Socket
Socket
Sign inDemoInstall

@babel/helper-create-class-features-plugin

Package Overview
Dependencies
Maintainers
6
Versions
107
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-create-class-features-plugin - npm Package Compare versions

Comparing version 7.10.4 to 7.10.5

4

lib/decorators.js

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

${classDecorators || _core.types.nullLiteral()},
function (${initializeId}, ${superClass ? superId : null}) {
function (${initializeId}, ${superClass ? _core.types.cloneNode(superId) : null}) {
${node}

@@ -157,3 +157,3 @@ return { F: ${_core.types.cloneNode(node.id)}, d: ${definitions} };

return {
instanceNodes: [_core.template.statement.ast`${initializeId}(this)`],
instanceNodes: [_core.template.statement.ast`${_core.types.cloneNode(initializeId)}(this)`],

@@ -160,0 +160,0 @@ wrapClass(path) {

@@ -65,3 +65,2 @@ "use strict";

const {
id,
static: isStatic,

@@ -74,2 +73,4 @@ method: isMethod,

const id = _core.types.cloneNode(value.id);
if (loose) {

@@ -185,3 +186,3 @@ initNodes.push(_core.template.statement.ast`

path.replaceWith(_core.template.expression.ast`
Object.prototype.hasOwnProperty.call(${right}, ${id})
Object.prototype.hasOwnProperty.call(${right}, ${_core.types.cloneNode(id)})
`);

@@ -201,3 +202,3 @@ return;

path.replaceWith(_core.template.expression.ast`${id}.has(${right})`);
path.replaceWith(_core.template.expression.ast`${_core.types.cloneNode(id)}.has(${right})`);
}

@@ -348,4 +349,4 @@

BASE: file.addHelper("classPrivateFieldLooseBase"),
REF: object,
PROP: privateNamesMap.get(name).id
REF: _core.types.cloneNode(object),
PROP: _core.types.cloneNode(privateNamesMap.get(name).id)
});

@@ -399,3 +400,3 @@ },

return _core.template.statement.ast`
Object.defineProperty(${ref}, ${id}, {
Object.defineProperty(${ref}, ${_core.types.cloneNode(id)}, {
// configurable is false by default

@@ -414,3 +415,3 @@ // enumerable is false by default

const value = prop.node.value || prop.scope.buildUndefinedNode();
return _core.template.statement.ast`${id}.set(${ref}, {
return _core.template.statement.ast`${_core.types.cloneNode(id)}.set(${ref}, {
// configurable is always false for private elements

@@ -439,3 +440,3 @@ // enumerable is always false for private elements

return _core.template.statement.ast`
var ${id.name} = {
var ${_core.types.cloneNode(id)} = {
// configurable is false by default

@@ -452,3 +453,3 @@ // enumerable is false by default

return _core.template.statement.ast`
var ${id} = {
var ${_core.types.cloneNode(id)} = {
// configurable is false by default

@@ -621,6 +622,6 @@ // enumerable is false by default

if (isStatic && !loose) {
return _core.types.variableDeclaration("var", [_core.types.variableDeclarator(id, _core.types.functionExpression(id, params, body, generator, async))]);
return _core.types.variableDeclaration("var", [_core.types.variableDeclarator(_core.types.cloneNode(id), _core.types.functionExpression(id, params, body, generator, async))]);
}
return _core.types.variableDeclaration("var", [_core.types.variableDeclarator(methodId, methodValue)]);
return _core.types.variableDeclaration("var", [_core.types.variableDeclarator(_core.types.cloneNode(methodId), methodValue)]);
}

@@ -627,0 +628,0 @@

@@ -20,2 +20,4 @@ "use strict";

var _core = require("@babel/core");
var _helperFunctionName = _interopRequireDefault(require("@babel/helper-function-name"));

@@ -129,3 +131,3 @@

} else {
ref = path.node.id;
ref = _core.types.cloneNode(path.node.id);
}

@@ -132,0 +134,0 @@

@@ -82,5 +82,11 @@ "use strict";

constructor.traverse(findBareSupers, bareSupers);
let isFirst = true;
for (const bareSuper of bareSupers) {
bareSuper.insertAfter(nodes);
if (isFirst) {
bareSuper.insertAfter(nodes);
isFirst = false;
} else {
bareSuper.insertAfter(nodes.map(n => _core.types.cloneNode(n)));
}
}

@@ -87,0 +93,0 @@ } else {

{
"name": "@babel/helper-create-class-features-plugin",
"version": "7.10.4",
"version": "7.10.5",
"author": "The Babel Team (https://babeljs.io/team)",

@@ -22,3 +22,3 @@ "license": "MIT",

"@babel/helper-function-name": "^7.10.4",
"@babel/helper-member-expression-to-functions": "^7.10.4",
"@babel/helper-member-expression-to-functions": "^7.10.5",
"@babel/helper-optimise-call-expression": "^7.10.4",

@@ -33,6 +33,6 @@ "@babel/helper-plugin-utils": "^7.10.4",

"devDependencies": {
"@babel/core": "^7.10.4",
"@babel/core": "^7.10.5",
"@babel/helper-plugin-test-runner": "^7.10.4"
},
"gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df"
"gitHead": "f7964a9ac51356f7df6404a25b27ba1cffba1ba7"
}
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