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
This commit is contained in:
committed by
Nicolò Ribaudo
parent
ce070ce422
commit
7633f09479
1
packages/babel-cli/test/fixtures/babel/error incorrect options after args/in-files/script.js
vendored
Normal file
1
packages/babel-cli/test/fixtures/babel/error incorrect options after args/in-files/script.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
arr.map(x => x * MULTIPLIER);
|
||||
4
packages/babel-cli/test/fixtures/babel/error incorrect options after args/options.json
vendored
Normal file
4
packages/babel-cli/test/fixtures/babel/error incorrect options after args/options.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"args": ["script.js", "--spruce-maps"],
|
||||
"stderrContains": true
|
||||
}
|
||||
1
packages/babel-cli/test/fixtures/babel/error incorrect options after args/stderr.txt
vendored
Normal file
1
packages/babel-cli/test/fixtures/babel/error incorrect options after args/stderr.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
error: unknown option '--spruce-maps'
|
||||
@@ -0,0 +1 @@
|
||||
arr.map(x => x * MULTIPLIER);
|
||||
4
packages/babel-cli/test/fixtures/babel/error incorrect options before args/options.json
vendored
Normal file
4
packages/babel-cli/test/fixtures/babel/error incorrect options before args/options.json
vendored
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"args": ["--spruce-maps", "script.js"],
|
||||
"stderrContains": true
|
||||
}
|
||||
1
packages/babel-cli/test/fixtures/babel/error incorrect options before args/stderr.txt
vendored
Normal file
1
packages/babel-cli/test/fixtures/babel/error incorrect options before args/stderr.txt
vendored
Normal file
@@ -0,0 +1 @@
|
||||
error: unknown option '--spruce-maps'
|
||||
Reference in New Issue
Block a user