@babel/core
Advanced tools
Comparing version 7.0.0-beta.39 to 7.0.0-beta.40
@@ -91,3 +91,2 @@ "use strict"; | ||
this._pairs = []; | ||
this._data = void 0; | ||
this._data = data; | ||
@@ -94,0 +93,0 @@ } |
@@ -63,3 +63,3 @@ "use strict"; | ||
function buildRootChain(cwd, opts, context) { | ||
function buildRootChain(opts, context) { | ||
var programmaticChain = loadProgrammaticChain({ | ||
@@ -74,12 +74,13 @@ options: opts, | ||
var _filename = context.filename; | ||
var babelignoreFile = (0, _files.findBabelignore)(_filename); | ||
if (babelignoreFile && shouldIgnore(context, babelignoreFile.ignore, null, babelignoreFile.dirname)) { | ||
var _findRelativeConfig = (0, _files.findRelativeConfig)(_filename, context.envName), | ||
ignore = _findRelativeConfig.ignore, | ||
config = _findRelativeConfig.config; | ||
if (ignore && shouldIgnore(context, ignore.ignore, null, ignore.dirname)) { | ||
return null; | ||
} | ||
var babelrcFile = (0, _files.findBabelrc)(_filename, context.envName); | ||
if (babelrcFile) { | ||
var result = loadFileChain(babelrcFile, context); | ||
if (config) { | ||
var result = loadFileChain(config, context); | ||
if (!result) return null; | ||
@@ -86,0 +87,0 @@ mergeChain(fileChain, result); |
"use strict"; | ||
exports.__esModule = true; | ||
exports.findBabelrc = findBabelrc; | ||
exports.findBabelignore = findBabelignore; | ||
exports.findRelativeConfig = findRelativeConfig; | ||
exports.loadConfig = loadConfig; | ||
@@ -28,3 +27,6 @@ | ||
function findBabelrc(filepath, envName) { | ||
function findRelativeConfig(filepath, envName) { | ||
var config = null; | ||
var ignore = null; | ||
var dirname = _path.default.dirname(filepath); | ||
@@ -35,41 +37,28 @@ | ||
while (true) { | ||
var conf = [BABELRC_FILENAME, BABELRC_JS_FILENAME, PACKAGE_FILENAME].reduce(function (previousConfig, name) { | ||
var filepath = _path.default.join(loc, name); | ||
if (!config) { | ||
config = [BABELRC_FILENAME, BABELRC_JS_FILENAME, PACKAGE_FILENAME].reduce(function (previousConfig, name) { | ||
var filepath = _path.default.join(loc, name); | ||
var config = readConfig(filepath, envName); | ||
var config = readConfig(filepath, envName); | ||
if (config && previousConfig) { | ||
throw new Error("Multiple configuration files found. Please remove one:\n" + (" - " + _path.default.basename(previousConfig.filepath) + "\n") + (" - " + name + "\n") + ("from " + loc)); | ||
} | ||
if (config && previousConfig) { | ||
throw new Error("Multiple configuration files found. Please remove one:\n" + (" - " + _path.default.basename(previousConfig.filepath) + "\n") + (" - " + name + "\n") + ("from " + loc)); | ||
} | ||
return config || previousConfig; | ||
}, null); | ||
return config || previousConfig; | ||
}, null); | ||
if (conf) { | ||
debug("Found configuration %o from %o.", conf.filepath, dirname); | ||
return conf; | ||
if (config) { | ||
debug("Found configuration %o from %o.", config.filepath, dirname); | ||
} | ||
} | ||
var nextLoc = _path.default.dirname(loc); | ||
if (!ignore) { | ||
var ignoreLoc = _path.default.join(loc, BABELIGNORE_FILENAME); | ||
if (loc === nextLoc) break; | ||
loc = nextLoc; | ||
} | ||
ignore = readIgnoreConfig(ignoreLoc); | ||
return null; | ||
} | ||
function findBabelignore(filepath) { | ||
var dirname = _path.default.dirname(filepath); | ||
var loc = dirname; | ||
while (true) { | ||
var ignoreLoc = _path.default.join(loc, BABELIGNORE_FILENAME); | ||
var _ignore = readIgnoreConfig(ignoreLoc); | ||
if (_ignore) { | ||
debug("Found ignore %o from %o.", _ignore.filepath, dirname); | ||
return _ignore; | ||
if (ignore) { | ||
debug("Found ignore %o from %o.", ignore.filepath, dirname); | ||
} | ||
} | ||
@@ -83,3 +72,6 @@ | ||
return null; | ||
return { | ||
config: config, | ||
ignore: ignore | ||
}; | ||
} | ||
@@ -86,0 +78,0 @@ |
"use strict"; | ||
exports.__esModule = true; | ||
exports.findBabelrc = findBabelrc; | ||
exports.findBabelignore = findBabelignore; | ||
exports.findRelativeConfig = findRelativeConfig; | ||
exports.loadConfig = loadConfig; | ||
@@ -12,10 +11,9 @@ exports.resolvePlugin = resolvePlugin; | ||
function findBabelrc(filepath, envName) { | ||
return null; | ||
function findRelativeConfig(filepath, envName) { | ||
return { | ||
config: null, | ||
ignore: null | ||
}; | ||
} | ||
function findBabelignore(filepath) { | ||
return null; | ||
} | ||
function loadConfig(name, dirname) { | ||
@@ -22,0 +20,0 @@ throw new Error("Cannot load " + name + " relative to " + dirname + " in a browser"); |
@@ -50,3 +50,3 @@ "use strict"; | ||
}; | ||
var configChain = (0, _configChain.buildRootChain)(absoluteCwd, args, context); | ||
var configChain = (0, _configChain.buildRootChain)(args, context); | ||
if (!configChain) return null; | ||
@@ -53,0 +53,0 @@ var optionDefaults = {}; |
@@ -7,10 +7,2 @@ "use strict"; | ||
var Plugin = function Plugin(plugin, options, key) { | ||
this.key = void 0; | ||
this.manipulateOptions = void 0; | ||
this.post = void 0; | ||
this.pre = void 0; | ||
this.visitor = void 0; | ||
this.parserOverride = void 0; | ||
this.generatorOverride = void 0; | ||
this.options = void 0; | ||
this.key = plugin.name || key; | ||
@@ -17,0 +9,0 @@ this.manipulateOptions = plugin.manipulateOptions; |
@@ -110,2 +110,4 @@ "use strict"; | ||
function assertConfigApplicableTest(key, value) { | ||
if (value === undefined) return value; | ||
if (Array.isArray(value)) { | ||
@@ -112,0 +114,0 @@ value.forEach(function (item, i) { |
@@ -6,3 +6,3 @@ "use strict"; | ||
var _config = _interopRequireWildcard(require("./config")); | ||
var _config = _interopRequireDefault(require("./config")); | ||
@@ -15,4 +15,2 @@ var _normalizeFile = _interopRequireDefault(require("./transformation/normalize-file")); | ||
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } } | ||
function parse(code, opts) { | ||
@@ -19,0 +17,0 @@ var config = (0, _config.default)(opts); |
@@ -34,7 +34,5 @@ "use strict"; | ||
this._map = new Map(); | ||
this.opts = void 0; | ||
this.declarations = {}; | ||
this.path = null; | ||
this.ast = {}; | ||
this.scope = void 0; | ||
this.metadata = {}; | ||
@@ -41,0 +39,0 @@ this.hub = new _traverse.Hub(this); |
@@ -121,3 +121,2 @@ "use strict"; | ||
if (loc) { | ||
err.loc = null; | ||
var codeFrame = (0, _codeFrame.codeFrameColumns)(code, { | ||
@@ -135,2 +134,4 @@ start: { | ||
} | ||
err.code = "BABEL_PARSE_ERROR"; | ||
} | ||
@@ -137,0 +138,0 @@ |
@@ -9,6 +9,2 @@ "use strict"; | ||
this._map = new Map(); | ||
this.key = void 0; | ||
this.file = void 0; | ||
this.opts = void 0; | ||
this.filename = void 0; | ||
this.key = key; | ||
@@ -15,0 +11,0 @@ this.file = file; |
{ | ||
"name": "@babel/core", | ||
"version": "7.0.0-beta.39", | ||
"version": "7.0.0-beta.40", | ||
"description": "Babel compiler core.", | ||
@@ -31,9 +31,9 @@ "main": "./lib/index.js", | ||
"dependencies": { | ||
"@babel/code-frame": "7.0.0-beta.39", | ||
"@babel/generator": "7.0.0-beta.39", | ||
"@babel/helpers": "7.0.0-beta.39", | ||
"@babel/template": "7.0.0-beta.39", | ||
"@babel/traverse": "7.0.0-beta.39", | ||
"@babel/types": "7.0.0-beta.39", | ||
"babylon": "7.0.0-beta.39", | ||
"@babel/code-frame": "7.0.0-beta.40", | ||
"@babel/generator": "7.0.0-beta.40", | ||
"@babel/helpers": "7.0.0-beta.40", | ||
"@babel/template": "7.0.0-beta.40", | ||
"@babel/traverse": "7.0.0-beta.40", | ||
"@babel/types": "7.0.0-beta.40", | ||
"babylon": "7.0.0-beta.40", | ||
"convert-source-map": "^1.1.0", | ||
@@ -48,5 +48,5 @@ "debug": "^3.0.1", | ||
"devDependencies": { | ||
"@babel/helper-transform-fixture-test-runner": "7.0.0-beta.39", | ||
"@babel/register": "7.0.0-beta.39" | ||
"@babel/helper-transform-fixture-test-runner": "7.0.0-beta.40", | ||
"@babel/register": "7.0.0-beta.40" | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116344
2852
+ Added@babel/code-frame@7.0.0-beta.40(transitive)
+ Added@babel/generator@7.0.0-beta.40(transitive)
+ Added@babel/helper-function-name@7.0.0-beta.40(transitive)
+ Added@babel/helper-get-function-arity@7.0.0-beta.40(transitive)
+ Added@babel/helpers@7.0.0-beta.40(transitive)
+ Added@babel/highlight@7.0.0-beta.40(transitive)
+ Added@babel/template@7.0.0-beta.40(transitive)
+ Added@babel/traverse@7.0.0-beta.40(transitive)
+ Added@babel/types@7.0.0-beta.40(transitive)
+ Addedbabylon@7.0.0-beta.40(transitive)
- Removed@babel/code-frame@7.0.0-beta.39(transitive)
- Removed@babel/generator@7.0.0-beta.39(transitive)
- Removed@babel/helper-function-name@7.0.0-beta.39(transitive)
- Removed@babel/helper-get-function-arity@7.0.0-beta.39(transitive)
- Removed@babel/helpers@7.0.0-beta.39(transitive)
- Removed@babel/template@7.0.0-beta.39(transitive)
- Removed@babel/traverse@7.0.0-beta.39(transitive)
- Removed@babel/types@7.0.0-beta.39(transitive)
- Removedbabylon@7.0.0-beta.39(transitive)
Updated@babel/helpers@7.0.0-beta.40
Updated@babel/types@7.0.0-beta.40
Updatedbabylon@7.0.0-beta.40