Problem/Motivation
Current Node.js can parse command-line arguments with util.parseArgs().
Drupal core uses minimist for CSS building and some Nightwatch tests.
Some Nightwatch tests use minimist to specify theme from command-line arguments.
In /core/scripts/css/postcss-build.js which works CSS building, uses minimist to build a specific file or check script from command-line arguments.
I think Node.js native function seems to be enough for Drupal core.
Proposed resolution
Remove minimist from devDependencies in /core/package.json and use Node.js native util.parseArgs().
Note:
The minimist library is not removed from node_modules directory at this point because other libraries require minimist as a dependency.
Remaining tasks
User interface changes
No.
API changes
No.
Data model changes
No.
Release notes snippet
No.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 3481095-nr-bot.txt | 90 bytes | needs-review-queue-bot |
Issue fork drupal-3481095
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
tom kondaComment #4
tom kondaComment #5
tom kondaI found minimist was called in Nightwatch testing codes.
Need to fix these codes.
Comment #6
tom kondaComment #7
tom kondaComment #8
smustgrave commentedQuestion what's the pro of making this change since the dependency still exists?
Comment #9
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #10
larowlanAgree with #8 could we get the output from `npm ls minimist` or whatever the yarn equivalent is so we can ascertain why we still end up installing it.
I agree it is better to use the built in parseArgs regardless