Update dependency typescript to v7#2263
Conversation
Signed-off-by: red-hat-konflux <126015336+red-hat-konflux[bot]@users.noreply.github.com>
|
📝 WalkthroughWalkthroughUpdates the ChangesTypeScript dependency
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@package.json`:
- Line 50: Revert the TypeScript dependency version in package.json from ^7.0.0
to the currently supported version, keeping the upgrade deferred until
ts-loader, ts-node, `@typescript-eslint`, and the tsconfig.json compiler options
support TypeScript 7.
- Line 50: Update tsconfig.json for TypeScript 7 by removing baseUrl and
changing moduleResolution from "node" to "bundler" for the webpack build. Before
removing baseUrl, inspect imports for aliases that rely on it and rewrite those
imports explicitly while preserving their resolved modules.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Enterprise
Run ID: 4269f572-cb97-4c44-98f4-fd706e4e27c9
📒 Files selected for processing (1)
package.json
| "ts-loader": "^9.6.0", | ||
| "ts-node": "^10.9.2", | ||
| "typescript": "^5.9.3", | ||
| "typescript": "^7.0.0", |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== package.json ==\n'
cat -n package.json | sed -n '1,140p'
printf '\n== tsconfig.json ==\n'
if [ -f tsconfig.json ]; then
cat -n tsconfig.json | sed -n '1,220p'
else
echo "tsconfig.json not found"
fi
printf '\n== relevant dependency occurrences ==\n'
rg -n '"(typescript|ts-loader|ts-node|`@typescript-eslint/`|eslint|webpack)"' package.json **/package.json 2>/dev/null || trueRepository: openshift/lightspeed-console
Length of output: 5190
🌐 Web query:
TypeScript 7 compiler API removal compatibility ts-loader ts-node @typescript-eslint deprecated baseUrl moduleResolution node
💡 Result:
TypeScript 7.0 (released July 2026) introduced major architectural changes, primarily due to the transition to a native Go-based compiler [1][2]. The most critical change is the absence of the programmatic TypeScript Compiler API in the 7.0 release [2][3][4]. Compatibility and Migration Details: 1. Compiler API Removal: TypeScript 7.0 does not expose the stable programmatic Compiler API (ts.createProgram, ts.createSourceFile, etc.) that many tools rely on [5][4]. Tools that import the TypeScript compiler as a library—such as ts-loader, ts-node, ts-morph, and type-aware @typescript-eslint rules—will break if they attempt to use the 7.0 native binary directly [2][3][5]. 2. Compatibility Strategy: Microsoft supports side-by-side usage to maintain compatibility [1][4]. You can keep TypeScript 6.x installed as a compatibility alias (often via npm: typescript@npm:@typescript/typescript6``) for tools that require the Compiler API, while using the native TypeScript 7 binary for type-checking and builds [1][4]. 3. Impact on Ecosystem Tools: - ts-node: Does not work with TypeScript 7.0 because it relies on the JavaScript-based compiler API [6][7]. Users are encouraged to switch to alternatives like tsx (which uses esbuild) for execution, while keeping a 7.0+ process for type-checking [6][7]. - ts-loader: The full type-checking mode relies on the Compiler API and is affected [2][5]. The `transpileOnly: true` mode remains functional as it bypasses the compiler API [5]. - `@typescript-eslint`: Type-aware linting (which requires `parserOptions.project`) depends on the Compiler API [3][7]. It must be configured to use a 6.x environment until the new API is released in TypeScript 7.1 [1][4]. 4. Configuration Changes: - baseUrl and moduleResolution: Use of `baseUrl` and older `moduleResolution` settings like `node` (alias for `node10`) have been removed or deprecated [4][8][9]. You should update your `tsconfig.json` to use modern resolutions such as `nodenext`, `node16`, or `bundler` [4][8][10]. - baseUrl Removal: `baseUrl` is no longer supported [9]. Migration requires updating `paths` to use project-root-relative paths (e.g., changing `@app/: ["app/"]` to `@app/: ["./src/app/"]`) [9]. The official release of a new Compiler API for the Go-based compiler is planned for TypeScript 7.1, expected within 3 to 4 months of the 7.0 release [4]. Until then, maintaining a dual-version setup is the recommended migration path [1][4].
Citations:
- 1: https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/
- 2: https://www.flowverify.co/blog/typescript-go-rewrite-what-breaks
- 3: https://fernforge.github.io/devnotes/typescript-7-what-breaks/
- 4: https://www.developersdigest.tech/blog/typescript-7-native-compiler-migration-guide
- 5: https://www.sitepoint.com/typescript-70-rc-the-go-rewrite-migration-guide/
- 6: ts-node doesn't work with Typescript 7.0.2 TypeStrong/ts-node#2174
- 7: https://beyondit.blog/blogs/three-tools-in-your-typescript-stack-will-break-on-the-7-0-upgrade
- 8: TypeScript 6 Support typescript-eslint/typescript-eslint#12123
- 9: Deprecate, remove support for
baseUrlmicrosoft/TypeScript#62207 - 10: v6: Cannot find module '@typescript-eslint/*' or its corresponding type declarations typescript-eslint/typescript-eslint#7284
Hold the TypeScript 7 bump until dependent tools are updated. ts-loader, ts-node, and @typescript-eslint still rely on the compiler API, and this repo’s tsconfig.json uses baseUrl and moduleResolution: "node", which TS7 no longer supports. Upgrading only package.json will break build and lint paths.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` at line 50, Revert the TypeScript dependency version in
package.json from ^7.0.0 to the currently supported version, keeping the upgrade
deferred until ts-loader, ts-node, `@typescript-eslint`, and the tsconfig.json
compiler options support TypeScript 7.
Source: MCP tools
🎯 Functional Correctness | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== files ==\n'
git ls-files | rg '(^|/)(package\.json|tsconfig.*|webpack.*|vite.*|rollup.*|babel.*|\.swcrc|\.npmrc)$' || true
printf '\n== package.json ==\n'
if [ -f package.json ]; then
cat -n package.json | sed -n '1,220p'
fi
printf '\n== tsconfig files ==\n'
for f in $(git ls-files | rg '(^|/)tsconfig(\..*)?\.json$'); do
printf '\n--- %s ---\n' "$f"
cat -n "$f" | sed -n '1,260p'
done
printf '\n== webpack/import strategy hits ==\n'
rg -n '"moduleResolution"|"\bbaseUrl\b"|"paths"|resolve\.|alias|tsx?config|typescript' -g '!*node_modules*' -g '!*.lock' .Repository: openshift/lightspeed-console
Length of output: 15646
🌐 Web query:
TypeScript 7 baseUrl moduleResolution node removes behaviors blog progress on TypeScript 7 December 2025
💡 Result:
In TypeScript 7.0, released in July 2026 [1], the compiler options baseUrl and moduleResolution: node (including node10) have been officially removed [1][2]. These features were deprecated in TypeScript 6.0 [3][4] to modernize the compiler's module resolution logic and simplify configuration [5][6]. Migration Paths: 1. baseUrl Removal: The baseUrl option is no longer supported as a lookup root for module resolution [3][4]. Developers should remove baseUrl from their tsconfig.json and incorporate the base path directly into each entry in the paths configuration [2][6]. For example, if your paths were mapped relative to a baseUrl of "./src", you should now prepend "./src/" to those path values [2][6]. 2. moduleResolution: node/node10 Removal: The node and node10 resolution strategies are no longer supported because they failed to reflect modern Node.js module resolution behaviors [5][3]. - For applications running directly in Node.js, the recommended replacement is moduleResolution: nodenext [2][3]. - For projects using bundlers (like Webpack, Vite, or Bun), the recommended replacement is moduleResolution: bundler [2][3]. Background and Context: The deprecation process began in TypeScript 6.0 [3][4]. During the transition period, projects could use the --ignoreDeprecations compiler option to suppress related errors, but this functionality has been removed in the final 7.0 release [1][7]. These changes were part of a broader architectural shift; TypeScript 7.0 is a significant milestone that introduced a new native compiler rewritten in Go (codenamed "Project Corsa") to achieve substantial performance improvements in build times and memory usage [8][9][10]. Despite this architectural rewrite, the compiler maintains structural and semantic parity with TypeScript 6.0 to ensure compatibility with existing codebases [9].
Citations:
- 1: https://devblogs.microsoft.com/typescript/announcing-typescript-7-0/
- 2: https://patrykb.pl/articles/typescript-7-migration-without-pain
- 3: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-6-0.html
- 4: https://devblogs.microsoft.com/typescript/announcing-typescript-6-0/
- 5: Deprecate, remove
--moduleResolution node10microsoft/TypeScript#62200 - 6: 6.0 Migration Guide microsoft/TypeScript#62508
- 7: Deprecate baseUrl microsoft/TypeScript#62432
- 8: https://devblogs.microsoft.com/typescript/progress-on-typescript-7-december-2025/
- 9: https://devblogs.microsoft.com/typescript/announcing-typescript-7-0-rc/
- 10: https://www.infoq.com/news/2026/01/typescript-7-progress/
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== webpack.config.ts ==\n'
cat -n webpack.config.ts | sed -n '1,220p'
printf '\n== non-relative imports in src/tests/unit-tests ==\n'
rg -n 'from [\"\x27](?!\.{1,2}/)' src tests unit-tests -g '!**/*.css' -g '!**/*.json' || true
printf '\n== tsconfig paths/baseUrl usage ==\n'
rg -n '"paths"|"baseUrl"|"moduleResolution"' tsconfig.json tests/tsconfig.json unit-tests/tsconfig.json webpack.config.ts package.json || trueRepository: openshift/lightspeed-console
Length of output: 4185
🏁 Script executed:
#!/bin/bash
set -euo pipefail
printf '\n== non-relative import specifiers ==\n'
rg -n --pcre2 'from\s+[\"\x27](?!\.{1,2}/)([^\"\x27]+)[\"\x27]' src tests unit-tests || true
printf '\n== import/require aliases or tsconfig path mappings ==\n'
rg -n '"paths"|baseUrl|resolve.alias|paths\s*:' src tests unit-tests webpack.config.ts tsconfig.json package.json || trueRepository: openshift/lightspeed-console
Length of output: 12791
Update tsconfig.json for TypeScript 7
baseUrl and moduleResolution: "node" are removed in TS 7, so this config will break as-is. For the webpack build, switch to moduleResolution: "bundler" and drop baseUrl; if any imports depend on it, rewrite those aliases explicitly first.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@package.json` at line 50, Update tsconfig.json for TypeScript 7 by removing
baseUrl and changing moduleResolution from "node" to "bundler" for the webpack
build. Before removing baseUrl, inspect imports for aliases that rely on it and
rewrite those imports explicitly while preserving their resolved modules.
Source: MCP tools
|
Don't want to upgrade to TypeScript 7 yet |
Renovate Ignore NotificationBecause you closed this PR without merging, Renovate will ignore this update. You will not get PRs for any future If you accidentally closed this PR, or if you changed your mind: rename this PR to get a fresh replacement PR. |
This PR contains the following updates:
^5.9.3→^7.0.0Release Notes
microsoft/TypeScript (typescript)
v7.0.2Compare Source
v6.0.3: TypeScript 6.0.3Compare Source
For release notes, check out the release announcement blog post.
Downloads are available on:
v6.0.2: TypeScript 6.0Compare Source
For release notes, check out the release announcement blog post.
Downloads are available on:
Configuration
📅 Schedule: (in timezone UTC)
* * * * *)🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
To execute skipped test pipelines write comment
/ok-to-test.Documentation
Find out how to configure dependency updates in MintMaker documentation or see all available configuration options in Renovate documentation.