-
Notifications
You must be signed in to change notification settings - Fork 31.1k
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
src: add --run-from
flag
#57592
base: main
Are you sure you want to change the base?
src: add --run-from
flag
#57592
Conversation
Review requested:
|
Closes nodejs#57489 Signed-off-by: flakey5 <[email protected]> Co-authored-by: Mert Can Altin <[email protected]> Co-authored-by: Yagiz Nizipli <[email protected]>
Signed-off-by: flakey5 <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #57592 +/- ##
==========================================
- Coverage 90.23% 90.23% -0.01%
==========================================
Files 630 630
Lines 185149 185065 -84
Branches 36235 36222 -13
==========================================
- Hits 167066 166989 -77
- Misses 11037 11046 +9
+ Partials 7046 7030 -16
🚀 New features to boost your workflow:
|
Is this a duplicate of #57523? |
@pmarchini ... it is a simpler alternative to #57523. @flakey5 had started working on it before #57523 was opened based on the discussion in the original issue. |
The
notable-change
Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section. |
Co-authored-by: Geoffrey Booth <[email protected]>
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.
LGTM! Left a minor comment, that might lead to misunderstandings on the expected behavior, but besides that, cool stuff!
Signed-off-by: flakey5 <[email protected]>
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.
LGTM 🚀
doc/api/cli.md
Outdated
Run a `package.json` script from a specified path to a `package.json` file or | ||
path to the containing folder of a `package.json` file. | ||
|
||
The script is run from the directory of the `package.json` file. |
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.
I think this is not entirely correct, as you can also path a subdirectory.
For example, if the package.json
is in /some/path/package.json
, you can use --run-from=/some/path/deeper/path
and it will still work, right?
Wouldn't it be simpler for everything (documentation, implementation, users), if this only supported a path to a folder and said that it will look for the closest package.json
in the hierarchy?
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.
I don't believe it does parent traversal search 🤔
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 does parent traversal path
Signed-off-by: flakey5 <[email protected]>
Co-authored-by: James M Snell <[email protected]>
I think this change is generally ready to go but due to some ongoing maintenance issues with CI we are restricted from running jenkins CI on this PR just yet. Once that is opened back up we can run CI and get this merged. |
Closes #57489
This differs from #57523 in that this changes the working directory that the script is executed from.