Socket
Socket
Sign inDemoInstall

@babel/generator

Package Overview
Dependencies
Maintainers
6
Versions
178
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/generator - npm Package Compare versions

Comparing version 7.16.7 to 7.16.8

2

lib/generators/base.js

@@ -66,3 +66,3 @@ "use strict";

if (raw != null) {
if (!this.format.minified && raw != null) {
this.token(raw);

@@ -69,0 +69,0 @@ return;

@@ -83,5 +83,10 @@ "use strict";

function TSTypeParameterInstantiation(node) {
function TSTypeParameterInstantiation(node, parent) {
this.token("<");
this.printList(node.params, node, {});
if (parent.type === "ArrowFunctionExpression" && node.params.length === 1) {
this.token(",");
}
this.token(">");

@@ -310,5 +315,5 @@ }

const {
typeParameters,
parameters
typeParameters
} = node;
const parameters = node.parameters;
this.print(typeParameters, node);

@@ -323,3 +328,4 @@ this.token("(");

this.space();
this.print(node.typeAnnotation.typeAnnotation, node);
const returnType = node.typeAnnotation;
this.print(returnType.typeAnnotation, node);
}

@@ -767,5 +773,5 @@

const {
typeParameters,
parameters
typeParameters
} = node;
const parameters = node.parameters;
this.print(typeParameters, node);

@@ -777,3 +783,4 @@ this.token("(");

this.token(")");
this.print(node.typeAnnotation, node);
const returnType = node.typeAnnotation;
this.print(returnType, node);
}

@@ -780,0 +787,0 @@

{
"name": "@babel/generator",
"version": "7.16.7",
"version": "7.16.8",
"description": "Turns an AST into code.",

@@ -22,3 +22,3 @@ "author": "The Babel Team (https://babel.dev/team)",

"dependencies": {
"@babel/types": "^7.16.7",
"@babel/types": "^7.16.8",
"jsesc": "^2.5.1",

@@ -28,4 +28,4 @@ "source-map": "^0.5.0"

"devDependencies": {
"@babel/helper-fixtures": "^7.16.7",
"@babel/parser": "^7.16.7",
"@babel/helper-fixtures": "^7.16.8",
"@babel/parser": "^7.16.8",
"@types/jsesc": "^2.5.0",

@@ -32,0 +32,0 @@ "@types/source-map": "^0.5.0",

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