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

@syntest/ast-visitor-javascript

Package Overview
Dependencies
Maintainers
4
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@syntest/ast-visitor-javascript - npm Package Compare versions

Comparing version 0.2.0-beta.3 to 0.2.0-beta.4

19

dist/lib/AbstractSyntaxTreeVisitor.js
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.AbstractSyntaxTreeVisitor = exports.MemberSeparator = void 0;
const diagnostics_1 = require("@syntest/diagnostics");
const logging_1 = require("@syntest/logging");

@@ -72,3 +73,3 @@ const globalVariables_1 = require("./globalVariables");

if (loc === undefined) {
throw new Error(`Node ${path.type} in file '${this._filePath}' does not have a location`);
throw new diagnostics_1.ImplementationError(`Node ${path.type} in file '${this._filePath}' does not have a location`);
}

@@ -100,3 +101,3 @@ const startLine = loc.start.line;

else {
throw new Error("Cannot get binding for labeled statement");
throw new diagnostics_1.ImplementationError("Cannot get binding for labeled statement");
}

@@ -175,3 +176,3 @@ }

else {
throw new Error(`Cannot find binding for ${path.node.name} at ${this._getNodeId(path)}`);
throw new diagnostics_1.ImplementationError(`Cannot find binding for ${path.node.name} at ${this._getNodeId(path)}`);
}

@@ -191,3 +192,3 @@ }

else {
throw new Error(`ThisExpression without parent function found at ${this._getNodeId(path)}`);
throw new diagnostics_1.ImplementationError(`ThisExpression without parent function found at ${this._getNodeId(path)}`);
}

@@ -204,3 +205,3 @@ }

else {
throw new Error(`ThisExpression without parent function found at ${this._getNodeId(path)}`);
throw new diagnostics_1.ImplementationError(`ThisExpression without parent function found at ${this._getNodeId(path)}`);
}

@@ -213,3 +214,3 @@ }

// impossible?
throw new Error(`ThisExpression without parent class found at ${this._getNodeId(path)}`);
throw new diagnostics_1.ImplementationError(`ThisExpression without parent class found at ${this._getNodeId(path)}`);
}

@@ -222,3 +223,3 @@ return classParent;

// impossible?
throw new Error(`ThisExpression without parent object found at ${this._getNodeId(path)}`);
throw new diagnostics_1.ImplementationError(`ThisExpression without parent object found at ${this._getNodeId(path)}`);
}

@@ -230,7 +231,7 @@ return objectParent;

}
throw new Error(`ThisExpression without parent function found at ${this._getNodeId(path)}`);
throw new diagnostics_1.ImplementationError(`ThisExpression without parent function found at ${this._getNodeId(path)}`);
}
_getCurrentThisScopeId() {
if (this._thisScopeStack.length === 0) {
throw new Error("Invalid scope stack!");
throw new diagnostics_1.ImplementationError("Invalid scope stack!");
}

@@ -237,0 +238,0 @@ return this._thisScopeStack[this._thisScopeStack.length - 1];

{
"name": "@syntest/ast-visitor-javascript",
"version": "0.2.0-beta.3",
"version": "0.2.0-beta.4",
"description": "SynTest AST JavaScript is a library for visiting Abstract Syntax Trees for the JavaScript language",

@@ -53,3 +53,4 @@ "keywords": [

"@babel/traverse": "7.20.12",
"@syntest/logging": "^0.1.1",
"@syntest/diagnostics": "^0.1.0-beta.0",
"@syntest/logging": "^0.2.0-beta.2",
"globals": "^13.20.0"

@@ -66,3 +67,3 @@ },

},
"gitHead": "e75194cbb88e7ce9fcdb0f9083cc66befc265190"
"gitHead": "ce22f962248ab40d23755169870f9416413e3921"
}

Sorry, the diff of this file is not supported yet

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