# sh-syntax ## 0.6.0 ### Minor Changes - [#136](https://github.com/un-ts/sh-syntax/pull/136) [`ecd5eb7`](https://github.com/un-ts/sh-syntax/commit/ecd5eb71a3ba47862b183746f15ca52d410d2272) Thanks [@jjloneman](https://github.com/jjloneman)! - Add zsh dialect support by rebuilding the WASM against a newer `mvdan/sh`: - Rebuild `main.wasm` against `mvdan/sh` v3.13.1 (was v3.11.0) and expose the `zsh` `LangVariant`. - Valid zsh such as `${0:A:h:h}` now parses and prints instead of erroring with `ternary operator missing ? before :`. **Breaking:** `LangVariant` is now a bit-flag enum (`1 << iota`) to match `mvdan/sh` v3.13, so every numeric value changed. Code using the exported `LangVariant` constants is unaffected; only code passing raw variant numbers needs updating: - `LangBash`: `0` → `1` - `LangPOSIX`: `1` → `2` - `LangMirBSDKorn`: `2` → `4` - `LangBats`: `3` → `8` - `LangZsh`: _(new)_ → `16` - `LangAuto`: `4` → `32` ### Patch Changes - [#138](https://github.com/un-ts/sh-syntax/pull/138) [`2aa922b`](https://github.com/un-ts/sh-syntax/commit/2aa922bcfe789ee6f0f19ecb44e623a2c3ab1fb9) Thanks [@JounQin](https://github.com/JounQin)! - Fix `File.Stmts` JSON field name to match the `mvdan/sh` syntax library, correcting a serialization mismatch between the WASM runtime and TypeScript types. - [#139](https://github.com/un-ts/sh-syntax/pull/139) [`eea166d`](https://github.com/un-ts/sh-syntax/commit/eea166d9150ae488cb1c3c2a29f40d2098f96dba) Thanks [@JounQin](https://github.com/JounQin)! - Remove unused `tslib` from dependencies. ## 0.5.8 ### Patch Changes - [#124](https://github.com/un-ts/sh-syntax/pull/124) [`a000d0a`](https://github.com/un-ts/sh-syntax/commit/a000d0a4aa3642d3cd29b1f1c27c7fd05427dcde) Thanks [@JounQin](https://github.com/JounQin)! - fix: remove buggy `module-sync` exports field ## 0.5.7 ### Patch Changes - [#119](https://github.com/un-ts/sh-syntax/pull/119) [`7c19ba8`](https://github.com/un-ts/sh-syntax/commit/7c19ba840f160428cbb163b28cfb46aa09d12170) Thanks [@JounQin](https://github.com/JounQin)! - fix(types): node `Buffer` should be supported ## 0.5.6 ### Patch Changes - [`5636672`](https://github.com/un-ts/sh-syntax/commit/5636672233a01ae51eeef4cebf156237971a1da1) Thanks [@JounQin](https://github.com/JounQin)! - chore: remove `browser` entry ## 0.5.5 ### Patch Changes - [#114](https://github.com/un-ts/sh-syntax/pull/114) [`c500f6d`](https://github.com/un-ts/sh-syntax/commit/c500f6dfd9e12370904dcf00917a53363491d77f) Thanks [@JounQin](https://github.com/JounQin)! - feat: support more ways to load `wasm` on browser ## 0.5.4 ### Patch Changes - [#111](https://github.com/un-ts/sh-syntax/pull/111) [`8b93f9a`](https://github.com/un-ts/sh-syntax/commit/8b93f9a3ed8297ec32256b9dfcec8ecf651d3ac7) Thanks [@JounQin](https://github.com/JounQin)! - fix: increase memory usage ## 0.5.3 ### Patch Changes - [#109](https://github.com/un-ts/sh-syntax/pull/109) [`e55d939`](https://github.com/un-ts/sh-syntax/commit/e55d939ab5ccf7d33ba13682a7ea553a994f8ae4) Thanks [@JounQin](https://github.com/JounQin)! - fix: block style comments are required for jsdoc ## 0.5.2 ### Patch Changes - [#107](https://github.com/un-ts/sh-syntax/pull/107) [`3152cd3`](https://github.com/un-ts/sh-syntax/commit/3152cd3debf4bc01eae1bd914aaaa905a4c8f975) Thanks [@JounQin](https://github.com/JounQin)! - feat: add new `LangVariant` option `LangAuto` although it's unsupported ## 0.5.1 ### Patch Changes - [#104](https://github.com/un-ts/sh-syntax/pull/104) [`ece2ff4`](https://github.com/un-ts/sh-syntax/commit/ece2ff4e852a34c38a2f1eef1222a63b7b5c11a0) Thanks [@JounQin](https://github.com/JounQin)! - feat: add new options `recoverErrors` and `singleLine` support ## 0.5.0 ### Minor Changes - [#97](https://github.com/un-ts/sh-syntax/pull/97) [`28d68ba`](https://github.com/un-ts/sh-syntax/commit/28d68ba10e72fa2e87afbae43949f39a03562e18) Thanks [@JounQin](https://github.com/JounQin)! - chore: housekeeping, bump `mvdan/sh` and `easyjson` deps, upgrade `go` to `v1.23` ### Patch Changes - [#97](https://github.com/un-ts/sh-syntax/pull/97) [`28d68ba`](https://github.com/un-ts/sh-syntax/commit/28d68ba10e72fa2e87afbae43949f39a03562e18) Thanks [@JounQin](https://github.com/JounQin)! - fix: incorrect typing for `cjs` entry ## 0.4.2 ### Patch Changes - [#85](https://github.com/un-ts/sh-syntax/pull/85) [`e2d3165`](https://github.com/un-ts/sh-syntax/commit/e2d3165e90cf6728a1d986d8cbc38af8404fdb71) Thanks [@JounQin](https://github.com/JounQin)! - feat(deps): bump `mvdan/sh` and `tinygo` ## 0.4.1 ### Patch Changes - [`5760ee9`](https://github.com/un-ts/sh-syntax/commit/5760ee92111726ee2716000ca9e6a82e17d66e77) Thanks [@JounQin](https://github.com/JounQin)! - fix: better LangVariant typing for compatibility with mvdan-sh ## 0.4.0 ### Minor Changes - [`e13b13a`](https://github.com/un-ts/sh-syntax/commit/e13b13a93701f97268cb2c53cac67ab3b7a9ef30) Thanks [@JounQin](https://github.com/JounQin)! - fix: add a trailing 0 for bytes, this should fix several known issues feat: drop node 14 support ## 0.3.7 ### Patch Changes - [#52](https://github.com/un-ts/sh-syntax/pull/52) [`487fee4`](https://github.com/un-ts/sh-syntax/commit/487fee4b77c91e1e8c36dc979bbb94b340364d55) Thanks [@jlarmstrongiv](https://github.com/jlarmstrongiv)! - fix: check property existence before patching ## 0.3.6 ### Patch Changes - [`6c23285`](https://github.com/un-ts/sh-syntax/commit/6c23285060e8674b31d64479b1c4468e04fab557) Thanks [@JounQin](https://github.com/JounQin)! - chore: migrate to un-ts org * [`ddf06b0`](https://github.com/un-ts/sh-syntax/commit/ddf06b035e32f6e4f83b253a5c61335021d9d144) Thanks [@JounQin](https://github.com/JounQin)! - chore: add donate and funding fields ## 0.3.5 ### Patch Changes - [#42](https://github.com/rx-ts/sh-syntax/pull/42) [`de46f55`](https://github.com/rx-ts/sh-syntax/commit/de46f557f99d6ab90108852793843e513c0d77f8) Thanks [@JounQin](https://github.com/JounQin)! - fix: print error for workaround ## 0.3.4 ### Patch Changes - [#40](https://github.com/rx-ts/sh-syntax/pull/40) [`fb92edf`](https://github.com/rx-ts/sh-syntax/commit/fb92edf1403aa87521aff2070522156edb580eab) Thanks [@JounQin](https://github.com/JounQin)! - fix: do not panic, return the error instead ## 0.3.3 ### Patch Changes - [#38](https://github.com/rx-ts/sh-syntax/pull/38) [`44ee9f9`](https://github.com/rx-ts/sh-syntax/commit/44ee9f9b274828a1dab167294a353170d1172e72) Thanks [@JounQin](https://github.com/JounQin)! - fix: print error info before panic ## 0.3.2 ### Patch Changes - [`6193518`](https://github.com/rx-ts/sh-syntax/commit/6193518c33f75f3d3d3c8284a436940f0efd1fa4) Thanks [@JounQin](https://github.com/JounQin)! - chore(deps): upgrade sh v3.5.1 and tinygo v0.23.0 ## 0.3.1 ### Patch Changes - [`2645131`](https://github.com/rx-ts/sh-syntax/commit/2645131e8727b3a5c07efb58b0b0e28cfed5e2d8) Thanks [@JounQin](https://github.com/JounQin)! - fix: add main.wasm into exports ## 0.3.0 ### Minor Changes - [#26](https://github.com/rx-ts/sh-syntax/pull/26) [`7ed3de3`](https://github.com/rx-ts/sh-syntax/commit/7ed3de30d24fe1c16a9427f848b7a5e36774df1d) Thanks [@JounQin](https://github.com/JounQin)! - feat: upgrade go 1.18 and deps * [#26](https://github.com/rx-ts/sh-syntax/pull/26) [`7ed3de3`](https://github.com/rx-ts/sh-syntax/commit/7ed3de30d24fe1c16a9427f848b7a5e36774df1d) Thanks [@JounQin](https://github.com/JounQin)! - feat: print with text directly ## 0.2.1 ### Patch Changes - [`04be352`](https://github.com/rx-ts/sh-syntax/commit/04be352916ec9527d39b07ca7ad3c41a203d9f9e) Thanks [@JounQin](https://github.com/JounQin)! - fix: types field should always come first ## 0.2.0 ### Minor Changes - [`d81883f`](https://github.com/rx-ts/sh-syntax/commit/d81883f20437f2259cdc5ef9f1c0b9f11269c59f) Thanks [@JounQin](https://github.com/JounQin)! - feat: use tinygo to decrease wasm file size ## 0.1.4 ### Patch Changes - [#15](https://github.com/rx-ts/sh-syntax/pull/15) [`174f66c`](https://github.com/rx-ts/sh-syntax/commit/174f66c58174006b2e6ec82a0591e645c1bc5650) Thanks [@JounQin](https://github.com/JounQin)! - fix: use global Go to store text due to go.argv limitation ## 0.1.3 ### Patch Changes - [`b652c1a`](https://github.com/rx-ts/sh-syntax/commit/b652c1ac86073f00773ff925c0bc42bd368f1419) Thanks [@JounQin](https://github.com/JounQin)! - fix: add main/module field for compatibility ## 0.1.2 ### Patch Changes - [`af7c8ad`](https://github.com/rx-ts/sh-syntax/commit/af7c8ad0df82424854669e4fbbddcc35a84d87bb) Thanks [@JounQin](https://github.com/JounQin)! - fix: do not stringify ast for now ## 0.1.1 ### Patch Changes - [#11](https://github.com/rx-ts/sh-syntax/pull/11) [`19e755d`](https://github.com/rx-ts/sh-syntax/commit/19e755d4600bb6b60dc6733506296d80283cd3b3) Thanks [@JounQin](https://github.com/JounQin)! - feat: use nanoid as uid ## 0.1.0 ### Minor Changes - [#8](https://github.com/rx-ts/sh-syntax/pull/8) [`c3c9aaa`](https://github.com/rx-ts/sh-syntax/commit/c3c9aaa050b777afe603f4fedfce035eb569944a) Thanks [@JounQin](https://github.com/JounQin)! - feat: support parse as AST ## 0.0.2 ### Patch Changes - [#6](https://github.com/rx-ts/sh-syntax/pull/6) [`3ed45c3`](https://github.com/rx-ts/sh-syntax/commit/3ed45c37d2278043e7847d837155a35014c4e7b9) Thanks [@JounQin](https://github.com/JounQin)! - feat: add parse error details ## 0.0.1 ### Patch Changes - [#4](https://github.com/rx-ts/sh-syntax/pull/4) [`047bd6b`](https://github.com/rx-ts/sh-syntax/commit/047bd6bd70707e8f5c33d98922669bc3b9324cc2) Thanks [@JounQin](https://github.com/JounQin)! - fix: support usage in browser