mirror of
https://github.com/duckietm/Nitro-V3.git
synced 2026-06-19 15:06:20 +00:00
Add TypeScript 7 (tsgo) as fast type-checker alongside TS 6
TypeScript 7 is the Go-native rewrite of tsc, ~10x faster but only
distributed as @typescript/native-preview daily builds at the time
of writing (npm typescript@latest is still 6.0.3). Add it as a
non-disruptive type-check tool: yarn typecheck → tsgo --noEmit.
Vite still uses esbuild for transpilation, ESLint still uses TS 6
through @typescript-eslint v8, IDEs continue using their bundled TS.
This commit only adds a type-check tool — nothing replaces.
Required tsconfig.json adjustments for TS 7 compatibility (still
valid for TS 6):
- Drop baseUrl: "./src" (removed in TS 7). The codebase has no
bare/non-relative imports that depended on it; all imports are
relative or aliased.
- Drop downlevelIteration: true (removed in TS 7; target es2022
doesn't need it).
- moduleResolution: "node" → "bundler" (TS 7 dropped node10; bundler
is the right mode for Vite anyway).
- paths "@layout/*" entries now use leading "./" (TS 7 disallows
non-relative path mappings). Add "@/*" → "./src/*" to match the
Vite alias used in some components.
Other TS 7 adjustments:
- src/react-app-env.d.ts: add module declarations for *.css/.scss/.sass
side-effect imports (TS 7 with bundler resolution requires them) +
Window.NitroConfig / Window.NitroSecureApiUrl globals which were
used in App.tsx without a declaration.
- src/common/Popover.tsx: explicit `import { JSX } from 'react'`
because TS 7 dropped the implicit global JSX namespace.
Verification:
- yarn eslint still passes (TS 6 / @typescript-eslint v8 happy with
the migrated config).
- yarn typecheck (tsgo) runs and reports only cascading errors
rooted in the missing @nitrots/nitro-renderer sibling repo
(environmental, not introduced here).
https://claude.ai/code/session_01GrR87LAqnAEyKG2ZbmQt5Q
This commit is contained in:
@@ -1062,6 +1062,54 @@
|
||||
"@typescript-eslint/types" "8.59.2"
|
||||
eslint-visitor-keys "^5.0.0"
|
||||
|
||||
"@typescript/native-preview-darwin-arm64@7.0.0-dev.20260509.2":
|
||||
version "7.0.0-dev.20260509.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript/native-preview-darwin-arm64/-/native-preview-darwin-arm64-7.0.0-dev.20260509.2.tgz#e759c5815bcc7d1605da78c63d3960c366b24d5c"
|
||||
integrity sha512-oG9KahiCpx4q70Ood/rRJhYio4oIMHEHfX0g0LhfenlSIjIonitZWjUmUVG9N9q1ev9QWcM8pWpDrGGP0Osp3Q==
|
||||
|
||||
"@typescript/native-preview-darwin-x64@7.0.0-dev.20260509.2":
|
||||
version "7.0.0-dev.20260509.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript/native-preview-darwin-x64/-/native-preview-darwin-x64-7.0.0-dev.20260509.2.tgz#70750de45f9791972eaa0d2054eec5964657f52a"
|
||||
integrity sha512-xdEkp23Gu8I7PJCMmSMYtSLX76NKODWj74AoWFPi6MM59ICsjnTSqZf/HmXKSvuNZ5MGb4CMpP3c40dLjGB2PQ==
|
||||
|
||||
"@typescript/native-preview-linux-arm64@7.0.0-dev.20260509.2":
|
||||
version "7.0.0-dev.20260509.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript/native-preview-linux-arm64/-/native-preview-linux-arm64-7.0.0-dev.20260509.2.tgz#e81a79ddd39efe42a872b0e5191fdbd0f80a023a"
|
||||
integrity sha512-rd+bMRtUAFBClOAKi9p2rOu6jPmnrjZVljoFyxHw+6bIRLerEQlxP+nIH1olC3HOZPyZ6/x75WtfzTHYeqffiQ==
|
||||
|
||||
"@typescript/native-preview-linux-arm@7.0.0-dev.20260509.2":
|
||||
version "7.0.0-dev.20260509.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript/native-preview-linux-arm/-/native-preview-linux-arm-7.0.0-dev.20260509.2.tgz#c05f9d7e6a546f2d2844808535bc216753913bba"
|
||||
integrity sha512-ar5HN/V/4HLF4FZCoVVFj+ET1Soi758hb4WhhzYQfSUXQ/bpVGUGP86JAy8EhVMoeN6qxqWet93MkLSszJOIVg==
|
||||
|
||||
"@typescript/native-preview-linux-x64@7.0.0-dev.20260509.2":
|
||||
version "7.0.0-dev.20260509.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript/native-preview-linux-x64/-/native-preview-linux-x64-7.0.0-dev.20260509.2.tgz#64bc09d219b194cbc8e40fa3dec973ee63585844"
|
||||
integrity sha512-lB26mGzdolYIZiOdBII8roVJCxCUR8zkYszvvHyjB1IPs7d5fmOhT6OzI1zYPYujiSRJi4HVYM1iXTcIfp7KDg==
|
||||
|
||||
"@typescript/native-preview-win32-arm64@7.0.0-dev.20260509.2":
|
||||
version "7.0.0-dev.20260509.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript/native-preview-win32-arm64/-/native-preview-win32-arm64-7.0.0-dev.20260509.2.tgz#14341a0a6561107fad33e0686bd267b4775b120e"
|
||||
integrity sha512-gH3UmtyxHiRNEP0LgQXCVlB5+ZN/U+/Z7jM/zULQtTOxIIFK3Y4b8gbGLvP7uW3u2cqYOg2hc2nuN8OdsCmOig==
|
||||
|
||||
"@typescript/native-preview-win32-x64@7.0.0-dev.20260509.2":
|
||||
version "7.0.0-dev.20260509.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript/native-preview-win32-x64/-/native-preview-win32-x64-7.0.0-dev.20260509.2.tgz#41a91f82067717781c47e5698bff0d1abb14ac51"
|
||||
integrity sha512-kZV0Vh64hp10saOghPlFZE1qahonqvRgU3iubt8pUY4XLe8IQIofwWCN5vzNNeULE4W4mRtAJbHuvP/muOFomw==
|
||||
|
||||
"@typescript/native-preview@^7.0.0-dev.20260509.2":
|
||||
version "7.0.0-dev.20260509.2"
|
||||
resolved "https://registry.yarnpkg.com/@typescript/native-preview/-/native-preview-7.0.0-dev.20260509.2.tgz#19767f26410f7a211384b9c77e5d53893cc489c5"
|
||||
integrity sha512-JAJpEX0yBaEle2zzbX5z9QAhmEfML1SyQafLwbKCdcOtnkGdk5xD8NKIVxq+nTwYjRwuV7kKnQ+fqU3gpWY0qQ==
|
||||
optionalDependencies:
|
||||
"@typescript/native-preview-darwin-arm64" "7.0.0-dev.20260509.2"
|
||||
"@typescript/native-preview-darwin-x64" "7.0.0-dev.20260509.2"
|
||||
"@typescript/native-preview-linux-arm" "7.0.0-dev.20260509.2"
|
||||
"@typescript/native-preview-linux-arm64" "7.0.0-dev.20260509.2"
|
||||
"@typescript/native-preview-linux-x64" "7.0.0-dev.20260509.2"
|
||||
"@typescript/native-preview-win32-arm64" "7.0.0-dev.20260509.2"
|
||||
"@typescript/native-preview-win32-x64" "7.0.0-dev.20260509.2"
|
||||
|
||||
"@vitejs/plugin-react@^6.0.1":
|
||||
version "6.0.1"
|
||||
resolved "https://registry.yarnpkg.com/@vitejs/plugin-react/-/plugin-react-6.0.1.tgz#d9113b71a0a592714913eafd9e5e63bcafd0ff15"
|
||||
|
||||
Reference in New Issue
Block a user