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.4.6 to 0.4.7

2

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

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

@@ -35,2 +35,4 @@ "use strict";

];
// TODO: this code is very fragile and should be reworked.
// See: https://github.com/angular/devkit/issues/523
const es5AngularModules = [

@@ -40,3 +42,4 @@ // Angular 4 packaging format has .es5.js as the extension.

// Angular 5 has esm5 folders.
/[\\/]node_modules[\\/]@angular[\\/][^\\/]+[\\/]esm5[\\/]/,
// Angular 6 has fesm5 folders.
/[\\/]node_modules[\\/]@angular[\\/][^\\/]+[\\/]f?esm5[\\/]/,
// All Angular versions have UMD with es5.

@@ -120,2 +123,2 @@ /\.umd\.js$/,

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

@@ -25,2 +25,5 @@ "use strict";

emitSourceMap: options.sourceMap,
isSideEffectFree: this._module
&& this._module.factoryMeta
&& this._module.factoryMeta.sideEffectFree,
});

@@ -64,2 +67,2 @@ if (boOutput.emitSk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mNlTWFwO1xuICAgIH1cbiAgfVxuXG4gIC8vIFdlYnBhY2sgdHlwaW5ncyBmb3IgcHJldmlvdXNTb3VyY2VNYXAgYXJlIHdyb25nLCB0aGV5IGFyZSBKU09OIG9iamVjdHMgYW5kIG5vdCBzdHJpbmdzLlxuICAvLyB0c2xpbnQ6ZGlzYWJsZS1uZXh0LWxpbmU6bm8tYW55XG4gIHRoaXMuY2FsbGJhY2sobnVsbCwgbmV3Q29udGVudCwgbmV3U291cmNlTWFwIGFzIGFueSk7XG59XG4iXX0=

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

/\s*function \(_super\) {/, newLine,
/\w*__extends\(\w+, _super\);/,
/\w*\.?__extends\(\w+, _super\);/,
],

@@ -138,12 +138,17 @@ ].map(arr => new RegExp(arr.map(x => x.source).join(''), 'm'));

}
if (functionStatements.length < 3) {
if (functionStatements.length < 3 || !ts.isExpressionStatement(firstStatement)) {
return false;
}
if (!ts.isExpressionStatement(firstStatement)
|| !ts.isCallExpression(firstStatement.expression)) {
if (!ts.isCallExpression(firstStatement.expression)) {
return false;
}
const extendCallExpression = firstStatement.expression;
if (!ts.isIdentifier(extendCallExpression.expression)
|| !extendCallExpression.expression.text.endsWith(extendsHelperName)) {
let functionName;
if (ts.isIdentifier(extendCallExpression.expression)) {
functionName = extendCallExpression.expression.text;
}
else if (ts.isPropertyAccessExpression(extendCallExpression.expression)) {
functionName = extendCallExpression.expression.name.text;
}
if (!functionName || !functionName.endsWith(extendsHelperName)) {
return false;

@@ -164,2 +169,2 @@ }

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoicHJlZml4LWNsYXNzZXMuanMiLCJzb3VyY2VSb290IjoiLi8iLCJzb3VyY2VzIjpbInBhY2thZ2VzL2FuZ3VsYXJfZGV2a2l0L2J1aWxkX29wdGltaXplci9zcmMvdHJhbnNmb3Jtcy9wcmVmaXgtY2xhc3Nlcy50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiO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AgICAgIHZhckRlY2wudHlwZSxcbiAgICAgICAgICAgICAgICAgIHRzLmFkZFN5bnRoZXRpY0xlYWRpbmdDb21tZW50KFxuICAgICAgICAgICAgICAgICAgICB2YXJJbml0aWFsaXplcixcbiAgICAgICAgICAgICAgICAgICAgdHMuU3ludGF4S2luZC5NdWx0aUxpbmVDb21tZW50VHJpdmlhLFxuICAgICAgICAgICAgICAgICAgICBwdXJlRnVuY3Rpb25Db21tZW50LFxuICAgICAgICAgICAgICAgICAgICBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIC8vIFJlcGxhY2Ugbm9kZSB3aXRoIG1vZGlmaWVkIG9uZS5cbiAgICAgICAgICByZXR1cm4gdHMudmlzaXRFYWNoQ2hpbGQobmV3Tm9kZSwgdmlzaXRvciwgY29udGV4dCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBPdGhlcndpc2UgcmV0dXJuIG5vZGUgYXMgaXMuXG4gICAgICAgIHJldHVybiB0cy52aXNpdEVhY2hDaGlsZChub2RlLCB2aXNpdG9yLCBjb250ZXh0KTtcbiAgICAgIH07XG5cbiAgICAgIHJldHVybiB0cy52aXNpdEVhY2hDaGlsZChzZiwgdmlzaXRvciwgY29udGV4dCk7XG4gICAgfTtcblxuICAgIHJldHVybiB0cmFuc2Zvcm1lcjtcbiAgfTtcbn1cblxuLy8gRGV0ZXJtaW5lIGlmIGEgbm9kZSBtYXRjaGVkIHRoZSBzdHJ1Y3R1cmUgb2YgYSBkb3dubGV2ZWxlZCBUUyBjbGFzcy5cbmZ1bmN0aW9uIGlzRG93bmxldmVsZWRDbGFzcyhub2RlOiB0cy5Ob2RlKTogYm9vbGVhbiB7XG5cbiAgaWYgKCF0cy5pc1ZhcmlhYmxlU3RhdGVtZW50KG5vZGUpKSB7XG4gICAgcmV0dXJuIGZhbHNl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ICAgICAgICAgICAgbm9kZS5kZWNsYXJhdGlvbkxpc3QsXG4gICAgICAgICAgICAgIFtcbiAgICAgICAgICAgICAgICB0cy51cGRhdGVWYXJpYWJsZURlY2xhcmF0aW9uKFxuICAgICAgICAgICAgICAgICAgdmFyRGVjbCxcbiAgICAgICAgICAgICAgICAgIHZhckRlY2wubmFtZSxcbiAgICAgICAgICAgICAgICAgIHZhckRlY2wudHlwZSxcbiAgICAgICAgICAgICAgICAgIHRzLmFkZFN5bnRoZXRpY0xlYWRpbmdDb21tZW50KFxuICAgICAgICAgICAgICAgICAgICB2YXJJbml0aWFsaXplcixcbiAgICAgICAgICAgICAgICAgICAgdHMuU3ludGF4S2luZC5NdWx0aUxpbmVDb21tZW50VHJpdmlhLFxuICAgICAgICAgICAgICAgICAgICBwdXJlRnVuY3Rpb25Db21tZW50LFxuICAgICAgICAgICAgICAgICAgICBmYWxzZSxcbiAgICAgICAgICAgICAgICAgICksXG4gICAgICAgICAgICAgICAgKSxcbiAgICAgICAgICAgICAgXSxcbiAgICAgICAgICAgICksXG4gICAgICAgICAgKTtcblxuICAgICAgICAgIC8vIFJlcGxhY2Ugbm9kZSB3aXRoIG1vZGlmaWVkIG9uZS5cbiAgICAgICAgICByZXR1cm4gdHMudmlzaXRFYWNoQ2hpbGQobmV3Tm9kZSwgdmlzaXRvciwgY29udGV4dCk7XG4gICAgICAgIH1cblxuICAgICAgICAvLyBPdGhlcndpc2UgcmV0dXJuIG5vZGUgYXMgaXMuXG4gICAgICAgIHJldHVybiB0cy52aXNpdEVhY2hDaGlsZChub2RlLCB2aXNpdG9yLCBjb250ZXh0KTtcbiAgICAgIH07XG5cbiAgICAgIHJldHVybiB0cy52aXNpdEVhY2hDaGlsZChzZiwgdmlzaXRvciwgY29udGV4dCk7XG4gICAgfTtcblxuICAgIHJldHVybiB0cmFuc2Zvcm1lcjtcbiAgfTtcbn1cblxuLy8gRGV0ZXJtaW5lIGlmIGEgbm9kZSBtYXRjaGVkIHRoZSBzd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nQubmFtZS50ZXh0KVxuICAgICAgICAgJiYgcmV0dXJuU3RhdGVtZW50LmV4cHJlc3Npb24udGV4dCA9PT0gc2Vjb25kU3RhdGVtZW50Lm5hbWUudGV4dDtcbn1cbiJdfQ==
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