Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@babel/plugin-proposal-unicode-property-regex

Package Overview
Dependencies
Maintainers
6
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@babel/plugin-proposal-unicode-property-regex - npm Package Compare versions

Comparing version 7.0.0-beta.42 to 7.0.0-beta.43

54

lib/index.js
"use strict";
exports.__esModule = true;
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = void 0;
var _helperPluginUtils = require("@babel/helper-plugin-utils");
function _helperPluginUtils() {
const data = require("@babel/helper-plugin-utils");
var _regexpuCore = _interopRequireDefault(require("regexpu-core"));
_helperPluginUtils = function () {
return data;
};
var regex = _interopRequireWildcard(require("@babel/helper-regex"));
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 _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {}; if (desc.get || desc.set) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } } newObj.default = obj; return newObj; } }

@@ -16,6 +42,7 @@

var _default = (0, _helperPluginUtils.declare)(function (api, options) {
var _default = (0, _helperPluginUtils().declare)((api, options) => {
api.assertVersion(7);
var _options$useUnicodeFl = options.useUnicodeFlag,
useUnicodeFlag = _options$useUnicodeFl === void 0 ? true : _options$useUnicodeFl;
const {
useUnicodeFlag = true
} = options;

@@ -28,18 +55,19 @@ if (typeof useUnicodeFlag !== "boolean") {

visitor: {
RegExpLiteral: function RegExpLiteral(path) {
var node = path.node;
RegExpLiteral(path) {
const node = path.node;
if (!regex.is(node, "u")) {
if (!regex().is(node, "u")) {
return;
}
node.pattern = (0, _regexpuCore.default)(node.pattern, node.flags, {
node.pattern = (0, _regexpuCore().default)(node.pattern, node.flags, {
unicodePropertyEscape: true,
useUnicodeFlag: useUnicodeFlag
useUnicodeFlag
});
if (!useUnicodeFlag) {
regex.pullFlag(node, "u");
regex().pullFlag(node, "u");
}
}
}

@@ -46,0 +74,0 @@ };

{
"name": "@babel/plugin-proposal-unicode-property-regex",
"version": "7.0.0-beta.42",
"version": "7.0.0-beta.43",
"description": "Compile Unicode property escapes in Unicode regular expressions to ES5.",

@@ -22,13 +22,13 @@ "homepage": "https://babeljs.io/",

"dependencies": {
"@babel/helper-plugin-utils": "7.0.0-beta.42",
"@babel/helper-regex": "7.0.0-beta.42",
"@babel/helper-plugin-utils": "7.0.0-beta.43",
"@babel/helper-regex": "7.0.0-beta.43",
"regexpu-core": "^4.1.3"
},
"peerDependencies": {
"@babel/core": "7.0.0-beta.42"
"@babel/core": "7.0.0-beta.43"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.42",
"@babel/helper-plugin-test-runner": "7.0.0-beta.42"
"@babel/core": "7.0.0-beta.43",
"@babel/helper-plugin-test-runner": "7.0.0-beta.43"
}
}
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