Skip to content

Enable TypeScript 7 RC side-by-side with TypeScript 6#3151

Merged
pethers merged 7 commits into
mainfrom
copilot/typescript-7-0-rc-side-by-side-install
Jul 8, 2026
Merged

Enable TypeScript 7 RC side-by-side with TypeScript 6#3151
pethers merged 7 commits into
mainfrom
copilot/typescript-7-0-rc-side-by-side-install

Conversation

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

TypeScript 7.0 RC ships a new tsc binary, but the stable programmatic API is not yet available. To keep the project on the current toolchain while evaluating the RC, the repository now runs TypeScript 7 RC side-by-side with TypeScript 6 without conflicting binary resolution.

  • Summary

    • The repo needs to adopt TypeScript 7 RC without breaking the existing tsc-based build flow or forcing a hard switch away from TypeScript 6 compatibility.
  • What changed

    • Switched the TypeScript dependency to the Microsoft-recommended alias-based layout so the existing typescript entry remains compatible with TypeScript 6 while a separate typescript-7 alias exposes the RC compiler.
    • Kept the project’s existing build entry points intact by preserving the default tsc workflow for the current toolchain.
    • Updated TypeScript project configs to remove deprecated baseUrl usage and use explicit relative path aliases, which are required for the new compiler to parse the config cleanly.
{
  "devDependencies": {
    "typescript": "npm:@typescript/typescript6@^6.0.0",
    "typescript-7": "npm:typescript@rc"
  }
}

Copilot AI and others added 2 commits July 8, 2026 10:48
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@pethers
pethers marked this pull request as ready for review July 8, 2026 10:53
Copilot AI review requested due to automatic review settings July 8, 2026 10:53
@github-actions github-actions Bot added dependencies Dependency updates size-l Large change (250-1000 lines) labels Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🏷️ Automatic Labeling Summary

This PR has been automatically labeled based on the files changed and PR metadata.

Applied Labels: dependencies,size-l

Label Categories

  • 🗳️ Content: news, dashboard, visualization, intelligence
  • 💻 Technology: html-css, javascript, workflow, security
  • 📊 Data: cia-data, riksdag-data, data-pipeline, schema
  • 🌍 I18n: i18n, translation, rtl
  • 🔒 ISMS: isms, iso-27001, nist-csf, cis-controls
  • 🏗️ Infrastructure: ci-cd, deployment, performance, monitoring
  • 🔄 Quality: testing, accessibility, documentation, refactor
  • 🤖 AI: agent, skill, agentic-workflow

For more information, see .github/labeler.yml.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR attempts to let the repo evaluate the TypeScript 7 RC alongside the existing TypeScript 6 toolchain by adding an RC dependency alias and adjusting TypeScript project configs (notably removing baseUrl and making paths entries explicitly relative).

Changes:

  • Updated devDependencies to keep TS6 as the primary typescript dependency while adding a typescript-7 alias for the RC compiler.
  • Removed baseUrl from TypeScript configs and adjusted paths mappings to use explicit ./-prefixed targets.
  • Updated package-lock.json to include the new alias dependency graph (including TS7 RC optional platform packages).

Reviewed changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
tsconfig.typedoc.json Removes baseUrl from the typedoc TypeScript config.
tsconfig.scripts.json Removes baseUrl and updates paths entries for script/test compilation.
tsconfig.npm-scripts.json Removes baseUrl and updates paths entries for npm-published scripts compilation.
package.json Adds alias-based TS6 + TS7 RC devDependencies.
package-lock.json Locks the new dependency set, including TS7 RC platform optional dependencies.

