Skip to content

Commit 3ccd4aa

Browse files
Update build tooling
1 parent c3a63b2 commit 3ccd4aa

33 files changed

Lines changed: 3156 additions & 1854 deletions

.eslintrc.json

Lines changed: 0 additions & 25 deletions
This file was deleted.

.github/CODEOWNERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
* @cursorless-dev/code-owners
1+
* @cursorless-dev/code-owners

.github/workflows/deploy.yaml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,50 @@
11
name: Deploy
22

33
on:
4-
workflow_dispatch:
4+
workflow_run:
5+
workflows: [Test]
6+
types: [completed]
7+
branches: [main]
58

69
jobs:
710
publish-extension:
811
name: Publish to marketplace
912
runs-on: ubuntu-latest
1013
environment: production
14+
if: ${{ github.event.workflow_run.conclusion == 'success' }}
15+
1116
steps:
1217
- name: Checkout repository
13-
uses: actions/checkout@v4
18+
uses: actions/checkout@v6
1419
with:
15-
fetch-depth: 0
20+
ref: ${{ github.event.workflow_run.head_sha }}
1621

1722
- name: Set up Node.js
18-
uses: actions/setup-node@v4
23+
uses: actions/setup-node@v6
1924
with:
2025
node-version-file: .nvmrc
21-
cache: yarn
2226

2327
- name: Install dependencies
24-
run: yarn install
28+
run: npm --color ci
29+
30+
- name: Read version from package.json
31+
run: |
32+
VERSION=$(node -p "require('./package.json').version")
33+
echo "version=$VERSION" >> $GITHUB_ENV
34+
35+
- name: Create Git tag
36+
run: |
37+
git tag ${{ env.version }}
38+
git push origin ${{ env.version }}
2539
2640
- name: Publish to Open VSX Registry
2741
id: publishToOpenVSX
28-
uses: HaaLeo/publish-vscode-extension@v1
42+
uses: HaaLeo/publish-vscode-extension@v2
2943
with:
3044
pat: ${{ secrets.OPEN_VSX_TOKEN }}
3145

3246
- name: Publish to Visual Studio Marketplace
33-
uses: HaaLeo/publish-vscode-extension@v1
47+
uses: HaaLeo/publish-vscode-extension@v2
3448
with:
3549
pat: ${{ secrets.VS_MARKETPLACE_TOKEN }}
3650
registryUrl: https://marketplace.visualstudio.com

.github/workflows/test.yaml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
types: [opened, synchronize, reopened]
8+
9+
jobs:
10+
run-tests:
11+
name: Run tests
12+
runs-on: ubuntu-latest
13+
14+
steps:
15+
- name: Checkout repository
16+
uses: actions/checkout@v6
17+
18+
- name: Set up Node.js
19+
uses: actions/setup-node@v6
20+
with:
21+
node-version-file: .nvmrc
22+
23+
- name: Install dependencies
24+
run: npm --color ci
25+
26+
- name: Build
27+
run: npm --color run build
28+
29+
- name: Run lint
30+
run: npm --color run lint
31+
32+
- name: Run tests
33+
run: npm --color run test:ci

.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
v21.1.0
1+
v24.14.0

.oxfmtrc.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"$schema": "./node_modules/oxfmt/configuration_schema.json",
3+
"printWidth": 80,
4+
"sortPackageJson": false,
5+
"sortImports": {
6+
"newlinesBetween": false,
7+
"partitionByNewline": true
8+
}
9+
}

.prettierrc.json

Lines changed: 0 additions & 3 deletions
This file was deleted.

.vscode/extensions.json

Lines changed: 0 additions & 7 deletions
This file was deleted.

.vscode/launch.json

Lines changed: 22 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,24 @@
1-
// A launch configuration that compiles the extension and then opens it inside a new window
2-
// Use IntelliSense to learn about possible attributes.
3-
// Hover to view descriptions of existing attributes.
4-
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
51
{
6-
"version": "0.2.0",
7-
"configurations": [
8-
{
9-
"name": "Run Extension",
10-
"type": "extensionHost",
11-
"request": "launch",
12-
"args": [
13-
"--extensionDevelopmentPath=${workspaceFolder}"
14-
],
15-
"outFiles": [
16-
"${workspaceFolder}/out/**/*.js"
17-
],
18-
"preLaunchTask": "${defaultBuildTask}"
19-
},
20-
{
21-
"name": "Extension Tests",
22-
"type": "extensionHost",
23-
"request": "launch",
24-
"args": [
25-
"--extensionDevelopmentPath=${workspaceFolder}",
26-
"--extensionTestsPath=${workspaceFolder}/out/test/suite/index"
27-
],
28-
"outFiles": [
29-
"${workspaceFolder}/out/test/**/*.js"
30-
],
31-
"preLaunchTask": "${defaultBuildTask}"
32-
}
33-
]
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": "Run Extension",
6+
"type": "extensionHost",
7+
"request": "launch",
8+
"args": ["--extensionDevelopmentPath=${workspaceFolder}"],
9+
"outFiles": ["${workspaceFolder}/out/**/*.js"],
10+
"preLaunchTask": "${defaultBuildTask}"
11+
},
12+
{
13+
"name": "Extension Tests",
14+
"type": "extensionHost",
15+
"request": "launch",
16+
"args": [
17+
"--extensionDevelopmentPath=${workspaceFolder}",
18+
"--extensionTestsPath=${workspaceFolder}/out/test/runAllTests"
19+
],
20+
"outFiles": ["${workspaceFolder}/out/test/**/*.js"],
21+
"preLaunchTask": "${defaultBuildTask}"
22+
}
23+
]
3424
}

.vscode/settings.json

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,4 @@
1-
// Place your settings in this file to overwrite default and user settings.
21
{
3-
"files.exclude": {
4-
"out": false // set this to true to hide the "out" folder with the compiled JS files
5-
},
6-
"search.exclude": {
7-
"out": true // set this to false to include "out" folder in search results
8-
},
9-
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
10-
"typescript.tsc.autoDetect": "off",
11-
"cSpell.words": [
12-
"eqeqeq"
13-
]
14-
}
2+
"editor.defaultFormatter": "oxc.oxc-vscode",
3+
"oxc.configPath": "./oxlint.config.mts"
4+
}

0 commit comments

Comments
 (0)