Socket
Socket
Sign inDemoInstall

@babel/plugin-transform-shorthand-properties

Package Overview
Dependencies
Maintainers
6
Versions
70
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-shorthand-properties - npm Package Compare versions

Comparing version 7.12.1 to 7.12.13

29

lib/index.js

@@ -26,11 +26,30 @@ "use strict";

func.returnType = node.returnType;
path.replaceWith(_core.types.objectProperty(node.key, func, node.computed));
const computedKey = _core.types.toComputedKey(node);
if (_core.types.isStringLiteral(computedKey, {
value: "__proto__"
})) {
path.replaceWith(_core.types.objectProperty(computedKey, func, true));
} else {
path.replaceWith(_core.types.objectProperty(node.key, func, node.computed));
}
}
},
ObjectProperty({
node
}) {
ObjectProperty(path) {
const {
node
} = path;
if (node.shorthand) {
node.shorthand = false;
const computedKey = _core.types.toComputedKey(node);
if (_core.types.isStringLiteral(computedKey, {
value: "__proto__"
})) {
path.replaceWith(_core.types.objectProperty(computedKey, node.value, true));
} else {
node.shorthand = false;
}
}

@@ -37,0 +56,0 @@ }

9

package.json
{
"name": "@babel/plugin-transform-shorthand-properties",
"version": "7.12.1",
"version": "7.12.13",
"description": "Compile ES2015 shorthand properties to ES5",

@@ -10,2 +10,3 @@ "repository": {

},
"homepage": "https://babel.dev/docs/en/next/babel-plugin-transform-shorthand-properties",
"license": "MIT",

@@ -20,3 +21,3 @@ "publishConfig": {

"dependencies": {
"@babel/helper-plugin-utils": "^7.10.4"
"@babel/helper-plugin-utils": "^7.12.13"
},

@@ -27,5 +28,5 @@ "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"
}
}

@@ -5,3 +5,3 @@ # @babel/plugin-transform-shorthand-properties

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

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

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