Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: move to loadDescriptor catch clause
- Loading branch information
Showing
7 changed files
with
85 additions
and
41 deletions.
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
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
12 changes: 8 additions & 4 deletions
12
packages/babel-core/test/__snapshots__/option-manager.js.snap
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 |
---|---|---|
@@ -1,17 +1,21 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`option-manager config plugin/preset flattening and overriding should throw when an option is provided as a plugin 1`] = ` | ||
".plugin[1] is not a valid plugin. Maybe you meant to use | ||
"[BABEL] unknown: .plugin[1] is not a valid plugin. Maybe you meant to use | ||
\\"plugin\\": [ | ||
[\\"@babel/transform-react-jsx\\", {\\"useSpread\\":true}] | ||
[\\"./fixtures/option-manager/babel-plugin-foo\\", { | ||
\\"useSpread\\": true | ||
}] | ||
] | ||
To be a valid plugin, its name and options should be wrapped in a pair of brackets" | ||
`; | ||
|
||
exports[`option-manager config plugin/preset flattening and overriding should throw when an option is provided as a preset 1`] = ` | ||
".preset[1] is not a valid preset. Maybe you meant to use | ||
"[BABEL] unknown: .preset[1] is not a valid preset. Maybe you meant to use | ||
\\"preset\\": [ | ||
[\\"@babel/env\\", {\\"useBuiltIns\\":\\"entry\\"}] | ||
[\\"./fixtures/option-manager/babel-preset-bar\\", { | ||
\\"useBuiltIns\\": \\"entry\\" | ||
}] | ||
] | ||
To be a valid preset, its name and options should be wrapped in a pair of brackets" | ||
`; |
1 change: 1 addition & 0 deletions
1
packages/babel-core/test/fixtures/option-manager/babel-plugin-foo/index.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 @@ | ||
module.exports = () => ({}); |
1 change: 1 addition & 0 deletions
1
packages/babel-core/test/fixtures/option-manager/babel-preset-bar/index.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 @@ | ||
module.exports = () => ({}); |
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