|
1 | 1 | # @taskless/cli |
2 | 2 |
|
| 3 | +## 0.10.3 |
| 4 | + |
| 5 | +### Patch Changes |
| 6 | + |
| 7 | +- db8adfa: Resolve the ast-grep binary without relying on an install-time step, and drop |
| 8 | + the `@ast-grep/cli` wrapper from what consumers install. |
| 9 | + - **The wrapper moves to `devDependencies`.** The seven `@ast-grep/cli-<platform>` |
| 10 | + packages were already declared in `optionalDependencies`, and the CLI already |
| 11 | + resolved them by path — the wrapper was a leftover whose only job is a |
| 12 | + `postinstall` that hardlinks the binary into itself so its `bin` entries work. |
| 13 | + Nothing here invoked those entries. Consumers now install only the platform |
| 14 | + package matching their host, and the wrapper's `postinstall` — which leaves a |
| 15 | + placeholder text file where the binary should be under `pnpm dlx`'s strict |
| 16 | + isolation — is out of the shipped product entirely. It stays as a |
| 17 | + `devDependency` because `fetch-ast-grep-schema` reads its version. |
| 18 | + - **Platform packages are pinned exactly at `0.41.0`.** They were carets, and the |
| 19 | + wrapper had been enforcing alignment implicitly by pinning its own |
| 20 | + `optionalDependencies`; without it, two hosts could resolve different ast-grep |
| 21 | + versions against the same rules and disagree about findings. Held at `0.41.0` |
| 22 | + rather than taking upstream's `0.45.0`, so this change stays structural. |
| 23 | + - **Binary resolution exhausts every candidate before failing.** It now searches |
| 24 | + the platform package, `node_modules/.bin`, then `sg` and `ast-grep` on `PATH`, |
| 25 | + and throws naming what it tried. Previously it returned a bare `"sg"` and let |
| 26 | + `spawn`'s `ENOENT` be the error, from a caller that could not say where it had |
| 27 | + looked. |
| 28 | + |
| 29 | + Alpine improves as a side effect: upstream publishes no musl build and marks its |
| 30 | + Linux packages `libc: ["glibc"]`, so today the wrapper's `postinstall` resolves a |
| 31 | + package that does not exist and exits 1, failing the install wherever dependency |
| 32 | + scripts run. Installing now succeeds and resolution falls through to `PATH`. |
| 33 | + |
3 | 34 | ## 0.10.2 |
4 | 35 |
|
5 | 36 | ### Patch Changes |
|
0 commit comments