chore: upgrade nopt to v9 - #11021
#11021Open
nulllkomalll wants to merge 1 commit into
ember-cli:masterember-cli/ember-cli:masterfrom
nulllkomalll:upgrade-nopt-v9nulllkomalll/ember-cli:upgrade-nopt-v9Copy head branch name to clipboard
Open
chore: upgrade nopt to v9#11021nulllkomalll wants to merge 1 commit intoember-cli:masterember-cli/ember-cli:masterfrom nulllkomalll:upgrade-nopt-v9nulllkomalll/ember-cli:upgrade-nopt-v9Copy head branch name to clipboard
nulllkomalll wants to merge 1 commit into
ember-cli:masterember-cli/ember-cli:masterfrom
nulllkomalll:upgrade-nopt-v9nulllkomalll/ember-cli:upgrade-nopt-v9Copy head branch name to clipboard
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR upgrades the nopt dependency from v3.0.6 directly to v9.0.0.
Context & Motivation
Upgrading nopt has previously been a challenge due to a breaking change introduced in nopt v8 regarding how strings starting with dashes (e.g., --options "--split 2") are parsed. Previous attempts to fix this involved complex "masking" logic to preserve legacy behavior.
However, modern nopt versions have moved toward stricter, more standard CLI parsing for better predictability. This PR takes a "surgical" approach: instead of adding complexity to the source code, it updates the test suite to use standard string formats. This allows us to benefit from the latest nopt features and security updates while keeping the ember-cli codebase clean.
Changes
Dependency Update: Upgraded nopt to ^9.0.0 in package.json.
Test Refactor: Updated tests/unit/models/command-test.js to use a standard string ('split-2-random') for the parseArgs string-parsing test.
Lockfile: Updated pnpm-lock.yaml to reflect the new dependency tree.
Verification Results
I have verified this change against the core unit test suites on a Windows environment:
View Test Verification Screenshots
Command Model Tests (43 Passing)
CLI Unit Tests (84 Passing)
Related Issues
noptto v9 #10907.