Skip to content
This repository was archived by the owner on Oct 11, 2026. It is now read-only.

docs: await builds before stopping esbuild - #21

Merged
KyleJune merged 2 commits into
mainfrom
codex/20-await-example-builds
Oct 3, 2026
Merged

KyleJune merged 2 commits into
mainfrom
codex/20-await-example-builds

Conversation

@KyleJune

@KyleJune KyleJune commented Oct 3, 2026 •

Copy link
Copy Markdown
Member

Why

Several build examples stop esbuild while its asynchronous build is still running. That can interrupt compilation and replace the original build error with a service shutdown error. The examples now await the build and await service cleanup in finally.

Outline

  • Apply the same lifecycle to all eight README builds and four public API examples, preserving their inputs, options, and output.
  • Execute the actual configuration and CSS Modules README snippets with real esbuild/PostCSS, checking CSS output, the matching class map, compilation errors, and build-before-stop ordering.

Verification

  • The original snippets failed all three regression controls with an esbuild service shutdown error; the corrected snippets pass.
  • deno task check: passed on Windows and Ubuntu.
  • deno task test --parallel --reporter=dot: 9 tests, 59 steps, zero failures on Windows and Ubuntu.
  • deno doc --lint postcss.ts less.ts sass.ts stylus.ts: all four entrypoints passed on Windows and Ubuntu.
  • Initial macOS CI exposed a temporary-directory alias write denial in the new fixture. Resolving its canonical path preserves the restricted write grant; a real symlink control fails before this correction and passes afterward.
  • Final independent committed-SHA reviews, including the portability correction: clear for correctness/docs and test/resource ownership.

Risk

Door: two-way. Only documentation examples and their regression tests change; runtime APIs and dependency versions are unchanged. Each test joins its child process and removes its own temporary fixture.

Closes

Closes #20

@KyleJune

KyleJune commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

Final independent review confirmed commit d401564 against eed1273. Its six-file tree is identical to the reviewed contents. Correctness/API/docs review and test/resource ownership review are clear: examples await build completion before joining service cleanup; representative tests execute actual README fences with real esbuild/PostCSS, semantic CSS and class-map controls, and authentic compilation failure. Owned children are joined and temporary fixtures removed. Final local package check, parallel9tests/59steps and four-entrypoint doclint passed. Reviewers performed source review only; this does not claim every documented preprocessor or host was executed.

@KyleJune

KyleJune commented Oct 3, 2026

Copy link
Copy Markdown
Member Author

test: canonicalize example fixture paths — Follow-up commit aee079c corrects the new fixture's observed macOS temporary-directory alias write denial. It resolves the owned directory inside its cleanup try/finally before creating paths and the restricted child grant, and removes the originally created directory even if resolution fails. The unchanged prior fixture reproduces the same denial through an actual owned symlink; the corrected fixture passes all three controls. Final Windows and Ubuntu package check, parallel9tests/59steps and four-entrypoint doclint pass. Two independent final pinned reviews are clear and match tree4002285899384f26d2090d97902476510039b6d5. No product grant, runtime API, dependency or example behavior changed in this follow-up.

@KyleJune
KyleJune merged commit 1a56a87 into main Oct 3, 2026
9 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Await example builds before stopping esbuild

1 participant