TypeScript 7 VS Code extension: a workspace "typescript" 7.x package is not detected, only "@typescript/native-preview", which is no longer published
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 2/5
- Geschätzter Aufwand
- 1-3 Stunden
- Anfängerfreundlichkeit
- 84/100
- Issue-Typ
- Bug
- Klarheit
- Klar beschrieben
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- typescript, vscode
- Bereich
- developer-experience, tooling
Rechercherichtung
Beginne in packages/vscode-typescript/src/session.ts, insbesondere bei findWorkspaceNativePreviewPackages, und prüfe, wie promptUseWorkspaceVersion und promptSelectVersion die Ergebnisse verwenden. Vergleiche die bestehende Erkennung von @typescript/native-preview mit dem typescript-Paket und pathHasTsserverJs. Erledigt ist die Aufgabe, wenn ein TypeScript-7+-Workspace-Paket erkannt wird, der Workspace-Prompt und die Versionsauswahl es anbieten und die Extension diesen Compiler auswählt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
The TypeScript 7 extension finds a workspace's own TypeScript 7 only in node_modules/@typescript/native-preview. That package was last published on 2026-07-07 (7.0.0-dev.20260707.2). TypeScript 7 now ships as typescript: [email protected] came out the next day, and the 7.1 nightlies ship as typescript@next (7.1.0-dev.20260930.4 today). So a project that installs TypeScript 7 the current way runs the extension's bundled compiler instead of its own. Nothing tells the user, and the only fix is to write a tsdk setting by hand.
Versions: TypeScript 7 extension 1.0.1, VS Code 1.140.0, macOS.
Repro
- In an empty folder, run
npm install -D typescript@nextand addmain.tswithexport const n: number = 1;. - Open the folder in VS Code with the TypeScript 7 extension installed, and open
main.ts. No setting is needed: on its first start, the extension turns TypeScript 7 on by itself (it writes"js/ts.experimental.useTsgo": trueinto the user settings). If TypeScript 7 was turned off later, run TypeScript: Enable TypeScript 7 Language Server.
Expected: the extension offers the workspace's TypeScript, as it does for @typescript/native-preview: the "This workspace has TypeScript 7 installed" prompt, and Use Workspace Version in TypeScript: Select TypeScript Version.
Actual: no prompt, and the server runs the extension's own compiler (7.0.2), not node_modules/typescript (7.1):
…/extensions/typescriptteam.native-preview-1.0.1-darwin-x64/lib/tsc --lsp --stdio
With "js/ts.tsdk.path": "node_modules/typescript", the same project runs the workspace compiler. So only the detection is missing: resolveTsdkPathToExe already accepts a typescript package (bin tsc).
Where
In packages/vscode-typescript/src/session.ts (main at 43521c80), findWorkspaceNativePreviewPackages checks only node_modules/@typescript/native-preview. Both promptUseWorkspaceVersion and the version picker (promptSelectVersion) use it.
Suggestion
Also detect node_modules/typescript when it is TypeScript 7 or newer. pathHasTsserverJs already tells a TypeScript 5 or 6 package apart from a TypeScript 7 one.
Why it matters
- The editor and the project's
tsc(CLI, CI) then run the same compiler. - Features that need a 7.1 nightly, such as content mappers with
--runExternalCode, now need either the TypeScript 7 Nightly extension or a hand-writtentsdksetting. The Nightly extension applies to every workspace and changes daily. Thetsdksetting is easy to miss, because the extension never mentions it.
- Vorherrschende Sprache
- Go
- Sterne
- 111k
- Forks
- 15.5k
- Ø Merge
- 1 T. 21 Std.
- Gemergte PRs (30 T.)
- 142
Entwicklungsumgebung
Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus microsoft/TypeScript
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
microsoft/TypeScript#64661 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Non-enum CLI options with multiple values separated by comma and space aren't whitespace trimmedEvtl. vergeben @auvred hat das vor 3 Tagen übernommen. OffenBug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
microsoft/TypeScript#64618 · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
`EFNoLeadingComments` suppresses synthesized leading comments in tsgo; Strada only suppresses source commentsEvtl. vergeben @weswigham hat das vor 7 Tagen übernommen. OffenNeeds Investigation
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 84/100
microsoft/TypeScript#64453 · 1 Kommentar · 1 zugewiesene Person ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhance: Add tests for premature caching of contextual parameter typesEvtl. vergeben @luchenxu73 hat das vor 21 Tagen übernommen. OffenPossible Improvement
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 78/100
microsoft/TypeScript#64278 · 1 Kommentar · 1 Reaktion ·
Maintainer antworten meist innerhalb von 1 Tag
-
Docs
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 70/100
microsoft/TypeScript#64118 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in microsoft/TypeScript
Ähnliche Issues
-
automation models
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 75/100
Maintainer antworten meist innerhalb von 1 Tag
-
bug llm-stack needs-triage
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 68/100
Maintainer antworten meist innerhalb von 1 Tag
-
Alert email subjects don't identify the host — same container on multiple hosts, identical subjectsOffen
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 74/100
Maintainer antworten meist innerhalb von 1 Tag
-
P3 Type: Bug
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 76/100
grpc/grpc-go#9483 · 2 Kommentare ·
Maintainer antworten meist innerhalb von 2 Tagen
-
needs-area needs-kind needs-priority needs-status needs-triage
Schwierigkeit 2/5 Unter einer Stunde Anfängerfreundlichkeit 85/100
cncf/automation#736 ·
Maintainer antworten meist innerhalb von 1 Tag