chore: migrate core/platforma to TypeScript 7#1764
Open
AStaroverov wants to merge 3 commits into
Open
Conversation
Bump the workspace to typescript@7.0.2 (the native compiler) and adapt the build toolchain so the whole repo type-checks and builds green on TS7. TypeScript 7 no longer ships the classic JS Compiler API, which Volar-based tooling (vue-tsc, vite-plugin-dts) still requires. Following Microsoft's transition guidance, embedded-compiler tools now use the official @typescript/typescript6 bridge, while node code uses the native tsc. Toolchain / versions: - catalog: typescript 7.0.2; add @typescript/typescript6 6.0.2; vite-plugin-dts ^5.0.3; vue-tsc 3.3.8; openapi-typescript ^7.13 - ts-builder: rolldown-plugin-dts ^0.27.13 (TS7-capable dts for node builds) ts-builder adaptations: - run vue-tsc against @typescript/typescript6 via bin/vue-tsc-ts6.cjs shim - type-check: pass --customConditions "default" instead of a bare "," (TS7's CLI parses "," as a source-file positional -> TS5042) - provide an explicit fs to @vitejs/plugin-vue's SFC compiler (@vue/compiler-sfc fell back to ts.sys, which TS7 no longer exposes) - dts moduleResolution NodeJs -> Bundler (resolve package exports subpaths) ui-vue: - AnnotationsSidebar/FilterSidebar handlers accept string | undefined, as PlEditableTitle's defineModel<string>() (no default) emits string | undefined
Contributor
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
🦋 Changeset detectedLatest commit: 70188e8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1764 +/- ##
==========================================
- Coverage 53.72% 53.65% -0.08%
==========================================
Files 366 366
Lines 19679 19679
Branches 4341 4341
==========================================
- Hits 10573 10558 -15
- Misses 7804 7817 +13
- Partials 1302 1304 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
vitest Vue tests compile SFCs via @vitejs/plugin-vue too, and @vue/compiler-sfc fell back to ts.sys to resolve types imported into SFC macros. TS7 removed ts.sys, so tests failed with "No fs option provided ... non-Node environment" (e.g. @platforma-sdk/ui-vue compiling uikit's PlProgressCell.vue). Mirror the createViteDevConfig fix: pass an explicit Node fs to the vue plugin in createVitestVueConfig.
| function updateTitle(title: string | undefined) { | ||
| produceAnnotationUpdate((draft) => { | ||
| draft.title = title; | ||
| draft.title = title ?? ""; |
Member
There was a problem hiding this comment.
Why these changes appeared? and only 2 such things for all platforma?
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.
What
Migrates the monorepo to TypeScript 7.0.2 (the native compiler). The whole
repo type-checks and builds green on TS7.
Why it's not just a version bump
TS7 is the native (Go) compiler and no longer ships the classic JS Compiler
API (
ts.createProgram,ts.sys,typescript/lib/tsc, …). Tooling thatembeds the compiler — Volar (
vue-tsc),vite-plugin-dts,rolldown-plugin-dts,@vue/compiler-sfc— depends on that API.Per Microsoft's transition guidance (TS 7.0 release notes) and
vuejs/language-tools#5381,
embedded-compiler tools use the official
@typescript/typescript6bridge(classic API packaged from TS6) until TS 7.1 ships a stable native API and Volar
adopts it. Node code uses the native
tsc; Vue type-checking uses the bridge.Changes
Versions
typescript~5.9.3 → 7.0.2; add@typescript/typescript6@6.0.2vite-plugin-dts ^4.5.3 → ^5.0.3,rolldown-plugin-dts ^0.26 → ^0.27.13,vue-tsc 3.3.5 → 3.3.8,openapi-typescript ^7.10 → ^7.13@microsoft/api-extractor'stypescriptpinned to the bridge via overridets-builderbin/vue-tsc-ts6.cjs(new): runsvue-tscagainst@typescript/typescript6(vue-tsc ≥3.3.8 redirects the alias to its bundled TS6). Browser targets use it.
--customConditions "default"instead of a bare","— TS7's CLI parses,as a source-file positional (
TS5042), which broke every node type-check.fsto@vitejs/plugin-vue's SFC compiler —@vue/compiler-sfcfell back tots.sys(gone on TS7) to resolve typesimported into SFC macros.
moduleResolutionNodeJs → Bundlersoexportssubpath types resolve(e.g.
@vueuse/integrations/useSortable).ui-vueAnnotationsSidebar/FilterSidebar: handlers acceptstring | undefined,matching
PlEditableTitle'sdefineModel<string>()(no default) emit type.Verification
pnpm turbo run types:check— 172/172 tasks green across the whole repo,confirmed with
--force(no cache).Notes
(not TS7). This is the intended interim state until TS 7.1 + a Volar update;
no
.vuesource changes required.vueintentionally left at3.5.24(bumping to3.5.40introduceddefineModeltyping regressions).flow requires them.
pnpm testand the fullpnpm build(softwarepackaging).
Greptile Summary
Migrates the monorepo’s TypeScript and Vue build pipeline to the TypeScript 7 native compiler while retaining the TypeScript 6 compatibility bridge for tools that require the classic Compiler API.
@typescript/typescript6, which supplies the classic JavaScript Compiler API absent from TypeScript 7; added for Vue and declaration tooling.vue-tscwith the bridge compiler; browser, browser-library, and block-UI checks now use it.defaultinstead of the TS7-invalid comma argument.Bundlerresolution.undefinedemission and normalize it to an empty string.Confidence Score: 5/5
The PR appears safe to merge, with no concrete changed-code defect identified.
The target-specific compiler routing, conditional-export override, explicit Vue filesystem integration, declaration-resolution update, and nullable title handling are internally consistent with the migration.
Important Files Changed
Flowchart
%%{init: {'theme': 'neutral'}}%% flowchart LR A[ts-builder type-check] --> B{Target} B -->|Node and model| C[TypeScript 7 native tsc] B -->|Browser, browser-lib, block-ui| D[vue-tsc TS6 shim] D --> E[TypeScript 6 classic Compiler API bridge] F[Vite Vue build] --> G[Explicit SFC filesystem] F --> H[Bundler declaration resolution] C --> I[Type-check result] E --> I G --> J[Vue build output] H --> JReviews (1): Last reviewed commit: "chore: migrate core/platforma to TypeScr..." | Re-trigger Greptile
Context used (3)