-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Compatibility: npm, yarn and pnpm run scripts #143
Conversation
EDIT sorry I read this as an issue, not a PR. Looking |
if (!isNPM) { | ||
// yarn | pnpm | ||
patterns = patterns.map((pattern) => { | ||
const match = ARGS_PATTERN.exec(pattern) |
Check failure
Code scanning / CodeQL
Polynomial regular expression used on uncontrolled data High
regular expression
library input
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #143 +/- ##
==========================================
- Coverage 96.82% 95.93% -0.89%
==========================================
Files 35 35
Lines 2080 2142 +62
==========================================
+ Hits 2014 2055 +41
- Misses 66 87 +21
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
This seems fine. Let's try it out. If this causes issues for anyone, please open an issue! |
@bcomnes Before this change, the following was working fine but is now broken:
…and then called via Am I missing something? |
Ok good to know. I'll revert and take a closer look at the change. |
I'm leaning to thinking this is probably a correct behavior change, but will likely need to go out in a breaking change. I didn't realize that earlier today. Sorry about that. Will take a closer look tomorrow and update tests to cover the breaking change. |
@ayu-exorcist can you clarify the problem more? What do you need to do right now to get it to work? What doesn't work in that arrangement? What will we need to break to implement your behavior? Specific examples are helpful. I'm trying to read upstream but your insight will be helpful here as well. |
Please change For NPM, |
@ayu-exorcist No, that does not work! |
@ayu-exorcist just to clarify I reverted this change in v6.2.2 for now. If it goes in it needs to be a breaking change. |
@bcomnes Yep, we need to have a provide unified command that is compatible with npm/yarn/pnpm double-dash. |
Ok reading through this again.
Here is my understanding:
Unfortunately this is the worst of all worlds. So the breaking change here would be:
I'm going to have to think this over a bit more, since in general as mentioned, pick one and adjust is generally the most pragmatic approach. Trying to support all 3 at once opens up a ton of edge cases to deal with. Also people using yarn and pnpm probably have opinions about adding |
@bcomnes @ayu-exorcist Not sure whether it’s any helpful but here’s the issue when using With the following in my
I then get this:
Note the literal |
Solved it! More see: RegExp/test in MDN |
Fix downstream issue: vuejs/create-vue#393
Related downstream PR: vuejs/create-vue#394
--
double dash behavior in npm/yarn/pnpm