feat: add apps-package-check reusable workflow (publint gate) - #54
Draft
MaximusHaximus wants to merge 1 commit into
Draft
feat: add apps-package-check reusable workflow (publint gate)#54MaximusHaximus wants to merge 1 commit into
MaximusHaximus wants to merge 1 commit into
Conversation
New PR gate on the publish-readiness axis alongside apps-changeset-check and apps-codegen-drift-check: builds the workspace, then runs each publishable package's check:package script (publint) to validate the packed artifact — exports/main/types/bin resolution, ESM/CJS format, types condition order, and files-set completeness — none of which lint/typecheck/test can see. check:package is a per-package named-script contract invoked with --if-present, so the job is a fast green no-op for repos with no publishable package and the script can grow more artifact checks (e.g. attw) without renaming. Wired into the canonical apps-ci-trigger.yml as a third job and documented in the README, mirroring apps-codegen-drift-check. Claude-Session: https://claude.ai/code/session_01BNdm93FPjkK8G7NmuTEbXD
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.
Why
A package can build, lint, and test green and still ship broken: an
exports/main/types/binentry pointing at a file the tarball doesn't contain, wrong ESM/CJS format, mis-orderedtypesconditions, or afilesset that silently dropsCHANGELOG.md/MIGRATION.md. None of the existing gates look at the packed artifact — publint does exactly that (it packs the package viapnpm packand validates the result), so it belongs on the publish-readiness axis alongsideapps-changeset-check.ymlandapps-codegen-drift-check.yml, not in the fastpnpm lintloop and not inside thecicomposite action.What changed
.github/workflows/apps-package-check.yml(new reusable workflow,workflow_callonly,contents: read): checkout → pnpm + node (node-version-file: .nvmrc, pnpm cache) →pnpm install --frozen-lockfile→pnpm run --if-present build(publint lints the packed artifact, so compiled output must exist) →pnpm -r --include-workspace-root run --if-present check:package. Skipschangeset-release/*branches, mirroringapps-codegen-drift-check.yml.check:packageconvention: each publishable package defines the script (currently"check:package": "publint"); the generic name is a stable CI contract that can grow more artifact checks (e.g.attw) without renaming.--if-presentmakes the job a fast green no-op for repos with no publishable package.apps-ci-trigger.yml:package-checkadded as a third job, same discrete-PR-status rationale asdrift-check.README.md: table row + section documenting the workflow and the convention.Merge ordering
This PR merges first. The companion
apps-team-ts-templatePR referencesapps-package-check.yml@mainand wiresexample-dbas the canonical consumer — its CI goes green only after this lands.https://claude.ai/code/session_01BNdm93FPjkK8G7NmuTEbXD