Skip to content
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

refactor: minimist to parseargs #443

Merged
merged 5 commits into from
Feb 20, 2024
Merged

refactor: minimist to parseargs #443

merged 5 commits into from
Feb 20, 2024

Conversation

Yordan-Ramchev
Copy link
Contributor

@Yordan-Ramchev Yordan-Ramchev commented Feb 5, 2024

Pull Request

Description

  1. Remove minimist package from package.json
  2. index.ts > Migrate minimist related code to parseArgs
  3. Delete minimist from LICENSE.

Related Issue

re #168

Checklist

  • All existing tests pass
  • Code comments added/updated

Notes for Reviewers

  1. alias is not supported by parseArgs. It has short {string} A single character alias for the option, but it's not matching our case.
  2. strict is set to false because it will trigger a console error when an argument is passed that is not defined in the options.

Copy link
Member

@cexbrayat cexbrayat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I'll let @sodatea decides if he wants this or not.

Note: parseArgs was added in v16.17 and v18.3, but is experimental until v20 (https://nodejs.org/api/util.html#utilparseargsconfig)

Copy link
Member

@haoqunjiang haoqunjiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! It's really helpful.

Considering the parseArgs API is already stable in Node.js v20, I think it's safe to assume no breaking changes would ship to v18.x, so let's use it.

@haoqunjiang haoqunjiang merged commit f3f22cf into vuejs:main Feb 20, 2024
101 checks passed
@haoqunjiang haoqunjiang changed the title ref: minimist to parseargs refactor: minimist to parseargs Feb 20, 2024
@Yordan-Ramchev Yordan-Ramchev deleted the ref-minimist-to-parseargs branch February 20, 2024 08:46
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.

3 participants