Socket
Socket
Sign inDemoInstall

@babel/plugin-proposal-class-static-block

Package Overview
Dependencies
Maintainers
4
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-proposal-class-static-block - npm Package Compare versions

Comparing version 7.18.6 to 7.20.7

lib/index.js.map

17

lib/index.js

@@ -7,9 +7,5 @@ "use strict";

exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
var _pluginSyntaxClassStaticBlock = require("@babel/plugin-syntax-class-static-block");
var _helperCreateClassFeaturesPlugin = require("@babel/helper-create-class-features-plugin");
function generateUid(scope, denyList) {

@@ -19,3 +15,2 @@ const name = "";

let i = 1;
do {

@@ -25,6 +20,4 @@ uid = scope._generateUid(name, i);

} while (denyList.has(uid));
return uid;
}
var _default = (0, _helperPluginUtils.declare)(({

@@ -39,7 +32,5 @@ types: t,

inherits: _pluginSyntaxClassStaticBlock.default,
pre() {
(0, _helperCreateClassFeaturesPlugin.enableFeature)(this.file, _helperCreateClassFeaturesPlugin.FEATURES.staticBlocks, false);
},
visitor: {

@@ -52,3 +43,2 @@ ClassBody(classBody) {

const body = classBody.get("body");
for (const path of body) {

@@ -59,3 +49,2 @@ if (path.isPrivate()) {

}
for (const path of body) {

@@ -68,3 +57,2 @@ if (!path.isStaticBlock()) continue;

const blockBody = path.node.body;
if (blockBody.length === 1 && t.isExpressionStatement(blockBody[0])) {

@@ -75,11 +63,10 @@ replacement = blockBody[0].expression;

}
path.replaceWith(t.classPrivateProperty(staticBlockRef, replacement, [], true));
}
}
}
};
});
exports.default = _default;
exports.default = _default;
//# sourceMappingURL=index.js.map
{
"name": "@babel/plugin-proposal-class-static-block",
"version": "7.18.6",
"version": "7.20.7",
"description": "Transform class static blocks",

@@ -23,4 +23,4 @@ "repository": {

"dependencies": {
"@babel/helper-create-class-features-plugin": "^7.18.6",
"@babel/helper-plugin-utils": "^7.18.6",
"@babel/helper-create-class-features-plugin": "^7.20.7",
"@babel/helper-plugin-utils": "^7.20.2",
"@babel/plugin-syntax-class-static-block": "^7.14.5"

@@ -32,6 +32,6 @@ },

"devDependencies": {
"@babel/core": "^7.18.6",
"@babel/core": "^7.20.7",
"@babel/helper-plugin-test-runner": "^7.18.6",
"@babel/traverse": "^7.18.6",
"@babel/types": "^7.18.6"
"@babel/traverse": "^7.20.7",
"@babel/types": "^7.20.7"
},

@@ -38,0 +38,0 @@ "homepage": "https://babel.dev/docs/en/next/babel-plugin-proposal-class-static-block",

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