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

check-side-effects

Package Overview
Dependencies
Maintainers
1
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

check-side-effects - npm Package Compare versions

Comparing version 0.0.17 to 0.0.18

21

dist/tslint/noToplevelPropertyAccessRule.js

@@ -15,12 +15,5 @@ "use strict";

})();
var __importStar = (this && this.__importStar) || function (mod) {
if (mod && mod.__esModule) return mod;
var result = {};
if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];
result["default"] = mod;
return result;
};
Object.defineProperty(exports, "__esModule", { value: true });
var rules_1 = require("tslint/lib/rules");
var ts = __importStar(require("typescript"));
var typescript_1 = require("typescript");
var Rule = /** @class */ (function (_super) {

@@ -57,3 +50,3 @@ __extends(Rule, _super);

function walk(ctx) {
return ts.forEachChild(ctx.sourceFile, function cb(node) {
return typescript_1.forEachChild(ctx.sourceFile, function cb(node) {
// Stop recursing into this branch if it's a definition construct.

@@ -63,14 +56,14 @@ // These are function expression, function declaration, class, or arrow function (lambda).

// need to mark function calls inside them as pure.
if (ts.isFunctionDeclaration(node) || ts.isFunctionExpression(node) ||
ts.isClassDeclaration(node) || ts.isClassExpression(node) || ts.isArrowFunction(node) ||
ts.isMethodDeclaration(node) || ts.isInterfaceDeclaration(node)) {
if (typescript_1.isFunctionDeclaration(node) || typescript_1.isFunctionExpression(node) ||
typescript_1.isClassDeclaration(node) || typescript_1.isClassExpression(node) || typescript_1.isArrowFunction(node) ||
typescript_1.isMethodDeclaration(node) || typescript_1.isInterfaceDeclaration(node)) {
return;
}
// Fail any property access found.
if (ts.isPropertyAccessExpression(node) || ts.isElementAccessExpression(node)) {
if (typescript_1.isPropertyAccessExpression(node) || typescript_1.isElementAccessExpression(node)) {
ctx.addFailureAtNode(node, Rule.FAILURE_STRING);
}
return ts.forEachChild(node, cb);
return typescript_1.forEachChild(node, cb);
});
}
//# sourceMappingURL=noToplevelPropertyAccessRule.js.map
{
"name": "check-side-effects",
"version": "0.0.17",
"version": "0.0.18",
"description": "Check if a ES module has side effects.",

@@ -24,11 +24,11 @@ "repository": "https://github.com/filipesilva/check-side-effects",

"rollup-plugin-node-resolve": "~4.2.3",
"rollup-plugin-terser": "~4.0.4",
"rollup-plugin-terser": "~4.0.4"
},
"devDependencies": {
"@types/minimist": "~1.2.0",
"@types/terser": "~3.8.0",
"tslib": "~1.9.3",
"tslint": "^5.16.0",
"typescript": "^3.4.5"
},
"devDependencies": {
"@types/minimist": "~1.2.0",
"@types/terser": "~3.8.0"
}
}

Sorry, the diff of this file is not supported yet

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