Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
51 commits
Select commit Hold shift + click to select a range
815e9a4
Allow parameter type reuse even when return type is inferred (#4367)
weswigham Jun 23, 2026
cccc2ee
Fix extra space in `--listEmittedFiles` TSFILE output (#4419)
Copilot Jun 23, 2026
c623b07
API: cache SourceFile text to heavily improve performance (#4414)
piotrtomiak Jun 23, 2026
6ad6100
[api] Flesh out project/file open state management (#4402)
andrewbranch Jun 23, 2026
d3860da
[api] Add missing program diagnostic getters (#4413)
andrewbranch Jun 23, 2026
750701f
Fix non-ASCII detection for source file position maps (#4360)
Copilot Jun 24, 2026
3c20d1f
Fix ${configDir} path candidate resolving in extended config (#4362)
Copilot Jun 24, 2026
6d68dd6
Prefer covariant inferences with deeper type argument nesting (#4389)
ahejlsberg Jun 24, 2026
8f38985
Fix getBaseTypes panic on type reference instantiations (#4345)
Copilot Jun 24, 2026
fb92769
Add `arguments` inference removal to CHANGES.md (#4421)
weswigham Jun 24, 2026
496afe9
Fix `js/ts.reportStyleChecksAsWarnings` not being read from VS Code c…
Copilot Jun 24, 2026
359c5b4
[api] Add missing checker methods (#4424)
andrewbranch Jun 24, 2026
1fcdf07
Fix CommonJS export destructuring emit (#4404)
jakebailey Jun 24, 2026
fd5dbc6
Produce npm packages to release in stages (#4433)
jakebailey Jun 24, 2026
10923b4
Collate-free import sorting (#4349)
jakebailey Jun 24, 2026
aa3f666
Respect useAliasesForRenames in rename edits (#4371)
Copilot Jun 24, 2026
f455841
Generate isSourceFile, fix updateSourceFile/cloneNode/getSynthesizedD…
andrewbranch Jun 24, 2026
0664d52
Add `program.getSourceFileNames`, `checker.getApparentType`, `checker…
andrewbranch Jun 24, 2026
c080da6
Add CJS "." version stub entrypoint to @typescript/native-preview (#4…
Copilot Jun 25, 2026
582e066
API: add checker methods to get true and false types of a conditional…
piotrtomiak Jun 26, 2026
ba6e20b
[api] Tighten client-side type safety of Type subtypes (#4438)
andrewbranch Jun 26, 2026
83743e9
Set LSP pull diagnostic identifier name, labelDetailsSupport (#4452)
jakebailey Jun 26, 2026
b55309c
Fix watch coalescing for FSEvents (#4379)
jakebailey Jun 26, 2026
fb246e8
Use shared FSEvents streams (#4447)
jakebailey Jun 26, 2026
efea2d8
Fix duplicate duplicate source file tracking (#4457)
andrewbranch Jun 26, 2026
6237334
Update dependencies (#4454)
jakebailey Jun 26, 2026
35704c2
Fix spurious JSDoc modifier errors on object literal members (#4448)
Copilot Jun 26, 2026
5a4eb5e
Emit JS `this` properties in declarations matching tsc's serializePro…
Copilot Jun 26, 2026
f7c4664
Update release stuff further in prep for full release (#4456)
jakebailey Jun 27, 2026
04c7848
Don't expose internal symbol name prefix in sig help, node printing (…
jakebailey Jun 29, 2026
e190472
Devirtualize ForEachChild and IterChildren (#4395)
jakebailey Jun 29, 2026
f7acbad
Fix RemoteNode.forEachChild visiting array children twice when a visi…
Copilot Jun 29, 2026
042a471
Use package.json locations for build up-to-date checks (#4301)
jakebailey Jun 29, 2026
288f23d
Add conditional type base constraint limiter (#4468)
ahejlsberg Jun 29, 2026
e7efb4b
Update submodule (#4477)
jakebailey Jun 29, 2026
1230cf2
Avoid nil package.json crash when resolving peer dependencies (#4479)
Copilot Jun 30, 2026
1262789
Run symbol-returning completion on the API checker (#4480)
Vorobey31415 Jun 30, 2026
cb1910b
Fix const enum elision on merged symbols (#4485)
Copilot Jun 30, 2026
90c2724
fix(native-preview): preserve lone surrogate string literals (#3518)
TorinAsakura Jun 30, 2026
caf5c23
Fix fswatch on windows (#4491)
jakebailey Jun 30, 2026
fe14dff
Fix jsdoc type reference reuse check TODO to use new corsa jsdoc node…
weswigham Jun 30, 2026
8457ea6
Reduce code size of lsproto package, use JSON roundtripping in foursl…
jakebailey Jun 30, 2026
a143d98
Fixed formatting for dotted tag names (#4490)
johnfav03 Jun 30, 2026
7f50707
[api] Batch of improvements, fixes, and additions (#4493)
andrewbranch Jun 30, 2026
24a938a
[api] Fix generated .text type for JSDocText (#4498)
andrewbranch Jul 1, 2026
6ee18a2
[api] Fix compatibility with older @types/node and exactOptionalPrope…
andrewbranch Jul 1, 2026
a465ebb
Clean up completed submoduleTriaged items (#4460)
jakebailey Jul 1, 2026
f6efaa9
Fix RemoteNodeList inherited array methods throwing `this.view.getUin…
Copilot Jul 1, 2026
79c203e
Rename LSP push diag collection (#4487)
jakebailey Jul 1, 2026
8ebb832
[api] Use stable order for symbol tables (#4504)
andrewbranch Jul 1, 2026
07318ee
Merge remote-tracking branch 'upstream/main' into upgrade/upstream-20…
clintonjrobinson Jul 1, 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
  •  
  •  
  •  
4 changes: 2 additions & 2 deletions .dprint.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,14 @@
"internal/lsp/lsproto/_generate/*.json",
"internal/lsp/lsproto/_generate/metaModelSchema.mts",
// Needs to be LF to have a working shebang.
"_packages/native-preview/bin/tsgo.js",
"_packages/native-preview/bin/tsgo",
"_packages/native-preview/vendor/**"
],
// Note: if adding new languages, make sure settings.template.json is updated too.
// Also, if updating typescript, update the one in package.json.
"plugins": [
"https://plugins.dprint.dev/typescript-0.96.1.wasm",
"https://plugins.dprint.dev/json-0.21.3.wasm",
"https://plugins.dprint.dev/json-0.22.0.wasm",
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.6.0.wasm",
"https://plugins.dprint.dev/jakebailey/gofumpt-v0.0.12.wasm"
]
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -359,6 +359,8 @@ jobs:

- run: npx hereby check:scripts

- run: npx hereby native-preview:check-platforms

required:
runs-on: ubuntu-slim
if: ${{ always() }}
Expand Down
16 changes: 16 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,22 @@ const FORWARD = 1,
BACKWARD = 2;
```

#### `arguments` usage within a JS function body no longer implies a `...args: any[]` parameter
```js
function f() {
return arguments[0];
}
f("something"); // Previously allowed, now an error
```

Instead, explicitly use a spread parameter:
```js
function f(...args) {
return args[0];
}
f("something"); // Still allowed
```

### JSDoc Types

#### JSDoc variadic types are now only synonyms for array types.
Expand Down
495 changes: 386 additions & 109 deletions Herebyfile.mjs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion NOTICE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND

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

github.com/go-json-experiment/json v0.0.0-20260601182631-00ed12fed2a6 - BSD-3-Clause
github.com/go-json-experiment/json v0.0.0-20260623181947-01eb4420fa68 - BSD-3-Clause


Copyright 2010 The Go Authors
Expand Down
4 changes: 2 additions & 2 deletions _extension/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -252,12 +252,12 @@
},
"dependencies": {
"@vscode/extension-telemetry": "^1.5.2",
"vscode-languageclient": "^10.0.0",
"vscode-languageclient": "^10.0.1",
"vscode-tas-client": "^0.2.1"
},
"devDependencies": {
"@types/vscode": "~1.110.0",
"@vscode/vsce": "^3.9.2",
"esbuild": "^0.28.0"
"esbuild": "^0.28.1"
}
}
2 changes: 1 addition & 1 deletion _extension/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ export class Client implements vscode.Disposable {
sendNotification: sendNotificationMiddleware,
provideHover: () => undefined,
},
diagnosticCollectionName: "typescript",
diagnosticCollectionName: "typescript-push",
diagnosticPullOptions: {
onChange: true,
onSave: true,
Expand Down
27 changes: 20 additions & 7 deletions _extension/src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -128,22 +128,35 @@ export function resolveTsdkPath(tsdkPath: string): string {
}

export async function resolveTsdkPathToExe(tsdkPath: string): Promise<{ path: string; version: string; } | undefined> {
if (tsdkPath.endsWith("/@typescript/native-preview") || tsdkPath.endsWith("\\@typescript\\native-preview")) {
const resolved = workspaceResolve(tsdkPath);
for (const packagePath of [resolved, vscode.Uri.joinPath(resolved, "..")]) {
try {
const packagePath = workspaceResolve(tsdkPath);
const packageJsonPath = vscode.Uri.joinPath(packagePath, "package.json");
const packageJson = JSON.parse(await vscode.workspace.fs.readFile(packageJsonPath).then(buffer => buffer.toString()));
// NOTE: Keep in sync with _packages/native-preview/lib/getExePath.js.
const exeName = `tsgo${process.platform === "win32" ? ".exe" : ""}`;
const platformPackage = `native-preview-${process.platform}-${process.arch}`;
const exePath = vscode.Uri.joinPath(packagePath, "..", platformPackage, "lib", exeName);
const name: unknown = packageJson.name;
const bin: unknown = packageJson.bin;
if (typeof name !== "string" || !bin || typeof bin !== "object") continue;

const baseName = name.startsWith("@") ? name.split("/")[1] : name;
if (!baseName) continue;
const expectedBinName = baseName === "typescript" ? "tsc" : "tsgo";
const binNames = Object.keys(bin);
if (binNames.length !== 1 || binNames[0] !== expectedBinName) continue;

const exeName = `${expectedBinName}${process.platform === "win32" ? ".exe" : ""}`;
const platformPackage = `${baseName}-${process.platform}-${process.arch}`;
const nodeModules = name.startsWith("@")
? vscode.Uri.joinPath(packagePath, "..", "..")
: vscode.Uri.joinPath(packagePath, "..");
const exePath = vscode.Uri.joinPath(nodeModules, "@typescript", platformPackage, "lib", exeName);
await vscode.workspace.fs.stat(exePath);
return { path: withLongPathPrefix(exePath.fsPath), version: packageJson.version };
return { path: withLongPathPrefix(exePath.fsPath), version: typeof packageJson.version === "string" ? packageJson.version : "unknown" };
}
catch {}
}
try {
const exePath = workspaceResolve(path.join(tsdkPath, `tsgo${process.platform === "win32" ? ".exe" : ""}`));
const exePath = vscode.Uri.joinPath(resolved, `tsgo${process.platform === "win32" ? ".exe" : ""}`);
await vscode.workspace.fs.stat(exePath);
return { path: withLongPathPrefix(exePath.fsPath), version: "(local)" };
}
Expand Down
2 changes: 2 additions & 0 deletions _packages/native-preview/bin/tsgo
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
#!/usr/bin/env node
import "../lib/tsgo.js";
20 changes: 16 additions & 4 deletions _packages/native-preview/lib/getExePath.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,27 @@ export default function getExePath() {
const __dirname = path.dirname(fileURLToPath(import.meta.url));
const normalizedDirname = __dirname.replace(/\\/g, "/");

const pkg = JSON.parse(fs.readFileSync(path.join(__dirname, "..", "package.json"), "utf8"));
const pkgName = pkg.name;
const baseName = pkgName.startsWith("@") ? pkgName.split("/")[1] : pkgName;
const expectedBinName = baseName === "typescript" ? "tsc" : "tsgo";
const binNames = pkg.bin && typeof pkg.bin === "object" ? Object.keys(pkg.bin) : [];
if (binNames.length !== 1 || binNames[0] !== expectedBinName) {
throw new Error(`Expected ${pkgName} to declare exactly one bin entry named ${expectedBinName}.`);
}
let binName = expectedBinName;
let exeDir;

const expectedPackage = "native-preview-" + process.platform + "-" + process.arch;
const expectedPackage = baseName + "-" + process.platform + "-" + process.arch;

if (normalizedDirname.endsWith("/_packages/native-preview/lib")) {
if (normalizedDirname.endsWith("/_packages/" + baseName + "/lib")) {
// We're running directly from source in the repo.
// The local repo build (`hereby build`) always produces `tsgo`, regardless
// of the published `bin` name, so don't use binName here.
exeDir = path.resolve(__dirname, "..", "..", "..", "built", "local");
binName = "tsgo";
}
else if (normalizedDirname.endsWith("/built/npm/native-preview/lib")) {
else if (normalizedDirname.endsWith("/built/npm/" + baseName + "/lib")) {
// We're running from the built output.
exeDir = path.resolve(__dirname, "..", "..", expectedPackage, "lib");
}
Expand All @@ -42,7 +54,7 @@ export default function getExePath() {
}
}

let exe = path.join(exeDir, "tsgo");
let exe = path.join(exeDir, binName);
if (process.platform === "win32") {
exe += ".exe";
if (exe.length >= 248) {
Expand Down
56 changes: 28 additions & 28 deletions _packages/native-preview/bin/tsgo.js → _packages/native-preview/lib/tsgo.js
100755 → 100644
Original file line number Diff line number Diff line change
@@ -1,28 +1,28 @@
#!/usr/bin/env node

import getExePath from "#getExePath";
import { execFileSync } from "node:child_process";

const exe = getExePath();

if (process.platform !== "win32" && typeof process.execve === "function") {
// > v22.15.0
try {
process.execve(exe, [exe, ...process.argv.slice(2)]);
}
catch {
// may not be available, ignore the error and fallback
}
}

try {
execFileSync(exe, process.argv.slice(2), { stdio: "inherit" });
}
catch (e) {
if (e.status) {
process.exitCode = e.status;
}
else {
throw e;
}
}
#!/usr/bin/env node
import getExePath from "#getExePath";
import { execFileSync } from "node:child_process";
const exe = getExePath();
if (process.platform !== "win32" && typeof process.execve === "function") {
// > v22.15.0
try {
process.execve(exe, [exe, ...process.argv.slice(2)]);
}
catch {
// may not be available, ignore the error and fallback
}
}
try {
execFileSync(exe, process.argv.slice(2), { stdio: "inherit" });
}
catch (e) {
if (e.status) {
process.exitCode = e.status;
}
else {
throw e;
}
}
3 changes: 3 additions & 0 deletions _packages/native-preview/lib/version.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
const { version } = require("../package.json");
exports.version = version;
exports.versionMajorMinor = "7.0";
2 changes: 2 additions & 0 deletions _packages/native-preview/lib/version.d.cts
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
export declare const version: string;
export declare const versionMajorMinor = "7.0";
8 changes: 3 additions & 5 deletions _packages/native-preview/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,6 @@
"type": "git",
"url": "https://github.com/microsoft/typescript-go.git"
},
"publishConfig": {
"access": "public"
},
"type": "module",
"preferUnplugged": true,
"engines": {
Expand All @@ -36,10 +33,11 @@
"vendor"
],
"bin": {
"tsgo": "./bin/tsgo.js"
"tsgo": "./bin/tsgo"
},
"exports": {
"./package.json": "./package.json",
".": "./lib/version.cjs",
"./unstable/sync": {
"@typescript/source": "./src/api/sync/api.ts",
"default": "./dist/api/sync/api.js"
Expand Down Expand Up @@ -113,7 +111,7 @@
"test": "npm run test:only"
},
"devDependencies": {
"@types/node": "^25.9.1",
"@types/node": "^25.9.4",
"tinybench": "^6.0.2",
"vscode-jsonrpc": "^9.0.0"
}
Expand Down
Loading
Loading