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

decaffeinate-parser

Package Overview
Dependencies
Maintainers
1
Versions
156
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

decaffeinate-parser - npm Package Compare versions

Comparing version

to
1.0.1

14

lib/parser.js

@@ -139,2 +139,16 @@ 'use strict';

value = accessOpForProperty(value, prop, node.base.locationData);
if (value.type === 'MemberAccessOp' && value.expression.type === 'MemberAccessOp') {
if (value.expression.memberName === 'prototype' && value.expression.raw.slice(-2) === '::') {
// Un-expand shorthand prototype access.
value = {
type: 'ProtoMemberAccessOp',
line: value.line,
column: value.column,
range: value.range,
raw: value.raw,
expression: value.expression.expression,
memberName: value.memberName
};
}
}
});

@@ -141,0 +155,0 @@ return value;

7

package.json
{
"name": "decaffeinate-parser",
"version": "1.0.0",
"version": "1.0.1",
"description": "A better AST for CoffeeScript, inspired by CoffeeScriptRedux.",

@@ -30,3 +30,6 @@ "main": "lib/parser.js",

"string-repeat": "^1.1.1"
},
"publishConfig": {
"registry": "https://registry.npmjs.org/"
}
}
}

@@ -94,2 +94,16 @@ import isChainedComparison from './util/isChainedComparison';

value = accessOpForProperty(value, prop, node.base.locationData);
if (value.type === 'MemberAccessOp' && value.expression.type === 'MemberAccessOp') {
if (value.expression.memberName === 'prototype' && value.expression.raw.slice(-2) === '::') {
// Un-expand shorthand prototype access.
value = {
type: 'ProtoMemberAccessOp',
line: value.line,
column: value.column,
range: value.range,
raw: value.raw,
expression: value.expression.expression,
memberName: value.memberName
};
}
}
});

@@ -96,0 +110,0 @@ return value;