Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Babel should not silently remove unknown options after command… (#10698)
* chore: add test case * chore: bump commander to 4.0.1 * fix: let commander.js throw on unknown options after args
- Loading branch information
1 parent
ce070ce
commit 7633f09
Showing
8 changed files
with
17 additions
and
1 deletion.
There are no files selected for viewing
This file contains 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
This file contains 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
1 change: 1 addition & 0 deletions
1
packages/babel-cli/test/fixtures/babel/error incorrect options after args/in-files/script.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
arr.map(x => x * MULTIPLIER); |
4 changes: 4 additions & 0 deletions
4
packages/babel-cli/test/fixtures/babel/error incorrect options after args/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"args": ["script.js", "--spruce-maps"], | ||
"stderrContains": true | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-cli/test/fixtures/babel/error incorrect options after args/stderr.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
error: unknown option '--spruce-maps' |
1 change: 1 addition & 0 deletions
1
...ages/babel-cli/test/fixtures/babel/error incorrect options before args/in-files/script.js
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
arr.map(x => x * MULTIPLIER); |
4 changes: 4 additions & 0 deletions
4
packages/babel-cli/test/fixtures/babel/error incorrect options before args/options.json
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
{ | ||
"args": ["--spruce-maps", "script.js"], | ||
"stderrContains": true | ||
} |
1 change: 1 addition & 0 deletions
1
packages/babel-cli/test/fixtures/babel/error incorrect options before args/stderr.txt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
error: unknown option '--spruce-maps' |