1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-12-27 17:49:08 -05:00
denoland-deno/tests/registry/npm/@denotest/node-lifecycle-scripts/1.0.0/preinstall.js
Nathan Whitaker 04f9db5b22
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
2024-07-15 12:11:09 -07:00

6 lines
No EOL
177 B
JavaScript

if ("Deno" in globalThis && typeof globalThis.Deno === 'object') {
require('./helper.js');
console.log('deno preinstall.js');
} else {
console.log('node preinstall.js');
}