"fetch" api included in NodeJS v18 brokes sql.js
Nessuno ha ancora preso questa issue.
- Lingua principale
- JavaScript
- Stelle
- 13.7k
- Fork
- 1.1k
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Descrizione
NodeJS 18 includes experiential support for the "fetch" api. This is causing sql.js not to work properly after Node v18. Because it checks if there is an global "fetch" funcion exists. If so it tries to fetch the wasm file.
sql-wasm.js
.... "function"!=typeof fetch?c(b):fetch(P,{credentials:"same-origin"}) .....
This check is invalid for NodeJS v18.
Guida per i contributori
Apri 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.
Direzione di ricerca
Start by inspecting sql-wasm.js, especially the fetch check shown in the issue, and compare its behavior under NodeJS 18. Determine how the NodeJS environment should load the wasm file when a global fetch function exists. Done means sql.js works correctly in NodeJS 18 without incorrectly trying to fetch the wasm file.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- javascript, nodejs, sqlite, wasm
- Ambito
- databases
- Tipo di issue
- Bug
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 28/100