Skip to content

Commit dca6294

Browse files
committed
Merge remote-tracking branch 'origin/main' into perl-support
2 parents acea36a + 7fdf965 commit dca6294

File tree

3,118 files changed

+20932
-53374
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,118 files changed

+20932
-53374
lines changed

.editorconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ insert_final_newline = false
2222
# with a line that has trailing white space. Many of our recorded
2323
# tests use strings with trailing white space to represent the final
2424
# document contents. For example
25-
# packages/cursorless-vscode-e2e/suite/fixtures/recorded/languages/ruby/changeCondition.yml
25+
# packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/ruby/changeCondition.yml
2626
trim_trailing_whitespace = false
2727

2828
[Makefile]

.eslintrc.json

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,9 @@
1010
"ecmaVersion": 6,
1111
"sourceType": "module"
1212
},
13-
"plugins": ["@typescript-eslint", "unused-imports"],
13+
"plugins": ["@typescript-eslint", "unused-imports", "import"],
1414
"rules": {
15-
// Note: you must disable the base rule as it can report incorrect errors
16-
"no-restricted-imports": "off",
17-
"@typescript-eslint/no-restricted-imports": "error",
15+
"import/no-relative-packages": "error",
1816
"@typescript-eslint/consistent-type-assertions": [
1917
"error",
2018
{
@@ -51,5 +49,31 @@
5149
"no-throw-literal": "warn",
5250
"semi": "off"
5351
},
54-
"ignorePatterns": ["**/vendor/**/*.ts", "**/vendor/**/*.js"]
52+
"overrides": [
53+
{
54+
"files": ["*.tsx"],
55+
"rules": {
56+
"@typescript-eslint/naming-convention": [
57+
"warn",
58+
{
59+
"selector": ["function"],
60+
"format": ["PascalCase", "camelCase"]
61+
}
62+
]
63+
}
64+
}
65+
],
66+
"settings": {
67+
"import/parsers": {
68+
"@typescript-eslint/parser": [".ts", ".tsx"]
69+
},
70+
"import/resolver": {
71+
"typescript": {
72+
"alwaysTryTypes": true, // always try to resolve types under `<root>@types` directory even it doesn't contain any source code, like `@types/unist`
73+
74+
"project": ["tsconfig.json", "packages/*/tsconfig.json"]
75+
}
76+
}
77+
},
78+
"ignorePatterns": ["**/vendor/**/*.ts", "**/vendor/**/*.js", "**/out/**"]
5579
}

.github/workflows/codeql.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,18 @@ on:
1717
pull_request:
1818
# The branches below must be a subset of the branches above
1919
branches: ["main"]
20+
merge_group:
21+
branches: [main]
2022
schedule:
2123
- cron: "34 12 * * 5"
2224

2325
jobs:
2426
analyze:
2527
name: Analyze
2628
runs-on: ubuntu-latest
29+
if: ${{ github.event_name != 'merge_group' }}
30+
# only run job if workflow initiated by a pull request event
31+
# see https://github.com/cursorless-dev/cursorless/issues/1338
2732
permissions:
2833
actions: read
2934
contents: read
@@ -73,3 +78,23 @@ jobs:
7378
uses: github/codeql-action/analyze@v2
7479
with:
7580
category: "/language:${{matrix.language}}"
81+
82+
analyze_merge_group:
83+
name: Analyze
84+
runs-on: ubuntu-latest
85+
if: ${{ github.event_name == 'merge_group' }}
86+
# If we're on a merge queue, we just force a pass, as it already ran on the PR
87+
# see https://github.com/cursorless-dev/cursorless/issues/1338
88+
89+
strategy:
90+
fail-fast: false
91+
matrix:
92+
language: ["javascript", "python"]
93+
# CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python', 'ruby' ]
94+
# Use only 'java' to analyze code written in Java, Kotlin or both
95+
# Use only 'javascript' to analyze code written in JavaScript, TypeScript or both
96+
# Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support
97+
98+
steps:
99+
- name: Checkout repository
100+
uses: actions/checkout@v3

.github/workflows/deploy.yaml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -15,24 +15,24 @@ jobs:
1515
- uses: actions/checkout@v3
1616
with:
1717
fetch-depth: 0
18+
- uses: pnpm/action-setup@v2
19+
with:
20+
version: 7
1821
- uses: actions/setup-node@v3
1922
with:
2023
node-version: 16
21-
cache: yarn
22-
- run: yarn install --frozen-lockfile
23-
- run: yarn run compile
24-
- run: yarn run prepare-for-extension-publish
25-
- name: Initialize cursorless-nx subdir
26-
run: npm ci
27-
working-directory: cursorless-nx
28-
- name: Build cheatsheet html
29-
run: npx nx build cheatsheet-local
30-
working-directory: cursorless-nx
24+
cache: pnpm
25+
- run: pnpm --color install
26+
- run: pnpm --color compile
27+
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
28+
env:
29+
CURSORLESS_DEPLOY: true
3130
- name: Publish to Open VSX Registry
32-
uses: HaaLeo/publish-vscode-extension@v1
3331
id: publishToOpenVSX
32+
uses: HaaLeo/publish-vscode-extension@v1
3433
with:
3534
pat: ${{ secrets.OPEN_VSX_TOKEN }}
35+
packagePath: packages/cursorless-vscode/dist
3636
- name: Publish to Visual Studio Marketplace
3737
uses: HaaLeo/publish-vscode-extension@v1
3838
with:

.github/workflows/test-docs.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,19 @@ name: Test docs
33
on:
44
pull_request:
55
types: [opened, synchronize, reopened]
6+
merge_group:
7+
branches: [main]
68

79
jobs:
810
test-docs-build:
911
runs-on: ubuntu-latest
1012
steps:
1113
- uses: actions/checkout@v3
14+
- uses: pnpm/action-setup@v2
15+
with:
16+
version: 7
1217
- uses: actions/setup-node@v3
1318
with:
1419
node-version: 16
15-
cache: yarn
16-
- run: bash -x scripts/docs-build.sh
20+
cache: pnpm
21+
- run: bash -x scripts/build-and-assemble-website.sh

.github/workflows/test.yml

Lines changed: 29 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@ on:
66
- main
77
pull_request:
88
types: [opened, synchronize, reopened]
9+
merge_group:
10+
branches: [main]
911

1012
jobs:
1113
test:
@@ -25,17 +27,40 @@ jobs:
2527
VSCODE_LOGS_DIR: ${{ github.workspace }}/artifacts/logs
2628
steps:
2729
- uses: actions/checkout@v3
30+
- uses: pnpm/action-setup@v2
31+
with:
32+
version: 7
2833
- uses: actions/setup-node@v3
2934
with:
3035
node-version: 16
31-
cache: yarn
36+
cache: pnpm
3237
- run: mkdir -p "${{ env.VSCODE_CRASH_DIR }}" "${{ env.VSCODE_LOGS_DIR }}"
3338
shell: bash
34-
- run: yarn install --frozen-lockfile
35-
- run: xvfb-run -a yarn test
39+
- run: pnpm --color install
40+
- run: pnpm --color compile
41+
- run: pnpm --color --filter '!cursorless-org' --filter '!cursorless-org-*' build
42+
- run: xvfb-run -a pnpm --color test
3643
if: runner.os == 'Linux'
37-
- run: yarn test
44+
- run: pnpm --color test
3845
if: runner.os != 'Linux'
46+
- name: Create vscode dist that can be installed locally
47+
run: pnpm -F @cursorless/cursorless-vscode populate-dist --local-install
48+
if: runner.os == 'Linux' && matrix.vscode_version == 'stable'
49+
- name: Test create vsix
50+
id: createVsix
51+
uses: HaaLeo/publish-vscode-extension@v1
52+
with:
53+
pat: none
54+
packagePath: packages/cursorless-vscode/dist
55+
dryRun: true
56+
- run: mv ${{ steps.createVsix.outputs.vsixPath }} cursorless-development.vsix
57+
if: runner.os == 'Linux' && matrix.vscode_version == 'stable'
58+
- name: Upload vsix
59+
uses: actions/upload-artifact@v3
60+
if: runner.os == 'Linux' && matrix.vscode_version == 'stable'
61+
with:
62+
name: vsix
63+
path: cursorless-development.vsix
3964
- name: Archive logs
4065
uses: actions/upload-artifact@v3
4166
with:

.gitignore

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,37 @@ node_modules
88

99
# TypeDoc output
1010
docs/contributing/api/
11+
12+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
13+
14+
# dependencies
15+
.pnp
16+
.pnp.js
17+
18+
# testing
19+
coverage
20+
21+
# next.js
22+
.next/
23+
24+
# production
25+
build
26+
27+
# misc
28+
*.pem
29+
30+
# debug
31+
npm-debug.log*
32+
yarn-debug.log*
33+
yarn-error.log*
34+
.pnpm-debug.log*
35+
36+
# local env files
37+
.env*.local
38+
39+
# vercel
40+
.vercel
41+
42+
# typescript
43+
*.tsbuildinfo
44+
next-env.d.ts

.meta-updater/main.mjs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
import { updater } from "../packages/meta-updater/dist/index.cjs";
2+
3+
export default updater;

.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
save-workspace-protocol=rolling
2+
save-prefix=""

.pre-commit-config.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,15 +24,16 @@ repos:
2424
- id: detect-private-key
2525
- id: end-of-file-fixer
2626
exclude_types: [svg]
27+
exclude: patches/.*\.patch
2728
- id: fix-byte-order-marker
2829
- id: mixed-line-ending
2930
- id: trailing-whitespace
3031
# Trailing whitespace breaks yaml files if you use a multiline string
3132
# with a line that has trailing white space. Many of our recorded
3233
# tests use strings with trailing white space to represent the final
3334
# document contents. For example
34-
# packages/cursorless-vscode-e2e/suite/fixtures/recorded/languages/ruby/changeCondition.yml
35-
exclude: ^packages/cursorless-vscode-e2e/suite/fixtures/recorded/.*/[^/]*\.yml$
35+
# packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/languages/ruby/changeCondition.yml
36+
exclude: ^packages/cursorless-vscode-e2e/src/suite/fixtures/recorded/.*/[^/]*\.yml$
3637
- repo: https://github.com/pre-commit/mirrors-prettier
3738
rev: "v2.7.1"
3839
hooks:

.prettierignore

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
**/vendor
22

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

6-
# This was swizzled from a Docusaurus core class
7-
docs-site/src/theme/SearchBar/index.js
6+
pnpm-lock.yaml

.syncpackrc.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"dependencyTypes": [
3+
"dev",
4+
"overrides",
5+
"peer",
6+
"pnpmOverrides",
7+
"prod",
8+
"resolutions"
9+
]
10+
}

.vscode/extensions.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
{
22
// See http://go.microsoft.com/fwlink/?LinkId=827846
33
// for the documentation about the extensions.json format
4-
"recommendations": ["dbaeumer.vscode-eslint", "esbenp.prettier-vscode"]
4+
"recommendations": [
5+
"dbaeumer.vscode-eslint",
6+
"esbenp.prettier-vscode",
7+
"connor4312.esbuild-problem-matchers"
8+
]
59
}

0 commit comments

Comments
 (0)