summaryrefslogtreecommitdiff
path: root/cli/tests/testdata/npm/registry/@denotest/env-var-re-export
diff options
context:
space:
mode:
authorBartek IwaƄczuk <biwanczuk@gmail.com>2022-09-08 22:01:48 +0200
committerGitHub <noreply@github.com>2022-09-08 22:01:48 +0200
commit6c179daff07fe60d478142ea86231a34dc9ee1fd (patch)
tree39ff8701af61eec0674827b4ef62de1d4087e407 /cli/tests/testdata/npm/registry/@denotest/env-var-re-export
parent93cbac69e8a53fbb393fc7a2f12654b223cf01ad (diff)
fix(npm): recursive translation of reexports, remove window global in node code (#15806)
Co-authored-by: David Sherret <dsherret@gmail.com>
Diffstat (limited to 'cli/tests/testdata/npm/registry/@denotest/env-var-re-export')
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/dev.cjs5
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/index.cjs5
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/package.json5
-rw-r--r--cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/prod.cjs5
4 files changed, 20 insertions, 0 deletions
diff --git a/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/dev.cjs b/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/dev.cjs
new file mode 100644
index 000000000..cf7b90970
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/dev.cjs
@@ -0,0 +1,5 @@
+module.exports = {
+ getEnv() {
+ return "dev";
+ },
+};
diff --git a/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/index.cjs b/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/index.cjs
new file mode 100644
index 000000000..6258d7c05
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/index.cjs
@@ -0,0 +1,5 @@
+if (process.env.NODE_ENV === 'production') {
+ module.exports = require('./prod.cjs');
+} else {
+ module.exports = require('./dev.cjs');
+}
diff --git a/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/package.json b/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/package.json
new file mode 100644
index 000000000..84f87be0d
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/package.json
@@ -0,0 +1,5 @@
+{
+ "name": "@denotest/env-var-re-export",
+ "version": "1.0.0",
+ "main": "./index.cjs"
+}
diff --git a/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/prod.cjs b/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/prod.cjs
new file mode 100644
index 000000000..a84c76543
--- /dev/null
+++ b/cli/tests/testdata/npm/registry/@denotest/env-var-re-export/1.0.0/prod.cjs
@@ -0,0 +1,5 @@
+module.exports = {
+ getEnv() {
+ return "prod";
+ },
+};