@babel/plugin-transform-unicode-regex
Advanced tools
Comparing version 7.6.2 to 7.7.0
@@ -8,55 +8,14 @@ "use strict"; | ||
function _helperPluginUtils() { | ||
const data = require("@babel/helper-plugin-utils"); | ||
var _helperCreateRegexpFeaturesPlugin = require("@babel/helper-create-regexp-features-plugin"); | ||
_helperPluginUtils = function () { | ||
return data; | ||
}; | ||
var _helperPluginUtils = require("@babel/helper-plugin-utils"); | ||
return data; | ||
} | ||
function _regexpuCore() { | ||
const data = _interopRequireDefault(require("regexpu-core")); | ||
_regexpuCore = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
function regex() { | ||
const data = _interopRequireWildcard(require("@babel/helper-regex")); | ||
regex = function () { | ||
return data; | ||
}; | ||
return data; | ||
} | ||
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; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; if (obj != null) { 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 }; } | ||
var _default = (0, _helperPluginUtils().declare)(api => { | ||
var _default = (0, _helperPluginUtils.declare)(api => { | ||
api.assertVersion(7); | ||
return { | ||
return (0, _helperCreateRegexpFeaturesPlugin.createRegExpFeaturePlugin)({ | ||
name: "transform-unicode-regex", | ||
visitor: { | ||
RegExpLiteral({ | ||
node | ||
}) { | ||
if (!regex().is(node, "u")) return; | ||
node.pattern = (0, _regexpuCore().default)(node.pattern, node.flags); | ||
regex().pullFlag(node, "u"); | ||
} | ||
} | ||
}; | ||
feature: "unicodeFlag" | ||
}); | ||
}); | ||
exports.default = _default; |
{ | ||
"name": "@babel/plugin-transform-unicode-regex", | ||
"version": "7.6.2", | ||
"version": "7.7.0", | ||
"description": "Compile ES2015 Unicode regex to ES5", | ||
@@ -15,5 +15,4 @@ "repository": "https://github.com/babel/babel/tree/master/packages/babel-plugin-transform-unicode-regex", | ||
"dependencies": { | ||
"@babel/helper-plugin-utils": "^7.0.0", | ||
"@babel/helper-regex": "^7.4.4", | ||
"regexpu-core": "^4.6.0" | ||
"@babel/helper-create-regexp-features-plugin": "^7.7.0", | ||
"@babel/helper-plugin-utils": "^7.0.0" | ||
}, | ||
@@ -24,6 +23,6 @@ "peerDependencies": { | ||
"devDependencies": { | ||
"@babel/core": "^7.6.2", | ||
"@babel/core": "^7.7.0", | ||
"@babel/helper-plugin-test-runner": "^7.0.0" | ||
}, | ||
"gitHead": "b9cb4af953afb1a5aeed9b18526192ab15bb45c1" | ||
"gitHead": "97faa83953cb87e332554fa559a4956d202343ea" | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3
2768
14
+ Added@babel/helper-annotate-as-pure@7.25.9(transitive)
+ Added@babel/helper-create-regexp-features-plugin@7.25.9(transitive)
+ Addedregenerate-unicode-properties@10.2.0(transitive)
+ Addedregexpu-core@6.1.1(transitive)
+ Addedregjsgen@0.8.0(transitive)
+ Addedregjsparser@0.11.2(transitive)
- Removed@babel/helper-regex@^7.4.4
- Removedregexpu-core@^4.6.0
- Removed@babel/helper-regex@7.10.5(transitive)
- Removedjsesc@0.5.0(transitive)
- Removedlodash@4.17.21(transitive)
- Removedregenerate-unicode-properties@9.0.0(transitive)
- Removedregexpu-core@4.8.0(transitive)
- Removedregjsgen@0.5.2(transitive)
- Removedregjsparser@0.7.0(transitive)