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

@babel/plugin-transform-typescript

Package Overview
Dependencies
Maintainers
6
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-typescript - npm Package Compare versions

Comparing version 7.15.4 to 7.15.8

17

lib/index.js

@@ -50,4 +50,4 @@ "use strict";

function registerGlobalType(programScope, name) {
GLOBAL_TYPES.get(programScope.path.node).add(name);
function registerGlobalType(programNode, name) {
GLOBAL_TYPES.get(programNode).add(name);
}

@@ -169,5 +169,6 @@

let fileJsxPragmaFrag = null;
const programNode = path.node;
if (!GLOBAL_TYPES.has(path.node)) {
GLOBAL_TYPES.set(path.node, new Set());
if (!GLOBAL_TYPES.has(programNode)) {
GLOBAL_TYPES.set(programNode, new Set());
}

@@ -208,2 +209,6 @@

if (stmt.node.importKind === "type") {
for (const specifier of stmt.node.specifiers) {
registerGlobalType(programNode, specifier.local.name);
}
stmt.remove();

@@ -260,3 +265,3 @@ continue;

for (const name of Object.keys(stmt.getBindingIdentifiers())) {
registerGlobalType(path.scope, name);
registerGlobalType(programNode, name);
}

@@ -270,3 +275,3 @@ } else if (stmt.isTSTypeAliasDeclaration() || stmt.isTSDeclareFunction() && stmt.get("id").isIdentifier() || stmt.isTSInterfaceDeclaration() || stmt.isClassDeclaration({

}) && stmt.get("id").isIdentifier()) {
registerGlobalType(path.scope, stmt.node.id.name);
registerGlobalType(programNode, stmt.node.id.name);
}

@@ -273,0 +278,0 @@ }

{
"name": "@babel/plugin-transform-typescript",
"version": "7.15.4",
"version": "7.15.8",
"description": "Transform TypeScript into ES.next",

@@ -28,6 +28,6 @@ "repository": {

"devDependencies": {
"@babel/core": "7.15.4",
"@babel/core": "7.15.8",
"@babel/helper-plugin-test-runner": "7.14.5",
"@babel/traverse": "7.15.4",
"@babel/types": "7.15.4"
"@babel/types": "7.15.6"
},

@@ -34,0 +34,0 @@ "homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-typescript",

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