Support undici 8.x request() through the built-in implementation
Los mantenedores suelen responder en 1 día
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 35/100
- Tipo de issue
- Nueva funcionalidad
- Claridad
- Bastante claro
- Estado de actividad
- Estancado
- Stack tecnológico
- node.js, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 6.6k
- Forks
- 216
- Merge medio
- 9 h 35 min
- PR fusionados (30 d)
- 775
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de vercel-labs/scriptc
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
vercel-labs/scriptc#3979 ·
Los mantenedores suelen responder en 1 día
-
A native program crashes with SIGSEGV when a string or JSON builder grows past 4 MiBPosiblemente ocupada @alantriesagain la tomó hace 5 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 22/100
vercel-labs/scriptc#3642 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
vercel-labs/scriptc#3613 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
Dificultad 4/5 3-5 días Aptitud para principiantes 42/100
vercel-labs/scriptc#3605 ·
Los mantenedores suelen responder en 1 día
-
Native CLI (scriptc.exe) segfaults on a large program that the same release compiles under NodeAbierto
Dificultad 5/5 Más de una semana Aptitud para principiantes 12/100
vercel-labs/scriptc#3595 ·
Los mantenedores suelen responder en 1 día
Todos los issues de vercel-labs/scriptc
Issues similares
-
truapi-release
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
paritytech/product-sdk#529 ·
Los mantenedores suelen responder en 1 día
-
Environments table lists page size 5 after 30Posiblemente ocupada @raus7n la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 90/100
litmuschaos/litmus#5743 ·
Los mantenedores suelen responder en 2 días
-
desktop grp:admin-donors type:graphics-bug ui-admin
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
milind-soni/OpenMausBot#6730 ·
Los mantenedores suelen responder en 1 día
-
Status: Triage Type: Bug / Error
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
mermaid-js/mermaid-v13#1059 ·
Los mantenedores suelen responder en 1 día