Support undici 8.x request() through the built-in implementation
I maintainer di solito rispondono entro 1 giorno
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- node.js, typescript
Direzione di ricerca
Read the built-in undici implementation and the dependency guide at docs/content/docs/dependencies.mdx, then trace how package selection handles undici 7.x and the SC8005 fallback. Start by compiling the three-line request.mts example with undici 8.12.2 and no libnode pack. Done means the example builds and runs against a loopback server, prints 200 ok, and covers the stated request and response body behavior; issue #3918 already has an open linked pull request.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Request
Could the built-in undici implementation support 8.x, starting with request() over HTTP/1.1? This would let CLI applications that use the current major make an HTTP request without shipping a libnode runtime pack. The dependency guide for v0.4.14 lists 5.x and 7.x.
Reproduction
Tested on macOS arm64 with Node 24.18.0 and scriptc 0.4.14. In a fresh directory:
npm init -y
npm install --save-exact [email protected] [email protected]
cat > request.mts <<'EOF'
import { request } from "undici";
const response = await request(process.argv[2]!);
console.log(response.statusCode, await response.body.text());
EOF
npx scriptc build request.mts -o ./client
The build reports SC8005 and asks for a libnode pack. I ran the same source against a loopback HTTP server returning status 200 and the body ok:
| Installed undici | Build | Executable output |
|---|---|---|
| 7.28.0 | Default build succeeds with the built-in implementation | 200 ok |
| 8.12.2 | Default build stops at SC8005 without a libnode pack |
— |
| 8.12.2 | With @scriptc/[email protected] and --libnode=<pack directory>, the build reports SC8001 for the undici Node island |
200 ok |
An acceptance test could compile the three-line example with undici 8 installed, without a libnode pack, and run it against a loopback server. This exercises package selection and reading the response body.
Scope
The 8.x Node island also worked in a separate test calling both request and fetch with new Agent({ allowH2: false }). Native coverage for CLI clients that use proxies would additionally need ProxyAgent and EnvHttpProxyAgent. The 7.x shim rejects both imports and the explicit allowH2 option, so selecting the existing 7.x implementation for all 8.x users would leave observable gaps. Proxy traffic itself was outside this test.
- Lingua principale
- TypeScript
- Stelle
- 6.6k
- Fork
- 216
- Merge medio
- 9h 35m
- PR unite (30g)
- 775
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di vercel-labs/scriptc
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
vercel-labs/scriptc#3979 ·
I maintainer di solito rispondono entro 1 giorno
-
A native program crashes with SIGSEGV when a string or JSON builder grows past 4 MiBForse già presa @alantriesagain l’ha presa 5 giorni fa. Aperta
Difficoltà 3/5 1-2 giorni Idoneità per principianti 22/100
vercel-labs/scriptc#3642 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 22/100
vercel-labs/scriptc#3613 · 2 commenti ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 42/100
vercel-labs/scriptc#3605 ·
I maintainer di solito rispondono entro 1 giorno
-
Native CLI (scriptc.exe) segfaults on a large program that the same release compiles under NodeAperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 12/100
vercel-labs/scriptc#3595 ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di vercel-labs/scriptc
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
milind-soni/OpenMausBot#6730 ·
I maintainer di solito rispondono entro 1 giorno
-
`@angular/[email protected]` depends on vulnerable Vite 7.3.7 - GHSA-p4f5-76q4-ffq7 (Critical RCE)Apertaarea: @angular/build
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
angular/angular-cli#34764 ·
I maintainer di solito rispondono entro 1 giorno
-
status/need-triage
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
google-gemini/gemini-cli#30384 · 1 commento ·
I maintainer di solito rispondono entro 1 giorno
-
P2
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno
-
area:image documentation good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno