Socket
Socket
Sign inDemoInstall

@babel/plugin-syntax-typescript

Package Overview
Dependencies
58
Maintainers
4
Versions
70
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 7.22.5 to 8.0.0-alpha.0

41

lib/index.js

@@ -1,23 +0,4 @@

"use strict";
import { declare } from '@babel/helper-plugin-utils';
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
{
var removePlugin = function (plugins, name) {
const indices = [];
plugins.forEach((plugin, i) => {
const n = Array.isArray(plugin) ? plugin[0] : plugin;
if (n === name) {
indices.unshift(i);
}
});
for (const i of indices) {
plugins.splice(i, 1);
}
};
}
var _default = (0, _helperPluginUtils.declare)((api, opts) => {
var index = declare((api, opts) => {
api.assertVersion(7);

@@ -28,21 +9,5 @@ const {

} = opts;
{
var {
isTSX
} = opts;
}
return {
name: "syntax-typescript",
manipulateOptions(opts, parserOpts) {
{
const {
plugins
} = parserOpts;
removePlugin(plugins, "flow");
removePlugin(plugins, "jsx");
plugins.push("objectRestSpread", "classProperties");
if (isTSX) {
plugins.push("jsx");
}
}
parserOpts.plugins.push(["typescript", {

@@ -55,4 +20,4 @@ disallowAmbiguousJSXLike,

});
exports.default = _default;
export { index as default };
//# sourceMappingURL=index.js.map

18

package.json
{
"name": "@babel/plugin-syntax-typescript",
"version": "7.22.5",
"version": "8.0.0-alpha.0",
"description": "Allow parsing of TypeScript syntax",

@@ -21,16 +21,20 @@ "repository": {

"dependencies": {
"@babel/helper-plugin-utils": "^7.22.5"
"@babel/helper-plugin-utils": "^8.0.0-alpha.0"
},
"peerDependencies": {
"@babel/core": "^7.0.0-0"
"@babel/core": "^8.0.0-alpha.0"
},
"devDependencies": {
"@babel/core": "^7.22.5",
"@babel/helper-plugin-test-runner": "^7.22.5"
"@babel/core": "^8.0.0-alpha.0",
"@babel/helper-plugin-test-runner": "^8.0.0-alpha.0"
},
"engines": {
"node": ">=6.9.0"
"node": "^16.20.0 || ^18.16.0 || >=20.0.0"
},
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
"exports": {
".": "./lib/index.js",
"./package.json": "./package.json"
},
"type": "module"
}

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

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

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

Sorry, the diff of this file is not supported yet

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