Rewrite config chain tests to use public loadOptions API. (#6909)
This commit is contained in:
@@ -83,6 +83,8 @@ class OptionManager {
|
||||
delete options.plugins;
|
||||
delete options.presets;
|
||||
delete options.passPerPreset;
|
||||
delete options.ignore;
|
||||
delete options.only;
|
||||
|
||||
// "sourceMap" is just aliased to sourceMap, so copy it over as
|
||||
// we merge the options together.
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1 +0,0 @@
|
||||
root-ignore
|
||||
@@ -1,4 +0,0 @@
|
||||
{
|
||||
"plugins": ["root"],
|
||||
"extends": "./extended.babelrc.json"
|
||||
}
|
||||
@@ -18,4 +18,5 @@ seventeen.js
|
||||
eighteen.js
|
||||
nineteen.js
|
||||
twenty.js
|
||||
plugin.js
|
||||
|
||||
**/plugin.js
|
||||
|
||||
@@ -2,6 +2,8 @@ module.exports = function(api) {
|
||||
api.env();
|
||||
|
||||
return {
|
||||
comments: false,
|
||||
plugins: [
|
||||
require("./plugin"),
|
||||
],
|
||||
};
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = function() {
|
||||
return {};
|
||||
};
|
||||
@@ -1,3 +1,3 @@
|
||||
{
|
||||
comments: false,
|
||||
plugins: ["./plugin"],
|
||||
}
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
module.exports = function() {
|
||||
return {};
|
||||
};
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"babel": {
|
||||
"comments": false
|
||||
"plugins": ["./plugin"]
|
||||
}
|
||||
}
|
||||
|
||||
3
packages/babel-core/test/fixtures/config/complex-plugin-config/config-identity/pkg/plugin.js
vendored
Normal file
3
packages/babel-core/test/fixtures/config/complex-plugin-config/config-identity/pkg/plugin.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = function() {
|
||||
return {};
|
||||
};
|
||||
1
packages/babel-core/test/fixtures/config/config-files/.babelignore
vendored
Normal file
1
packages/babel-core/test/fixtures/config/config-files/.babelignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
# Placeholder so the monorepo ignore isn't accessed
|
||||
1
packages/babel-core/test/fixtures/config/config-files/babelignore/.babelignore
vendored
Normal file
1
packages/babel-core/test/fixtures/config/config-files/babelignore/.babelignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
src.js
|
||||
1
packages/babel-core/test/fixtures/config/config-files/babelrc-error/.babelrc
vendored
Normal file
1
packages/babel-core/test/fixtures/config/config-files/babelrc-error/.babelrc
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{45
|
||||
3
packages/babel-core/test/fixtures/config/config-files/babelrc-js-error/.babelrc.js
vendored
Normal file
3
packages/babel-core/test/fixtures/config/config-files/babelrc-js-error/.babelrc.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = function() {
|
||||
throw new Error("Babelrc threw an error");
|
||||
};
|
||||
3
packages/babel-core/test/fixtures/config/config-files/babelrc-js/.babelrc.js
vendored
Normal file
3
packages/babel-core/test/fixtures/config/config-files/babelrc-js/.babelrc.js
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
module.exports = {
|
||||
comments: true,
|
||||
};
|
||||
3
packages/babel-core/test/fixtures/config/config-files/babelrc/.babelrc
vendored
Normal file
3
packages/babel-core/test/fixtures/config/config-files/babelrc/.babelrc
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
comments: true,
|
||||
}
|
||||
1
packages/babel-core/test/fixtures/config/config-files/both-babelrc/.babelrc.js
vendored
Normal file
1
packages/babel-core/test/fixtures/config/config-files/both-babelrc/.babelrc.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = {};
|
||||
1
packages/babel-core/test/fixtures/config/config-files/pkg-babelrc-js/.babelrc.js
vendored
Normal file
1
packages/babel-core/test/fixtures/config/config-files/pkg-babelrc-js/.babelrc.js
vendored
Normal file
@@ -0,0 +1 @@
|
||||
module.exports = {};
|
||||
1
packages/babel-core/test/fixtures/config/config-files/pkg-babelrc/.babelrc
vendored
Normal file
1
packages/babel-core/test/fixtures/config/config-files/pkg-babelrc/.babelrc
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
3
packages/babel-core/test/fixtures/config/config-files/pkg-error/package.json
vendored
Normal file
3
packages/babel-core/test/fixtures/config/config-files/pkg-error/package.json
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"babel": {235
|
||||
}
|
||||
3
packages/babel-core/test/fixtures/config/config-files/pkg-ignored/.babelrc
vendored
Normal file
3
packages/babel-core/test/fixtures/config/config-files/pkg-ignored/.babelrc
vendored
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
comments: true,
|
||||
}
|
||||
1
packages/babel-core/test/fixtures/config/config-files/pkg-ignored/package.json
vendored
Normal file
1
packages/babel-core/test/fixtures/config/config-files/pkg-ignored/package.json
vendored
Normal file
@@ -0,0 +1 @@
|
||||
{}
|
||||
5
packages/babel-core/test/fixtures/config/config-files/pkg/package.json
vendored
Normal file
5
packages/babel-core/test/fixtures/config/config-files/pkg/package.json
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
{
|
||||
"babel": {
|
||||
"comments": true
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
"dir2"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,5 +0,0 @@
|
||||
|
||||
{
|
||||
"name": "application-name",
|
||||
"version": "0.0.1"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,11 +0,0 @@
|
||||
{
|
||||
"plugins": ["env-base"],
|
||||
"env": {
|
||||
"foo": {
|
||||
"plugins": ["env-foo"]
|
||||
},
|
||||
"bar": {
|
||||
"plugins": ["env-bar"]
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
"extended"
|
||||
]
|
||||
}
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
ignore: [
|
||||
"*",
|
||||
"!folder",
|
||||
],
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
# Blank .gitignore to ensure this directory exists.
|
||||
!.gitignore
|
||||
@@ -1,6 +0,0 @@
|
||||
{
|
||||
ignore: [
|
||||
"*",
|
||||
"!src.js",
|
||||
],
|
||||
}
|
||||
@@ -1,10 +0,0 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
var plugins = ["foo", "bar"];
|
||||
|
||||
exports.default = {
|
||||
plugins: plugins
|
||||
};
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,2 +0,0 @@
|
||||
throw new Error("Something bad happened!");
|
||||
module.exports = {}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1 +0,0 @@
|
||||
module.exports = '';
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1 +0,0 @@
|
||||
module.exports = null;
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,6 +0,0 @@
|
||||
var plugins = ["foo", "bar"];
|
||||
|
||||
module.exports = {
|
||||
extends: "../extended.babelrc.json",
|
||||
plugins: plugins
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,7 +0,0 @@
|
||||
module.exports = function(api) {
|
||||
api.cache(true);
|
||||
|
||||
return {
|
||||
compact: true,
|
||||
};
|
||||
};
|
||||
@@ -1,5 +0,0 @@
|
||||
var plugins = ["foo", "bar"];
|
||||
|
||||
module.exports = {
|
||||
plugins: plugins
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
"json"
|
||||
]
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
"js"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,5 +0,0 @@
|
||||
module.exports = {
|
||||
plugins: [
|
||||
"js"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,3 +0,0 @@
|
||||
{
|
||||
"bad: "json"
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
"json"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"plugins": [
|
||||
"json"
|
||||
]
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
@@ -1 +0,0 @@
|
||||
pkg-ignore
|
||||
@@ -1,7 +0,0 @@
|
||||
{
|
||||
"name": "application-name",
|
||||
"version": "0.0.1",
|
||||
"babel": {
|
||||
"plugins": ["pkg-plugin"]
|
||||
}
|
||||
}
|
||||
@@ -1 +0,0 @@
|
||||
// empty
|
||||
Reference in New Issue
Block a user