Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-typescript

Package Overview
Dependencies
Maintainers
4
Versions
133
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.19.1 to 7.19.3

25

lib/index.js

@@ -57,2 +57,18 @@ "use strict";

function safeRemove(path) {
const ids = path.getBindingIdentifiers();
for (const name of Object.keys(ids)) {
const binding = path.scope.getBinding(name);
if (binding && binding.identifier === ids[name]) {
binding.scope.removeBinding(name);
}
}
path.opts.noScope = true;
path.remove();
path.opts.noScope = false;
}
var _default = (0, _helperPluginUtils.declare)((api, opts) => {

@@ -351,7 +367,7 @@ api.assertVersion(7);

TSDeclareFunction(path) {
path.remove();
safeRemove(path);
},
TSDeclareMethod(path) {
path.remove();
safeRemove(path);
},

@@ -361,3 +377,3 @@

if (path.node.declare) {
path.remove();
safeRemove(path);
}

@@ -382,4 +398,3 @@ },

if (node.declare) {
path.remove();
return;
safeRemove(path);
}

@@ -386,0 +401,0 @@ },

12

lib/namespace.js

@@ -58,5 +58,3 @@ "use strict";

for (const declarator of declarations) {
if (declarator.init) {
declarator.init = _core.types.assignmentExpression("=", getMemberExpression(name, declarator.id.name), declarator.init);
}
declarator.init = _core.types.assignmentExpression("=", getMemberExpression(name, declarator.id.name), declarator.init);
}

@@ -135,2 +133,6 @@

if ("declare" in subNode.declaration && subNode.declaration.declare) {
continue;
}
switch (subNode.declaration.type) {

@@ -141,6 +143,2 @@ case "TSEnumDeclaration":

{
if (subNode.declaration.declare) {
continue;
}
const itemName = subNode.declaration.id.name;

@@ -147,0 +145,0 @@ names.add(itemName);

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

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

"devDependencies": {
"@babel/core": "^7.19.1",
"@babel/core": "^7.19.3",
"@babel/helper-plugin-test-runner": "^7.18.6",
"@babel/traverse": "^7.19.1",
"@babel/types": "^7.19.0"
"@babel/traverse": "^7.19.3",
"@babel/types": "^7.19.3"
},

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

Sorry, the diff of this file is not supported yet

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