Comment thread tsconfig.scripts.json
Comment on lines 22 to 26
"ignoreDeprecations": "6.0",
"baseUrl": ".",
"paths": {
"@scripts/*": ["scripts/*"],
"@types/*": ["scripts/types/*"]
"@scripts/*": ["./scripts/*"],
"@types/*": ["./scripts/types/*"]
},
Comment thread tsconfig.npm-scripts.json
Comment on lines 22 to 26
"ignoreDeprecations": "6.0",
"baseUrl": ".",
"paths": {
"@scripts/*": ["scripts/*"],
"@types/*": ["scripts/types/*"]
"@scripts/*": ["./scripts/*"],
"@types/*": ["./scripts/types/*"]
},
Comment thread package.json Outdated
Comment on lines +215 to +216
"typescript": "npm:@typescript/typescript6@^6.0.0",
"typescript-7": "npm:typescript@rc",
Comment thread package.json Outdated
"typedoc": "0.28.20",
"typedoc-plugin-mdn-links": "5.1.1",
"typescript": "6.0.3",
"typescript": "npm:@typescript/typescript6@^6.0.0",
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions github-actions Bot added the documentation Documentation updates label Jul 8, 2026
@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

Copilot AI requested a review from pethers July 8, 2026 12:15
@pethers

pethers commented Jul 8, 2026

Copy link
Copy Markdown
Member

@copilot analyse and fix all issues in

Knip Dead Code Check / Run Knip (pull_request)
Knip Dead Code Check / Run Knip (pull_request)Failing after 1m
Quality Checks / typescript-lint (pull_request)
Quality Checks / typescript-lint (pull_request)Failing after 1m
TypeScript & JavaScript Testing / Build Test (Vite) (pull_request)
TypeScript & JavaScript Testing / Build Test (Vite) (pull_request)Failing after 1m
TypeScript & JavaScript Testing / Node.js Nightly Compat (pull_request)
TypeScript & JavaScript Testing / Node.js Nightly Compat (pull_request)Failing after 59s
TypeScript & JavaScript Testing / Unit Tests (Vitest) (pull_request)
TypeScript & JavaScript Testing / Unit Tests (Vitest) (pull_request)Failing after 1m

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions github-actions Bot added workflow GitHub Actions workflows ci-cd CI/CD pipeline changes testing Test coverage labels Jul 8, 2026
Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>
@github-actions github-actions Bot added the size-xs Extra small change (< 10 lines) label Jul 8, 2026

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot analyse and fix all issues in

[Knip Dead Code Check / Run Knip (pull_request)](https://github.com/Hack23/riksdagsmonitor/actions/runs/28940319518/job/85860642964?p...

Implemented the CI-side fix in commit dea53ea by switching the remaining workflow type-check steps to the explicit TS6 compiler path, matching the earlier package.json/tsconfig changes. I also validated the browser/scripts typechecks and build:lib locally with the same compiler path.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@pethers

pethers commented Jul 8, 2026

Copy link
Copy Markdown
Member

@copilot also investigate and fix
Knip Dead Code Check / Run Knip (pull_request)
Knip Dead Code Check / Run Knip (pull_request)Failing after 1m

Co-authored-by: pethers <1726836+pethers@users.noreply.github.com>

Copilot AI commented Jul 8, 2026

Copy link
Copy Markdown
Contributor Author

@copilot also investigate and fix
Knip Dead Code Check / Run Knip (pull_request)...

Fixed in commit 89262ba by adding the intentionally installed typescript-7 RC alias to Knip’s ignored dev dependencies, which removes the dead-code failure without changing the side-by-side toolchain behavior. I also verified the change locally with npx knip and npm run build:lib.

@github-actions

github-actions Bot commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

🔍 Lighthouse Performance Audit

Category Score Status
Performance 85/100 🟡
Accessibility 95/100 🟢
Best Practices 90/100 🟢
SEO 95/100 🟢

📥 Download full Lighthouse report

Budget Compliance: Performance budgets enforced via budget.json

@pethers
pethers merged commit ecb23aa into main Jul 8, 2026
21 checks passed
@pethers
pethers deleted the copilot/typescript-7-0-rc-side-by-side-install branch July 8, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci-cd CI/CD pipeline changes dependencies Dependency updates documentation Documentation updates size-l Large change (250-1000 lines) size-xs Extra small change (< 10 lines) testing Test coverage workflow GitHub Actions workflows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants