настройка webpack
This commit is contained in:
22
node_modules/@babel/plugin-transform-unicode-escapes/LICENSE
generated
vendored
Normal file
22
node_modules/@babel/plugin-transform-unicode-escapes/LICENSE
generated
vendored
Normal file
@ -0,0 +1,22 @@
|
||||
MIT License
|
||||
|
||||
Copyright (c) 2014-present Sebastian McKenzie and other contributors
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
"Software"), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
||||
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
||||
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
||||
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
19
node_modules/@babel/plugin-transform-unicode-escapes/README.md
generated
vendored
Normal file
19
node_modules/@babel/plugin-transform-unicode-escapes/README.md
generated
vendored
Normal file
@ -0,0 +1,19 @@
|
||||
# @babel/plugin-transform-unicode-escapes
|
||||
|
||||
> Compile ES2015 Unicode escapes to ES5
|
||||
|
||||
See our website [@babel/plugin-transform-unicode-escapes](https://babeljs.io/docs/en/next/babel-plugin-transform-unicode-escapes.html) for more information.
|
||||
|
||||
## Install
|
||||
|
||||
Using npm:
|
||||
|
||||
```sh
|
||||
npm install --save-dev @babel/plugin-transform-unicode-escapes
|
||||
```
|
||||
|
||||
or using yarn:
|
||||
|
||||
```sh
|
||||
yarn add @babel/plugin-transform-unicode-escapes --dev
|
||||
```
|
||||
132
node_modules/@babel/plugin-transform-unicode-escapes/lib/index.js
generated
vendored
Normal file
132
node_modules/@babel/plugin-transform-unicode-escapes/lib/index.js
generated
vendored
Normal file
@ -0,0 +1,132 @@
|
||||
"use strict";
|
||||
|
||||
Object.defineProperty(exports, "__esModule", {
|
||||
value: true
|
||||
});
|
||||
exports.default = void 0;
|
||||
|
||||
var _helperPluginUtils = require("@babel/helper-plugin-utils");
|
||||
|
||||
var _core = require("@babel/core");
|
||||
|
||||
var _default = (0, _helperPluginUtils.declare)(api => {
|
||||
api.assertVersion(7);
|
||||
const surrogate = /[\ud800-\udfff]/g;
|
||||
const unicodeEscape = /(\\+)u\{([0-9a-fA-F]+)\}/g;
|
||||
|
||||
function escape(code) {
|
||||
let str = code.toString(16);
|
||||
|
||||
while (str.length < 4) str = "0" + str;
|
||||
|
||||
return "\\u" + str;
|
||||
}
|
||||
|
||||
function replacer(match, backslashes, code) {
|
||||
if (backslashes.length % 2 === 0) {
|
||||
return match;
|
||||
}
|
||||
|
||||
const char = String.fromCodePoint(parseInt(code, 16));
|
||||
const escaped = backslashes.slice(0, -1) + escape(char.charCodeAt(0));
|
||||
return char.length === 1 ? escaped : escaped + escape(char.charCodeAt(1));
|
||||
}
|
||||
|
||||
function replaceUnicodeEscapes(str) {
|
||||
return str.replace(unicodeEscape, replacer);
|
||||
}
|
||||
|
||||
function getUnicodeEscape(str) {
|
||||
let match;
|
||||
|
||||
while (match = unicodeEscape.exec(str)) {
|
||||
if (match[1].length % 2 === 0) continue;
|
||||
unicodeEscape.lastIndex = 0;
|
||||
return match[0];
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
return {
|
||||
name: "transform-unicode-escapes",
|
||||
visitor: {
|
||||
Identifier(path) {
|
||||
const {
|
||||
node,
|
||||
key
|
||||
} = path;
|
||||
const {
|
||||
name
|
||||
} = node;
|
||||
const replaced = name.replace(surrogate, c => {
|
||||
return `_u${c.charCodeAt(0).toString(16)}`;
|
||||
});
|
||||
if (name === replaced) return;
|
||||
|
||||
const str = _core.types.inherits(_core.types.stringLiteral(name), node);
|
||||
|
||||
if (key === "key") {
|
||||
path.replaceWith(str);
|
||||
return;
|
||||
}
|
||||
|
||||
const {
|
||||
parentPath,
|
||||
scope
|
||||
} = path;
|
||||
|
||||
if (parentPath.isMemberExpression({
|
||||
property: node
|
||||
}) || parentPath.isOptionalMemberExpression({
|
||||
property: node
|
||||
})) {
|
||||
parentPath.node.computed = true;
|
||||
path.replaceWith(str);
|
||||
return;
|
||||
}
|
||||
|
||||
const binding = scope.getBinding(name);
|
||||
|
||||
if (binding) {
|
||||
scope.rename(name, scope.generateUid(replaced));
|
||||
return;
|
||||
}
|
||||
|
||||
throw path.buildCodeFrameError(`Can't reference '${name}' as a bare identifier`);
|
||||
},
|
||||
|
||||
"StringLiteral|DirectiveLiteral"(path) {
|
||||
const {
|
||||
node
|
||||
} = path;
|
||||
const {
|
||||
extra
|
||||
} = node;
|
||||
if (extra == null ? void 0 : extra.raw) extra.raw = replaceUnicodeEscapes(extra.raw);
|
||||
},
|
||||
|
||||
TemplateElement(path) {
|
||||
const {
|
||||
node,
|
||||
parentPath
|
||||
} = path;
|
||||
const {
|
||||
value
|
||||
} = node;
|
||||
const firstEscape = getUnicodeEscape(value.raw);
|
||||
if (!firstEscape) return;
|
||||
const grandParent = parentPath.parentPath;
|
||||
|
||||
if (grandParent.isTaggedTemplateExpression()) {
|
||||
throw path.buildCodeFrameError(`Can't replace Unicode escape '${firstEscape}' inside tagged template literals. You can enable '@babel/plugin-transform-template-literals' to compile them to classic strings.`);
|
||||
}
|
||||
|
||||
value.raw = replaceUnicodeEscapes(value.raw);
|
||||
}
|
||||
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
exports.default = _default;
|
||||
59
node_modules/@babel/plugin-transform-unicode-escapes/package.json
generated
vendored
Normal file
59
node_modules/@babel/plugin-transform-unicode-escapes/package.json
generated
vendored
Normal file
@ -0,0 +1,59 @@
|
||||
{
|
||||
"_from": "@babel/plugin-transform-unicode-escapes@^7.10.4",
|
||||
"_id": "@babel/plugin-transform-unicode-escapes@7.10.4",
|
||||
"_inBundle": false,
|
||||
"_integrity": "sha512-y5XJ9waMti2J+e7ij20e+aH+fho7Wb7W8rNuu72aKRwCHFqQdhkdU2lo3uZ9tQuboEJcUFayXdARhcxLQ3+6Fg==",
|
||||
"_location": "/@babel/plugin-transform-unicode-escapes",
|
||||
"_phantomChildren": {},
|
||||
"_requested": {
|
||||
"type": "range",
|
||||
"registry": true,
|
||||
"raw": "@babel/plugin-transform-unicode-escapes@^7.10.4",
|
||||
"name": "@babel/plugin-transform-unicode-escapes",
|
||||
"escapedName": "@babel%2fplugin-transform-unicode-escapes",
|
||||
"scope": "@babel",
|
||||
"rawSpec": "^7.10.4",
|
||||
"saveSpec": null,
|
||||
"fetchSpec": "^7.10.4"
|
||||
},
|
||||
"_requiredBy": [
|
||||
"/@babel/preset-env"
|
||||
],
|
||||
"_resolved": "https://registry.npmjs.org/@babel/plugin-transform-unicode-escapes/-/plugin-transform-unicode-escapes-7.10.4.tgz",
|
||||
"_shasum": "feae523391c7651ddac115dae0a9d06857892007",
|
||||
"_spec": "@babel/plugin-transform-unicode-escapes@^7.10.4",
|
||||
"_where": "/Users/alinavigdorova/dev/storage-service-ui/node_modules/@babel/preset-env",
|
||||
"bugs": {
|
||||
"url": "https://github.com/babel/babel/issues"
|
||||
},
|
||||
"bundleDependencies": false,
|
||||
"dependencies": {
|
||||
"@babel/helper-plugin-utils": "^7.10.4"
|
||||
},
|
||||
"deprecated": false,
|
||||
"description": "Compile ES2015 Unicode escapes to ES5",
|
||||
"devDependencies": {
|
||||
"@babel/core": "^7.10.4",
|
||||
"@babel/helper-plugin-test-runner": "^7.10.4"
|
||||
},
|
||||
"gitHead": "7fd40d86a0d03ff0e9c3ea16b29689945433d4df",
|
||||
"homepage": "https://github.com/babel/babel#readme",
|
||||
"keywords": [
|
||||
"babel-plugin"
|
||||
],
|
||||
"license": "MIT",
|
||||
"main": "lib/index.js",
|
||||
"name": "@babel/plugin-transform-unicode-escapes",
|
||||
"peerDependencies": {
|
||||
"@babel/core": "^7.0.0-0"
|
||||
},
|
||||
"publishConfig": {
|
||||
"access": "public"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git+https://github.com/babel/babel.git",
|
||||
"directory": "packages/babel-plugin-transform-unicode-escapes"
|
||||
},
|
||||
"version": "7.10.4"
|
||||
}
|
||||
Reference in New Issue
Block a user