From 934ed8e7d1709927e2ab0f7e0716b320b3e575b1 Mon Sep 17 00:00:00 2001 From: Kiryl Dziamura <2wontem@gmail.com> Date: Sat, 14 Jan 2023 00:57:24 +0100 Subject: fix(npm): use original node regex in npm resolution (#17404) Fixes regex for matching conditional exports in a package. Updated to the same regex Node.js uses. --- .../testdata/npm/registry/@denotest/conditional-exports/1.0.0/foo.js | 3 +++ .../npm/registry/@denotest/conditional-exports/1.0.0/package.json | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 cli/tests/testdata/npm/registry/@denotest/conditional-exports/1.0.0/foo.js (limited to 'cli/tests/testdata/npm/registry/@denotest') diff --git a/cli/tests/testdata/npm/registry/@denotest/conditional-exports/1.0.0/foo.js b/cli/tests/testdata/npm/registry/@denotest/conditional-exports/1.0.0/foo.js new file mode 100644 index 000000000..6060c8a67 --- /dev/null +++ b/cli/tests/testdata/npm/registry/@denotest/conditional-exports/1.0.0/foo.js @@ -0,0 +1,3 @@ +export default { + hello: "from foo", +} diff --git a/cli/tests/testdata/npm/registry/@denotest/conditional-exports/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/conditional-exports/1.0.0/package.json index c02015835..5a2536aa0 100644 --- a/cli/tests/testdata/npm/registry/@denotest/conditional-exports/1.0.0/package.json +++ b/cli/tests/testdata/npm/registry/@denotest/conditional-exports/1.0.0/package.json @@ -15,6 +15,7 @@ "./client/*": { "types": "./types/src/client/*.d.ts", "import": "./esm/client/*.js" - } + }, + "./*": "./*" } } -- cgit v1.2.3