@hh.ru/babel-plugin-static-value-extractor
Advanced tools
Comparing version 0.5.1 to 0.5.2
202
lib/index.js
@@ -1,149 +0,159 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
exports.extractStaticValueImportedFilesFromFile = exports.extractStaticValueFromFile = undefined; | ||
exports["default"] = exports.extractStaticValueImportedFilesFromFile = exports.extractStaticValueFromFile = void 0; | ||
var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
var _fs = _interopRequireDefault(require("fs")); | ||
var _fs = require('fs'); | ||
var _path = _interopRequireDefault(require("path")); | ||
var _fs2 = _interopRequireDefault(_fs); | ||
var babylon = _interopRequireWildcard(require("@babel/parser")); | ||
var _path = require('path'); | ||
var _traverse = _interopRequireDefault(require("@babel/traverse")); | ||
var _path2 = _interopRequireDefault(_path); | ||
var _globAll = _interopRequireDefault(require("glob-all")); | ||
var _babylon = require('babylon'); | ||
var _traverser = _interopRequireDefault(require("./traverser")); | ||
var babylon = _interopRequireWildcard(_babylon); | ||
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; } } | ||
var _babelTraverse = require('babel-traverse'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _babelTraverse2 = _interopRequireDefault(_babelTraverse); | ||
function _toConsumableArray(arr) { return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread(); } | ||
var _globAll = require('glob-all'); | ||
function _nonIterableSpread() { throw new TypeError("Invalid attempt to spread non-iterable instance"); } | ||
var _globAll2 = _interopRequireDefault(_globAll); | ||
function _iterableToArray(iter) { if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === "[object Arguments]") return Array.from(iter); } | ||
var _traverser = require('./traverser'); | ||
function _arrayWithoutHoles(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } } | ||
var _traverser2 = _interopRequireDefault(_traverser); | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { keys.push.apply(keys, Object.getOwnPropertySymbols(object)); } if (enumerableOnly) keys = keys.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); return keys; } | ||
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)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
function _toConsumableArray(arr) { if (Array.isArray(arr)) { for (var i = 0, arr2 = Array(arr.length); i < arr.length; i++) { arr2[i] = arr[i]; } return arr2; } else { return Array.from(arr); } } | ||
var ENCODING = 'utf8'; | ||
var BABEL_PARSING_OPTS = { | ||
sourceType: 'module', | ||
plugins: ['jsx', 'flow', 'doExpressions', 'objectRestSpread', 'decorators', 'classProperties', 'exportExtensions', 'asyncGenerators', 'functionBind', 'functionSent', 'dynamicImport'] | ||
sourceType: 'module', | ||
plugins: ['jsx', 'flow', 'doExpressions', 'objectRestSpread', 'decorators-legacy', 'classProperties', 'exportExtensions', 'asyncGenerators', 'functionBind', 'functionSent', 'dynamicImport'] | ||
}; | ||
var noop = function noop() {}; | ||
var extractStaticValueFromCode = function extractStaticValueFromCode(code) { | ||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop; | ||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop; | ||
try { | ||
var ast = babylon.parse(code.toString(ENCODING), BABEL_PARSING_OPTS); | ||
var traverser = (0, _traverser2.default)(cb, opts); | ||
(0, _babelTraverse2.default)(ast, traverser); | ||
} catch (error) { | ||
if (process.env.NODE_ENV === 'development') { | ||
console.log(error); | ||
} else { | ||
throw error; | ||
} | ||
try { | ||
var ast = babylon.parse(code.toString(ENCODING), BABEL_PARSING_OPTS); | ||
var traverser = (0, _traverser["default"])(cb, opts); | ||
(0, _traverse["default"])(ast, traverser); | ||
} catch (error) { | ||
if (process.env.NODE_ENV === 'development') { | ||
console.log(error); | ||
} else { | ||
throw error; | ||
} | ||
} | ||
}; | ||
var extractStaticValueFromFile = exports.extractStaticValueFromFile = function extractStaticValueFromFile(file) { | ||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop; | ||
extractStaticValueFromCode(_fs2.default.readFileSync(file), _extends({}, opts, { | ||
filename: file | ||
}), cb); | ||
var extractStaticValueFromFile = function extractStaticValueFromFile(file) { | ||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop; | ||
extractStaticValueFromCode(_fs["default"].readFileSync(file), _objectSpread({}, opts, { | ||
filename: file | ||
}), cb); | ||
}; | ||
exports.extractStaticValueFromFile = extractStaticValueFromFile; | ||
var cachedFiles = {}; | ||
var extractStaticValueImportedFilesFromFile = exports.extractStaticValueImportedFilesFromFile = function extractStaticValueImportedFilesFromFile(file) { | ||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop; | ||
var extractStaticValueImportedFilesFromFile = function extractStaticValueImportedFilesFromFile(file) { | ||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var cb = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : noop; | ||
var staticPropsList = []; | ||
var staticPropsList = []; | ||
function _extractStaticValueImportedFilesFromFile(file, opts) { | ||
var importsDeclarations = []; | ||
function _extractStaticValueImportedFilesFromFile(file, opts) { | ||
var importsDeclarations = []; | ||
if (opts.include && !opts.include.find(function (includePath) { | ||
return file.search(includePath) !== -1; | ||
})) { | ||
return; | ||
} | ||
if (cachedFiles[file]) { | ||
staticPropsList = staticPropsList.concat(cachedFiles[file].propsList); | ||
importsDeclarations = cachedFiles[file].importsDeclarations; | ||
} else { | ||
extractStaticValueFromFile(file, opts, function (_staticPropsList, _importsDeclarations) { | ||
staticPropsList = staticPropsList.concat(_staticPropsList); | ||
importsDeclarations = _importsDeclarations; | ||
cachedFiles[file] = { propsList: _staticPropsList, importsDeclarations: importsDeclarations }; | ||
}); | ||
} | ||
importsDeclarations.forEach(function (file) { | ||
_extractStaticValueImportedFilesFromFile(file, opts, staticPropsList); | ||
}); | ||
if (opts.include && !opts.include.find(function (includePath) { | ||
return file.search(includePath) !== -1; | ||
})) { | ||
return; | ||
} | ||
if (cachedFiles[file]) { | ||
staticPropsList = cachedFiles[file].propsList; | ||
staticPropsList = staticPropsList.concat(cachedFiles[file].propsList); | ||
importsDeclarations = cachedFiles[file].importsDeclarations; | ||
} else { | ||
_extractStaticValueImportedFilesFromFile(file, opts); | ||
cachedFiles[file] = { propsList: staticPropsList, importsDeclarations: [] }; | ||
extractStaticValueFromFile(file, opts, function (_staticPropsList, _importsDeclarations) { | ||
staticPropsList = staticPropsList.concat(_staticPropsList); | ||
importsDeclarations = _importsDeclarations; | ||
cachedFiles[file] = { | ||
propsList: _staticPropsList, | ||
importsDeclarations: importsDeclarations | ||
}; | ||
}); | ||
} | ||
var values = [].concat(_toConsumableArray(new Set(cachedFiles[file].propsList))); | ||
importsDeclarations.forEach(function (file) { | ||
_extractStaticValueImportedFilesFromFile(file, opts, staticPropsList); | ||
}); | ||
} | ||
cb(values); | ||
if (cachedFiles[file]) { | ||
staticPropsList = cachedFiles[file].propsList; | ||
} else { | ||
_extractStaticValueImportedFilesFromFile(file, opts); | ||
return values; | ||
cachedFiles[file] = { | ||
propsList: staticPropsList, | ||
importsDeclarations: [] | ||
}; | ||
} | ||
var values = _toConsumableArray(new Set(cachedFiles[file].propsList)); | ||
cb(values); | ||
return values; | ||
}; | ||
exports.default = function (globArr) { | ||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
exports.extractStaticValueImportedFilesFromFile = extractStaticValueImportedFilesFromFile; | ||
var saveFilePath = _path2.default.resolve(opts.saveFilePath); | ||
var PATH_DELIMITER_LENGTH = 1; | ||
var previousContent = void 0; | ||
var _default = function _default(globArr) { | ||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var staticValues = _globAll2.default.sync(globArr).reduce(function (globObject, file) { | ||
var staticValues = extractStaticValueImportedFilesFromFile(file, opts); | ||
var dir = _path2.default.parse(file).dir; | ||
var saveFilePath = _path["default"].resolve(opts.saveFilePath); | ||
globObject[dir.slice(dir.lastIndexOf('/') + PATH_DELIMITER_LENGTH)] = staticValues; | ||
var PATH_DELIMITER_LENGTH = 1; | ||
var previousContent; | ||
return globObject; | ||
}, {}); | ||
var staticValues = _globAll["default"].sync(globArr).reduce(function (globObject, file) { | ||
var staticValues = extractStaticValueImportedFilesFromFile(file, opts); | ||
if (_fs2.default.existsSync(saveFilePath + '/' + opts.saveFileName + '.' + opts.saveFileExt)) { | ||
previousContent = _fs2.default.readFileSync(saveFilePath + '/' + opts.saveFileName + '.' + opts.saveFileExt, ENCODING).toString(); | ||
} | ||
var dir = _path["default"].parse(file).dir; | ||
var content = opts.template ? opts.template(staticValues) : JSON.stringify(staticValues); | ||
globObject[dir.slice(dir.lastIndexOf('/') + PATH_DELIMITER_LENGTH)] = staticValues; | ||
return globObject; | ||
}, {}); | ||
cachedFiles = {}; | ||
if (_fs["default"].existsSync("".concat(saveFilePath, "/").concat(opts.saveFileName, ".").concat(opts.saveFileExt))) { | ||
previousContent = _fs["default"].readFileSync("".concat(saveFilePath, "/").concat(opts.saveFileName, ".").concat(opts.saveFileExt), ENCODING).toString(); | ||
} | ||
if (content !== previousContent) { | ||
_fs2.default.mkdirSync(saveFilePath, { recursive: true }); | ||
_fs2.default.writeFileSync(saveFilePath + '/' + opts.saveFileName + '.' + opts.saveFileExt, content); | ||
} | ||
}; | ||
var content = opts.template ? opts.template(staticValues) : JSON.stringify(staticValues); | ||
cachedFiles = {}; | ||
if (content !== previousContent) { | ||
_fs["default"].mkdirSync(saveFilePath, { | ||
recursive: true | ||
}); | ||
_fs["default"].writeFileSync("".concat(saveFilePath, "/").concat(opts.saveFileName, ".").concat(opts.saveFileExt), content); | ||
} | ||
}; | ||
exports["default"] = _default; |
@@ -1,143 +0,138 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
value: true | ||
}); | ||
exports["default"] = void 0; | ||
var _fs = require('fs'); | ||
var _fs = _interopRequireDefault(require("fs")); | ||
var _fs2 = _interopRequireDefault(_fs); | ||
var _path = _interopRequireDefault(require("path")); | ||
var _path = require('path'); | ||
var _core = require("@babel/core"); | ||
var _path2 = _interopRequireDefault(_path); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; } | ||
var _babelCore = require('babel-core'); | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
var JS_EXTENSIONS = ['', 'js', 'jsx']; | ||
var getConcatenatedStaticProps = function getConcatenatedStaticProps(staticProps, nodeStaticProps) { | ||
return staticProps.concat(nodeStaticProps.reduce(function (arr, _ref) { | ||
var value = _ref.value; | ||
return staticProps.concat(nodeStaticProps.reduce(function (arr, _ref) { | ||
var value = _ref.value; | ||
if (_babelCore.types.isStringLiteral(value)) { | ||
arr.push(value.value); | ||
} | ||
if (_core.types.isStringLiteral(value)) { | ||
arr.push(value.value); | ||
} | ||
return arr; | ||
}, [])); | ||
return arr; | ||
}, [])); | ||
}; | ||
var isJsFile = function isJsFile(path) { | ||
return JS_EXTENSIONS.includes(_path2.default.parse(path).ext); | ||
return JS_EXTENSIONS.includes(_path["default"].parse(path).ext); | ||
}; | ||
var replacePath = function replacePath(path) { | ||
var pathsToReplace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
return Object.keys(pathsToReplace).filter(function (checkPath) { | ||
return path.startsWith(checkPath); | ||
}).reduce(function (result, checkPath) { | ||
return _path2.default.normalize(result.replace(checkPath, pathsToReplace[checkPath])); | ||
}, path); | ||
var pathsToReplace = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
return Object.keys(pathsToReplace).filter(function (checkPath) { | ||
return path.startsWith(checkPath); | ||
}).reduce(function (result, checkPath) { | ||
return _path["default"].normalize(result.replace(checkPath, pathsToReplace[checkPath])); | ||
}, path); | ||
}; | ||
exports.default = function (cb) { | ||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var _default = function _default(cb) { | ||
var opts = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {}; | ||
var staticProps = []; | ||
var staticProps = []; | ||
var currentFileDir = _path2.default.parse(opts.filename).dir; | ||
var staticPropName = opts.staticPropName, | ||
pathsToReplace = opts.pathsToReplace; | ||
var currentFileDir = _path["default"].parse(opts.filename).dir; | ||
var importDeclarationPaths = []; | ||
var staticPropName = opts.staticPropName, | ||
pathsToReplace = opts.pathsToReplace; | ||
var importDeclarationPaths = []; | ||
var processImports = function processImports(filePath) { | ||
var defaultFileName = _path2.default.parse(filePath).ext ? '' : 'index.jsx'; | ||
var importPath = _path2.default.resolve(currentFileDir, filePath); | ||
var processImports = function processImports(filePath) { | ||
var defaultFileName = _path["default"].parse(filePath).ext ? '' : 'index.jsx'; | ||
if (_fs2.default.existsSync(importPath)) { | ||
importDeclarationPaths.push(_path2.default.resolve(importPath, defaultFileName)); | ||
return; | ||
} | ||
var importPath = _path["default"].resolve(currentFileDir, filePath); | ||
if (_fs2.default.existsSync(importPath + '.jsx')) { | ||
importDeclarationPaths.push(importPath + '.jsx'); | ||
return; | ||
} | ||
if (_fs["default"].existsSync(importPath)) { | ||
importDeclarationPaths.push(_path["default"].resolve(importPath, defaultFileName)); | ||
return; | ||
} | ||
if (_fs2.default.existsSync(importPath + '.js')) { | ||
importDeclarationPaths.push(importPath + '.js'); | ||
} | ||
}; | ||
if (_fs["default"].existsSync("".concat(importPath, ".jsx"))) { | ||
importDeclarationPaths.push("".concat(importPath, ".jsx")); | ||
return; | ||
} | ||
return { | ||
Program: { | ||
exit: function exit() { | ||
cb(staticProps, importDeclarationPaths); | ||
} | ||
}, | ||
if (_fs["default"].existsSync("".concat(importPath, ".js"))) { | ||
importDeclarationPaths.push("".concat(importPath, ".js")); | ||
} | ||
}; | ||
ClassProperty: { | ||
enter: function enter(path) { | ||
var node = path.node; | ||
return { | ||
Program: { | ||
exit: function exit() { | ||
cb(staticProps, importDeclarationPaths); | ||
} | ||
}, | ||
ClassProperty: { | ||
enter: function enter(path) { | ||
var node = path.node; | ||
if (!node["static"]) { | ||
return; | ||
} | ||
if (!node.static) { | ||
return; | ||
} | ||
if (_core.types.isIdentifier(node.key) && node.key.name === staticPropName && _core.types.isObjectExpression(node.value)) { | ||
staticProps = getConcatenatedStaticProps(staticProps, node.value.properties); | ||
} | ||
} | ||
}, | ||
ExpressionStatement: { | ||
enter: function enter(path) { | ||
path.traverse({ | ||
AssignmentExpression: { | ||
enter: function enter(_ref2) { | ||
var node = _ref2.node; | ||
if (_babelCore.types.isIdentifier(node.key) && node.key.name === staticPropName && _babelCore.types.isObjectExpression(node.value)) { | ||
staticProps = getConcatenatedStaticProps(staticProps, node.value.properties); | ||
} | ||
} | ||
}, | ||
if (!_core.types.isMemberExpression(node.left)) { | ||
return; | ||
} | ||
ExpressionStatement: { | ||
enter: function enter(path) { | ||
path.traverse({ | ||
AssignmentExpression: { | ||
enter: function enter(_ref2) { | ||
var node = _ref2.node; | ||
var propIsMemberExpression = _core.types.isMemberExpression(node.left.object) && node.left.object.property.name === staticPropName && _core.types.isStringLiteral(node.right); | ||
if (!_babelCore.types.isMemberExpression(node.left)) { | ||
return; | ||
} | ||
var propsIsObjectExpression = _core.types.isIdentifier(node.left.object) && node.left.property.name === staticPropName && _core.types.isObjectExpression(node.right); | ||
var propIsMemberExpression = _babelCore.types.isMemberExpression(node.left.object) && node.left.object.property.name === staticPropName && _babelCore.types.isStringLiteral(node.right); | ||
var propsIsObjectExpression = _babelCore.types.isIdentifier(node.left.object) && node.left.property.name === staticPropName && _babelCore.types.isObjectExpression(node.right); | ||
if (propIsMemberExpression) { | ||
staticProps.push(node.right.value); | ||
} else if (propsIsObjectExpression) { | ||
staticProps = getConcatenatedStaticProps(staticProps, node.right.properties); | ||
} | ||
} | ||
} | ||
}); | ||
if (propIsMemberExpression) { | ||
staticProps.push(node.right.value); | ||
} else if (propsIsObjectExpression) { | ||
staticProps = getConcatenatedStaticProps(staticProps, node.right.properties); | ||
} | ||
} | ||
}, | ||
} | ||
}); | ||
} | ||
}, | ||
ImportDeclaration: { | ||
enter: function enter(_ref3) { | ||
var node = _ref3.node; | ||
ImportDeclaration: { | ||
enter: function enter(_ref3) { | ||
var node = _ref3.node; | ||
if (node && node.source && isJsFile(node.source.value)) { | ||
processImports(replacePath(node.source.value, pathsToReplace)); | ||
} | ||
} | ||
}, | ||
CallExpression: { | ||
enter: function enter(_ref4) { | ||
var node = _ref4.node; | ||
if (node && node.source && isJsFile(node.source.value)) { | ||
processImports(replacePath(node.source.value, pathsToReplace)); | ||
} | ||
} | ||
}, | ||
if (node && node.callee && _core.types.isImport(node.callee)) { | ||
processImports(node.arguments[0].value); | ||
} | ||
} | ||
} | ||
}; | ||
}; | ||
CallExpression: { | ||
enter: function enter(_ref4) { | ||
var node = _ref4.node; | ||
if (node && node.callee && _babelCore.types.isImport(node.callee)) { | ||
processImports(node.arguments[0].value); | ||
} | ||
} | ||
} | ||
}; | ||
}; | ||
exports["default"] = _default; |
{ | ||
"name": "@hh.ru/babel-plugin-static-value-extractor", | ||
"version": "0.5.1", | ||
"version": "0.5.2", | ||
"main": "lib/index.js", | ||
"devDependencies": { | ||
"babel-cli": "^6.26.0", | ||
"babel-preset-env": "^1.7.0", | ||
"babel-preset-stage-0": "^6.24.1", | ||
"@babel/cli": "^7.5.0", | ||
"@babel/plugin-proposal-function-bind": "^7.2.0", | ||
"@babel/preset-env": "^7.5.4", | ||
"@babel/register": "^7.5.5", | ||
"del": "^3.0.0", | ||
@@ -23,3 +24,3 @@ "mocha": "5.2.0" | ||
"build": "babel src -d lib", | ||
"test": "mocha --compilers js:babel-register", | ||
"test": "mocha --compilers js:@babel/register", | ||
"test:watch": "yarn run test -- --watch", | ||
@@ -32,5 +33,5 @@ "prepublish": "yarn clean && yarn build" | ||
"dependencies": { | ||
"babel-core": "^6.26.3", | ||
"@babel/core": "^7.5.4", | ||
"glob-all": "^3.1.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
226
15766
6
6
1
+ Added@babel/core@^7.5.4
+ Added@ampproject/remapping@2.3.0(transitive)
+ Added@babel/code-frame@7.26.2(transitive)
+ Added@babel/compat-data@7.26.2(transitive)
+ Added@babel/core@7.26.0(transitive)
+ Added@babel/generator@7.26.2(transitive)
+ Added@babel/helper-compilation-targets@7.25.9(transitive)
+ Added@babel/helper-module-imports@7.25.9(transitive)
+ Added@babel/helper-module-transforms@7.26.0(transitive)
+ Added@babel/helper-string-parser@7.25.9(transitive)
+ Added@babel/helper-validator-identifier@7.25.9(transitive)
+ Added@babel/helper-validator-option@7.25.9(transitive)
+ Added@babel/helpers@7.26.0(transitive)
+ Added@babel/parser@7.26.2(transitive)
+ Added@babel/template@7.25.9(transitive)
+ Added@babel/traverse@7.25.9(transitive)
+ Added@babel/types@7.26.0(transitive)
+ Added@jridgewell/gen-mapping@0.3.5(transitive)
+ Added@jridgewell/resolve-uri@3.1.2(transitive)
+ Added@jridgewell/set-array@1.2.1(transitive)
+ Added@jridgewell/sourcemap-codec@1.5.0(transitive)
+ Added@jridgewell/trace-mapping@0.3.25(transitive)
+ Addedbrowserslist@4.24.2(transitive)
+ Addedcaniuse-lite@1.0.30001680(transitive)
+ Addedconvert-source-map@2.0.0(transitive)
+ Addeddebug@4.3.7(transitive)
+ Addedelectron-to-chromium@1.5.63(transitive)
+ Addedescalade@3.2.0(transitive)
+ Addedgensync@1.0.0-beta.2(transitive)
+ Addedglobals@11.12.0(transitive)
+ Addedjs-tokens@4.0.0(transitive)
+ Addedjsesc@3.0.2(transitive)
+ Addedjson5@2.2.3(transitive)
+ Addedlru-cache@5.1.1(transitive)
+ Addedms@2.1.3(transitive)
+ Addednode-releases@2.0.18(transitive)
+ Addedpicocolors@1.1.1(transitive)
+ Addedsemver@6.3.1(transitive)
+ Addedupdate-browserslist-db@1.1.1(transitive)
+ Addedyallist@3.1.1(transitive)
- Removedbabel-core@^6.26.3
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedbabel-code-frame@6.26.0(transitive)
- Removedbabel-core@6.26.3(transitive)
- Removedbabel-generator@6.26.1(transitive)
- Removedbabel-helpers@6.24.1(transitive)
- Removedbabel-messages@6.23.0(transitive)
- Removedbabel-register@6.26.0(transitive)
- Removedbabel-runtime@6.26.0(transitive)
- Removedbabel-template@6.26.0(transitive)
- Removedbabel-traverse@6.26.0(transitive)
- Removedbabel-types@6.26.0(transitive)
- Removedbabylon@6.18.0(transitive)
- Removedchalk@1.1.3(transitive)
- Removedconvert-source-map@1.9.0(transitive)
- Removedcore-js@2.6.12(transitive)
- Removeddebug@2.6.9(transitive)
- Removeddetect-indent@4.0.0(transitive)
- Removedescape-string-regexp@1.0.5(transitive)
- Removedesutils@2.0.3(transitive)
- Removedglobals@9.18.0(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhome-or-tmp@2.0.0(transitive)
- Removedinvariant@2.2.4(transitive)
- Removedis-finite@1.1.0(transitive)
- Removedjs-tokens@3.0.2(transitive)
- Removedjsesc@1.3.0(transitive)
- Removedjson5@0.5.1(transitive)
- Removedlodash@4.17.21(transitive)
- Removedloose-envify@1.4.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmkdirp@0.5.6(transitive)
- Removedms@2.0.0(transitive)
- Removedos-homedir@1.0.2(transitive)
- Removedos-tmpdir@1.0.2(transitive)
- Removedprivate@0.1.8(transitive)
- Removedregenerator-runtime@0.11.1(transitive)
- Removedrepeating@2.0.1(transitive)
- Removedslash@1.0.0(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedsource-map-support@0.4.18(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedto-fast-properties@1.0.3(transitive)
- Removedtrim-right@1.0.1(transitive)