Skip to content

Widen typescript peer dependency range to allow v6#16471

Merged
delucis merged 1 commit into
mainfrom
chris/ts6
Apr 23, 2026
Merged

Widen typescript peer dependency range to allow v6#16471
delucis merged 1 commit into
mainfrom
chris/ts6

Conversation

@delucis
Copy link
Copy Markdown
Member

@delucis delucis commented Apr 23, 2026

Changes

  • @astrojs/check and @astrojs/svelte use TypeScript as a peer dependency
  • This PR widens the supported version range to allow TS v6

Testing

Existing tests should pass

Docs

n/a

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 23, 2026

🦋 Changeset detected

Latest commit: 10f57e6

The changes in this PR will be included in the next version bump.

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

@github-actions github-actions Bot added pkg: svelte Related to Svelte (scope) pkg: integration Related to any renderer integration (scope) labels Apr 23, 2026
@delucis delucis merged commit f56bb3f into main Apr 23, 2026
25 checks passed
@delucis delucis deleted the chris/ts6 branch April 23, 2026 21:57
@ocavue
Copy link
Copy Markdown
Contributor

ocavue commented Apr 23, 2026

Just FYI, @astrojs/svelte depends on svelte2tsx, which doesn't support TS6 in the peer dependency yet. So any user who uses @astrojs/svelte with TS6 will still see the peer dependency warnings.

See sveltejs/language-tools#2985

@astrobot-houston astrobot-houston mentioned this pull request Apr 23, 2026
@delucis
Copy link
Copy Markdown
Member Author

delucis commented Apr 23, 2026

Just FYI, @astrojs/svelte depends on svelte2tsx, which doesn't support TS6 in the peer dependency yet. So any user who uses @astrojs/svelte with TS6 will still see the peer dependency warnings.

See sveltejs/language-tools#2985

Ah thanks for the heads up. Do you think that means we should restore the v5-only peer dependency for the Svelte integration in that case?

@ocavue
Copy link
Copy Markdown
Contributor

ocavue commented Apr 23, 2026

Keeping @astrojs/svelte TS5-only peer dependency would probably be a good idea because once svelte2tsx is updated, we can bump @astrojs/svelte's version and ensure that package managers will install the latest svelte2tsx that does support TS6.

@delucis
Copy link
Copy Markdown
Member Author

delucis commented Apr 23, 2026

OK — I’ll send a PR removing the Svelte change then!

@delucis
Copy link
Copy Markdown
Member Author

delucis commented Apr 23, 2026

Done in #16472

ematipico pushed a commit that referenced this pull request Apr 24, 2026
This partially reverts #16471 based on information from @ocavue

Co-authored-by: ocavue <ocavue@users.noreply.github.com>
@sebastienbarre
Copy link
Copy Markdown

I'm a bit confused. Astro itself doesn't support TS6.

@ocavue
Copy link
Copy Markdown
Contributor

ocavue commented Apr 28, 2026

I'm a bit confused. Astro itself doesn't support TS6.

Astro works perfectly with TS6! Some of its dependencies haven't yet updated their peerDependencies field to indicate support for TS6, so you may encounter a few warnings during npm install. The astro repository hasn't updated its TypeScript to v6 in devDependencies yet, but this won't impact users.

@sebastienbarre
Copy link
Copy Markdown

Oh great, good to know. Do you happen to also know if work on supporting TS7 has started? Astro 7 beta maybe? Thanks

@ocavue
Copy link
Copy Markdown
Contributor

ocavue commented Apr 28, 2026

I don't see any issues running my Astro project with TS7 beta (AKA tsgo).

@sebastienbarre
Copy link
Copy Markdown

But Astro will be using TS6 internally though?
If I slap "@typescript/native-preview": "7.0.0-dev.20260421.2" in my package.json, the best it can do after pnpm install is using TS6.

$ pnpm why typescript                                         
typescript@6.0.3
├─┬ @astrojs/check@0.9.9
│ ├── @sebastienbarre/astro@1.0.0 (dependencies)
│ └── @sebastienbarre/barre.me@1.0.0 (dependencies)
└─┬ tsconfck@3.1.6
  └─┬ astro@6.1.10
    ├─┬ @astrojs/mdx@5.0.4
    │ └── @sebastienbarre/astro@1.0.0 (dependencies)
    ├── @sebastienbarre/astro@1.0.0 (dependencies)
    ├── @sebastienbarre/barre.me@1.0.0 (dependencies)
    └─┬ astro-pagefind@1.8.6
      └── @sebastienbarre/astro@1.0.0 (dependencies)
      ```

@ocavue
Copy link
Copy Markdown
Contributor

ocavue commented Apr 28, 2026

But Astro will be using TS6 internally though?

Yes.

You would likely need to have both TS6 and TS7 installed in your node_modules until at least TS v7.1 is released.

https://devblogs.microsoft.com/typescript/announcing-typescript-7-0-beta/

Additionally, even though 7.0 Beta is close to production-ready, we won’t have a stable programmatic API available until at least several months from now with TypeScript 7.1. Given this, we have made it a priority to ensure TypeScript can be run side-by-side with TypeScript 6.0 for the foreseeable future without any conflicts around “which tsc is which?”

As part of the 6.0/7.0 transition process, we’ve published a new compatibility package, @typescript/typescript6. This package exposes a new entry point tsc6, so that (if needed) you can run the next release of TypeScript 7.0 (which will provide a tsc binary) side-by-side without naming conflicts. It will also re-export the TypeScript 6.0 API, so that you can use tsc for TypeScript 7, while other tooling can continue to rely on 6.0.

dadezzz pushed a commit to dadezzz/university_notes that referenced this pull request May 2, 2026
This PR contains the following updates:

| Package | Change | [Age](https://docs.renovatebot.com/merge-confidence/) | [Confidence](https://docs.renovatebot.com/merge-confidence/) |
|---|---|---|---|
| [@astrojs/check](https://github.com/withastro/astro/tree/main/packages/language-tools/astro-check) ([source](https://github.com/withastro/astro/tree/HEAD/packages/language-tools/astro-check)) | [`0.9.8` → `0.9.9`](https://renovatebot.com/diffs/npm/@astrojs%2fcheck/0.9.8/0.9.9) | ![age](https://developer.mend.io/api/mc/badges/age/npm/@astrojs%2fcheck/0.9.9?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@astrojs%2fcheck/0.9.8/0.9.9?slim=true) |
| [astro](https://astro.build) ([source](https://github.com/withastro/astro/tree/HEAD/packages/astro)) | [`6.1.9` → `6.1.10`](https://renovatebot.com/diffs/npm/astro/6.1.9/6.1.10) | ![age](https://developer.mend.io/api/mc/badges/age/npm/astro/6.1.10?slim=true) | ![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/astro/6.1.9/6.1.10?slim=true) |

---

### Release Notes

<details>
<summary>withastro/astro (@&#8203;astrojs/check)</summary>

### [`v0.9.9`](https://github.com/withastro/astro/blob/HEAD/packages/language-tools/astro-check/CHANGELOG.md#099)

[Compare Source](https://github.com/withastro/astro/compare/@astrojs/check@0.9.8...@astrojs/check@0.9.9)

##### Patch Changes

- [#&#8203;16471](withastro/astro#16471) [`f56bb3f`](withastro/astro@f56bb3f) Thanks [@&#8203;delucis](https://github.com/delucis)! - Adds support for TypeScript v6 to peer dependencies range

- Updated dependencies \[[`8c62159`](withastro/astro@8c62159)]:
  - [@&#8203;astrojs/language-server](https://github.com/astrojs/language-server)@&#8203;2.16.7

</details>

<details>
<summary>withastro/astro (astro)</summary>

### [`v6.1.10`](https://github.com/withastro/astro/blob/HEAD/packages/astro/CHANGELOG.md#6110)

[Compare Source](https://github.com/withastro/astro/compare/astro@6.1.9...astro@6.1.10)

##### Patch Changes

- [#&#8203;16479](withastro/astro#16479) [`1058428`](withastro/astro@1058428) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Fixes a spurious `[WARN] [content] Content config not loaded` warning during `astro dev` for projects that don't use content collections

- [#&#8203;16457](withastro/astro#16457) [`3d82220`](withastro/astro@3d82220) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Hardens server island encryption to prevent encrypted data from one island component being replayed against a different one

- [#&#8203;16481](withastro/astro#16481) [`152700e`](withastro/astro@152700e) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Fixes a spurious 404 request for a dev toolbar sourcemap during `astro dev` caused by the browser mis-resolving a relative `sourceMappingURL` from the `/@&#8203;id/` URL prefix

- [#&#8203;16480](withastro/astro#16480) [`1bcb43b`](withastro/astro@1bcb43b) Thanks [@&#8203;matthewp](https://github.com/matthewp)! - Fixes an unnecessary full page reload on first navigation during dev

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - At any time (no schedule defined)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://github.com/renovatebot/renovate/discussions) if that's undesired.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0My4xNDEuNiIsInVwZGF0ZWRJblZlciI6IjQzLjE0MS42IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: integration Related to any renderer integration (scope) pkg: svelte Related to Svelte (scope)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants