Skip to content

Commit a6206a5

Browse files
committed
Merge remote-tracking branch 'salesforce/main' into gunnar/fix_gulpfile_to_not_mangle_jars
Signed-off-by: Gunnar Wagenknecht <[email protected]>
2 parents 5f78642 + d7a2906 commit a6206a5

File tree

12 files changed

+2507
-781
lines changed

12 files changed

+2507
-781
lines changed

.github/workflows/cd.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727

2828
steps:
2929
- name: Checkout
30-
uses: actions/checkout@v4
30+
uses: actions/checkout@v5
3131

3232
- name: Get Time for BUILD_ID
3333
id: time
@@ -41,7 +41,7 @@ jobs:
4141
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
4242

4343
- name: Setup Node version
44-
uses: actions/setup-node@v4
44+
uses: actions/setup-node@v6
4545
with:
4646
node-version: 16
4747
cache: 'npm'
@@ -50,7 +50,7 @@ jobs:
5050
run: npm ci
5151

5252
- name: Download Bazel JDT Language Server extension
53-
uses: dawidd6/action-download-artifact@v8
53+
uses: dawidd6/action-download-artifact@v11
5454
with:
5555
run_id: ${{ github.event.workflow_run.id }}
5656
name: server
@@ -64,7 +64,7 @@ jobs:
6464
run: npm run build
6565

