Socket
Socket
Sign inDemoInstall

acorn-import-assertions

Package Overview
Dependencies
1
Maintainers
1
Versions
22
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.0 to 1.4.0

test/fixtures/without-assertions/actual.js

4

lib/index.js

@@ -89,4 +89,2 @@ "use strict";

var importDeclaration = this.finishNode(node, "ImportDeclaration");
if (this.type === this.assertToken) {

@@ -102,3 +100,3 @@ this.next();

this.semicolon();
return importDeclaration;
return this.finishNode(node, "ImportDeclaration");
}

@@ -105,0 +103,0 @@ }, {

{
"name": "acorn-import-assertions",
"version": "1.3.0",
"version": "1.4.0",
"description": "Support for import assertions in acorn",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -40,4 +40,2 @@ import { tokTypes as tt, TokenType } from "acorn";

const importDeclaration = this.finishNode(node, "ImportDeclaration");
if (this.type === this.assertToken) {

@@ -51,3 +49,3 @@ this.next();

this.semicolon();
return importDeclaration;
return this.finishNode(node, "ImportDeclaration");
}

@@ -54,0 +52,0 @@

@@ -23,3 +23,3 @@ {

"start": 0,
"end": 29,
"end": 54,
"loc": {

@@ -32,3 +32,3 @@ "start": {

"line": 1,
"column": 29
"column": 54
}

@@ -38,3 +38,3 @@ },

0,
29
54
],

@@ -41,0 +41,0 @@ "specifiers": [

import * as acorn from 'acorn';
import importAssertions from '../src/index';
import { importAssertions } from '../src/index';

@@ -4,0 +4,0 @@ const Parser = acorn.Parser.extend(importAssertions);

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc