Skip to content

Undici tests depend on install hooks #2287

@anonrig

Description

@anonrig

Adding the following lines to your .npmrc files will result in 5 test failures.

ignore-scripts=true

Example failing test:

test/unix.js 2> Error: ENOENT: no such file or directory, open '/Users/yagiz/Developer/undici/node_modules/https-pem/key.pem'
test/unix.js 2>     at Object.openSync (node:fs:601:3)
test/unix.js 2>     at Object.readFileSync (node:fs:469:35)
test/unix.js 2>     at Object.<anonymous> (/Users/yagiz/Developer/undici/node_modules/https-pem/index.js:6:18)
test/unix.js 2>     at Module._compile (node:internal/modules/cjs/loader:1241:14)
test/unix.js 2>     at Module._compile (/Users/yagiz/Developer/undici/node_modules/tap/node_modules/source-map-support/source-map-support.js:568:25)
test/unix.js 2>     at Object.Module._extensions..js (node:internal/modules/cjs/loader:1295:10)
test/unix.js 2>     at Module.load (node:internal/modules/cjs/loader:1091:32)
test/unix.js 2>     at Function.Module._load (node:internal/modules/cjs/loader:938:12)
test/unix.js 2>     at Module.require (node:internal/modules/cjs/loader:1115:19)
test/unix.js 2>     at require (node:internal/modules/helpers:130:18)

PS: For security reasons, I think undici shouldn't rely on preinstall hooks.

cc @KhafraDev @ronag

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workinggood first issueGood for newcomers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions