Skip to content

Commit 5443020

Browse files
committed
merge upstream
1 parent 0227a2d commit 5443020

File tree

1,081 files changed

+33911
-11527
lines changed

Some content is hidden

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

1,081 files changed

+33911
-11527
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ trim_trailing_whitespace = false
2828
[Makefile]
2929
indent_style = tab
3030

31-
[**/vendor/**]
31+
[**/{vendor,generated}/**]
3232
charset = unset
3333
end_of_line = unset
3434
indent_size = unset

.eslintrc.json

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@
1111
"ecmaVersion": 6,
1212
"sourceType": "module"
1313
},
14-
"plugins": ["@typescript-eslint", "unused-imports", "import"],
14+
"plugins": [
15+
"@typescript-eslint",
16+
"unused-imports",
17+
"import",
18+
"unicorn",
19+
"mocha"
20+
],
1521
"rules": {
1622
"import/no-relative-packages": "error",
1723
"@typescript-eslint/consistent-type-assertions": [
@@ -52,7 +58,10 @@
5258
"MemberExpression[object.property.name='constructor'][property.name='name']"
5359
],
5460
"no-throw-literal": "warn",
55-
"semi": "off"
61+
"semi": "off",
62+
"unicorn/prefer-module": "error",
63+
"mocha/no-skipped-tests": "error",
64+
"mocha/no-exclusive-tests": "error"
5665
},
5766
"overrides": [
5867
{
@@ -77,5 +86,10 @@
7786
}
7887
}
7988
},
80-
"ignorePatterns": ["**/vendor/**/*.ts", "**/vendor/**/*.js", "**/out/**"]
89+
"ignorePatterns": [
90+
"**/vendor/**/*.ts",
91+
"**/vendor/**/*.js",
92+
"**/out/**",
93+
"**/generated/**"
94+
]
8195
}

.github/CODEOWNERS

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,4 @@
1-
* @pokey
1+
* @pokey @AndreasArvidsson
2+
3+
*keyboard* @pokey @josharian
4+
*Keyboard* @pokey @josharian

.github/workflows/deploy.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
- uses: pnpm/action-setup@v2
2121
- uses: actions/setup-node@v3
2222
with:
23-
node-version: 16
23+
node-version-file: package.json
2424
cache: pnpm
2525
- run: pnpm --color install
2626
- run: pnpm --color compile

.github/workflows/pre-commit.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
- uses: pnpm/action-setup@v2
2222
- uses: actions/setup-node@v3
2323
with:
24-
node-version: 16
24+
node-version-file: package.json
2525
cache: pnpm
2626
- run: pnpm --color install
2727
- uses: pre-commit/[email protected]

.github/workflows/test-docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ jobs:
1616
- uses: pnpm/action-setup@v2
1717
- uses: actions/setup-node@v3
1818
with:
19-
node-version: 16
19+
node-version-file: package.json
2020
cache: pnpm
2121
- run: bash -x scripts/build-and-assemble-website.sh

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- uses: pnpm/action-setup@v2
3232
- uses: actions/setup-node@v3
3333
with:
34-
node-version: 16
34+
node-version-file: package.json
3535
cache: pnpm
3636
- run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}"
3737
shell: bash
@@ -72,3 +72,5 @@ jobs:
7272
name: dumps
7373
path: ${{ env.VSCODE_CRASH_DIR }}
7474
if: failure()
75+
- name: Forbid TODOs
76+
run: ./scripts/forbid-todo.sh

.pre-commit-config.yaml

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,17 @@ repos:
3030
- id: detect-private-key
3131
- id: end-of-file-fixer
3232
exclude_types: [svg]
33-
exclude: patches/.*\.patch
33+
exclude: ^patches/.*\.patch$|\.scope$
3434
- id: fix-byte-order-marker
35+
- id: forbid-submodules
3536
- id: mixed-line-ending
3637
- id: trailing-whitespace
3738
# Trailing whitespace breaks yaml files if you use a multiline string
3839
# with a line that has trailing white space. Many of our recorded
3940
# tests use strings with trailing white space to represent the final
4041
# document contents. For example
4142
# packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/ruby/changeCondition.yml
42-
exclude: ^packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/.*/[^/]*\.yml$
43+
exclude: ^packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/.*/[^/]*\.yml$|\.scope$|/generated/|^patches/
4344
- repo: local
4445
hooks:
4546
- id: eslint
@@ -62,24 +63,24 @@ repos:
6263
name: format-recorded-tests
6364
files: ^packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/.*/[^/]*\.yml$
6465
language: system
65-
entry: pnpm exec tsx --conditions=cursorless:bundler packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts
66+
entry: pnpm exec ./packages/common/scripts/my-ts-node.js packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts
6667
- repo: local
6768
hooks:
6869
- id: check-recorded-test-marks
6970
name: check-recorded-test-marks
7071
files: ^packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/.*/[^/]*\.yml$
7172
language: system
72-
entry: pnpm exec tsx --conditions=cursorless:bundler packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts --check-marks
73-
- repo: https://github.com/ikamensh/flynt/
74-
rev: "0.78"
73+
entry: pnpm exec ./packages/common/scripts/my-ts-node.js packages/cursorless-engine/src/scripts/transformRecordedTests/index.ts --check-marks
74+
- repo: https://github.com/ikamensh/flynt
75+
rev: "1.0.1"
7576
hooks:
7677
- id: flynt
77-
- repo: https://github.com/charliermarsh/ruff-pre-commit
78-
rev: "v0.0.260"
78+
- repo: https://github.com/astral-sh/ruff-pre-commit
79+
rev: v0.1.11
7980
hooks:
8081
- id: ruff
8182
args: [--fix, --exit-non-zero-on-fix]
82-
- repo: https://github.com/psf/black
83-
rev: 23.3.0
83+
- repo: https://github.com/psf/black-pre-commit-mirror
84+
rev: 24.1.1
8485
hooks:
8586
- id: black

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
**/vendor
2+
**/generated
23

