Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@angular-devkit/build-optimizer

Package Overview
Dependencies
Maintainers
2
Versions
481
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@angular-devkit/build-optimizer - npm Package Compare versions

Comparing version 0.0.23 to 0.0.24

2

package.json
{
"name": "@angular-devkit/build-optimizer",
"version": "0.0.23",
"version": "0.0.24",
"description": "Angular Build Optimizer",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -19,17 +19,25 @@ "use strict";

const whitelistedAngularModules = [
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)animations(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)common(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)compiler(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)core(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)forms(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)http(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)platform-browser-dynamic(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)platform-browser(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)platform-webworker-dynamic(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)platform-webworker(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)router(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)upgrade(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)material(\\|\/)/,
/(\\|\/)node_modules(\\|\/)@angular(\\|\/)cdk(\\|\/)/,
/[\\/]node_modules[\\/]@angular[\\/]animations[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]common[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]compiler[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]core[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]forms[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]http[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]platform-browser-dynamic[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]platform-browser[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]platform-webworker-dynamic[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]platform-webworker[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]router[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]upgrade[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]material[\\/]/,
/[\\/]node_modules[\\/]@angular[\\/]cdk[\\/]/,
];
const es5AngularModules = [
// Angular 4 packaging format has .es5.js as the extension.
/\.es5\.js$/,
// Angular 5 has esm5 folders.
/[\\/]node_modules[\\/]@angular[\\/][^\\/]+[\\/]esm5[\\/]/,
// All Angular versions have UMD with es5.
/\.umd\.js$/,
];
function buildOptimizer(options) {

@@ -56,5 +64,6 @@ const { inputFilePath } = options;

if (inputFilePath
&& whitelistedAngularModules.some((re) => re.test(inputFilePath))) {
&& whitelistedAngularModules.some((re) => re.test(inputFilePath))
&& es5AngularModules.some((re) => re.test(inputFilePath))) {
getTransforms.push(
// getPrefixFunctionsTransformer is rather dangerous, apply only to known pure modules.
// getPrefixFunctionsTransformer is rather dangerous, apply only to known pure es5 modules.
// It will mark both `require()` calls and `console.log(stuff)` as pure.

@@ -71,2 +80,2 @@ // We only apply it to whitelisted modules, since we know they are safe.

exports.buildOptimizer = buildOptimizer;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVpbGQtb3B0aW1pemVyLmpzIiwic291cmNlUm9vdCI6Ii9Vc2Vycy9oYW5zbC9Tb3VyY2VzL2RldmtpdC8iLCJzb3VyY2VzIjpbInBhY2thZ2VzL2FuZ3VsYXJfZGV2a2l0L2J1aWxkX29wdGltaXplci9zc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1zLCBjb250ZW50IH0pO1xufVxuIl19

@@ -14,4 +14,6 @@ /**

export { getFoldFileTransformer } from './transforms/class-fold';
export { getImportTslibTransformer, testImportTslib } from './transforms/import-tslib';
export { getPrefixClassesTransformer, testPrefixClasses } from './transforms/prefix-classes';
export { getPrefixFunctionsTransformer } from './transforms/prefix-functions';
export { getScrubFileTransformer } from './transforms/scrub-file';
export { getImportTslibTransformer } from './transforms/import-tslib';
export { getScrubFileTransformer, testScrubFile } from './transforms/scrub-file';
export { getWrapEnumsTransformer, testWrapEnums } from './transforms/wrap-enums';

@@ -22,2 +22,8 @@ "use strict";

exports.getFoldFileTransformer = class_fold_1.getFoldFileTransformer;
var import_tslib_1 = require("./transforms/import-tslib");
exports.getImportTslibTransformer = import_tslib_1.getImportTslibTransformer;
exports.testImportTslib = import_tslib_1.testImportTslib;
var prefix_classes_1 = require("./transforms/prefix-classes");
exports.getPrefixClassesTransformer = prefix_classes_1.getPrefixClassesTransformer;
exports.testPrefixClasses = prefix_classes_1.testPrefixClasses;
var prefix_functions_1 = require("./transforms/prefix-functions");

@@ -27,4 +33,6 @@ exports.getPrefixFunctionsTransformer = prefix_functions_1.getPrefixFunctionsTransformer;

exports.getScrubFileTransformer = scrub_file_1.getScrubFileTransformer;
var import_tslib_1 = require("./transforms/import-tslib");
exports.getImportTslibTransformer = import_tslib_1.getImportTslibTransformer;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiL1VzZXJzL2hhbnNsL1NvdXJjZXMvZGV2a2l0LyIsInNvdXJjZXMiOlsicGFja2FnZXMvYW5ndWxhcl9kZXZraXQvYnVpbGRfb3B0aW1pemVyL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBOzs7Ozs7R0FNRztBQUNILG1FQUFtRjtBQUExRSxnREFBQSxPQUFPLENBQXdCO0FBQ3hDLHFFQUFtRTtBQUExR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tICcuL2hlbHBlcnMvdHJhbnNmb3JtLWphdmFzY3JpcHQnO1xuXG5leHBvcnQgeyBnZXRGb2xkRmlsZVRyYW5zZm9ybWVyIH0gZnJvbSAnLi90cmFuc2Zvcm1zL2NsYXNzLWZvbGQnO1xuZXhwb3J0IHsgZ2V0UHJlZml4RnVuY3Rpb25zVHJhbnNmb3JtZXIgfSBmcm9tICcuL3RyYW5zZm9ybXMvcHJlZml4LWZ1bmN0aW9ucyc7XG5leHBvcnQgeyBnZXRTY3J1YkZpbGVUcmFuc2Zvcm1lciB9IGZyb20gJy4vdHJhbnNmb3Jtcy9zY3J1Yi1maWxlJztcbmV4cG9ydCB7IGdldEltcG9ydFRzbGliVHJhbnNmb3JtZXIgfSBmcm9tICcuL3RyYW5zZm9ybXMvaW1wb3J0LXRzbGliJztcbiJdfQ==
exports.testScrubFile = scrub_file_1.testScrubFile;
var wrap_enums_1 = require("./transforms/wrap-enums");
exports.getWrapEnumsTransformer = wrap_enums_1.getWrapEnumsTransformer;
exports.testWrapEnums = wrap_enums_1.testWrapEnums;
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiaW5kZXguanMiLCJzb3VyY2VSb290IjoiL1VzZXJzL2hhbnNsL1NvdXJjZXMvZGV2a2l0LyIsInNvdXJjZXMiOlsicGFja2FnZXMvYW5ndWxhcl9kZXZraXQvYnVpbGRfb3B0aW1pemVyL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBOzs7Ozs7R0FNRztBQUNILG1FQUFtRjtBQUExRSxnREFBQSxPQUFPLENBQXdCO0FBQ3hDLHFFQUFtRTtBQUExRCwyQ0FBQSxjQUFjLENBQUE7QUFFdkIsMERBQXVEO0FBQTlDLHdDQUFBLFlBQVksQ0FBQTtBQUNyQiwwQ0FBeUM7QUFBaEMsMEJBQUEsTUFBTSxDQUFBO0FBRWYsdUVBQXFFO0FBQTVELHFEQUFBLG1CQUFtQixD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JpZnknO1xuXG5leHBvcnQgeyB0cmFuc2Zvcm1KYXZhc2NyaXB0IH0gZnJvbSAnLi9oZWxwZXJzL3RyYW5zZm9ybS1qYXZhc2NyaXB0JztcblxuZXhwb3J0IHsgZ2V0Rm9sZEZpbGVUcmFuc2Zvcm1lciB9IGZyb20gJy4vdHJhbnNmb3Jtcy9jbGFzcy1mb2xkJztcbmV4cG9ydCB7IGdldEltcG9ydFRzbGliVHJhbnNmb3JtZXIsIHRlc3RJbXBvcnRUc2xpYiB9IGZyb20gJy4vdHJhbnNmb3Jtcy9pbXBvcnQtdHNsaWInO1xuZXhwb3J0IHsgZ2V0UHJlZml4Q2xhc3Nlc1RyYW5zZm9ybWVyLCB0ZXN0UHJlZml4Q2xhc3NlcyB9IGZyb20gJy4vdHJhbnNmb3Jtcy9wcmVmaXgtY2xhc3Nlcyc7XG5leHBvcnQgeyBnZXRQcmVmaXhGdW5jdGlvbnNUcmFuc2Zvcm1lciB9IGZyb20gJy4vdHJhbnNmb3Jtcy9wcmVmaXgtZnVuY3Rpb25zJztcbmV4cG9ydCB7IGdldFNjcnViRmlsZVRyYW5zZm9ybWVyLCB0ZXN0U2NydWJGaWxlIH0gZnJvbSAnLi90cmFuc2Zvcm1zL3NjcnViLWZpbGUnO1xuZXhwb3J0IHsgZ2V0V3JhcEVudW1zVHJhbnNmb3JtZXIsIHRlc3RXcmFwRW51bXMgfSBmcm9tICcuL3RyYW5zZm9ybXMvd3JhcC1lbnVtcyc7XG4iXX0=

@@ -16,7 +16,9 @@ "use strict";

const replacements = purify_1.purifyReplacements(compilation.assets[fileName].source());
const replaceSource = new webpack_sources_1.ReplaceSource(compilation.assets[fileName], fileName);
replacements.forEach((replacement) => {
replaceSource.replace(replacement.start, replacement.end, replacement.content);
});
compilation.assets[fileName] = replaceSource;
if (replacements.length > 0) {
const replaceSource = new webpack_sources_1.ReplaceSource(compilation.assets[fileName], fileName);
replacements.forEach((replacement) => {
replaceSource.replace(replacement.start, replacement.end, replacement.content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2VtZW50KSA9PiB7XG4gICAgICAgICAgICAgICAgICByZXBsYWNlU291cmNlLnJlcGxhY2UocmVwbGFjZW1lbnQuc3RhcnQsIHJlcGxhY2VtZW50LmVuZCwgcmVwbGFjZW1lbnQuY29udGVudCk7XG4gICAgICAgICAgICAgICAgfSk7XG4gICAgICAgICAgICAgICAgY29tcGlsYXRpb24uYXNzZXRzW2ZpbGVOYW1lXSA9IHJlcGxhY2VTb3VyY2U7XG4gICAgICAgICAgICAgIH1cbiAgICAgICAgICAgIH0pO1xuICAgICAgICB9KTtcbiAgICAgICAgY2FsbGJhY2soKTtcbiAgICAgIH0pO1xuICAgIH0pO1xuICB9XG59XG4iXX0=

@@ -1,10 +0,3 @@

/**
* @license
* Copyright Google Inc. All Rights Reserved.
*
* Use of this source code is governed by an MIT-style license that can be
* found in the LICENSE file at https://angular.io/license
*/
import * as ts from 'typescript';
export declare function testPrefixClasses(content: string): boolean;
export declare function getPrefixClassesTransformer(): ts.TransformerFactory<ts.SourceFile>;

@@ -10,2 +10,3 @@ "use strict";

*/
const semver_1 = require("semver");
const ts = require("typescript");

@@ -15,4 +16,4 @@ function testPrefixClasses(content) {

// tslint:disable-next-line:max-line-length
/^(var (\S+) = )(\(function \(\) \{\r?\n(?: (?:\/\*\*| \*|\*\/|\/\/)[^\r?\n]*\r?\n)* function \2\([^\)]*\) \{\r?\n)/,
/^(var (\S+) = )(\(function \(_super\) \{\r?\n \w*__extends\(\w+, _super\);\r?\n)/,
/^(?:export )?(var (\S+) = )(?:\/\*\* @class \*\/ )?(\(function \(\) \{\r?\n(?:\s+(?:\/\*\*| \*|\*\/|\/\/)[^\r?\n]*\r?\n)*\s+function \2\([^\)]*\) \{\r?\n)/,
/^(?:export )?(var (\S+) = )(?:\/\*\* @class \*\/ )?(\(function \(_super\) \{\r?\n\s+\w*__extends\(\w+, _super\);\r?\n)/,
];

@@ -22,2 +23,4 @@ return regexes.some((regex) => regex.test(content));

exports.testPrefixClasses = testPrefixClasses;
const superParameterName = '_super';
const extendsHelperName = (semver_1.satisfies(ts.version, '< 2.5') ? '_' : '') + '__extends';
function getPrefixClassesTransformer() {

@@ -29,7 +32,9 @@ return (context) => {

// Add pure comment to downleveled classes.
if (isDownleveledClass(node)) {
const varDecl = node;
const varDeclInit = varDecl.initializer;
// Create a new node with the pure comment before the variable declaration initializer.
const newNode = ts.createVariableDeclaration(varDecl.name, undefined, ts.addSyntheticLeadingComment(varDeclInit, ts.SyntaxKind.MultiLineCommentTrivia, pureFunctionComment, false));
if (isVariableStatement(node) && isDownleveledClass(node)) {
const varDecl = node.declarationList.declarations[0];
const varInitializer = varDecl.initializer;
// Update node with the pure comment before the variable declaration initializer.
const newNode = ts.updateVariableStatement(node, node.modifiers, ts.updateVariableDeclarationList(node.declarationList, [
ts.updateVariableDeclaration(varDecl, varDecl.name, varDecl.type, ts.addSyntheticLeadingComment(varInitializer, ts.SyntaxKind.MultiLineCommentTrivia, pureFunctionComment, false)),
]));
// Replace node with modified one.

@@ -41,3 +46,3 @@ return ts.visitEachChild(newNode, visitor, context);

};
return ts.visitNode(sf, visitor);
return ts.visitEachChild(sf, visitor, context);
};

@@ -48,95 +53,133 @@ return transformer;

exports.getPrefixClassesTransformer = getPrefixClassesTransformer;
function isVariableStatement(node) {
return node.kind === ts.SyntaxKind.VariableStatement;
}
function isIdentifier(node) {
return node.kind === ts.SyntaxKind.Identifier;
}
function isExpressionStatement(node) {
return node.kind === ts.SyntaxKind.ExpressionStatement;
}
function isParenthesizedExpression(node) {
return node.kind === ts.SyntaxKind.ParenthesizedExpression;
}
function isCallExpression(node) {
return node.kind === ts.SyntaxKind.CallExpression;
}
function isFunctionExpression(node) {
return node.kind === ts.SyntaxKind.FunctionExpression;
}
function isArrowFunction(node) {
return node.kind === ts.SyntaxKind.ArrowFunction;
}
function isFunctionDeclaration(node) {
return node.kind === ts.SyntaxKind.FunctionDeclaration;
}
function isReturnStatement(node) {
return node.kind === ts.SyntaxKind.ReturnStatement;
}
function isBlock(node) {
return node.kind === ts.SyntaxKind.Block;
}
function isClassDeclaration(node) {
return node.kind === ts.SyntaxKind.ClassDeclaration;
}
// Determine if a node matched the structure of a downleveled TS class.
function isDownleveledClass(node) {
let isExtendedClass = false;
if (node.kind !== ts.SyntaxKind.VariableDeclaration) {
if (!isVariableStatement(node)) {
return false;
}
const varDecl = node;
if (varDecl.name.kind !== ts.SyntaxKind.Identifier) {
if (node.declarationList.declarations.length !== 1) {
return false;
}
const variableDeclaration = node.declarationList.declarations[0];
if (!isIdentifier(variableDeclaration.name)
|| !variableDeclaration.initializer) {
return false;
}
let potentialClass = variableDeclaration.initializer;
// TS 2.3 has an unwrapped class IIFE
// TS 2.4 uses a function expression wrapper
// TS 2.5 uses an arrow function wrapper
if (isParenthesizedExpression(potentialClass)) {
potentialClass = potentialClass.expression;
}
if (!isCallExpression(potentialClass) || potentialClass.arguments.length > 1) {
return false;
}
let wrapperBody;
if (isFunctionExpression(potentialClass.expression)) {
wrapperBody = potentialClass.expression.body;
}
else if (isArrowFunction(potentialClass.expression)
&& isBlock(potentialClass.expression.body)) {
wrapperBody = potentialClass.expression.body;
}
else {
return false;
}
if (wrapperBody.statements.length === 0) {
return false;
}
const functionExpression = potentialClass.expression;
const functionStatements = wrapperBody.statements;
// need a minimum of two for a function declaration and return statement
if (functionStatements.length < 2) {
return false;
}
// The variable name should be the class name.
const className = varDecl.name.text;
if (!varDecl.initializer || varDecl.initializer.kind !== ts.SyntaxKind.ParenthesizedExpression) {
const className = variableDeclaration.name.text;
const firstStatement = functionStatements[0];
// find return statement - may not be last statement
let returnStatement;
for (let i = functionStatements.length - 1; i > 0; i--) {
if (isReturnStatement(functionStatements[i])) {
returnStatement = functionStatements[i];
break;
}
}
if (returnStatement == undefined
|| returnStatement.expression == undefined
|| !isIdentifier(returnStatement.expression)) {
return false;
}
const parenExpr = varDecl.initializer;
if (parenExpr.expression.kind !== ts.SyntaxKind.CallExpression) {
if (functionExpression.parameters.length === 0) {
// potential non-extended class or wrapped es2015 class
return (isFunctionDeclaration(firstStatement) || isClassDeclaration(firstStatement))
&& firstStatement.name !== undefined
&& firstStatement.name.text === className
&& returnStatement.expression.text === firstStatement.name.text;
}
else if (functionExpression.parameters.length !== 1) {
return false;
}
const callExpr = parenExpr.expression;
if (callExpr.expression.kind !== ts.SyntaxKind.FunctionExpression) {
// Potential extended class
const functionParameter = functionExpression.parameters[0];
if (!isIdentifier(functionParameter.name) || functionParameter.name.text !== superParameterName) {
return false;
}
const funcExpr = callExpr.expression;
// Extended classes have the `_super` parameter.
if (funcExpr.parameters.length === 1
&& funcExpr.parameters[0].name.text === '_super') {
isExtendedClass = true;
if (functionStatements.length < 3) {
return false;
}
// IIFE inner parameters should be empty or `_super`.
if (funcExpr.parameters.length !== 0 && !isExtendedClass) {
if (!isExpressionStatement(firstStatement) || !isCallExpression(firstStatement.expression)) {
return false;
}
const stmts = funcExpr.body.statements;
if (stmts.length === 0) {
const extendCallExpression = firstStatement.expression;
if (!isIdentifier(extendCallExpression.expression)
|| extendCallExpression.expression.text !== extendsHelperName) {
return false;
}
const firstStatement = stmts[0];
// Check if `node` is a FunctionDeclaration named `name`.
function isFunDeclNamed(node, name) {
if (node.kind === ts.SyntaxKind.FunctionDeclaration) {
const funcDecl = node;
if (funcDecl.name && funcDecl.name.text === name) {
return true;
}
}
else {
return false;
}
if (extendCallExpression.arguments.length === 0) {
return false;
}
// If the class is extending another, the first statement is a _extends(..., _super) call.
if (isExtendedClass) {
if (firstStatement.kind !== ts.SyntaxKind.ExpressionStatement) {
return false;
}
const exprStmt = firstStatement;
if (exprStmt.expression.kind !== ts.SyntaxKind.CallExpression) {
return false;
}
const extendsCallExpr = exprStmt.expression;
// Function should be called `__extends`.
if (extendsCallExpr.expression.kind !== ts.SyntaxKind.Identifier) {
return false;
}
const callExprName = extendsCallExpr.expression.text;
// Reserved TS names are retrieved with three underscores instead of two.
if (callExprName !== '___extends') {
return false;
}
// Function should have 1+ arguments, with the last being named `_super`.
if (extendsCallExpr.arguments.length === 0) {
return false;
}
const lastArg = extendsCallExpr.arguments[extendsCallExpr.arguments.length - 1];
if (lastArg.kind !== ts.SyntaxKind.Identifier) {
return false;
}
const lastArgName = lastArg.text;
if (lastArgName !== '_super') {
return false;
}
const secondStatement = stmts[1];
if (secondStatement && isFunDeclNamed(secondStatement, className)) {
// This seems to be downleveled class that extends another class.
return true;
}
const lastArgument = extendCallExpression.arguments[extendCallExpression.arguments.length - 1];
if (!isIdentifier(lastArgument) || lastArgument.text !== functionParameter.name.text) {
return false;
}
else if (isFunDeclNamed(firstStatement, className)) {
// This seems to be downleveled class.
return true;
}
return false;
const secondStatement = functionStatements[1];
return isFunctionDeclaration(secondStatement)
&& secondStatement.name !== undefined
&& secondStatement.name.text === className
&& returnStatement.expression.text === secondStatement.name.text;
}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlZml4LWNsYXNzZXMuanMiLCJzb3VyY2VSb290IjoiL1VzZXJzL2hhbnNsL1NvdXJjZXMvZGV2a2l0LyIsInNvdXJjZXMiOlsicGFja2FnZXMvYW5ndWxhcl9kZXZraXQvYnVpbGRfb3B0aW1pemVyL3NyYy90cmFuc2Zvcm1zL3ByZWZpeC1jbGFzc2VzLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiI7O0FBQUE7Ozs7OztHQU1HO0FBQ0gsaUNBQWlDO0FBR2pDLDJCQUFrQyxPQUFlO0lBQy9DLE1BQU0sT0FBTyxHQUFHO1FBQ2QsMkNBQTJDO1FBQzNDLDBIQUEwSDtRQUMxSCxxRkFBcUY7S0FDdEYsQ0FBQztJQUVGLE1BQU0sQ0FBQyxPQUFPLENBQUMsSUFBSSxDQUFDLENBQUMsS0FBSyxLQUFLLEtBQUssQ0FBQyxJQUFJLENBQUMsT0FBTyxDQUFDLENBQUMsQ0FBQztBQUN0RCxDQUFDO0FBUkQsOENBUUM7QUFFRDtJQUNFLE1BQU0sQ0FBQyxDQUFDLE9BQWlDO1FB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IHZhckRlY2wuaW5pdGlhbGl6ZXIgYXMgdHMuRXhwcmVzc2lvbjtcblxuICAgICAgICAgIC8vIFVwZGF0ZSBub2RlIHdpdGggdGhlIHB1cmUgY29tbWVudCBiZWZvcmUgdGhlIHZhcmlhYmxlIGRlY2xhcmF0aW9uIGluaXRpYWxpemVyLlxuICAgICAgICAgIGNvbnN0IG5ld05vZGUgPSB0cy51cGRhdGVWYXJpYWJsZVN0YXRlbWVudChcbiAgICAgICAgICAgIG5vZGUsXG4gICAgICAgICAgICBub2RlLm1vZGlmaWVycyxcbiAgICAgICAgICAgIHRzLnVwZGF0ZVZhcmlhYmxlRGVjbGFyYXRpb25MaXN0KFxuICAgICAgICAgICAgICBub2RlLmRlY2xhcmF0aW9uTGlzdCxcbiAgICAgICAgICAgICAgW1xuICAgICAgICAgICAgICAgIHRzLnVwZGF0ZVZhcmlhYmxlRGVjbGFyYXRpb24oXG4gICAgICAgICAgICAgICAgICB2YXJEZWNsLFxuICAgICAgICAgICAgICAgICAgdmFyRGVjbC5uYW1lLFxuICAgICAgICAgICAgICAgICAgdmFyRGVjbC50eXBlLFxuICAgICAgICAgICAgICAgICAgdHMuYWRkU3ludGhldGljTGVhZGluZ0NvbW1lbnQoXG4gICAgICAgICAgICAgICAgICAgIHZhckluaXRpYWxpemVyLFxuICAgICAgICAgICAgICAgICAgICB0cy5TeW50YXhLaW5kLk11bHRpTGluZUNvbW1lbnRUcml2aWEsXG4gICAgICAgICAgICAgICAgICAgIHB1cmVGdW5jdGlvbkNvbW1lbnQsXG4gICAgICAgICAgICAgICAgICAgIGZhbHNlLFxuICAgICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgICApLFxuICAgICAgICAgICAgICBdLFxuICAgICAgICAgICAgKSxcbiAgICAgICAgICApO1xuXG4gICAgICAgICAgLy8gUmVwbGFjZSBub2RlIHdpdGggbW9kaWZpZWQgb25lLlxuICAgICAgICAgIHJldHVybiB0cy52aXNpdEVhY2hDaGlsZChuZXdOb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5leHByZXNzaW9uO1xuXG4gIGlmICghaXNJZGVudGlmaWVyKGV4dGVuZENhbGxFeHByZXNzaW9uLmV4cHJlc3Npb24pXG4gICAgICB8fCBleHRlbmRDYWxsRXhwcmVzc2lvbi5leHByZXNzaW9uLnRleHQgIT09IGV4dGVuZHNIZWxwZXJOYW1lKSB7XG4gICAgcmV0dXJuIGZhbHNlO1xuICB9XG5cbiAgaWYgKGV4dGVuZENhbGxFeHByZXNzaW9uLmFyZ3VtZW50cy5sZW5ndGggPT09IDApIHtcbiAgICByZXR1cm4gZmFsc2U7XG4gIH1cblxuICBjb25zdCBsYXN0QXJndW1lbnQgPSBleHRlbmRDYWxsRXhwcmVzc2lvbi5hcmd1bWVudHNbZXh0ZW5kQ2FsbEV4cHJlc3Npb24uYXJndW1lbnRzLmxlbmd0aCAtIDFdO1xuXG4gIGlmICghaXNJZGVudGlmaWVyKGxhc3RBcmd1bWVudCkgfHwgbGFzdEFyZ3VtZW50LnRleHQgIT09IGZ1bmN0aW9uUGFyYW1ldGVyLm5hbWUudGV4dCkge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIGNvbnN0IHNlY29uZFN0YXRlbWVudCA9IGZ1bmN0aW9uU3RhdGVtZW50c1sxXTtcblxuICByZXR1cm4gaXNGdW5jdGlvbkRlY2xhcmF0aW9uKHNlY29uZFN0YXRlbWVudClcbiAgICAgICAgICYmIHNlY29uZFN0YXRlbWVudC5uYW1lICE9PSB1bmRlZmluZWRcbiAgICAgICAgICYmIHNlY29uZFN0YXRlbWVudC5uYW1lLnRleHQgPT09IGNsYXNzTmFtZVxuICAgICAgICAgJiYgcmV0dXJuU3RhdGVtZW50LmV4cHJlc3Npb24udGV4dCA9PT0gc2Vjb25kU3RhdGVtZW50Lm5hbWUudGV4dDtcbn1cbiJdfQ==

@@ -203,3 +203,4 @@ "use strict";

}
if (expr.right.kind !== ts.SyntaxKind.FunctionExpression) {
if (expr.right.kind !== ts.SyntaxKind.FunctionExpression
&& expr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V0dXJuIG5hbWUudGV4dCA9PT0gJ3R5cGUnO1xufVxuXG4vLyBDaGVjayBpZiBhbiBpZGVudGlmaWVyIGlzIHBhcnQgb2YgdGhlIGtub3duIEFuZ3VsYXIgTWV0YWRhdGEuXG5mdW5jdGlvbiBpZGVudGlmaWVySXNNZXRhZGF0YShcbiAgaWQ6IHRzLklkZW50aWZpZXIsXG4gIG1ldGFkYXRhOiB0cy5Ob2RlW10sXG4gIGNoZWNrZXI6IHRzLlR5cGVDaGVja2VyLFxuKTogYm9vbGVhbiB7XG4gIGNvbnN0IHN5bWJvbCA9IGNoZWNrZXIuZ2V0U3ltYm9sQXRMb2NhdGlvbihpZCk7XG4gIGlmICghc3ltYm9sIHx8ICFzeW1ib2wuZGVjbGFyYXRpb25zIHx8ICFzeW1ib2wuZGVjbGFyYXRpb25zLmxlbmd0aCkge1xuICAgIHJldHVybiBmYWxzZTtcbiAgfVxuXG4gIHJldHVybiBzeW1ib2xcbiAgICAuZGVjbGFyYXRpb25zXG4gICAgLnNvbWUoKHNwZWMpID0+IG1ldGFkYXRhLmluZGV4T2Yoc3BlYykgIT09IC0xKTtcbn1cbiJdfQ==

@@ -135,3 +135,3 @@ "use strict";

// otherwise, return original array instance
return updatedStatements ? updatedStatements : statements;
return updatedStatements ? ts.createNodeArray(updatedStatements) : statements;
}

@@ -244,2 +244,2 @@ // TS 2.3 enums have statements that are inside a IIFE.

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoid3JhcC1lbnVtcy5qcyIsInNvdXJjZVJvb3QiOiIvVXNlcnMvaGFuc2wvU291cmNlcy9kZXZraXQvIiwic291cmNlcyI6WyJwYWNrYWdlcy9hbmd1bGFyX2RldmtpdC9idWlsZF9vcHRpbWl6ZXIvc3JjL3RyYW5zZm9ybXMvd3JhcC1lbnVtcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOztBQUFBOzs7Ozs7R0FNRztBQUNILGlDQUFpQztBQUN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ICAgIH1cbiAgICAgICAgICAgIC8vIGNyZWF0ZSB3cmFwcGVyIGFuZCByZXBsYWNlIHZhcmlhYmxlIHN0YXRlbWVudCBhbmQgSUlGRVxuICAgICAgICAgICAgdXBkYXRlZFN0YXRlbWVudHMuc3BsaWNlKHVJbmRleCwgMiwgY3JlYXRlV3JhcHBlZEVudW0oXG4gICAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgICAgIGN1cnJlbnRTdGF0ZW1lbnQsXG4gICAgICAgICAgICAgIGVudW1TdGF0ZW1lbnRzLFxuICAgICAgICAgICAgKSk7XG4gICAgICAgICAgICAvLyBza2lwIElJRkUgc3RhdGVtZW50XG4gICAgICAgICAgICBvSW5kZXgrKztcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChpc09iamVjdExpdGVyYWxFeHByZXNzaW9uKHZhcmlhYmxlRGVjbGFyYXRpb24uaW5pdGlhbGl6ZXIpXG4gICAgICAgICAgICAgICAgICAgJiYgdmFyaWFibGVEZWNsYXJhdGlvbi5pbml0aWFsaXplci5wcm9wZXJ0aWVzLmxlbmd0aCA9PT0gMCkge1xuICAgICAgICAgIGNvbnN0IG5leHRTdGF0ZW1lbnRzID0gc3RhdGVtZW50cy5zbGljZShvSW5kZXggKyAxKTtcbiAgICAgICAgICBjb25zdCBlbnVtU3RhdGVtZW50cyA9IGZpbmRUczJfMkVudW1TdGF0ZW1lbnRzKG5hbWUsIG5leHRTdGF0ZW1lbnRzKTtcbiAgICAgICAgICBpZiAoZW51bVN0YXRlbWVudHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgLy8gZm91bmQgYW4gZW51bVxuICAgICAgICAgICAgaWYgKCF1cGRhdGVkU3RhdGVtZW50cykge1xuICAgICAgICAgICAgICB1cGRhdGVkU3RhdGVtZW50cyA9IHN0YXRlbWVudHMuc2xpY2UoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIGNyZ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F0ZW1lbnQuZGVjbGFyYXRpb25MaXN0LmRlY2xhcmF0aW9uc1swXTtcbiAgICAgIGlmIChpc0lkZW50aWZpZXIodmFyaWFibGVEZWNsYXJhdGlvbi5uYW1lKSkge1xuICAgICAgICBjb25zdCBuYW1lID0gdmFyaWFibGVEZWNsYXJhdGlvbi5uYW1lLnRleHQ7XG5cbiAgICAgICAgaWYgKCF2YXJpYWJsZURlY2xhcmF0aW9uLmluaXRpYWxpemVyKSB7XG4gICAgICAgICAgY29uc3QgZW51bVN0YXRlbWVudHMgPSBmaW5kVHMyXzNFbnVtU3RhdGVtZW50cyhuYW1lLCBzdGF0ZW1lbnRzW29JbmRleCArIDFdKTtcbiAgICAgICAgICBpZiAoZW51bVN0YXRlbWVudHMubGVuZ3RoID4gMCkge1xuICAgICAgICAgICAgLy8gZm91bmQgYW4gZW51bVxuICAgICAgICAgICAgaWYgKCF1cGRhdGVkU3RhdGVtZW50cykge1xuICAgICAgICAgICAgICB1cGRhdGVkU3RhdGVtZW50cyA9IHN0YXRlbWVudHMuc2xpY2UoKTtcbiAgICAgICAgICAgIH1cbiAgICAgICAgICAgIC8vIGNyZWF0ZSB3cmFwcGVyIGFuZCByZXBsYWNlIHZhcmlhYmxlIHN0YXRlbWVudCBhbmQgSUlGRVxuICAgICAgICAgICAgdXBkYXRlZFN0YXRlbWVudHMuc3BsaWNlKHVJbmRleCwgMiwgY3JlYXRlV3JhcHBlZEVudW0oXG4gICAgICAgICAgICAgIG5hbWUsXG4gICAgICAgICAgICAgIGN1cnJlbnRTdGF0ZW1lbnQsXG4gICAgICAgICAgICAgIGVudW1TdGF0ZW1lbnRzLFxuICAgICAgICAgICAgKSk7XG4gICAgICAgICAgICAvLyBza2lwIElJRkUgc3RhdGVtZW50XG4gICAgICAgICAgICBvSW5kZXgrKztcbiAgICAgICAgICAgIGNvbnRpbnVlO1xuICAgICAgICAgIH1cbiAgICAgICAgfSBlbHNlIGlmIChpc09iamVjdExpdGVyYWxFeHByZXNzaW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pdGggdGhlIHB1cmUgY29tbWVudCBiZWZvcmUgdGhlIHZhcmlhYmxlIGRlY2xhcmF0aW9uIGluaXRpYWxpemVyLlxuICBjb25zdCB2YXJpYWJsZURlY2xhcmF0aW9uID0gaG9zdE5vZGUuZGVjbGFyYXRpb25MaXN0LmRlY2xhcmF0aW9uc1swXTtcbiAgY29uc3Qgb3V0ZXJWYXJTdG10ID0gdHMudXBkYXRlVmFyaWFibGVTdGF0ZW1lbnQoXG4gICAgaG9zdE5vZGUsXG4gICAgaG9zdE5vZGUubW9kaWZpZXJzLFxuICAgIHRzLnVwZGF0ZVZhcmlhYmxlRGVjbGFyYXRpb25MaXN0KFxuICAgICAgaG9zdE5vZGUuZGVjbGFyYXRpb25MaXN0LFxuICAgICAgW1xuICAgICAgICB0cy51cGRhdGVWYXJpYWJsZURlY2xhcmF0aW9uKFxuICAgICAgICAgIHZhcmlhYmxlRGVjbGFyYXRpb24sXG4gICAgICAgICAgdmFyaWFibGVEZWNsYXJhdGlvbi5uYW1lLFxuICAgICAgICAgIHZhcmlhYmxlRGVjbGFyYXRpb24udHlwZSxcbiAgICAgICAgICB0cy5hZGRTeW50aGV0aWNMZWFkaW5nQ29tbWVudChcbiAgICAgICAgICAgIGlpZmUsIHRzLlN5bnRheEtpbmQuTXVsdGlMaW5lQ29tbWVudFRyaXZpYSwgcHVyZUZ1bmN0aW9uQ29tbWVudCwgZmFsc2UsXG4gICAgICAgICAgKSxcbiAgICAgICAgKSxcbiAgICAgIF0sXG4gICAgKSxcbiAgKTtcblxuICByZXR1cm4gb3V0ZXJWYXJTdG10O1xufVxuIl19
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc