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

estree-to-babel

Package Overview
Dependencies
Maintainers
1
Versions
58
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 4.7.0 to 4.8.0

8

lib/estree-to-babel.js

@@ -16,2 +16,3 @@ 'use strict';

convertTSInterfaceHeritage,
convertTSAbstractMethodDefinition,
convertPropertyDefinition,

@@ -61,4 +62,4 @@ convertPrivateIdentifier,

if (type === 'TSClassImplements')
return convertTSClassImplements(path);
if (type === 'TSAbstractMethodDefinition')
return convertTSAbstractMethodDefinition(path);

@@ -73,2 +74,5 @@ if (type === 'TSInterfaceHeritage')

return convertPrivateIdentifier(path);
if (type === 'TSClassImplements')
return convertTSClassImplements(path);
},

@@ -75,0 +79,0 @@ exit(path) {

@@ -45,2 +45,29 @@ 'use strict';

module.exports.convertTSAbstractMethodDefinition = (path) => {
const {node} = path;
const {
generator,
async,
params,
id,
returnType,
} = node.value;
const newNode = {
...node,
abstract: true,
generator,
async,
params,
id,
returnType,
type: 'TSDeclareMethod',
};
delete newNode.value;
path.replaceWith(newNode);
};
function createPrivateName(node) {

@@ -47,0 +74,0 @@ return {

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

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

@@ -44,8 +44,15 @@ # Estree-to-babel [![NPM version][NPMIMGURL]][NPMURL] [![Build Status][BuildStatusIMGURL]][BuildStatusURL] [![Coverage Status][CoverageIMGURL]][CoverageURL]

- `TSExpressionWithTypeArguments` instead of `TSClassImplements`;
- `ClassPrivateProperty` instead of `PropertyDefinition` when `key.type=PrivateName`;
- `ClasseProperty` instead of `PropertyDefinition` when `key.type=Identifier`;
- `PrivateName` instead of `PrivateIdentifier`;
- `TSInterfaceHeritage` instead of `TSExpressionWithTypeArguments`;
- `MemberExpression` instead of `TSQualifiedName` in `TSInterfaceHeritage`;
- `TSQualifiedName` instead of `MemberExpression` in `TSInterfaceHeritage`;
- `TSDeclaredMethod` with `abstract=true` instead of `TSAbstractMethodDefinition`;
- etc...

@@ -52,0 +59,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