Skip to content

ci: add typecheck and plain-Node ESM smoke test to PR checks#1834

Draft
bgub wants to merge 1 commit into
bg/fix-release-api-blockersfrom
bg/ci-typecheck-esm-smoke
Draft

ci: add typecheck and plain-Node ESM smoke test to PR checks#1834
bgub wants to merge 1 commit into
bg/fix-release-api-blockersfrom
bg/ci-typecheck-esm-smoke

Conversation

@bgub

@bgub bgub commented Jul 4, 2026

Copy link
Copy Markdown
Contributor

TL;DR

Adds two gates to CI that would have caught the release blockers fixed in #1827: a turbo typecheck step and a plain-Node ESM/CJS import smoke test for gt-next/config. Draft while #1827 is in review — this PR is stacked on that branch and should be retargeted to odysseus once it merges.

Code Changes

  • .github/workflows/ci.yml: two new steps in the tests job, using the same change-based filters as the existing build/test steps:
    • Run typecheck (after build): turbo typecheck over changed packages and their dependents. The typecheck task already existed in turbo.json and every package has the script — it just never ran in CI. tsdown's dts emit passes unresolved re-exports through, so tsc --noEmit is the only thing that catches them.
    • Run smoke tests (after tests): runs the new smoke turbo task for changed packages that define one.
  • turbo.json: new smoke task (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 + smoke script in package.json: imports gt-next/config via package self-reference from plain Node — await import() for the ESM build and createRequire for the CJS build — and asserts withGTConfig is exported. This exercises the exports map and module-evaluation-time code the way a real next.config.mjs does, which no bundled test app can (all in-repo apps use next.config.ts transpiled to CJS, which is why the require is not defined crash shipped unnoticed).

Notes / Flags

  • Stacked on fix: repair broken type surfaces and ESM config entry before odysseus release #1827 (base is bg/fix-release-api-blockers): typecheck fails on plain odysseus until those fixes land (gt-react's initializeGT re-export, react-core's resolveStringContent options). Retarget to odysseus after merge.
  • Verified locally with the exact CI commands against origin/odysseus: 35 typecheck tasks pass; the smoke task runs for gt-next and passes (and is a no-op for packages without a smoke script).
  • The typecheck step covers the tests/apps/* workspace members (same filters as the test step, examples excluded). All pass today.
  • Only gt-next has a smoke script for now; the same pattern would fit other packages whose entries are loaded by plain Node (e.g. the CLI), but that's left for follow-ups.

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.

1 participant