Skip to content

fix(migrate): only rewrite launched command in cross-env scripts - #3616

Open
CoderSerio wants to merge 2 commits into
voidzero-dev:mainfrom
CoderSerio:fix/migrate-cross-env-command
Open

CoderSerio wants to merge 2 commits into
voidzero-dev:mainfrom
CoderSerio:fix/migrate-cross-env-command

Conversation

@CoderSerio

Copy link
Copy Markdown

rewrite_in_cross_env previously searched the entire SimpleCommand suffix for config.source_command (eslint / prettier). When eslint or prettier appeared as an argument to another command launched via cross-env (for example, cross-env NODE_ENV=test vitest run eslint or cross-env NODE_ENV=test echo eslint --cache), vp migrate rewrote the argument to vp lint / vp fmt and stripped subsequent flags.

Align rewrite_in_cross_env with rewrite_direct_pack_flags in the same module by locating the first non-KEY=VAL word after cross-env / cross-env-shell and rewriting only when that launched command itself matches config.source_command.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant