Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-typescript

Package Overview
Dependencies
61
Maintainers
6
Versions
123
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.15.0 to 7.15.4

15

lib/namespace.js

@@ -75,7 +75,12 @@ "use strict";

function buildNestedAmbiendModuleError(path, node) {
throw path.hub.buildError(node, "Ambient modules cannot be nested in other modules or namespaces.", Error);
}
function handleNested(path, t, node, parentExport) {
const names = new Set();
const realName = node.id;
t.assertIdentifier(realName);
const name = path.scope.generateUid(realName.name);
const namespaceTopLevel = node.body.body;
const namespaceTopLevel = t.isTSModuleBlock(node.body) ? node.body.body : [t.exportNamedDeclaration(node.body)];

@@ -88,2 +93,6 @@ for (let i = 0; i < namespaceTopLevel.length; i++) {

{
if (!t.isIdentifier(subNode.id)) {
throw buildNestedAmbiendModuleError(path, subNode);
}
const transformed = handleNested(path, t, subNode);

@@ -144,2 +153,6 @@ const moduleName = subNode.id.name;

{
if (!t.isIdentifier(subNode.declaration.id)) {
throw buildNestedAmbiendModuleError(path, subNode.declaration);
}
const transformed = handleNested(path, t, subNode.declaration, t.identifier(name));

@@ -146,0 +159,0 @@ const moduleName = subNode.declaration.id.name;

10

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

@@ -20,3 +20,3 @@ "repository": {

"dependencies": {
"@babel/helper-create-class-features-plugin": "^7.15.0",
"@babel/helper-create-class-features-plugin": "^7.15.4",
"@babel/helper-plugin-utils": "^7.14.5",

@@ -29,6 +29,6 @@ "@babel/plugin-syntax-typescript": "^7.14.5"

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

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc