-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
fix(lifecycle): replace shell-quote with shlex #9695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR replaces the previous use of shell-quote with shlex for quoting command arguments, aligning dependency declarations and tests with the new library.
- Swapped imports and dependency entries from
shell-quote
toshlex
- Updated test expectations to match
shlex.join
behavior (removal of=
escaping) - Removed obsolete type packages and updated change log
Reviewed Changes
Copilot reviewed 9 out of 10 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
worker/src/index.ts | Replaced shell-quote import with shlex.join |
exec/lifecycle/src/runLifecycleHook.ts | Same import replacement for lifecycle hook quoting |
worker/package.json | Swapped dependency from shell-quote to shlex |
exec/lifecycle/package.json | Swapped dependency from shell-quote to shlex |
pnpm/test/run.ts | Adjusted regex for new quoting semantics |
exec/lifecycle/test/index.ts | Updated expected output to match shlex.join |
pnpm-workspace.yaml | Updated catalog entries to use shlex |
cspell.json | Added βshlexβ to the custom dictionary |
.changeset/tired-points-brake.md | Documented the migration to shlex |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
Comments suppressed due to low confidence (3)
worker/src/index.ts:11
- [nitpick] Aliasing
shlex.join
asshellQuote
can confuse readers. Rename the import alias to something likeshlexJoin
orjoinArgs
to better reflect its origin and purpose.
import { join as shellQuote } from 'shlex'
exec/lifecycle/src/runLifecycleHook.ts:9
- [nitpick] Update the surrounding comment or add a note to clarify that
shlex.join
is now used instead ofshell-quote
for argument quoting to keep docs accurate.
import { join as shellQuote } from 'shlex'
worker/package.json:46
- The new dependency
shlex
does not include TypeScript declarations. Consider adding@types/shlex
or bundling type definitions to prevent compilation errors.
"shlex": "catalog:"
IMO pnpm adds pnpm should care more about dependency security. |
It solves the bug. |
The version of shlex is locked in the lockfile. If it will have a new version, we can review it before upgrading. We also have |
fixes #9381