Repository navigation
refactor(migrate): reuse native shell parsing for literal commands - #3138
Conversation
CLI artifact sizes (
|
| Artifact | Format | Base | PR | Change |
|---|---|---|---|---|
packages/cli/dist |
Directory total | 2.15 MiB | 2.14 MiB | -2.09 KiB (-0.10%) |
packages/core/dist |
Directory total | 4.08 MiB | 4.08 MiB | 0 B (0.00%) |
| Combined package dist | Directory total | 6.23 MiB | 6.23 MiB | -2.09 KiB (-0.03%) |
vp (Linux x64) |
Binary | 7.22 MiB | 7.22 MiB | 0 B (0.00%) |
vp (Linux x64) |
gzip -9 | 3.35 MiB | 3.35 MiB | 0 B (0.00%) |
| NAPI (Linux x64) | Binary | 35.13 MiB | 35.14 MiB | +16.00 KiB (+0.04%) |
| NAPI (Linux x64) | gzip -9 | 14.00 MiB | 14.01 MiB | +12.08 KiB (+0.08%) |
vp (macOS ARM64) |
Binary | 4.77 MiB | 4.77 MiB | 0 B (0.00%) |
vp (macOS ARM64) |
gzip -9 | 2.87 MiB | 2.87 MiB | 0 B (0.00%) |
| NAPI (macOS ARM64) | Binary | 42.00 MiB | 42.01 MiB | +16.14 KiB (+0.04%) |
| NAPI (macOS ARM64) | gzip -9 | 18.15 MiB | 18.16 MiB | +13.21 KiB (+0.07%) |
vp (Windows x64) |
Binary | 5.27 MiB | 5.27 MiB | 0 B (0.00%) |
vp (Windows x64) |
gzip -9 | 2.46 MiB | 2.46 MiB | 0 B (0.00%) |
| NAPI (Windows x64) | Binary | 31.19 MiB | 31.20 MiB | +13.50 KiB (+0.04%) |
| NAPI (Windows x64) | gzip -9 | 12.71 MiB | 12.72 MiB | +3.42 KiB (+0.03%) |
| Trampoline (Windows x64) | Binary | 13.50 KiB | 13.50 KiB | 0 B (0.00%) |
| Trampoline (Windows x64) | gzip -9 | 7.09 KiB | 7.09 KiB | +1 B (+0.01%) |
| Installer (Windows x64) | Binary | 3.64 MiB | 3.64 MiB | 0 B (0.00%) |
| Installer (Windows x64) | gzip -9 | 1.78 MiB | 1.78 MiB | -1 B (-0.00%) |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://refactor-native-shell-command-viteplus-dev.voidzero-docs.workers.dev (commit 31f6841)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
Git hooks and Vitest migrations use a separate TypeScript shell parser. This duplicates native parsing and can produce different quoting and command boundaries.
Both migrations now call
parseLiteralCommandsdirectly through the native binding. It uses the existing Bash syntax tree and returnsUTF-16offsets to preserve quotes and spacing. The TypeScript parser file is removed. Shared migration helpers define package-manager wrappers and shell-state commands.Native script rewrites also share their parsing, command traversal, and output formatting steps. Each caller retains its rules for environment overrides, directory changes, and migration flags.
Fixes #3136.