From d6e3c65352c5f4050933a9ca848e5894c3a7b58b Mon Sep 17 00:00:00 2001 From: Nathan Whitaker Date: Tue, 29 Oct 2024 16:42:43 -0700 Subject: [PATCH] cleaner regex --- ext/node/polyfills/01_require.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ext/node/polyfills/01_require.js b/ext/node/polyfills/01_require.js index 8afc422a76aee4..b39c4655217e51 100644 --- a/ext/node/polyfills/01_require.js +++ b/ext/node/polyfills/01_require.js @@ -505,7 +505,7 @@ Module.globalPaths = modulePaths; const CHAR_FORWARD_SLASH = 47; const TRAILING_SLASH_REGEX = /(?:^|\/)\.?\.$/; -const ERROR_CODE_REGEX = /^\[([0-9a-zA-Z_]+)\]/; +const ERROR_CODE_REGEX = /^\[(\w+)\]/; // This only applies to requests of a specific form: // 1. name/.*