ci: add typecheck and plain-Node ESM smoke test to PR checks#1834
Draft
bgub wants to merge 1 commit into
Draft
Conversation
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.
TL;DR
Adds two gates to CI that would have caught the release blockers fixed in #1827: a
turbo typecheckstep and a plain-Node ESM/CJS import smoke test forgt-next/config. Draft while #1827 is in review — this PR is stacked on that branch and should be retargeted toodysseusonce it merges.Code Changes
.github/workflows/ci.yml: two new steps in thetestsjob, using the same change-based filters as the existing build/test steps:Run typecheck(after build):turbo typecheckover changed packages and their dependents. Thetypechecktask already existed inturbo.jsonand every package has the script — it just never ran in CI. tsdown's dts emit passes unresolved re-exports through, sotsc --noEmitis the only thing that catches them.Run smoke tests(after tests): runs the newsmoketurbo task for changed packages that define one.turbo.json: newsmoketask (dependsOn: ["build", "^build"], uncached). Build dependencies are cache hits by the time it runs in CI, so the added cost is negligible.packages/next/scripts/smoke.mjs+smokescript inpackage.json: importsgt-next/configvia package self-reference from plain Node —await import()for the ESM build andcreateRequirefor the CJS build — and assertswithGTConfigis exported. This exercises the exports map and module-evaluation-time code the way a realnext.config.mjsdoes, which no bundled test app can (all in-repo apps usenext.config.tstranspiled to CJS, which is why therequire is not definedcrash shipped unnoticed).Notes / Flags
bg/fix-release-api-blockers): typecheck fails on plainodysseusuntil those fixes land (gt-react'sinitializeGTre-export, react-core'sresolveStringContentoptions). Retarget toodysseusafter merge.origin/odysseus: 35 typecheck tasks pass; the smoke task runs for gt-next and passes (and is a no-op for packages without asmokescript).tests/apps/*workspace members (same filters as the test step, examples excluded). All pass today.