Skip to content

chore(react): add packaging validation harness + CI gate#2476

Merged
frankensteinke merged 3 commits into
developfrom
chore/2466-packaging-validation-harness
Jul 22, 2026
Merged

chore(react): add packaging validation harness + CI gate#2476
frankensteinke merged 3 commits into
developfrom
chore/2466-packaging-validation-harness

Conversation

@frankensteinke

@frankensteinke frankensteinke commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Adds a verifyPackaging script 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

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.
@aws-amplify-us-east-1

Copy link
Copy Markdown

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-2476.d15792l1n26ww3.amplifyapp.com

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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:packaging script that packs the tarball, runs publint + @arethetypeswrong/cli, and smoke-tests require() and native import.
  • 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.

Comment thread packages/react/scripts/verifyPackaging.js
@frankensteinke frankensteinke changed the title chore(react): packaging validation harness + CI gate chore(react): add packaging validation harness + CI gate Jul 17, 2026
@frankensteinke
frankensteinke marked this pull request as ready for review July 17, 2026 17:04
@frankensteinke
frankensteinke requested a review from a team as a code owner July 17, 2026 17:04
@rheisler-deque
rheisler-deque self-requested a review July 20, 2026 18:42

@rheisler-deque rheisler-deque left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great first phase! I just have a couple things I think should change before merging.

Comment thread packages/react/scripts/packaging-smoke/smoke.mjs Outdated
Comment thread packages/react/scripts/verifyPackaging.js
Comment thread packages/react/scripts/verifyPackaging.js
- 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.
@frankensteinke
frankensteinke merged commit 3a9f8d4 into develop Jul 22, 2026
9 checks passed
@frankensteinke
frankensteinke deleted the chore/2466-packaging-validation-harness branch July 22, 2026 12:48
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.

3 participants