@babel/core
Advanced tools
@@ -49,4 +49,5 @@ "use strict"; | ||
| const BABEL_PRESET_ORG_RE = /^(@babel\/)(?!preset-|[^/]+\/)/; | ||
| const OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?!babel-plugin-|[^/]+\/)/; | ||
| const OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?!babel-preset-|[^/]+\/)/; | ||
| const OTHER_PLUGIN_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?!babel-plugin(?:-|\/|$)|[^/]+\/)/; | ||
| const OTHER_PRESET_ORG_RE = /^(@(?!babel\/)[^/]+\/)(?!babel-preset(?:-|\/|$)|[^/]+\/)/; | ||
| const OTHER_ORG_DEFAULT_RE = /^(@(?!babel$)[^/]+)$/; | ||
@@ -94,3 +95,3 @@ function resolvePlugin(name, dirname) { | ||
| const isPreset = type === "preset"; | ||
| return name.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, `babel-${type}-`).replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, `$1${type}-`).replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, `$1babel-${type}-`).replace(EXACT_RE, ""); | ||
| return name.replace(isPreset ? BABEL_PRESET_PREFIX_RE : BABEL_PLUGIN_PREFIX_RE, `babel-${type}-`).replace(isPreset ? BABEL_PRESET_ORG_RE : BABEL_PLUGIN_ORG_RE, `$1${type}-`).replace(isPreset ? OTHER_PRESET_ORG_RE : OTHER_PLUGIN_ORG_RE, `$1babel-${type}-`).replace(OTHER_ORG_DEFAULT_RE, `$1/babel-${type}`).replace(EXACT_RE, ""); | ||
| } | ||
@@ -97,0 +98,0 @@ |
@@ -8,2 +8,12 @@ "use strict"; | ||
| function _path() { | ||
| const data = _interopRequireDefault(require("path")); | ||
| _path = function () { | ||
| return data; | ||
| }; | ||
| return data; | ||
| } | ||
| function _debug() { | ||
@@ -74,29 +84,36 @@ const data = _interopRequireDefault(require("debug")); | ||
| if (options.inputSourceMap !== false) { | ||
| try { | ||
| inputMap = _convertSourceMap().default.fromSource(code); | ||
| if (typeof options.inputSourceMap === "object") { | ||
| inputMap = _convertSourceMap().default.fromObject(options.inputSourceMap); | ||
| } | ||
| if (inputMap) { | ||
| if (!inputMap) { | ||
| try { | ||
| inputMap = _convertSourceMap().default.fromSource(code); | ||
| if (inputMap) { | ||
| code = _convertSourceMap().default.removeComments(code); | ||
| } | ||
| } catch (err) { | ||
| debug("discarding unknown inline input sourcemap", err); | ||
| code = _convertSourceMap().default.removeComments(code); | ||
| } | ||
| } catch (err) { | ||
| debug("discarding unknown inline input sourcemap", err); | ||
| code = _convertSourceMap().default.removeComments(code); | ||
| } | ||
| if (!inputMap) { | ||
| try { | ||
| inputMap = _convertSourceMap().default.fromMapFileSource(code); | ||
| if (typeof options.filename === "string") { | ||
| try { | ||
| inputMap = _convertSourceMap().default.fromMapFileSource(code, _path().default.dirname(options.filename)); | ||
| if (inputMap) { | ||
| if (inputMap) { | ||
| code = _convertSourceMap().default.removeMapFileComments(code); | ||
| } | ||
| } catch (err) { | ||
| debug("discarding unknown file input sourcemap", err); | ||
| code = _convertSourceMap().default.removeMapFileComments(code); | ||
| } | ||
| } catch (err) { | ||
| debug("discarding unknown file input sourcemap", err); | ||
| } else { | ||
| debug("discarding un-loadable file input sourcemap"); | ||
| code = _convertSourceMap().default.removeMapFileComments(code); | ||
| } | ||
| } | ||
| if (!inputMap && typeof options.inputSourceMap === "object") { | ||
| inputMap = _convertSourceMap().default.fromObject(options.inputSourceMap); | ||
| } | ||
| } | ||
@@ -103,0 +120,0 @@ |
+10
-10
| { | ||
| "name": "@babel/core", | ||
| "version": "7.0.0-beta.51", | ||
| "version": "7.0.0-beta.52", | ||
| "description": "Babel compiler core.", | ||
@@ -33,9 +33,9 @@ "main": "lib/index.js", | ||
| "dependencies": { | ||
| "@babel/code-frame": "7.0.0-beta.51", | ||
| "@babel/generator": "7.0.0-beta.51", | ||
| "@babel/helpers": "7.0.0-beta.51", | ||
| "@babel/parser": "7.0.0-beta.51", | ||
| "@babel/template": "7.0.0-beta.51", | ||
| "@babel/traverse": "7.0.0-beta.51", | ||
| "@babel/types": "7.0.0-beta.51", | ||
| "@babel/code-frame": "7.0.0-beta.52", | ||
| "@babel/generator": "7.0.0-beta.52", | ||
| "@babel/helpers": "7.0.0-beta.52", | ||
| "@babel/parser": "7.0.0-beta.52", | ||
| "@babel/template": "7.0.0-beta.52", | ||
| "@babel/traverse": "7.0.0-beta.52", | ||
| "@babel/types": "7.0.0-beta.52", | ||
| "convert-source-map": "^1.1.0", | ||
@@ -51,5 +51,5 @@ "debug": "^3.1.0", | ||
| "devDependencies": { | ||
| "@babel/helper-transform-fixture-test-runner": "7.0.0-beta.51", | ||
| "@babel/register": "7.0.0-beta.51" | ||
| "@babel/helper-transform-fixture-test-runner": "7.0.0-beta.52", | ||
| "@babel/register": "7.0.0-beta.52" | ||
| } | ||
| } |
+3
-3
@@ -5,3 +5,3 @@ # @babel/core | ||
| See our website [@babel/core](https://new.babeljs.io/docs/en/next/babel-core.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package. | ||
| See our website [@babel/core](https://babeljs.io/docs/en/next/babel-core.html) for more information or the [issues](https://github.com/babel/babel/issues?utf8=%E2%9C%93&q=is%3Aissue+label%3A%22pkg%3A%20core%22+is%3Aopen) associated with this package. | ||
@@ -13,3 +13,3 @@ ## Install | ||
| ```sh | ||
| npm install --save @babel/core | ||
| npm install --save-dev @babel/core | ||
| ``` | ||
@@ -20,3 +20,3 @@ | ||
| ```sh | ||
| yarn add --save @babel/core | ||
| yarn add @babel/core --dev | ||
| ``` |
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 2 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
122945
0.46%3691
0.41%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
- Removed
Updated
Updated
Updated