This commit is contained in:
2022-07-18 02:50:52 +00:00
parent befd344ab0
commit 06181b34d6
8569 changed files with 818704 additions and 352705 deletions
@@ -2,18 +2,18 @@
> Helper function to build binary assignment operator visitors
See our website [@babel/helper-builder-binary-assignment-operator-visitor](https://babeljs.io/docs/en/next/babel-helper-builder-binary-assignment-operator-visitor.html) for more information.
See our website [@babel/helper-builder-binary-assignment-operator-visitor](https://babeljs.io/docs/en/babel-helper-builder-binary-assignment-operator-visitor) for more information.
## Install
Using npm:
```sh
npm install --save-dev @babel/helper-builder-binary-assignment-operator-visitor
npm install --save @babel/helper-builder-binary-assignment-operator-visitor
```
or using yarn:
```sh
yarn add @babel/helper-builder-binary-assignment-operator-visitor --dev
yarn add @babel/helper-builder-binary-assignment-operator-visitor
```
@@ -5,22 +5,21 @@ Object.defineProperty(exports, "__esModule", {
});
exports.default = _default;
var _helperExplodeAssignableExpression = _interopRequireDefault(require("@babel/helper-explode-assignable-expression"));
var _helperExplodeAssignableExpression = require("@babel/helper-explode-assignable-expression");
var t = _interopRequireWildcard(require("@babel/types"));
var _t = require("@babel/types");
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
const {
assignmentExpression,
sequenceExpression
} = _t;
function _default(opts) {
const {
build,
operator
} = opts;
return {
const visitor = {
AssignmentExpression(path) {
const {
node,
@@ -29,8 +28,8 @@ function _default(opts) {
if (node.operator !== operator + "=") return;
const nodes = [];
const exploded = (0, _helperExplodeAssignableExpression.default)(node.left, nodes, this, scope);
nodes.push(t.assignmentExpression("=", exploded.ref, build(exploded.uid, node.right)));
path.replaceWith(t.sequenceExpression(nodes));
nodes.push(assignmentExpression("=", exploded.ref, build(exploded.uid, node.right)));
path.replaceWith(sequenceExpression(nodes));
},
BinaryExpression(path) {
@@ -44,4 +43,5 @@ function _default(opts) {
}
};
return visitor;
}
@@ -1,45 +1,51 @@
{
"_args": [
[
"@babel/helper-builder-binary-assignment-operator-visitor@7.10.4",
"/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series"
"@babel/helper-builder-binary-assignment-operator-visitor@7.18.6",
"/home/node/nuxt"
]
],
"_from": "@babel/helper-builder-binary-assignment-operator-visitor@7.10.4",
"_id": "@babel/helper-builder-binary-assignment-operator-visitor@7.10.4",
"_from": "@babel/helper-builder-binary-assignment-operator-visitor@7.18.6",
"_id": "@babel/helper-builder-binary-assignment-operator-visitor@7.18.6",
"_inBundle": false,
"_integrity": "sha512-L0zGlFrGWZK4PbT8AszSfLTM5sDU1+Az/En9VrdT8/LmEiJt4zXt+Jve9DCAnQcbqDhCI+29y/L93mrDzddCcg==",
"_integrity": "sha512-KT10c1oWEpmrIRYnthbzHgoOf6B+Xd6a5yhdbNtdhtG7aO1or5HViuf1TQR36xY/QprXA5nvxO6nAjhJ4y38jw==",
"_location": "/@babel/helper-builder-binary-assignment-operator-visitor",
"_phantomChildren": {},
"_requested": {
"type": "version",
"registry": true,
"raw": "@babel/helper-builder-binary-assignment-operator-visitor@7.10.4",
"raw": "@babel/helper-builder-binary-assignment-operator-visitor@7.18.6",
"name": "@babel/helper-builder-binary-assignment-operator-visitor",
"escapedName": "@babel%2fhelper-builder-binary-assignment-operator-visitor",
"scope": "@babel",
"rawSpec": "7.10.4",
"rawSpec": "7.18.6",
"saveSpec": null,
"fetchSpec": "7.10.4"
"fetchSpec": "7.18.6"
},
"_requiredBy": [
"/@babel/plugin-transform-exponentiation-operator"
],
"_resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.10.4.tgz",
"_spec": "7.10.4",
"_where": "/mnt/Foxconn/Digitalent/Deverloper/liff-push_2series",
"_resolved": "https://registry.npmjs.org/@babel/helper-builder-binary-assignment-operator-visitor/-/helper-builder-binary-assignment-operator-visitor-7.18.6.tgz",
"_spec": "7.18.6",
"_where": "/home/node/nuxt",
"author": {
"name": "The Babel Team",
"url": "https://babel.dev/team"
},
"bugs": {
"url": "https://github.com/babel/babel/issues"
},
"dependencies": {
"@babel/helper-explode-assignable-expression": "^7.10.4",
"@babel/types": "^7.10.4"
"@babel/helper-explode-assignable-expression": "^7.18.6",
"@babel/types": "^7.18.6"
},
"description": "Helper function to build binary assignment operator visitors",
"gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df",
"homepage": "https://github.com/babel/babel#readme",
"engines": {
"node": ">=6.9.0"
},
"homepage": "https://babel.dev/docs/en/next/babel-helper-builder-binary-assignment-operator-visitor",
"license": "MIT",
"main": "lib/index.js",
"main": "./lib/index.js",
"name": "@babel/helper-builder-binary-assignment-operator-visitor",
"publishConfig": {
"access": "public"
@@ -49,5 +55,6 @@
"url": "git+https://github.com/babel/babel.git",
"directory": "packages/babel-helper-builder-binary-assignment-operator-visitor"
},
"version": "7.10.4"
"type": "commonjs",
"version": "7.18.6"
}