chore(react): add packaging validation harness + CI gate#2476
Merged
Conversation
Phase 1 of #2466. Validates the published artifact (not the workspace source) so packaging regressions are caught before release: - publint --strict against the pnpm-packed tarball - @arethetypeswrong/cli to verify type resolution across conditions - tarball smoke test: install into a throwaway consumer and confirm the barrel resolves under both require() and native import Wired into the Tests workflow as a 'packaging' job. Passes against the current CJS-only output; establishes install-from-tarball (not symlink) ahead of the dual CJS/ESM build.
|
This pull request is automatically being deployed by Amplify Hosting (learn more). |
7 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a packaging-validation harness for @deque/cauldron-react and wires it into CI to catch publish-time regressions (tarball contents + type resolution + basic runtime import/require) ahead of the planned dual CJS/ESM work.
Changes:
- Add
verify:packagingscript that packs the tarball, runspublint+@arethetypeswrong/cli, and smoke-testsrequire()and nativeimport. - Add smoke-test fixtures for CJS and ESM consumers installed from the packed tarball.
- Add a dedicated GitHub Actions job to gate PRs on packaging validation.
Reviewed changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
pnpm-lock.yaml |
Locks new tooling dependencies (publint, @arethetypeswrong/cli) and their transitive deps. |
packages/react/scripts/verifyPackaging.js |
Implements the pack → lint → type-check → consumer smoke-test harness. |
packages/react/scripts/packaging-smoke/smoke.mjs |
ESM-side smoke test for import-based consumption from the packed tarball. |
packages/react/scripts/packaging-smoke/smoke.cjs |
CJS-side smoke test for require-based consumption from the packed tarball. |
packages/react/package.json |
Adds verify:packaging script + devDeps for the validation tools. |
.github/workflows/tests.yml |
Adds a packaging CI job to run the new validation script. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
frankensteinke
marked this pull request as ready for review
July 17, 2026 17:04
rheisler-deque
self-requested a review
July 20, 2026 18:42
rheisler-deque
requested changes
Jul 20, 2026
rheisler-deque
left a comment
Contributor
There was a problem hiding this comment.
Great first phase! I just have a couple things I think should change before merging.
- Drop default-export assertion in smoke.mjs; the barrel has only named exports, so the default import works today only via CJS interop and would break under a real ESM entry. - Add --ignore-scripts to the hermetic smoke install so no dependency lifecycle script runs during the release-context install. - Assert the published lib/cauldron.css ships and is non-empty; publint and attw don't validate the bare style field.
rheisler-deque
approved these changes
Jul 22, 2026
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.
Adds a
verifyPackagingscript that lints the packaged tarball, checks its types (with@arethetypeswrong/cli), and smoke tests it.This doesn't affect the build output, but will catch any packaging regression in CI. This will be helpful for the move to dual CJS/ESM builds.
Relates to: #2466