Skip to content

test(build): add post-build tests for ESM/UMD bundles and API surface gate#8845

Merged
kpal81xd merged 1 commit into
mainfrom
feature-post-build-tests
Jun 5, 2026
Merged

test(build): add post-build tests for ESM/UMD bundles and API surface gate#8845
kpal81xd merged 1 commit into
mainfrom
feature-post-build-tests

Conversation

@kpal81xd

@kpal81xd kpal81xd commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Summary

The mocha suite runs against src/, and CI only publints the bundles — so build-output
regressions ship undetected. That's how #8836 (pc.app null in UMD) and #8839 (getter-only
exports breaking pc.createScript overrides) reached users. Closes #8838.

Adds a post-build runtime suite:

Guard Command Checks CI job
Post-build runtime suite (test/bundles/) npm run test:build each built bundle (rel/dbg/prf/min × UMD/ESM) loads (UMD global + CJS, ESM import) and boots an Application; runtime exports match src/index.js; pc.app live binding (#8836/#8837); UMD exports overridable (#8839); blanket invariant — every UMD export is a live + overridable accessor build

The public API surface gate (api-extractor) is split into a separate PR: #8848.

Verification

Check Result
npm run test:build 60 passing
npm test (unit) unchanged
revert UMD footer to broken forms corresponding test:build specs fail (#8836 + #8839)

@kpal81xd kpal81xd self-assigned this Jun 4, 2026
@kpal81xd kpal81xd force-pushed the feature-post-build-tests branch from 13df5ea to 6e2f2d4 Compare June 4, 2026 15:08
@kpal81xd kpal81xd force-pushed the feature-post-build-tests branch from 756ab1a to fe87182 Compare June 4, 2026 16:41
@kpal81xd kpal81xd force-pushed the feature-post-build-tests branch from fe87182 to 7e7bd04 Compare June 5, 2026 11:09
@kpal81xd kpal81xd force-pushed the feature-post-build-tests branch from 7e7bd04 to 996eee6 Compare June 5, 2026 11:26
The mocha suite runs against src/ and CI only publints the bundles, so
build-output regressions ship undetected (e.g. #8836 pc.app null in UMD,
#8839 getter-only exports breaking pc.createScript overrides).

test/bundles/: a post-build mocha suite (npm run test:build) that loads the
built bundles (rel/dbg/prf/min x UMD/ESM) - each loads (UMD as a browser global
and via CommonJS, ESM via import) and boots an Application; runtime exports
match src/index.js; pc.app live binding (#8836/#8837); UMD exports overridable
(#8839); plus a blanket invariant that every UMD export is a live + overridable
accessor. Runs in the build CI job.

Closes #8838
@kpal81xd kpal81xd merged commit 4d69ee7 into main Jun 5, 2026
8 checks passed
@kpal81xd kpal81xd deleted the feature-post-build-tests branch June 5, 2026 13:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add post-build tests for the main build targets (ESM and UMD)

1 participant