From 04f9db5b2217fe06f88e76146aac6362ff0b0b86 Mon Sep 17 00:00:00 2001 From: Nathan Whitaker <17734409+nathanwhit@users.noreply.github.com> Date: Mon, 15 Jul 2024 12:11:09 -0700 Subject: fix(node): Fix `--allow-scripts` with no `deno.json` (#24533) We would resolve the wrong package.json, resulting in an inability to run CJS (or other node-mode) scripts --- tests/registry/npm/@denotest/node-lifecycle-scripts/1.0.0/preinstall.js | 1 + 1 file changed, 1 insertion(+) (limited to 'tests/registry/npm/@denotest/node-lifecycle-scripts/1.0.0/preinstall.js') diff --git a/tests/registry/npm/@denotest/node-lifecycle-scripts/1.0.0/preinstall.js b/tests/registry/npm/@denotest/node-lifecycle-scripts/1.0.0/preinstall.js index e3a59c753..f375b5fb3 100644 --- a/tests/registry/npm/@denotest/node-lifecycle-scripts/1.0.0/preinstall.js +++ b/tests/registry/npm/@denotest/node-lifecycle-scripts/1.0.0/preinstall.js @@ -1,4 +1,5 @@ if ("Deno" in globalThis && typeof globalThis.Deno === 'object') { + require('./helper.js'); console.log('deno preinstall.js'); } else { console.log('node preinstall.js'); -- cgit v1.2.3