34
# We use our own format for our recorded yaml tests to keep them compact
45
/packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/**/*.yml

.vscode/launch.json

Lines changed: 24 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"args": [
3535
"--profile=cursorlessDevelopment",
3636
"--extensionDevelopmentPath=${workspaceFolder}/packages/cursorless-vscode/dist",
37-
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/out/runners/extensionTests"
37+
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/dist/extensionTests.cjs"
3838
],
3939
"outFiles": ["${workspaceFolder}/**/out/**/*.js"],
4040
"preLaunchTask": "${defaultBuildTask}",
@@ -55,7 +55,7 @@
5555
"args": [
5656
"--profile=cursorlessDevelopment",
5757
"--extensionDevelopmentPath=${workspaceFolder}/packages/cursorless-vscode/dist",
58-
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/out/runners/extensionTests"
58+
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/dist/extensionTests.cjs"
5959
],
6060
"outFiles": ["${workspaceFolder}/**/out/**/*.js"],
6161
"preLaunchTask": "Prepare test subset",
@@ -68,7 +68,7 @@
6868
"name": "Talon tests",
6969
"type": "node",
7070
"request": "launch",
71-
"program": "${workspaceFolder}/packages/test-harness/out/scripts/runTalonTests",
71+
"program": "${workspaceFolder}/packages/test-harness/dist/runTalonTests.cjs",
7272
"env": {
7373
"CURSORLESS_TEST": "true",
7474
"CURSORLESS_REPO_ROOT": "${workspaceFolder}"
@@ -84,7 +84,7 @@
8484
"name": "Talon tests subset",
8585
"type": "node",
8686
"request": "launch",
87-
"program": "${workspaceFolder}/packages/test-harness/out/scripts/runTalonTests",
87+
"program": "${workspaceFolder}/packages/test-harness/dist/runTalonTests.cjs",
8888
"env": {
8989
"CURSORLESS_TEST": "true",
9090
"CURSORLESS_RUN_TEST_SUBSET": "true",
@@ -101,7 +101,7 @@
101101
"name": "Unit tests only",
102102
"type": "node",
103103
"request": "launch",
104-
"program": "${workspaceFolder}/packages/test-harness/out/scripts/runUnitTestsOnly",
104+
"program": "${workspaceFolder}/packages/test-harness/dist/runUnitTestsOnly.cjs",
105105
"env": {
106106
"CURSORLESS_TEST": "true",
107107
"CURSORLESS_REPO_ROOT": "${workspaceFolder}"
@@ -125,7 +125,7 @@
125125
"args": [
126126
"--profile=cursorlessDevelopment",
127127
"--extensionDevelopmentPath=${workspaceFolder}/packages/cursorless-vscode/dist",
128-
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/out/runners/extensionTests"
128+
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/dist/extensionTests.cjs"
129129
],
130130
"outFiles": ["${workspaceFolder}/**/out/**/*.js"],
131131
"preLaunchTask": "${defaultBuildTask}",
@@ -147,7 +147,7 @@
147147
"args": [
148148
"--profile=cursorlessDevelopment",
149149
"--extensionDevelopmentPath=${workspaceFolder}/packages/cursorless-vscode/dist",
150-
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/out/runners/extensionTests"
150+
"--extensionTestsPath=${workspaceFolder}/packages/test-harness/dist/extensionTests.cjs"
151151
],
152152
"outFiles": ["${workspaceFolder}/**/out/**/*.js"],
153153
"preLaunchTask": "${defaultBuildTask}",
@@ -156,6 +156,23 @@
156156
"!**/node_modules/**"
157157
]
158158
},
159+
{
160+
"name": "Update fixtures, unit tests only",
161+
"type": "node",
162+
"request": "launch",
163+
"program": "${workspaceFolder}/packages/test-harness/dist/runUnitTestsOnly.cjs",
164+
"env": {
165+
"CURSORLESS_TEST": "true",
166+
"CURSORLESS_TEST_UPDATE_FIXTURES": "true",
167+
"CURSORLESS_REPO_ROOT": "${workspaceFolder}"
168+
},
169+
"outFiles": ["${workspaceFolder}/**/out/**/*.js"],
170+
"preLaunchTask": "${defaultBuildTask}",
171+
"resolveSourceMapLocations": [
172+
"${workspaceFolder}/**",
173+
"!**/node_modules/**"
174+
]
175+
},
159176
{
160177
"name": "Docusaurus start",
161178
"type": "node",

0 commit comments

Comments
 (0)