You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit a4f7410
Browse filesBrowse the repository at this point in the historyBrowse files
fix(scripts): use file URL for ESM sourcemap preload (#6044)
## Motivation
On Windows, egg-scripts passes the resolved source-map-support path
directly to Node.js --import for ESM applications. A drive-letter path
such as D:\app\node_modules\source-map-support\register.js is parsed as
the unsupported d: URL scheme, causing ERR_UNSUPPORTED_ESM_URL_SCHEME
during production startup.
Fixes#6041.
## Changes
- convert the internally resolved source-map-support path to a file URL
before passing it to --import
- keep the CommonJS --require path unchanged
- add regression coverage for an ESM application with egg.typescript
enabled
## Testing
- cd tools/scripts && ut run test -- test/start-unit.test.ts (3 passed)
- cd tools/scripts && ut run test (24 passed, 38 skipped)
- cd tools/scripts && ut run typecheck
- oxfmt --check on the changed files
- git diff --check
<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit
* **Bug Fixes**
* Improved source-map loading when starting applications in ESM mode,
including when the application path contains spaces or special
characters. CommonJS preload behavior remains unchanged.
* **Tests**
* Added Windows coverage for ESM and CommonJS startup, including
source-map preloading and foreground child-process exits. Windows tests
run on Node.js 24; existing Linux coverage across Node.js versions
remains in place.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->
---------
Co-authored-by: killagu <killa07071201@gmail.com>
Copy file name to clipboardExpand all lines: wiki/index.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -17,7 +17,7 @@ Read this file before exploring raw sources.
17
17
-[GitHub Actions performance plan](./workflows/ci-performance-plan.md) - PR/full matrix, sharding, test-runtime improvements, and acceptance criteria based on measured CI bottlenecks.
18
18
-[CI parallel test metrics](./workflows/ci-parallel-test-metrics.md) - Test concurrency, resolved worker settings, retries, and shard inventories in CI artifacts.
19
19
-[Docs and API Updates](./workflows/docs-and-api-updates.md) - How to handle changes that affect user-facing docs or durable project understanding.
20
-
-[Local CI](./workflows/local-ci.md) - Local validation should run tests from clean sources and avoid stale artifacts (`dist/` duplicate-proto; fixture `.egg` scan-manifest caches) before tegg tests.
20
+
-[Local CI](./workflows/local-ci.md) - Local validation and scripts Windows preload coverage; run main tests from clean sources and avoid stale artifacts (`dist/` duplicate-proto; fixture `.egg` scan-manifest caches) before tegg tests.
21
21
-[PR preview packages](./workflows/pr-preview-packages.md) - Publish workspace previews through a pull request label and install them in consumer applications, including from stacked PRs.
22
22
-[Egg-bin Windows shell probe hotspot](./workflows/egg-bin-windows-shell-probe.md) - How PR #6014 diagnosed hosted-Windows egg-bin startup slowness and why the final fix only presets SHELL.
Copy file name to clipboardExpand all lines: wiki/log.md
+7Lines changed: 7 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -532,3 +532,10 @@ Full **isolate:false suite validated GREEN** under CI-faithful parallelism (`--m
532
532
533
533
- Removed the exact packageManager pin, restored the utoo catalog range to ^1, and switched CI/bootstrap instructions to latest at the user’s request. Native workspace/catalog configuration remains authoritative.
534
534
- Removed the E2E-only utoo@1.1.1 temporary installation; packing now reuses the latest CLI from setup-utoo and the tracked native configuration.
535
+
536
+
## 2026-10-06 — Scripts Windows sourcemap regression coverage
537
+
538
+
- Added Windows Node.js 24 coverage for ESM file URL preloads, special-character paths, CJS preloads, and foreground child exit handling in `.github/workflows/ci.yml` and `tools/scripts/test/start-unit.test.ts`.
539
+
- Refreshed [Local CI](./workflows/local-ci.md) to describe the targeted Windows job and scripts-only build prerequisite.
540
+
541
+
- Windows source-level regression tests skip the Linux CLI build step: utoo interprets its tsdown path filter as a workspace selection on Windows, while these tests do not require `dist`.
0 commit comments