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

acorn-loose

Package Overview
Dependencies
Maintainers
1
Versions
12
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn-loose - npm Package Compare versions

Comparing version 6.1.0 to 7.0.0

8

CHANGELOG.md

@@ -0,4 +1,10 @@

## 7.0.0 (2019-08-12)
### Breaking changes
Changes the node format for dynamic imports to use the `ImportExpression` node type, as defined in [ESTree](https://github.com/estree/estree/blob/master/es2020.md#importexpression).
## 6.1.0 (2019-07-04)
## New features
### New features

@@ -5,0 +11,0 @@ Support bigint syntax.

25

dist/acorn-loose.js

@@ -298,5 +298,3 @@ (function (global, factory) {

this.last = this.tok;
if (this.options.ecmaVersion >= 6) {
node.sourceType = this.options.sourceType;
}
node.sourceType = this.options.sourceType;
return this.finishNode(node, "Program")

@@ -1052,4 +1050,4 @@ };

case acorn.tokTypes._import:
if (this.options.ecmaVersion > 10) {
return this.parseDynamicImport()
if (this.options.ecmaVersion >= 11) {
return this.parseExprImport()
} else {

@@ -1064,8 +1062,19 @@ return this.dummyIdent()

lp$2.parseDynamicImport = function() {
lp$2.parseExprImport = function() {
var node = this.startNode();
this.next();
return this.finishNode(node, "Import")
this.next(); // skip `import`
switch (this.tok.type) {
case acorn.tokTypes.parenL:
return this.parseDynamicImport(node)
default:
node.name = "import";
return this.finishNode(node, "Identifier")
}
};
lp$2.parseDynamicImport = function(node) {
node.source = this.parseExprList(acorn.tokTypes.parenR)[0] || this.dummyString();
return this.finishNode(node, "ImportExpression")
};
lp$2.parseNew = function() {

@@ -1072,0 +1081,0 @@ var node = this.startNode(), startIndent = this.curIndent, line = this.curLineStart;

@@ -7,6 +7,6 @@ {

"module": "dist/acorn-loose.mjs",
"version": "6.1.0",
"version": "7.0.0",
"engines": {"node": ">=0.4.0"},
"dependencies": {
"acorn": "^6.2.0"
"acorn": "^7.0.0"
},

@@ -13,0 +13,0 @@ "maintainers": [

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