fix(build): restore the build and type checks under TypeScript 7 - #916
Open
will-lamerton wants to merge 1 commit into
Open
fix(build): restore the build and type checks under TypeScript 7#916will-lamerton wants to merge 1 commit into
will-lamerton wants to merge 1 commit into
Conversation
#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.
Contributor
No changeset foundThis 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 changesetPick 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 If this PR is docs-only or a chore that needs no release note, you can ignore this - or run |
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.
Closes the red build on
main.Description
#913 bumped
typescript5.9.3 -> 7.0.2 and was merged with Type Checks, Unit Tests and Verify Build all failing on its own PR, somainhas been red since. There were three breakages, two of them from that bump and one older.tsconfig.jsonTypeScript 7 removedbaseUrl(TS5102) and rejects non-relativepathstargets (TS5090). DroppedbaseUrland made both targets relative to the config file, which resolves to the same places.tsc-aliasstill rewrites every@/specifier, sodist/is unchanged.plugins/vscode/tsconfig.jsonincludedeliberately reaches intosource/, and TypeScript 7 infers arootDirofplugins/vscodeand rejects those files with TS6059. WidenedrootDirto the repo root. The extension is bundled by esbuild (build:ext), sotsconly ever type-checks this project and the widerrootDirhas no effect on output. This one was hidden behind the first:test:typesfails beforetest:types:vscodegets to run.source/wizards/steps/location-step.spec.tsxa 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 inwrite-file.spec.tsxandapp-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
Testing
Run against the real 7.0.2 install (
pnpm install --frozen-lockfile), underFORCE_COLOR=1 CI=true:pnpm test:typespasspnpm test:types:vscodepasspnpm test:formatpasspnpm test:lintpasspnpm test:knippasspnpm buildpass,dist/carries no unresolved@/specifiersNotes
No changeset:
dist/output is unchanged,typescriptis a devDependency, and the third change is test-only.The open
dependabot/npm_and_yarn/tsc-alias-1.9.1PR is red for exactly thistsconfigreason and should go green on rebase once this lands. Theava-8.0.1PR fails for an unrelated reason and is untouched here.