test(build): add post-build tests for ESM/UMD bundles and API surface gate#8845
Merged
Conversation
13df5ea to
6e2f2d4
Compare
756ab1a to
fe87182
Compare
fe87182 to
7e7bd04
Compare
7e7bd04 to
996eee6
Compare
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
996eee6 to
a1bfbc5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The mocha suite runs against
src/, and CI onlypublints the bundles — so build-outputregressions ship undetected. That's how #8836 (
pc.appnull in UMD) and #8839 (getter-onlyexports breaking
pc.createScriptoverrides) reached users. Closes #8838.Adds a post-build runtime suite:
test/bundles/)npm run test:buildApplication; runtime exports matchsrc/index.js;pc.applive binding (#8836/#8837); UMD exports overridable (#8839); blanket invariant — every UMD export is a live + overridable accessorbuildThe public API surface gate (api-extractor) is split into a separate PR: #8848.
Verification
npm run test:buildnpm test(unit)test:buildspecs fail (#8836 + #8839)