Sprint 6: ES Module Execution + Script Pipeline Fix 🔥 #57
Labels
No labels
bug
docs
feature
housekeeping
html-spec
performance
react-compat
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
glow-all/true-headless-browser#57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Sprint 6: ES Module + Script Pipeline Fix 🔥
Issue: #56
Epic: Phase 2 Production Engine (dieses Epic)
Aufwand: ~4h
Tests: execution-realm.test.ts, script-loader.test.ts, script-pipeline.test.ts
Problem
<script type="module">wird aktuell durchnew Function()gejagt → SyntaxError wegenimport/export.executeModule()existiert als Skeleton (temp .mjs +import()) aber der ScriptLoader ruft es nie auf. Qwik crasht wegenconst/letredeclaration.Lösung
import(data:text/javascript,${encodeURIComponent(code)})vermeidet Disk I/Oexecute()prüftentry.type === "module"und routed zuexecuteModule()Map<string, Function>mit content-hash als Key, gleicher Code wird nur 1x compiliertconst-Redeclaration erlaubenBetroffene Dateien
src/js/execution-realm.tsexecuteModule(): data: URL, Function Cachesrc/js/script-loader.tsexecute(): Module-Pfad fix, Function Cachesrc/js/unified-execution-layer.tsexecute(): type="module" Pfadsrc/interaction/evaluate.tsAkzeptanzkriterien
<script type="module">Code wird viaimport()ausgeführt (kein SyntaxError)import/exportStatements in Modulen funktionierenexecuteModule()nutzt data: URL (kein Disk I/O)const x = 1; const x = 1in einem Script → kein ErrorTestplan
importundexport→ läuft durch (kein SyntaxError)export function→ in anderem Modul importierbarconstredeclaration → kein Error✅ Sprint 6 abgeschlossen — Implementiert in
6b3e686Commits: 1 | Neue Tests: 20 ✅ | Regression: 0 (1301 pass / 27 fail — Netto-Verbesserung)
Geliefert
Performance-Gewinn
Bun.write()+ temp file + unlink entfallen (~5-10ms pro Modul eingespart)Pre-existing Failures (nicht von uns)
27 Failures insgesamt, alle pre-existing:
with(eval)gefixtNächster Schritt: Sprint 7 — Script Execution Architecture (
with()+eval())