Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-typescript

Package Overview
Dependencies
Maintainers
5
Versions
132
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.0.0-beta.47 to 7.0.0-beta.48

8

lib/enum.js

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

_assert = function _assert() {
_assert = function () {
return data;

@@ -22,3 +22,3 @@ };

_core = function _core() {
_core = function () {
return data;

@@ -33,3 +33,5 @@ };

function transpileEnum(path, t) {
const node = path.node;
const {
node
} = path;

@@ -36,0 +38,0 @@ if (node.declare) {

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

_helperPluginUtils = function _helperPluginUtils() {
_helperPluginUtils = function () {
return data;

@@ -22,3 +22,3 @@ };

_pluginSyntaxTypescript = function _pluginSyntaxTypescript() {
_pluginSyntaxTypescript = function () {
return data;

@@ -33,3 +33,3 @@ };

_core = function _core() {
_core = function () {
return data;

@@ -72,16 +72,3 @@ };

for (var _iterator = path.get("body"), _isArray = Array.isArray(_iterator), _i = 0, _iterator = _isArray ? _iterator : _iterator[Symbol.iterator]();;) {
var _ref;
if (_isArray) {
if (_i >= _iterator.length) break;
_ref = _iterator[_i++];
} else {
_i = _iterator.next();
if (_i.done) break;
_ref = _i.value;
}
const stmt = _ref;
for (const stmt of path.get("body")) {
if (_core().types.isImportDeclaration(stmt)) {

@@ -95,15 +82,3 @@ if (stmt.node.specifiers.length === 0) {

for (var _iterator2 = stmt.node.specifiers, _isArray2 = Array.isArray(_iterator2), _i2 = 0, _iterator2 = _isArray2 ? _iterator2 : _iterator2[Symbol.iterator]();;) {
var _ref2;
if (_isArray2) {
if (_i2 >= _iterator2.length) break;
_ref2 = _iterator2[_i2++];
} else {
_i2 = _iterator2.next();
if (_i2.done) break;
_ref2 = _i2.value;
}
const specifier = _ref2;
for (const specifier of stmt.node.specifiers) {
const binding = stmt.scope.getBinding(specifier.local.name);

@@ -121,4 +96,3 @@

} else {
for (var _i3 = 0; _i3 < importsToRemove.length; _i3++) {
const importPath = importsToRemove[_i3];
for (const importPath of importsToRemove) {
importPath.remove();

@@ -150,3 +124,5 @@ }

ClassMethod(path) {
const node = path.node;
const {
node
} = path;
if (node.accessibility) node.accessibility = null;

@@ -162,16 +138,3 @@ if (node.abstract) node.abstract = null;

for (var _iterator3 = node.params, _isArray3 = Array.isArray(_iterator3), _i4 = 0, _iterator3 = _isArray3 ? _iterator3 : _iterator3[Symbol.iterator]();;) {
var _ref3;
if (_isArray3) {
if (_i4 >= _iterator3.length) break;
_ref3 = _iterator3[_i4++];
} else {
_i4 = _iterator3.next();
if (_i4.done) break;
_ref3 = _i4.value;
}
const param = _ref3;
for (const param of node.params) {
if (param.type === "TSParameterProperty") {

@@ -214,3 +177,5 @@ parameterProperties.push(param.parameter);

ClassProperty(path) {
const node = path.node;
const {
node
} = path;

@@ -235,3 +200,5 @@ if (!node.value) {

ClassDeclaration(path) {
const node = path.node;
const {
node
} = path;

@@ -325,16 +292,3 @@ if (node.declare) {

function isImportTypeOnly(binding, programPath) {
for (var _iterator4 = binding.referencePaths, _isArray4 = Array.isArray(_iterator4), _i5 = 0, _iterator4 = _isArray4 ? _iterator4 : _iterator4[Symbol.iterator]();;) {
var _ref4;
if (_isArray4) {
if (_i5 >= _iterator4.length) break;
_ref4 = _iterator4[_i5++];
} else {
_i5 = _iterator4.next();
if (_i5.done) break;
_ref4 = _i5.value;
}
const path = _ref4;
for (const path of binding.referencePaths) {
if (!isInType(path)) {

@@ -341,0 +295,0 @@ return false;

{
"name": "@babel/plugin-transform-typescript",
"version": "7.0.0-beta.47",
"version": "7.0.0-beta.48",
"description": "Transform TypeScript into ES.next",

@@ -13,12 +13,12 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-typescript",

"dependencies": {
"@babel/helper-plugin-utils": "7.0.0-beta.47",
"@babel/plugin-syntax-typescript": "7.0.0-beta.47"
"@babel/helper-plugin-utils": "7.0.0-beta.48",
"@babel/plugin-syntax-typescript": "7.0.0-beta.48"
},
"peerDependencies": {
"@babel/core": "7.0.0-beta.47"
"@babel/core": "7.0.0-beta.48"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.47",
"@babel/helper-plugin-test-runner": "7.0.0-beta.47"
"@babel/core": "7.0.0-beta.48",
"@babel/helper-plugin-test-runner": "7.0.0-beta.48"
}
}
SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc