acorn-import-assertions
Advanced tools
Comparing version 1.7.6 to 1.8.0
@@ -265,11 +265,6 @@ "use strict"; | ||
this.next(); | ||
node.key = assertionKeyNode; // for now we are only allowing `type` as the only allowed module attribute | ||
if (node.key.name !== "type") { | ||
this.raise(this.pos, "The only accepted import assertion is `type`"); | ||
} // check if we already have an entry for an attribute | ||
node.key = assertionKeyNode; // check if we already have an entry for an attribute | ||
// if a duplicate entry is found, throw an error | ||
// for now this logic will come into play only when someone declares `type` twice | ||
if (attrNames.has(node.key.name)) { | ||
@@ -276,0 +271,0 @@ this.raise(this.pos, "Duplicated key in assertions"); |
{ | ||
"name": "acorn-import-assertions", | ||
"version": "1.7.6", | ||
"version": "1.8.0", | ||
"description": "Support for import assertions in acorn", | ||
@@ -16,5 +16,7 @@ "main": "lib/index.js", | ||
"scripts": { | ||
"build": "babel ./src --out-dir ./lib && node post-build.js", | ||
"prepublishOnly": "npm run build", | ||
"test": "mocha ./test/index.js", | ||
"watch": "babel ./src --out-dir ./lib --watch", | ||
"prepublish": "babel ./src --out-dir ./lib && node post-build.js" | ||
"test:test262": "node run_test262.js", | ||
"watch": "babel ./src --out-dir ./lib --watch" | ||
}, | ||
@@ -24,9 +26,11 @@ "author": "Sven Sauleau <sven@sauleau.com>", | ||
"devDependencies": { | ||
"@babel/cli": "^7.12.10", | ||
"@babel/core": "^7.12.10", | ||
"@babel/preset-env": "^7.12.10", | ||
"@babel/register": "^7.12.10", | ||
"acorn": "^8", | ||
"chai": "^4.2.0", | ||
"mocha": "^8.2.1" | ||
"@babel/cli": "^7.14.8", | ||
"@babel/core": "^7.15.0", | ||
"@babel/preset-env": "^7.15.0", | ||
"@babel/register": "^7.15.3", | ||
"acorn": "^8.4.1", | ||
"chai": "^4.3.4", | ||
"mocha": "^9.1.0", | ||
"test262": "tc39/test262#47ab262658cd97ae35c9a537808cac18fa4ab567", | ||
"test262-parser-runner": "^0.5.0" | ||
}, | ||
@@ -40,3 +44,2 @@ "peerDependencies": { | ||
}, | ||
"dependencies": {}, | ||
"browserslist": [ | ||
@@ -43,0 +46,0 @@ "maintained node versions" |
@@ -219,6 +219,2 @@ import * as _acorn from "acorn"; | ||
// for now we are only allowing `type` as the only allowed module attribute | ||
if (node.key.name !== "type") { | ||
this.raise(this.pos, "The only accepted import assertion is `type`"); | ||
} | ||
// check if we already have an entry for an attribute | ||
@@ -225,0 +221,0 @@ // if a duplicate entry is found, throw an error |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
25510
9
643