From 7ddd8b097cc8046e0c5815a93becba05d207f365 Mon Sep 17 00:00:00 2001 From: liuxingbaoyu <30521560+liuxingbaoyu@users.noreply.github.com> Date: Thu, 9 Feb 2023 18:20:47 +0800 Subject: [PATCH] Apply suggestions from code review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Nicolò Ribaudo --- .../babel-helper-create-regexp-features-plugin/package.json | 2 +- packages/babel-helper-create-regexp-features-plugin/src/util.ts | 2 +- packages/babel-plugin-proposal-regexp-modifiers/package.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/babel-helper-create-regexp-features-plugin/package.json b/packages/babel-helper-create-regexp-features-plugin/package.json index 1263c72f5434..1e959ddd0ec4 100644 --- a/packages/babel-helper-create-regexp-features-plugin/package.json +++ b/packages/babel-helper-create-regexp-features-plugin/package.json @@ -19,7 +19,7 @@ ], "dependencies": { "@babel/helper-annotate-as-pure": "workspace:^", - "regexpu-core": "https://github.com/liuxingbaoyu/regexpu-core#head=modifiers" + "regexpu-core": "^5.3.0" }, "peerDependencies": { "@babel/core": "^7.0.0" diff --git a/packages/babel-helper-create-regexp-features-plugin/src/util.ts b/packages/babel-helper-create-regexp-features-plugin/src/util.ts index 05ee3ab3d378..7396baf3219a 100644 --- a/packages/babel-helper-create-regexp-features-plugin/src/util.ts +++ b/packages/babel-helper-create-regexp-features-plugin/src/util.ts @@ -72,7 +72,7 @@ export function canSkipRegexpu( return false; } - if (options.modifiers === "transform" && /\(\?.{1,10}:/.test(pattern)) { + if (options.modifiers === "transform" && /\(\?[\w-]+:/.test(pattern)) { return false; } diff --git a/packages/babel-plugin-proposal-regexp-modifiers/package.json b/packages/babel-plugin-proposal-regexp-modifiers/package.json index 5aeecf004efe..dc2c1f444141 100644 --- a/packages/babel-plugin-proposal-regexp-modifiers/package.json +++ b/packages/babel-plugin-proposal-regexp-modifiers/package.json @@ -1,7 +1,7 @@ { "name": "@babel/plugin-proposal-regexp-modifiers", "version": "7.19.1", - "description": "TODO", + "description": "Compile inline regular expression modifiers", "homepage": "https://babel.dev/docs/en/next/babel-plugin-proposal-regexp-modifiers", "license": "MIT", "publishConfig": {