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

acorn-import-assertions

Package Overview
Dependencies
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

acorn-import-assertions - npm Package Compare versions

Comparing version 1.7.6 to 1.8.0

7

lib/index.js

@@ -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");

25

package.json
{
"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

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