Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"@semantic-release/npm": "^13.1.5",
"@semantic-release/release-notes-generator": "^14.1.1",
"semantic-release": "^25.0.3",
"typescript": "^5.5.4",
"typescript": "^6.0.3",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🌐 Web query:

TypeScript 6.0 breaking changes and migration guide

💡 Result:

TypeScript 6.0, released on March 23, 2026, is a transition release preparing for the native Go-based TypeScript 7.0. It introduces breaking changes through new defaults, deprecations (ignored via "ignoreDeprecations": "6.0" but removed in 7.0), and behavioral shifts. ## Key Breaking Changes and New Defaults - strict: true (was false) - Enables all strict type-checking options. - target: es2025 (was ES3/ES5, lowest now es2015). - types: [] (was [""] auto-installing all @types/) - Explicitly list needed types like ["node"]. - rootDir: config directory (was inferred) - Set explicitly e.g. "./src". - moduleResolution: bundler/nodenext (node10/classic deprecated). - esModuleInterop: true by default. - noUncheckedSideEffectImports: true. - lib: dom includes dom.iterable/asynciterable. - --outFile removed - Migrate to bundlers like esbuild/webpack. - Deprecated: baseUrl, module=namespace (use namespace), import assert { } (use with { }), triple-slash refs, downlevelIteration, legacy module targets (AMD/UMD/System). ## Behavioral Changes - Less context-sensitivity for this-less functions (may affect inference). - Type ordering may differ (use --stableTypeOrdering flag to preview 7.0 behavior). ## Migration Guide / Checklist 1. npm install -D typescript@latest (6.0+). 2. Add "ignoreDeprecations": "6.0" temporarily to tsconfig.json to suppress warnings. 3. Explicitly set changed defaults: "strict": true/false, "target": "es2022"/runtime match, "types": ["node"], "rootDir": "./src". 4. Update module/moduleResolution: e.g. "module": "nodenext", "moduleResolution": "bundler". 5. Replace deprecated import assert {} with with {}. 6. Remove baseUrl/outFile/downlevelIteration etc. 7. Run npx tsc --noEmit to check errors. 8. Test with --stableTypeOrdering. 9. Use codemod ts5to6 for baseUrl/rootDir auto-fixes. 10. Verify with TypeScript 7.0 native preview if available. Official docs: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-6-0.html. Address deprecations before 7.0 as ignoreDeprecations won't work there. Most projects need types[] and rootDir fixes first.

Citations:


🌐 Web query:

TypeScript 6.0 compatibility with Vite 5.4 and Vitest 3.2

💡 Result:

TypeScript 6.0 is not compatible with Vite 5.4 or Vitest 3.2. Vite 5.4 supports up to TypeScript 5.6, as shown in its dependency updates. Vitest 3.2, released in June 2025, also aligns with TypeScript versions prior to 6.0. TypeScript 6.0, released around April 2026, introduces breaking changes like new defaults (strict: true, target: es2025) and deprecations that require updates. Vite added TypeScript 6.0 support in April 2026 via PR #22110, which updates templates and configs (e.g., typescript: ~6.0.2, handling new behaviors like moduleResolution: bundler and ignoreDeprecations: '6.0'). This is in Vite 6+ or main branch, not backported to 5.4. Vitest 4.0 requires Vite >=6.0.0, implying it supports TypeScript 6.0 alongside newer Vite. To use TypeScript 6.0, upgrade to Vite 6+ and Vitest 4+. Follow TypeScript 6.0 migration guide for tsconfig changes (e.g., explicit target/moduleResolution, handle baseUrl removal). No reported specific compatibility issues beyond general TS 6.0 migration needs.

Citations:


🏁 Script executed:

#!/bin/bash
# Description: Verify TypeScript compilation and type checking works after the upgrade

# Check if package-lock.json or node_modules reflect the update
echo "=== Checking TypeScript version in lockfile ==="
fd -t f "package-lock.json" --exec jq -r '.packages."node_modules/typescript".version' {} \;

# Look for any TypeScript configuration files
echo -e "\n=== TypeScript configuration files ==="
fd -e json "tsconfig" --exec echo {} \;

# Check for any .d.ts files that might be affected
echo -e "\n=== Checking for type definition files ==="
fd -e ts ".d.ts$" | head -20

# Look for potential type errors in source files
echo -e "\n=== Source TypeScript files ==="
fd -e ts -e tsx --type f -E "node_modules" -E "dist" | head -20

Repository: lokalise/npm-package-template

Length of output: 305


🏁 Script executed:

#!/bin/bash
# Read the tsconfig.json to see current configuration
cat -n tsconfig.json

Repository: lokalise/npm-package-template

Length of output: 525


Upgrade Vite to 6.0+ and Vitest to 4.0+ to support TypeScript 6.0.

TypeScript 6.0.3 is incompatible with Vite 5.4.11 and Vitest 3.2.4. Vite 5.x supports only up to TypeScript 5.6, and Vitest 3.2 does not support TypeScript 6.0. These toolchain dependencies must be upgraded to Vite 6.0+ and Vitest 4.0+ for the TypeScript 6.0 upgrade to work.

Additionally, TypeScript 6.0 introduces major breaking changes and new defaults. While the tsconfig.json is mostly compatible (target: ESNext, moduleResolution: bundler, strict: true, and explicit types are all appropriate), you must follow the TypeScript 6.0 migration checklist before merging:

  1. Verify the build succeeds with Vite 6.0+ and Vitest 4.0+
  2. Run npm run lint:ts to ensure type checking passes with the new defaults
  3. Run npm run test and npm run build to verify the full pipeline works
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 42, package.json currently pins "typescript": "^6.0.3"
but the toolchain dependencies Vite and Vitest must be upgraded to be
compatible; update the package.json dependency entries for "vite" to 6.0+ and
"vitest" to 4.0+ (and any related Vite plugins or vite-related devDependencies)
so they support TypeScript 6, then run build/test/lint as described; locate and
update the "vite" and "vitest" dependency lines in package.json and ensure any
plugins (e.g., vite-plugin-*) are upgraded to versions compatible with Vite 6
before merging.

"vite": "^5.4.11",
"vitest": "^3.2.4"
},
Expand Down
Loading