Skip to content

fix(build): restore the build and type checks under TypeScript 7 - #916

Open
will-lamerton wants to merge 1 commit into
mainfrom
fix/ci-typescript-7
Open

fix(build): restore the build and type checks under TypeScript 7#916
will-lamerton wants to merge 1 commit into
mainfrom
fix/ci-typescript-7

Conversation

@will-lamerton

Copy link
Copy Markdown
Member

Closes the red build on main.

Description

#913 bumped typescript 5.9.3 -> 7.0.2 and was merged with Type Checks, Unit Tests and Verify Build all failing on its own PR, so main has been red since. There were three breakages, two of them from that bump and one older.

  • tsconfig.json TypeScript 7 removed baseUrl (TS5102) and rejects non-relative paths targets (TS5090). Dropped baseUrl and made both targets relative to the config file, which resolves to the same places. tsc-alias still rewrites every @/ specifier, so dist/ is unchanged.
  • plugins/vscode/tsconfig.json include deliberately reaches into source/, and TypeScript 7 infers a rootDir of plugins/vscode and rejects those files with TS6059. Widened rootDir to the repo root. The extension is bundled by esbuild (build:ext), so tsc only ever type-checks this project and the wider rootDir has no effect on output. This one was hidden behind the first: test:types fails before test:types:vscode gets to run.
  • source/wizards/steps/location-step.spec.tsx a separate breakage, from fix: show resolved path in setup wizard's config location picker #855. The assertion compares a rendered line against the raw resolved path, but the path is rendered dimmed, so the frame carries ANSI escapes that .trim() leaves in place. It passed locally (colour off) and failed in CI (FORCE_COLOR=1). Now strips ANSI first, matching the existing convention in write-file.spec.tsx and app-container.spec.tsx.

Reproduce the third one on any checkout with FORCE_COLOR=1 npx ava source/wizards/steps/location-step.spec.tsx.

Type of Change

  • Bug fix
  • New feature
  • Breaking change
  • Documentation update

Testing

Run against the real 7.0.2 install (pnpm install --frozen-lockfile), under FORCE_COLOR=1 CI=true:

  • pnpm test:types pass
  • pnpm test:types:vscode pass
  • pnpm test:format pass
  • pnpm test:lint pass
  • pnpm test:knip pass
  • pnpm build pass, dist/ carries no unresolved @/ specifiers
  • full AVA suite 6565 passed, 0 failed

Notes

No changeset: dist/ output is unchanged, typescript is a devDependency, and the third change is test-only.

The open dependabot/npm_and_yarn/tsc-alias-1.9.1 PR is red for exactly this tsconfig reason and should go green on rebase once this lands. The ava-8.0.1 PR fails for an unrelated reason and is untouched here.

#913 bumped typescript 5.9.3 -> 7.0.2 and was merged with Type Checks,
Unit Tests and Verify Build all failing, so main has been red since.

- tsconfig.json: TypeScript 7 removed `baseUrl` and rejects non-relative
  `paths` targets. Dropped the former and made both targets relative to
  this file, which resolves to the same places. tsc-alias still rewrites
  every `@/` specifier, so dist/ is unchanged.
- plugins/vscode/tsconfig.json: `include` deliberately reaches into
  source/, and TypeScript 7 infers a rootDir of plugins/vscode and
  rejects those files with TS6059. Widened rootDir to the repo root. The
  extension is bundled by esbuild, so tsc only type-checks this project
  and the wider rootDir has no effect on output. This was hidden behind
  the first failure: test:types dies before test:types:vscode runs.
- location-step.spec.tsx: a separate breakage from #855. The assertion
  compares a rendered line against the raw resolved path, but the path
  is dimmed, so the frame carries ANSI escapes that `.trim()` leaves in
  place. It passed locally (no colour) and failed in CI (FORCE_COLOR=1).
  Strips ANSI first, matching write-file.spec.tsx and app-container.spec.tsx.

Verified with the real 7.0.2 install: test:types, test:types:vscode,
test:format, test:lint, test:knip, pnpm build, and the full AVA suite
(6565 passed) under FORCE_COLOR=1 CI=true.
@github-actions

Copy link
Copy Markdown
Contributor

No changeset found

This PR does not add a changeset, so it will not appear in the changelog or trigger a release.

If the change is user-facing, add one:

pnpm changeset

Pick a bump (patch / minor / major) and write the changelog entry in our usual voice ("Added X... Thanks to @you. Closes #123."), then commit the generated .changeset/*.md file.

If this PR is docs-only or a chore that needs no release note, you can ignore this - or run pnpm changeset --empty to record that intentionally.

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