Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-typescript

Package Overview
Dependencies
61
Maintainers
6
Versions
128
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.12.1 to 7.12.13

36

lib/index.js

@@ -53,11 +53,16 @@ "use strict";

var _default = (0, _helperPluginUtils.declare)((api, {
jsxPragma = "React.createElement",
jsxPragmaFrag = "React.Fragment",
allowNamespaces = false,
allowDeclareFields = false,
onlyRemoveTypeImports = false
}) => {
var _default = (0, _helperPluginUtils.declare)((api, opts) => {
api.assertVersion(7);
const JSX_PRAGMA_REGEX = /\*?\s*@jsx((?:Frag)?)\s+([^\s]+)/;
const {
jsxPragma = "React.createElement",
jsxPragmaFrag = "React.Fragment",
allowNamespaces = false,
onlyRemoveTypeImports = false
} = opts;
{
var {
allowDeclareFields = false
} = opts;
}
const classMemberVisitors = {

@@ -68,5 +73,6 @@ field(path) {

} = path;
if (!allowDeclareFields && node.declare) {
throw path.buildCodeFrameError(`The 'declare' modifier is only allowed when the 'allowDeclareFields' option of ` + `@babel/plugin-transform-typescript or @babel/preset-typescript is enabled.`);
{
if (!allowDeclareFields && node.declare) {
throw path.buildCodeFrameError(`The 'declare' modifier is only allowed when the 'allowDeclareFields' option of ` + `@babel/plugin-transform-typescript or @babel/preset-typescript is enabled.`);
}
}

@@ -87,7 +93,11 @@

if (!allowDeclareFields && !node.decorators) {
{
if (!allowDeclareFields && !node.decorators) {
path.remove();
}
}
} else {
if (!allowDeclareFields && !node.value && !node.decorators && !_core.types.isClassPrivateProperty(node)) {
path.remove();
}
} else if (!allowDeclareFields && !node.value && !node.decorators && !_core.types.isClassPrivateProperty(node)) {
path.remove();
}

@@ -94,0 +104,0 @@

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

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

"dependencies": {
"@babel/helper-create-class-features-plugin": "^7.12.1",
"@babel/helper-plugin-utils": "^7.10.4",
"@babel/plugin-syntax-typescript": "^7.12.1"
"@babel/helper-create-class-features-plugin": "^7.12.13",
"@babel/helper-plugin-utils": "^7.12.13",
"@babel/plugin-syntax-typescript": "^7.12.13"
},

@@ -29,5 +29,6 @@ "peerDependencies": {

"devDependencies": {
"@babel/core": "^7.12.1",
"@babel/helper-plugin-test-runner": "7.10.4"
}
"@babel/core": "7.12.13",
"@babel/helper-plugin-test-runner": "7.12.13"
},
"homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-typescript"
}

@@ -5,3 +5,3 @@ # @babel/plugin-transform-typescript

See our website [@babel/plugin-transform-typescript](https://babeljs.io/docs/en/next/babel-plugin-transform-typescript.html) for more information.
See our website [@babel/plugin-transform-typescript](https://babeljs.io/docs/en/babel-plugin-transform-typescript) for more information.

@@ -8,0 +8,0 @@ ## Install

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