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

estree-to-babel

Package Overview
Dependencies
Maintainers
1
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

estree-to-babel - npm Package Compare versions

Comparing version 2.0.2 to 2.0.3

40

lib/get-ast.js

@@ -12,5 +12,11 @@ 'use strict';

tokens,
interpreter,
...program
} = node;
const directives = getDirectives(node);
if (interpreter)
tokens.unshift(getShebangToken(interpreter.value))
const ast = {

@@ -20,4 +26,3 @@ type: 'File',

...program,
interpreter: null,
directives: getDirectives(node),
directives,
},

@@ -44,1 +49,32 @@ comments,

}
function getShebangToken(value) {
return {
"type": {
"label": "#!...",
"beforeExpr": false,
"startsExpr": false,
"rightAssociative": false,
"isLoop": false,
"isAssign": false,
"prefix": false,
"postfix": false,
"binop": null,
"updateContext": null
},
"value": value,
"start": 0,
"end": 19,
"loc": {
"start": {
"line": 1,
"column": 0
},
"end": {
"line": 1,
"column": 19
}
}
}
}

2

package.json
{
"name": "estree-to-babel",
"version": "2.0.2",
"version": "2.0.3",
"author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",

@@ -5,0 +5,0 @@ "description": "convert estree ast to babel",

@@ -34,3 +34,3 @@ # Estree-to-babel [![NPM version][NPMIMGURL]][NPMURL] [![Dependency Status][DependencyStatusIMGURL]][DependencyStatusURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]

- `ClassPrivateMethod`
- Convert 'use strict' Literal into `Directive` and put into `program.body.directives`
- Convert `use strict` Literal into `Directive` and put it into `program.body.directives`
- etc...

@@ -37,0 +37,0 @@

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