Skip to content

Commit 85d4b7a

Browse files
authored
Merge pull request #75 from fujidana/switch-to-pnpm/esbuild
Switch to pnpm/esbuild
2 parents f11e879 + 8a0d3cb commit 85d4b7a

18 files changed

+6123
-8176
lines changed

.github/workflows/main.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,17 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14+
- uses: pnpm/action-setup@v4
1415
- uses: actions/setup-node@v4
1516
with:
1617
node-version: 22
17-
cache: npm
18+
cache: pnpm
1819

1920
- name: Install
20-
run: npm install
21+
run: pnpm install
2122

2223
- name: Lint
23-
run: npm run lint
24+
run: pnpm run lint
2425

2526
- name: Package
26-
run: npm run package
27+
run: pnpm run package

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
*.vsix
22
/node_modules
33
out/
4+
dist/
5+
.vscode-test/
46
PUBLISHING
57
tsconfig.tsbuildinfo

.npmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
enable-pre-post-scripts = true

.vscode-test.mjs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { defineConfig } from '@vscode/test-cli';
2+
3+
export default defineConfig({
4+
files: 'out/test/**/*.test.js',
5+
});

.vscode/extensions.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
// List of extensions which should be recommended for users of this workspace.
66
"recommendations": [
7-
"dbaeumer.vscode-eslint"
7+
"dbaeumer.vscode-eslint",
8+
"connor4312.esbuild-problem-matchers",
9+
"ms-vscode.extension-test-runner"
810
]
9-
}
11+
}

.vscode/launch.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"name": "Launch Client",
99
"runtimeExecutable": "${execPath}",
1010
"args": [
11-
"--extensionDevelopmentPath=${workspaceRoot}"
11+
"--extensionDevelopmentPath=${workspaceFolder}"
1212
],
1313
"outFiles": [
14-
"${workspaceRoot}/out/**/*.js"
14+
"${workspaceFolder}/dist/**/*.js"
1515
],
16-
"preLaunchTask": "watch:webpack"
16+
"preLaunchTask": "${defaultBuildTask}"
1717
},
1818
{
1919
"type": "node",
@@ -22,7 +22,7 @@
2222
"port": 6009,
2323
"restart": true,
2424
"outFiles": [
25-
"${workspaceRoot}/out/**/*.js"
25+
"${workspaceFolder}/dist/**/*.js"
2626
]
2727
}
2828
],

.vscode/settings.json

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22
{
33
"files.exclude": {
44
"**/.git": true,
5-
"**/.DS_Store": true
6-
}
7-
}
5+
"**/.DS_Store": true,
6+
"out": false, // set this to true to hide the "out" folder with the compiled JS files
7+
"dist": false // set this to true to hide the "dist" folder with the compiled JS files
8+
},
9+
"search.exclude": {
10+
"out": true, // set this to false to include "out" folder in search results
11+
"dist": true // set this to false to include "dist" folder in search results
12+
},
13+
// Turn off tsc task auto detection since we have the necessary tasks as npm scripts
14+
"typescript.tsc.autoDetect": "off"
15+
}

.vscode/tasks.json

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -23,46 +23,42 @@
2323
]
2424
},
2525
{
26-
"label": "watch:webpack",
26+
"label": "npm: watch:esbuild",
2727
"type": "npm",
28-
"script": "watch:webpack",
28+
"script": "watch:esbuild",
2929
"isBackground": true,
30-
"group": {
31-
"kind": "build",
32-
"isDefault": true
33-
},
30+
"group": "build",
3431
"presentation": {
35-
"panel": "dedicated",
32+
"group": "watch",
3633
"reveal": "never"
3734
},
38-
"problemMatcher": [
39-
"$ts-webpack-watch"
40-
]
35+
"problemMatcher": "$esbuild-watch"
4136
},
4237
{
43-
"label": "watch:tsc-no-emit",
38+
"label": "npm: watch:tsc",
4439
"type": "npm",
45-
"script": "watch:tsc-no-emit",
40+
"script": "watch:tsc",
4641
"isBackground": true,
4742
"group": "build",
4843
"presentation": {
49-
"panel": "dedicated",
44+
"group": "watch",
5045
"reveal": "never"
5146
},
52-
"problemMatcher": [
53-
"$tsc-watch"
54-
]
47+
"problemMatcher": "$tsc-watch"
5548
},
5649
{
5750
"label": "watch",
5851
"dependsOn": [
59-
"watch:tsc-no-emit",
60-
"watch:webpack"
52+
"npm: watch:tsc",
53+
"npm: watch:esbuild"
6154
],
6255
"presentation": {
6356
"reveal": "never"
6457
},
65-
"group": "build"
58+
"group": {
59+
"kind": "build",
60+
"isDefault": true
61+
}
6662
}
6763
]
6864
}

.vscodeignore

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
11
.github/
22
.gitignore
33
.vscode/**
4+
.vscode-test/**
45
**/*.map
56
**/*.ts
7+
**/.vscode-test.*
68
**/*.vsix
79
**/*webpack.config.js
8-
**/out/test/**
10+
esbuild.js
11+
**/out/**
912
**/src/**
1013
**/test/**
1114
**/tsconfig.json
@@ -14,4 +17,5 @@ eslint.config.mjs
1417
images/*.svg
1518
node_modules/**
1619
pnpm-lock.yaml
20+
pnpm-workspace.yaml
1721
PUBLISHING

client/client.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ let client: LanguageClient = undefined;
1313
export function activate(context: ExtensionContext): void {
1414
// The server is implemented in node
1515
const serverModule
16-
= context.asAbsolutePath(path.join("out", "server.js"));
16+
= context.asAbsolutePath(path.join("dist", "server.js"));
1717

1818
// The debug options for the server
1919
const debugOptions = { execArgv: ["--nolazy", "--inspect=6009"] };

0 commit comments

Comments
 (0)