Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
50 commits
Select commit Hold shift + click to select a range
3b59895
perf(checker): defer orderedSet map allocation until >16 elements (#4…
mds-ant Jun 11, 2026
cd961a7
Several performance optimizations for the scanner's hot path (#4238)
mds-ant Jun 11, 2026
c7f7cb8
Fix false TS1006 for included tsconfig JSON imports (#4279)
Copilot Jun 11, 2026
6038f11
Walk class children to find this property assignments beyond top leve…
weswigham Jun 11, 2026
0a1ff41
add localization for extension (#3834)
iisaduan Jun 11, 2026
f83eec5
Fix incorrect renaming of `arguments` in non-reference positions in a…
Copilot Jun 11, 2026
f0113b7
Reparse non-identifier jsdoc names where possible, error otherwise (#…
weswigham Jun 11, 2026
a58d885
API: Add declaration property to IndexInfo. (#4273)
piotrtomiak Jun 11, 2026
de1bb2e
LSP: accept null initializationOptions (#4281)
Copilot Jun 11, 2026
4a461b7
TS GO API: add getCompletionsAtPosition to the API and support includ…
piotrtomiak Jun 11, 2026
45df665
Dedupe cjs export assignments (#4284)
weswigham Jun 11, 2026
42eb4d4
Don't provide auto-imports for non-identifiers (#4287)
DanielRosenwasser Jun 11, 2026
79fe60a
fix: release speculative parse-cache acquire using the acquired file'…
Copilot Jun 11, 2026
52a0fe6
Fix stack overflow caused by simplification of recursive type (#4260)
ahejlsberg Jun 12, 2026
4cf361f
Fix stack overflow crash in base constraint resolution (#4242)
ahejlsberg Jun 12, 2026
bb2240e
Rebuilt CLI watcher around new `fswatch` package (#4026)
johnfav03 Jun 12, 2026
3e6ed73
Allow LSP server to use builtin watcher on Windows and macOS (#4288)
andrewbranch Jun 12, 2026
b1e0c7e
Fix external helper crash after module-status updates (#3994)
Copilot Jun 12, 2026
7ce96c8
Make LS checkers time out after being idle, segment based on use (tak…
jakebailey Jun 12, 2026
889378b
Reclassify `nodeModulesAllowJsImportAssignment` JS emit diffs as acce…
Copilot Jun 13, 2026
0751b19
Return diagnostics API positions as UTF-16 offsets (#4298)
Copilot Jun 13, 2026
c78d39e
Add missing diagnostic context setting logic for newer js declaration…
weswigham Jun 13, 2026
551b02d
Better fix bug with this types and instantiateSymbol (#4307)
jakebailey Jun 13, 2026
a7ae3a1
Pin JS casing to generated Unicode data (#4321)
jakebailey Jun 15, 2026
f315ef9
Ensure node_modules buckets are removed from auto-import registry onc…
andrewbranch Jun 15, 2026
b8e4490
Fixed CJS class expression exports emit anonymous constructor types (…
johnfav03 Jun 15, 2026
d42388b
fix(4315): preserve modifier order when emitting private js methods (…
a-tarasyuk Jun 15, 2026
59ae7d0
Add native preview Sort Imports commands (#4300)
Copilot Jun 15, 2026
c90e1d4
API: remove `omitempty` from TypeResponse.Value to send empty string …
piotrtomiak Jun 15, 2026
7eb731a
Store API node tables on SourceFile in data bag (#4327)
andrewbranch Jun 15, 2026
dd6bceb
Fix auto-import crash from unimplemented aliasResolver.IsSourceFileDe…
Copilot Jun 16, 2026
462a1a4
Fix redundant undefined wrapping in declaration emit (#4302)
jakebailey Jun 16, 2026
6894935
API: add Signature implementation and improve object caching on clien…
piotrtomiak Jun 16, 2026
900f95a
Note `tsc` for RC and above in README.me (#4340)
RyanCavanaugh Jun 16, 2026
2fb5d4c
Rebuilt build mode around `fswatch` package (#4326)
johnfav03 Jun 17, 2026
241df12
Update NOTICE and ensure it's inside packages (#4348)
jakebailey Jun 17, 2026
3af952d
Deduplicate declaration emit for this-assigned methods (#4351)
weswigham Jun 18, 2026
e578159
Re-allow nested cjs export assignments in declaration emit (#4356)
weswigham Jun 18, 2026
dc37b52
Fix nil pointer panic when extending an empty config file (#4377)
oMatheusmol Jun 19, 2026
97195f8
Bump actions/checkout from 6.0.3 to 7.0.0 in the github-actions group…
dependabot[bot] Jun 22, 2026
997b92a
fix(4354): add tsconfig option errors from project diagnostics (#4355)
a-tarasyuk Jun 22, 2026
52ef010
Fix generated Is* guards for type-parameter-kinded nodes (#4394)
jakebailey Jun 22, 2026
6a0ce63
Skip mark/rewind in `tryParseTypeArgumentsInExpression` when token is…
mds-ant Jun 22, 2026
133d33a
Fix watches on symlinked directories (#4376)
Copilot Jun 22, 2026
481a4aa
Warn on TSServer Plugin Contributions from other extensions (#4063)
DanielRosenwasser Jun 22, 2026
a844752
Add per-kind literal type interfaces and decode BigInt literal values…
Copilot Jun 22, 2026
9415beb
Fix panic on non-string include/exclude/files in extended configs (#4…
oMatheusmol Jun 22, 2026
f6e1c6d
API: add the missing position and text getters to Node (#4308)
oMatheusmol Jun 23, 2026
0392487
API: make object registries project-specific to avoid id collisions o…
piotrtomiak Jun 23, 2026
b81e872
Merge remote-tracking branch 'refs/remotes/upstream/main' into upgrad…
clintonjrobinson Jun 23, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
1 change: 1 addition & 0 deletions .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
"**/node_modules",
"**/*-lock.json",
"**/testdata",
"_extension/l10n/**",
"_submodules/**",
"internal/bundled/libs/**",
"internal/lsp/lsproto/_generate/*.json",
Expand Down
23 changes: 13 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
docker-images: false
swap-storage: false
dotnet: false
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: ./.github/actions/setup-go

Expand All @@ -50,7 +50,7 @@ jobs:
if: ${{ github.repository == 'microsoft/typescript-go' && github.event_name != 'merge_group' }}
runs-on: TypeScript-1ES-GitHub-XL-2
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: 'lts/*'
Expand All @@ -72,7 +72,7 @@ jobs:
extension:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0

- run: npm ci
Expand Down Expand Up @@ -137,7 +137,7 @@ jobs:
- run: git config --system core.longpaths true
if: ${{ matrix.config.os == 'windows-latest' }}

- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: ${{ !matrix.config.no-submodules }}
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
Expand Down Expand Up @@ -231,7 +231,7 @@ jobs:
docker-images: false
swap-storage: false
dotnet: false
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: ./.github/actions/setup-go

Expand All @@ -251,7 +251,7 @@ jobs:
format:
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: ./.github/actions/setup-go

Expand All @@ -268,7 +268,7 @@ jobs:
docker-images: false
swap-storage: false
dotnet: false
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: true
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
Expand All @@ -286,6 +286,9 @@ jobs:
- run: node --experimental-strip-types ./internal/lsp/lsproto/_generate/fetchModel.mts
- run: node --experimental-strip-types ./internal/lsp/lsproto/_generate/generate.mts

- name: generate files for extension
run: npx hereby generate:extension

- name: Regenerate fourslash tests and update failing test list
run: |
set -x
Expand All @@ -304,7 +307,7 @@ jobs:
tidy:
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: ./.github/actions/setup-go

- run: go mod tidy -diff
Expand All @@ -319,7 +322,7 @@ jobs:
docker-images: false
swap-storage: false
dotnet: false
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: true
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
Expand All @@ -346,7 +349,7 @@ jobs:
misc:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
- uses: ./.github/actions/setup-go

Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/copilot-setup-steps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
docker-images: false
swap-storage: false
dotnet: false
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
submodules: true
- uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ linters:
- path: internal/fourslash/tests/gen/
linters:
- misspell
- path: 'internal/(repo|testutil|testrunner|vfs|pprof|execute/tsctests|bundled|fswatch)|cmd/tsgo'
- path: 'internal/(repo|testutil|testrunner|vfs|pprof|execute/tsctests|bundled|fswatch|nativepath)|cmd/tsgo'
text: should likely be used instead
- path: '(.+)_test\.go$'
text: should likely be used instead
Expand Down
13 changes: 12 additions & 1 deletion Herebyfile.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,14 @@ export const generate = task({
},
});

export const generateExtension = task({
name: "generate:extension",
description: "Generates files in the extension",
run: async () => {
await $`npm run -w _extension generateLocBundle`;
},
});

// ── Enum generation from Go source ──────────────────────────────

/**
Expand Down Expand Up @@ -323,6 +331,7 @@ const enumDefs = [
{ name: "ModifierFlags", goPrefix: "ModifierFlags", goFile: "internal/ast/modifierflags.go", outDir: "_packages/native-preview/src/enums" },
{ name: "TokenFlags", goPrefix: "TokenFlags", goFile: "internal/ast/tokenflags.go", outDir: "_packages/native-preview/src/enums" },
{ name: "NodeBuilderFlags", goPrefix: "Flags", goFile: "internal/nodebuilder/types.go", outDir: "_packages/native-preview/src/enums" },
{ name: "CompletionItemKind", goPrefix: "CompletionItemKind", goFile: "internal/lsp/lsproto/lsp_generated.go", outDir: "_packages/native-preview/src/enums" },
];

/**
Expand Down Expand Up @@ -1546,6 +1555,7 @@ async function runBuildNativePreviewPackages() {
const inputPackageJson = JSON.parse(fs.readFileSync(path.join(inputDir, "package.json"), "utf8"));
inputPackageJson.version = getVersion();
delete inputPackageJson.private;
inputPackageJson.files = [...new Set([...(inputPackageJson.files ?? []), "NOTICE.txt"])];
stripSourceConditions(inputPackageJson);

const { stdout: gitHead } = await $pipe`git rev-parse HEAD`;
Expand All @@ -1566,7 +1576,7 @@ async function runBuildNativePreviewPackages() {

await fs.promises.writeFile(path.join(mainPackageDir, "package.json"), JSON.stringify(mainPackage, undefined, 4));
await fs.promises.copyFile("LICENSE", path.join(mainPackageDir, "LICENSE"));
// No NOTICE.txt here; does not ship the binary or libs. If this changes, we should add it.
await fs.promises.copyFile("NOTICE.txt", path.join(mainPackageDir, "NOTICE.txt"));

// Build JS API and copy dist into the package.
await $`npm run -w @typescript/native-preview build`;
Expand Down Expand Up @@ -1602,6 +1612,7 @@ async function runBuildNativePreviewPackages() {
const packageJson = {
...inputPackageJson,
bin: undefined,
files: ["lib", "NOTICE.txt"],
imports: undefined,
dependencies: undefined,
name: npmPackageName,
Expand Down
34 changes: 34 additions & 0 deletions NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -400,3 +400,37 @@ limitations under the License.

---------------------------------------------------------

---------------------------------------------------------

parcel-bundler/watcher 8926bb8b281733bbfcaf69bb4e62ab7a1431c42a - MIT


Copyright Node.js contributors
Copyright 2012-2020 Facebook, Inc.
Copyright (c) 2017-present Devon Govett

MIT License

Copyright (c) 2017-present Devon Govett

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.


---------------------------------------------------------

2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ npm install @typescript/native-preview
npx tsgo # Use this as you would tsc.
```

For TypeScript 7.0 RC and later, the command name is `tsc`.

A preview VS Code extension is [available on the VS Code marketplace](https://marketplace.visualstudio.com/items?itemName=TypeScriptTeam.native-preview).

To use this, set this in your VS Code settings:
Expand Down
2 changes: 2 additions & 0 deletions _extension/.gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
*.vsix
dist/
lib/
package.nls.qps-ploc.json
l10n/bundle.l10n.qps-ploc.json
76 changes: 76 additions & 0 deletions _extension/l10n/bundle.l10n.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
{
"TypeScript Native Preview": "TypeScript Native Preview",
"$(beaker) tsgo {0}": "$(beaker) tsgo {0}",
"TypeScript Native Preview Language Server": "TypeScript Native Preview Language Server",
"Show Menu": "Show Menu",
"Language server is not running.": "Language server is not running.",
"Garbage collection triggered": "Garbage collection triggered",
"Failed to run GC: {0}": "Failed to run GC: {0}",
"Heap profile saved to: {0}": "Heap profile saved to: {0}",
"Failed to save heap profile: {0}": "Failed to save heap profile: {0}",
"Allocation profile saved to: {0}": "Allocation profile saved to: {0}",
"Failed to save allocation profile: {0}": "Failed to save allocation profile: {0}",
"CPU profiling started. Profile will be saved to: {0}": "CPU profiling started. Profile will be saved to: {0}",
"Failed to start CPU profile: {0}": "Failed to start CPU profile: {0}",
"CPU profile saved to: {0}": "CPU profile saved to: {0}",
"Failed to stop CPU profile: {0}": "Failed to stop CPU profile: {0}",
"Copy": "Copy",
"API session initialized. Listening on: {0}": "API session initialized. Listening on: {0}",
"Failed to initialize API session: {0}": "Failed to initialize API session: {0}",
"$(refresh) Restart Server": "$(refresh) Restart Server",
"Restart the TypeScript Native Preview language server": "Restart the TypeScript Native Preview language server",
"$(output) Show Output": "$(output) Show Output",
"Show the TypeScript Native Preview output log": "Show the TypeScript Native Preview output log",
"$(report) Report Issue": "$(report) Report Issue",
"Report an issue with TypeScript Native Preview": "Report an issue with TypeScript Native Preview",
"$(versions) Select Version": "$(versions) Select Version",
"Choose between bundled and workspace versions": "Choose between bundled and workspace versions",
"$(stop-circle) Disable TypeScript Native Preview": "$(stop-circle) Disable TypeScript Native Preview",
"Switch back to the built-in TypeScript extension": "Switch back to the built-in TypeScript extension",
"Executable": "Executable",
"Executable path copied to clipboard.": "Executable path copied to clipboard.",
"PID": "PID",
"Server PID copied to clipboard.": "Server PID copied to clipboard.",
"{0} Commands": "{0} Commands",
"Use Bundled Version": "Use Bundled Version",
"Use Workspace Version": "Use Workspace Version",
"$(lock) Manage Workspace Trust to select a workspace version": "$(lock) Manage Workspace Trust to select a workspace version",
"Use Custom Version": "Use Custom Version",
"Select the TypeScript Native Preview version to use": "Select the TypeScript Native Preview version to use",
"Allow": "Allow",
"Dismiss": "Dismiss",
"Never in this Workspace": "Never in this Workspace",
"This workspace has a TypeScript Native Preview tsdk configured ({0}). Would you like to use it?": "This workspace has a TypeScript Native Preview tsdk configured ({0}). Would you like to use it?",
"Enter directory path for profile output": "Enter directory path for profile output",
"Directory path is required": "Directory path is required",
"Loading project info...": "Loading project info...",
"No tsconfig": "No tsconfig",
"No jsconfig": "No jsconfig",
"No opened folders": "No opened folders",
"File is not part of opened folders": "File is not part of opened folders",
"Open Config File": "Open Config File",
"TypeScript Native Preview Project Status": "TypeScript Native Preview Project Status",
"TypeScript Native Preview setting has changed. Restart extensions to apply changes.": "TypeScript Native Preview setting has changed. Restart extensions to apply changes.",
"Restart Extensions": "Restart Extensions",
"The built-in TypeScript extension is disabled. Sync launch.json with launch.template.json to reenable.": "The built-in TypeScript extension is disabled. Sync launch.json with launch.template.json to reenable.",
"OK": "OK",
"Enable Setting": "Enable Setting",
"TypeScript Native Preview is running in development mode with \"{0}\" set to false.": "TypeScript Native Preview is running in development mode with \"{0}\" set to false.",
"Ignore": "Ignore",
"TypeScript Native Preview is disabled. Select 'Enable TypeScript Native Preview (Experimental)' in the command palette to enable it.": "TypeScript Native Preview is disabled. Select 'Enable TypeScript Native Preview (Experimental)' in the command palette to enable it.",
"Error prompting to use workspace version: {0}": "Error prompting to use workspace version: {0}",
"TypeScript server plugins from the \"{0}\" extension will not be loaded because TypeScript Native Preview is enabled globally.": "TypeScript server plugins from the \"{0}\" extension will not be loaded because TypeScript Native Preview is enabled globally.",
"{0} extensions contribute TypeScript server plugins that will not be loaded because TypeScript Native Preview is enabled globally: {1}": "{0} extensions contribute TypeScript server plugins that will not be loaded because TypeScript Native Preview is enabled globally: {1}",
"Disable Native Preview in Workspace": "Disable Native Preview in Workspace",
"Don't Show Again": "Don't Show Again",
"Unexpected number of arguments.": "Unexpected number of arguments.",
"Starting language server...": "Starting language server...",
"Language client is not initialized": "Language client is not initialized",
"Restarting language server...": "Restarting language server...",
"Graceful shutdown failed, forcing restart: {0}": "Graceful shutdown failed, forcing restart: {0}",
"The typescript.native-preview-lsp server crashed {0} times in the last 3 minutes. The server will not be restarted. See the output for more information.": "The typescript.native-preview-lsp server crashed {0} times in the last 3 minutes. The server will not be restarted. See the output for more information.",
"Go to Source Definition failed. No editor is active.": "Go to Source Definition failed. No editor is active.",
"Go to Source Definition failed. Unsupported file type.": "Go to Source Definition failed. Unsupported file type.",
"Finding source definitions": "Finding source definitions",
"No source definitions found.": "No source definitions found."
}
Loading
Loading