Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-transform-proto-to-assign

Package Overview
Dependencies
Maintainers
4
Versions
83
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-transform-proto-to-assign - npm Package Compare versions

Comparing version 7.18.0 to 7.18.6

16

lib/index.js

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

function isProtoKey(node) {
return _core.types.isLiteral(_core.types.toComputedKey(node, node.key), {
return !_core.types.isSpreadElement(node) && _core.types.isStringLiteral(_core.types.toComputedKey(node, node.key), {
value: "__proto__"

@@ -24,3 +24,3 @@ });

const left = node;
return _core.types.isMemberExpression(left) && _core.types.isLiteral(_core.types.toComputedKey(left, left.property), {
return _core.types.isMemberExpression(left) && _core.types.isStringLiteral(_core.types.toComputedKey(left, left.property), {
value: "__proto__"

@@ -37,3 +37,5 @@ });

visitor: {
AssignmentExpression(path, file) {
AssignmentExpression(path, {
file
}) {
if (!isProtoAssignmentExpression(path.node.left)) return;

@@ -53,3 +55,5 @@ const nodes = [];

ExpressionStatement(path, file) {
ExpressionStatement(path, {
file
}) {
const expr = path.node.expression;

@@ -65,3 +69,5 @@ if (!_core.types.isAssignmentExpression(expr, {

ObjectExpression(path, file) {
ObjectExpression(path, {
file
}) {
let proto;

@@ -68,0 +74,0 @@ const {

{
"name": "@babel/plugin-transform-proto-to-assign",
"version": "7.18.0",
"version": "7.18.6",
"description": "Babel plugin for turning __proto__ into a shallow property clone",

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

"dependencies": {
"@babel/helper-plugin-utils": "^7.17.12"
"@babel/helper-plugin-utils": "^7.18.6"
},

@@ -27,4 +27,4 @@ "peerDependencies": {

"devDependencies": {
"@babel/core": "^7.18.0",
"@babel/helper-plugin-test-runner": "^7.16.7"
"@babel/core": "^7.18.6",
"@babel/helper-plugin-test-runner": "^7.18.6"
},

@@ -34,3 +34,4 @@ "engines": {

},
"author": "The Babel Team (https://babel.dev/team)"
"author": "The Babel Team (https://babel.dev/team)",
"type": "commonjs"
}
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