From f091d1ad69b4e5217ae3272b641171781a372c4f Mon Sep 17 00:00:00 2001 From: David Sherret Date: Wed, 13 Nov 2024 10:10:09 -0500 Subject: feat(node): stabilize detecting if CJS via `"type": "commonjs"` in a package.json (#26439) This will respect `"type": "commonjs"` in a package.json to determine if `.js`/`.jsx`/`.ts`/.tsx` files are CJS or ESM. If the file is found to be ESM it will be loaded as ESM though. --- tests/registry/npm/@denotest/install-no-ext/1.0.0/install/index.js | 1 + 1 file changed, 1 insertion(+) create mode 100644 tests/registry/npm/@denotest/install-no-ext/1.0.0/install/index.js (limited to 'tests/registry/npm/@denotest/install-no-ext/1.0.0/install/index.js') diff --git a/tests/registry/npm/@denotest/install-no-ext/1.0.0/install/index.js b/tests/registry/npm/@denotest/install-no-ext/1.0.0/install/index.js new file mode 100644 index 000000000..7d55c2481 --- /dev/null +++ b/tests/registry/npm/@denotest/install-no-ext/1.0.0/install/index.js @@ -0,0 +1 @@ +require("./output"); -- cgit v1.2.3