Skip to content

Commit 983ed07

Browse files
committed
Merge branch 'main' into jabaile/staticcheck
2 parents 287e1ec + 5ab1364 commit 983ed07

File tree

3,149 files changed

+672273
-24600
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

3,149 files changed

+672273
-24600
lines changed

.custom-gcl.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# yaml-language-server: $schema=https://golangci-lint.run/jsonschema/custom-gcl.jsonschema.json
22

3-
version: v2.0.2
3+
version: v2.3.0
44

55
destination: ./_tools
66

.dprint.jsonc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
// Note: if adding new languages, make sure settings.template.json is updated too.
6060
// Also, if updating typescript, update the one in package.json.
6161
"plugins": [
62-
"https://plugins.dprint.dev/typescript-0.95.7.wasm",
62+
"https://plugins.dprint.dev/typescript-0.95.8.wasm",
6363
"https://plugins.dprint.dev/json-0.20.0.wasm",
6464
"https://plugins.dprint.dev/g-plane/pretty_yaml-v0.5.1.wasm",
6565
"https://plugins.dprint.dev/exec-0.5.1.json@492414e39dea4dccc07b4af796d2f4efdb89e84bae2bd4e1e924c0cc050855bf"

.github/ISSUE_TEMPLATE/01-crash.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
---
2+
name: Crash
3+
about: Using tsgo or the language server caused a panic
4+
title: ''
5+
labels: Crash
6+
assignees: ''
7+
8+
---
9+
10+
## Stack trace
11+
12+
```
13+
[paste stack trace here]
14+
```
15+
16+
## Steps to reproduce
17+
18+
1.
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Behavior Difference
3+
about: tsgo produces different results than TypeScript 5.8
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
## Steps to reproduce
11+
12+
<!-- Share a repository link or a code sample -->
13+
14+
## Behavior with `[email protected]`
15+
16+
## Behavior with `tsgo`

.github/ISSUE_TEMPLATE/03-other.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
name: Other
3+
about: Something else
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
10+
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
name: '[TypeScript Team Use] Copilot PR porting'
3+
about: Instructions for Copilot to port a PR from microsoft/TypeScript
4+
title: 'Port TypeScript PR #[NNNNN]'
5+
labels: Porting PR
6+
assignees: ''
7+
8+
---
9+
10+
This repository is a port of microsoft/TypeScript from TypeScript to Go. Since the port began, the following pull request was applied to microsoft/TypeScript. An equivalent change now needs to be applied here.
11+
12+
## PR to port
13+
14+
- PR link: <!-- https://github.com/microsoft/TypeScript/pull/NNNNN -->
15+
- Squash commit diff: <!-- Copy the squash commit link and append ".patch", e.g. https://github.com/microsoft/TypeScript/commit/a271797c1a95494e5f7aa8075c01941ad25cad08.patch -->
16+
17+
## Instructions
18+
19+
1. Use `playwright` to view the PR listed above
20+
2. Apply the edits made in that PR to this codebase, translating them from TypeScript to Go.
21+
- The change may or may not be applicable. It may have already been ported. Do not make any significant changes outside the scope of the diff. If the change cannot be applied without significant out-of-scope changes, explain why and stop working.
22+
- Tip: search for functions and identifiers from the diff to find the right location to apply edits. Some files in microsoft/TypeScript have been split into multiple.
23+
- Tip: some changes have already been ported, like changes to diagnostic message text. Tests do not need to be ported as they are imported from the submodule.
24+
3. Refer to your copilot_instructions.md for guidance on how to build and test your change. Note the following differences to the typical development workflow:
25+
- Since you are porting the implementation for a behavior that already has tests in the submodule, you don't need to add new tests. Instead, your change should change existing baselines.
26+
- If done correctly, you should see removals in `.diff` baselines. These `.diff` removals are your ultimate source of truth: your change is not correct unless diffs are reduced.

.github/actions/setup-go/action.yml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,16 @@ runs:
1919
go-version: ${{ inputs.go-version }}
2020
cache: false
2121

22+
# There is more code downloaded and built than is covered by '**/go.sum',
23+
# so give each job its own cache to try and not end up sharing the wrong
24+
# cache between jobs, and hash the Herebyfile and golancgi-lint version.
25+
2226
- name: Go cache
2327
uses: actions/cache@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
2428
with:
25-
# There is more code downloaded and built than is covered by '**/go.sum',
26-
# so give each job its own cache to try and not end up sharing the wrong
27-
# cache between jobs.
2829
key: ts-setup-go-${{ runner.os }}-${{ steps.install-go.outputs.go-version }}-${{ hashFiles('**/go.sum', '**/Herebyfile.mjs', '**/.custom-gcl.yml') }}-${{ github.workflow }}-${{ inputs.cache-name }}
2930
restore-keys: |
30-
ts-setup-go-${{ runner.os }}-${{ steps.install-go.outputs.go-version }}-${{ hashFiles('**/go.sum', '**/Herebyfile.mjs', '**/.custom-gcl.yml') }}
31+
ts-setup-go-${{ runner.os }}-${{ steps.install-go.outputs.go-version }}-${{ hashFiles('**/go.sum', '**/Herebyfile.mjs', '**/.custom-gcl.yml') }}-${{ github.workflow }}-
3132
path: |
3233
~/go/pkg/mod
3334
~/.cache/go-build

.github/codeql/codeql-configuration.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,6 @@ query-filters:
99
# This query takes too long on complicated string manipulations
1010
- exclude:
1111
id: go/unsafe-quoting
12+
# Times out in our code.
13+
- exclude:
14+
id: go/allocation-size-overflow

.github/workflows/ci.yml

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,11 @@ jobs:
247247

248248
- run: npx hereby generate
249249

250-
- run: node ./internal/lsp/lsproto/_generate/fetchModel.mjs
251-
- run: node ./internal/lsp/lsproto/_generate/generate.mjs
250+
- run: node --experimental-strip-types ./internal/lsp/lsproto/_generate/fetchModel.mts
251+
- run: node --experimental-strip-types ./internal/lsp/lsproto/_generate/generate.mts
252252

253-
- name: Remove all converted fourslash tests
254-
run: rm -rf internal/fourslash/tests/gen
255-
256-
- name: Regenerate fourslash tests
257-
run: npm run convertfourslash
253+
- name: Regenerate fourslash tests and update failing test list
254+
run: npm run updatefailing
258255

259256
- run: git add .
260257
- run: git diff --staged --exit-code --stat

.golangci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ linters:
7878
- -ST1022
7979

8080
exclusions:
81+
rules:
82+
- path: internal/fourslash/tests/gen/
83+
linters: misspell
84+
8185
presets:
8286
- comments
8387
- std-error-handling

0 commit comments

Comments
 (0)