6666
- name: Trigger VS Code Extension publish workflow to edge channel
67-
uses: actions/github-script@v7
67+
uses: actions/github-script@v8
6868
with:
6969
script: |
7070
await github.rest.actions.createWorkflowDispatch({

.github/workflows/ci.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626

2727
steps:
2828
- name: Checkout
29-
uses: actions/checkout@v4
29+
uses: actions/checkout@v5
3030

3131
- name: Get Time for BUILD_ID
3232
id: time
@@ -40,7 +40,7 @@ jobs:
4040
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
4141

4242
- name: Set up JDK
43-
uses: actions/setup-java@v4
43+
uses: actions/setup-java@v5
4444
with:
4545
java-version: '17'
4646
distribution: 'temurin'
@@ -75,7 +75,7 @@ jobs:
7575
run: cat ~/.m2/toolchains.xml
7676

7777
- name: Setup Node version
78-
uses: actions/setup-node@v4
78+
uses: actions/setup-node@v6
7979
with:
8080
node-version: 22
8181
cache: 'npm'
@@ -99,7 +99,7 @@ jobs:
9999
options: "-screen 0 1600x1200x24"
100100

101101
- name: Upload Test Results
102-
uses: actions/upload-artifact@v4
102+
uses: actions/upload-artifact@v5
103103
if: always()
104104
with:
105105
name: test-results-${{ matrix.os }}
@@ -111,7 +111,7 @@ jobs:
111111
!test/projects/**/*
112112
113113
- name: Upload screenshots on failure
114-
uses: actions/upload-artifact@v4
114+
uses: actions/upload-artifact@v5
115115
if: failure()
116116
with:
117117
name: screenshots-${{ matrix.os }}
@@ -120,7 +120,7 @@ jobs:
120120
test/logs
121121
122122
- name: Upload Bazel JDT Language Server extension
123-
uses: actions/upload-artifact@v4
123+
uses: actions/upload-artifact@v5
124124
if: success() && matrix.os == 'ubuntu-latest'
125125
with:
126126
name: server
@@ -134,7 +134,7 @@ jobs:
134134
# needed for publishing test results from forks
135135
steps:
136136
- name: Upload
137-
uses: actions/upload-artifact@v4
137+
uses: actions/upload-artifact@v5
138138
with:
139139
name: ci-event-file
140140
path: ${{ github.event_path }}

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Checkout
24-
uses: actions/checkout@v4
24+
uses: actions/checkout@v5
2525

2626
- name: Get Time for BUILD_ID
2727
id: time
@@ -35,7 +35,7 @@ jobs:
3535
run: echo "branch=${GITHUB_REF#refs/heads/}" >> $GITHUB_OUTPUT
3636

3737
- name: Setup Node version
38-
uses: actions/setup-node@v4
38+
uses: actions/setup-node@v6
3939
with:
4040
node-version: 22
4141
cache: 'npm'
@@ -60,15 +60,15 @@ jobs:
6060
run: npx gulp prepare_pre_release
6161

6262
- name: 🚀 Publish to Visual Studio Marketplace
63-
uses: HaaLeo/publish-vscode-extension@v1
63+
uses: HaaLeo/publish-vscode-extension@v2
6464
id: publishToVscMktp
6565
with:
6666
preRelease: ${{ github.event.inputs.releaseChannel == 'edge' && true || false }}
6767
pat: ${{ secrets.VSC_MKTP_TOKEN }}
6868
registryUrl: https://marketplace.visualstudio.com
6969

7070
- name: 🚀 Publish to Open VSX Registry
71-
uses: HaaLeo/publish-vscode-extension@v1
71+
uses: HaaLeo/publish-vscode-extension@v2
7272
with:
7373
preRelease: ${{ github.event.inputs.releaseChannel == 'edge' && true || false }}
7474
pat: ${{ secrets.OPEN_VSX_TOKEN }}

.github/workflows/test-results.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121

2222
steps:
2323
- name: Download and Extract Artifacts
24-
uses: dawidd6/action-download-artifact@v8
24+
uses: dawidd6/action-download-artifact@v11
2525
with:
2626
run_id: ${{ github.event.workflow_run.id }}
2727
name: (test-results.*|ci-event-file)

build.ts

Lines changed: 68 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -8,72 +8,77 @@ import esbuild from 'esbuild';
88

99
const isWatchMode = process.argv.includes('--watch');
1010
const options: BuildOptions = {
11-
color: true,
12-
logLevel: 'info',
13-
entryPoints: ['src/extension.ts'],
14-
bundle: true,
15-
metafile: process.argv.includes('--metafile'),
16-
outdir: './out/src',
17-
external: [
18-
'vscode',
19-
'typescript', // vue-component-meta
20-
],
21-
format: 'cjs',
22-
platform: 'node',
23-
target: 'ESNext',
24-
tsconfig: 'src/tsconfig.json',
25-
sourcemap: process.argv.includes('--sourcemap'),
26-
minify: process.argv.includes('--minify'),
27-
plugins: [
28-
{
29-
name: 'umd2esm',
30-
setup(build) {
31-
build.onResolve({ filter: /^(vscode-.*|estree-walker|jsonc-parser)/ }, (args) => {
32-
const pathUmdMay = require.resolve(args.path, {
33-
paths: [args.resolveDir],
34-
});
35-
// Call twice the replace is to solve the problem of the path in Windows
36-
const pathEsm = pathUmdMay
37-
.replace('/umd/', '/esm/')
38-
.replace('\\umd\\', '\\esm\\');
39-
return { path: pathEsm };
40-
});
41-
},
42-
},
43-
{
44-
name: 'meta',
45-
setup(build) {
46-
build.onEnd(async (result) => {
47-
if (result.metafile && result.errors.length === 0) {
48-
return fs.writeFile(
49-
path.resolve(__dirname, './meta.json'),
50-
JSON.stringify(result.metafile),
51-
);
52-
}
53-
});
54-
},
55-
},
56-
],
11+
color: true,
12+
logLevel: 'info',
13+
entryPoints: ['src/extension.ts'],
14+
bundle: true,
15+
metafile: process.argv.includes('--metafile'),
16+
outdir: './out/src',
17+
external: [
18+
'vscode',
19+
'typescript', // vue-component-meta
20+
],
21+
format: 'cjs',
22+
platform: 'node',
23+
target: 'ESNext',
24+
tsconfig: 'src/tsconfig.json',
25+
sourcemap: process.argv.includes('--sourcemap'),
26+
minify: process.argv.includes('--minify'),
27+
plugins: [
28+
{
29+
name: 'umd2esm',
30+
setup(build) {
31+
build.onResolve(
32+
{ filter: /^(vscode-.*|estree-walker|jsonc-parser)/ },
33+
(args) => {
34+
const pathUmdMay = require.resolve(args.path, {
35+
paths: [args.resolveDir],
36+
});
37+
// Call twice the replace is to solve the problem of the path in Windows
38+
const pathEsm = pathUmdMay
39+
.replace('/umd/', '/esm/')
40+
.replace('\\umd\\', '\\esm\\');
41+
return { path: pathEsm };
42+
}
43+
);
44+
},
45+
},
46+
{
47+
name: 'meta',
48+
setup(build) {
49+
build.onEnd(async (result) => {
50+
if (result.metafile && result.errors.length === 0) {
51+
return fs.writeFile(
52+
path.resolve(__dirname, './meta.json'),
53+
JSON.stringify(result.metafile)
54+
);
55+
}
56+
});
57+
},
58+
},
59+
],
5760
};
5861

5962
async function main() {
60-
let ctx: BuildContext | undefined;
61-
try {
62-
if (isWatchMode) {
63-
ctx = await esbuild.context(options);
64-
await ctx.watch();
65-
} else {
66-
const result = await esbuild.build(options);
63+
let ctx: BuildContext | undefined;
64+
try {
65+
if (isWatchMode) {
66+
ctx = await esbuild.context(options);
67+
await ctx.watch();
68+
} else {
69+
const result = await esbuild.build(options);
6770
if (process.argv.includes('--analyze')) {
68-
const chunksTree = await esbuild.analyzeMetafile(result.metafile!, { color: true });
69-
console.log(chunksTree);
70-
}
71-
}
72-
} catch (error) {
73-
console.error(error);
74-
ctx?.dispose();
75-
process.exit(1);
76-
}
71+
const chunksTree = await esbuild.analyzeMetafile(result.metafile!, {
72+
color: true,
73+
});
74+
console.log(chunksTree);
75+
}
76+
}
77+
} catch (error) {
78+
console.error(error);
79+
ctx?.dispose();
80+
process.exit(1);
81+
}
7782
}
7883

79-
main();
84+
main();

0 commit comments

Comments
 (0)