New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

shift-parser

Package Overview
Dependencies
Maintainers
4
Versions
36
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

shift-parser - npm Package Compare versions

Comparing version 5.2.2 to 5.2.3

61

dist/early-error-state.js

@@ -38,11 +38,14 @@ 'use strict';

// FIXME: remove this when collections/multi-map is working
_multimap2.default.prototype.addEach = function (otherMap) {
var _this = this;
function addEach(thisMap) {
for (var _len = arguments.length, otherMaps = Array(_len > 1 ? _len - 1 : 0), _key = 1; _key < _len; _key++) {
otherMaps[_key - 1] = arguments[_key];
}
otherMap.forEachEntry(function (v, k) {
_this.set.apply(_this, [k].concat(v));
otherMaps.forEach(function (otherMap) {
otherMap.forEachEntry(function (v, k) {
thisMap.set.apply(thisMap, [k].concat(v));
});
});
return this;
};
return thisMap;
}

@@ -274,3 +277,3 @@ var identity = void 0; // initialised below EarlyErrorState

value: function observeLexicalDeclaration() {
this.lexicallyDeclaredNames.addEach(this.boundNames);
addEach(this.lexicallyDeclaredNames, this.boundNames);
this.boundNames = new _multimap2.default();

@@ -290,3 +293,3 @@ return this;

value: function enforceDuplicateLexicallyDeclaredNames(createError) {
var _this2 = this;
var _this = this;

@@ -296,3 +299,3 @@ this.lexicallyDeclaredNames.forEachEntry(function (nodes) {

nodes.slice(1).forEach(function (dupeNode) {
_this2.addError(createError(dupeNode));
_this.addError(createError(dupeNode));
});

@@ -306,3 +309,3 @@ }

value: function enforceConflictingLexicallyDeclaredNames(otherNames, createError) {
var _this3 = this;
var _this2 = this;

@@ -312,3 +315,3 @@ this.lexicallyDeclaredNames.forEachEntry(function (nodes, bindingName) {

nodes.forEach(function (conflictingNode) {
_this3.addError(createError(conflictingNode));
_this2.addError(createError(conflictingNode));
});

@@ -323,3 +326,3 @@ }

this.observeVarBoundary();
this.functionDeclarationNames.addEach(this.boundNames);
addEach(this.functionDeclarationNames, this.boundNames);
this.boundNames = new _multimap2.default();

@@ -331,3 +334,3 @@ return this;

value: function functionDeclarationNamesAreLexical() {
this.lexicallyDeclaredNames.addEach(this.functionDeclarationNames);
addEach(this.lexicallyDeclaredNames, this.functionDeclarationNames);
this.functionDeclarationNames = new _multimap2.default();

@@ -339,3 +342,3 @@ return this;

value: function observeVarDeclaration() {
this.varDeclaredNames.addEach(this.boundNames);
addEach(this.varDeclaredNames, this.boundNames);
this.boundNames = new _multimap2.default();

@@ -347,6 +350,6 @@ return this;

value: function recordForOfVars() {
var _this4 = this;
var _this3 = this;
this.varDeclaredNames.forEach(function (bindingIdentifier) {
_this4.forOfVarDeclaredNames.push(bindingIdentifier);
_this3.forOfVarDeclaredNames.push(bindingIdentifier);
});

@@ -373,4 +376,4 @@ return this;

value: function exportDeclaredNames() {
this.exportedNames.addEach(this.lexicallyDeclaredNames).addEach(this.varDeclaredNames);
this.exportedBindings.addEach(this.lexicallyDeclaredNames).addEach(this.varDeclaredNames);
addEach(this.exportedNames, this.lexicallyDeclaredNames, this.varDeclaredNames);
addEach(this.exportedBindings, this.lexicallyDeclaredNames, this.varDeclaredNames);
return this;

@@ -437,9 +440,9 @@ }

[].push.apply(this.newTargetExpressions, s.newTargetExpressions);
this.boundNames.addEach(s.boundNames);
this.lexicallyDeclaredNames.addEach(s.lexicallyDeclaredNames);
this.functionDeclarationNames.addEach(s.functionDeclarationNames);
this.varDeclaredNames.addEach(s.varDeclaredNames);
addEach(this.boundNames, s.boundNames);
addEach(this.lexicallyDeclaredNames, s.lexicallyDeclaredNames);
addEach(this.functionDeclarationNames, s.functionDeclarationNames);
addEach(this.varDeclaredNames, s.varDeclaredNames);
[].push.apply(this.forOfVarDeclaredNames, s.forOfVarDeclaredNames);
this.exportedNames.addEach(s.exportedNames);
this.exportedBindings.addEach(s.exportedBindings);
addEach(this.exportedNames, s.exportedNames);
addEach(this.exportedBindings, s.exportedBindings);
[].push.apply(this.superCallExpressions, s.superCallExpressions);

@@ -481,7 +484,7 @@ [].push.apply(this.superCallExpressionsInConstructorMethod, s.superCallExpressionsInConstructorMethod);

var _this5 = _possibleConstructorReturn(this, (EarlyError.__proto__ || Object.getPrototypeOf(EarlyError)).call(this, message));
var _this4 = _possibleConstructorReturn(this, (EarlyError.__proto__ || Object.getPrototypeOf(EarlyError)).call(this, message));
_this5.node = node;
_this5.message = message;
return _this5;
_this4.node = node;
_this4.message = message;
return _this4;
}

@@ -488,0 +491,0 @@

{
"name": "shift-parser",
"version": "5.2.2",
"version": "5.2.3",
"description": "ECMAScript parser that produces a Shift format AST",

@@ -47,6 +47,8 @@ "author": "Shape Security",

"mocha": "2.3.4",
"normalize-parser-test": "1.0.3",
"nyc": "10.1.2",
"regenerate": "^1.3.2",
"shift-parser-expectations": "2016.0.0",
"shift-spec": "^2016.0.0",
"test262-parser-tests": "0.0.1",
"test262-parser-tests": "0.0.3",
"tick": "0.1.1",

@@ -53,0 +55,0 @@ "traceur": "0.0.91",

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