Socket
Socket
Sign inDemoInstall

@babel/helper-replace-supers

Package Overview
Dependencies
Maintainers
6
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/helper-replace-supers - npm Package Compare versions

Comparing version 7.16.0 to 7.16.5

54

lib/index.js

@@ -6,4 +6,15 @@ "use strict";

});
exports.environmentVisitor = exports.default = void 0;
exports.skipAllButComputedKey = skipAllButComputedKey;
exports.default = void 0;
Object.defineProperty(exports, "environmentVisitor", {
enumerable: true,
get: function () {
return _helperEnvironmentVisitor.default;
}
});
Object.defineProperty(exports, "skipAllButComputedKey", {
enumerable: true,
get: function () {
return _helperEnvironmentVisitor.skipAllButComputedKey;
}
});

@@ -16,6 +27,7 @@ var _traverse = require("@babel/traverse");

var _helperEnvironmentVisitor = require("@babel/helper-environment-visitor");
var _t = require("@babel/types");
const {
VISITOR_KEYS,
assignmentExpression,

@@ -28,3 +40,2 @@ booleanLiteral,

sequenceExpression,
staticBlock,
stringLiteral,

@@ -40,34 +51,3 @@ thisExpression

function skipAllButComputedKey(path) {
if (!path.node.computed) {
path.skip();
return;
}
const keys = VISITOR_KEYS[path.type];
for (const key of keys) {
if (key !== "key") path.skipKey(key);
}
}
const environmentVisitor = {
[`${staticBlock ? "StaticBlock|" : ""}ClassPrivateProperty|TypeAnnotation`](path) {
path.skip();
},
Function(path) {
if (path.isMethod()) return;
if (path.isArrowFunctionExpression()) return;
path.skip();
},
"Method|ClassProperty"(path) {
skipAllButComputedKey(path);
}
};
exports.environmentVisitor = environmentVisitor;
const visitor = _traverse.default.visitors.merge([environmentVisitor, {
const visitor = _traverse.default.visitors.merge([_helperEnvironmentVisitor.default, {
Super(path, state) {

@@ -86,3 +66,3 @@ const {

const unshadowSuperBindingVisitor = _traverse.default.visitors.merge([environmentVisitor, {
const unshadowSuperBindingVisitor = _traverse.default.visitors.merge([_helperEnvironmentVisitor.default, {
Scopable(path, {

@@ -89,0 +69,0 @@ refName

{
"name": "@babel/helper-replace-supers",
"version": "7.16.0",
"version": "7.16.5",
"description": "Helper function to replace supers",

@@ -17,5 +17,6 @@ "repository": {

"dependencies": {
"@babel/helper-member-expression-to-functions": "^7.16.0",
"@babel/helper-environment-visitor": "^7.16.5",
"@babel/helper-member-expression-to-functions": "^7.16.5",
"@babel/helper-optimise-call-expression": "^7.16.0",
"@babel/traverse": "^7.16.0",
"@babel/traverse": "^7.16.5",
"@babel/types": "^7.16.0"

@@ -22,0 +23,0 @@ },

@@ -12,3 +12,3 @@ # @babel/helper-replace-supers

```sh
npm install --save-dev @babel/helper-replace-supers
npm install --save @babel/helper-replace-supers
```

@@ -19,3 +19,3 @@

```sh
yarn add @babel/helper-replace-supers --dev
yarn add @babel/helper-replace-supers
```
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