-
Notifications
You must be signed in to change notification settings - Fork 108
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
Support node --run #1169
Support node --run #1169
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.
Nice!
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.
🎉
README.md
Outdated
between arguments intended for `node`, `wireit`, and the script itself: | ||
|
||
```sh | ||
node --run build -- -- --verbose |
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.
It might be more clear to add a small template of who's args go where. Maybe something like:
node {node args} --run <script> -- {script args} -- {wireit args}
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.
Good idea, added general forms for npm
and node --run
.
Adds support for the new
node --run
feature which is available starting in Node 22 (basicallynpm run
but faster, see https://nodejs.org/en/blog/announcements/v22-release-announce#running-packagejson-scripts and https://www.yagiz.co/developing-fast-builtin-task-runner/).Note that
node --run
is stricter than the other runners when it comes to distinguishing between arguments for the runner vs the script, so an additional--
is needed to set wireit flags and script flags (explained in the README).Thank you very much to @anonrig for adding the environment variables this required (nodejs/node#53032, nodejs/node#53058) and @justinfagnani for filing the issue (nodejs/node#52673)!
There is a problem with recursive invocations on Windows that I believe is a Node bug but need to double-check, tracking at #1168.
Fixes #1094
Reviewer: the "Refactor tests a bit" commit is pretty noisy, but you can take my word it's a no-op :)