summaryrefslogtreecommitdiff
path: root/tests/registry/npm/@denotest/conditional-exports-node/1.0.0
diff options
context:
space:
mode:
authorNathan Whitaker <17734409+nathanwhit@users.noreply.github.com>2024-09-21 16:10:38 -0700
committerGitHub <noreply@github.com>2024-09-21 16:10:38 -0700
commit9be8dce0c7f8deaeff5523735e0867194ec04c59 (patch)
tree36977fc586cff680bb0847bdb19e586e0e777955 /tests/registry/npm/@denotest/conditional-exports-node/1.0.0
parent4b022103a14916de1c3bc539d123273750138915 (diff)
fix(node): Include "node" condition during CJS re-export analysis (#25785)
Fixes #25777. We were missing the "node" condition, so we were resolving to the wrong conditional export, causing our analysis to be incorrect.
Diffstat (limited to 'tests/registry/npm/@denotest/conditional-exports-node/1.0.0')
-rw-r--r--tests/registry/npm/@denotest/conditional-exports-node/1.0.0/bad.js3
-rw-r--r--tests/registry/npm/@denotest/conditional-exports-node/1.0.0/good.cjs3
-rw-r--r--tests/registry/npm/@denotest/conditional-exports-node/1.0.0/index.js3
-rw-r--r--tests/registry/npm/@denotest/conditional-exports-node/1.0.0/package.json13
4 files changed, 22 insertions, 0 deletions
diff --git a/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/bad.js b/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/bad.js
new file mode 100644
index 000000000..e4f1bed50
--- /dev/null
+++ b/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/bad.js
@@ -0,0 +1,3 @@
+module.exports = {
+ hello: "bad"
+}; \ No newline at end of file
diff --git a/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/good.cjs b/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/good.cjs
new file mode 100644
index 000000000..f99f7732a
--- /dev/null
+++ b/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/good.cjs
@@ -0,0 +1,3 @@
+module.exports = {
+ hello: "from node"
+}; \ No newline at end of file
diff --git a/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/index.js b/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/index.js
new file mode 100644
index 000000000..a440bdc74
--- /dev/null
+++ b/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/index.js
@@ -0,0 +1,3 @@
+export default {
+ hello: "default export"
+} \ No newline at end of file
diff --git a/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/package.json b/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/package.json
new file mode 100644
index 000000000..00a43c78f
--- /dev/null
+++ b/tests/registry/npm/@denotest/conditional-exports-node/1.0.0/package.json
@@ -0,0 +1,13 @@
+{
+ "name": "@denotest/conditional-exports",
+ "version": "1.0.0",
+ "type": "module",
+ "exports": {
+ ".": {
+ "node": "./good.cjs",
+ "require": "./bad.js",
+ "default": "./index.js"
+ },
+ "./*": "./*"
+ }
+}