Skip to content

Commit bbed15b

Browse files
committed
fix: extension fails to load with node 24
fixes #77 Signed-off-by: Gordon Smith <GordonJSmith@gmail.com>
1 parent c90a537 commit bbed15b

4 files changed

Lines changed: 55 additions & 201 deletions

File tree

.github/workflows/ci.yml

Lines changed: 55 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -7,62 +7,67 @@ on:
77
branches: [main]
88

99
jobs:
10-
build:
11-
runs-on: ubuntu-latest
12-
permissions:
13-
contents: read
14-
issues: write
15-
pull-requests: write
16-
steps:
17-
- uses: actions/checkout@v4
1810

19-
- uses: actions/setup-node@v3
20-
with:
21-
node-version: "22"
11+
build:
12+
strategy:
13+
matrix:
14+
os: [ubuntu-latest, windows-latest, macos-latest]
15+
node-version: [20, 22, 24]
16+
runs-on: ${{ matrix.os }}
17+
permissions:
18+
contents: read
19+
issues: write
20+
pull-requests: write
21+
steps:
22+
- uses: actions/checkout@v4
2223

23-
- name: Install dependencies
24-
run: npm ci
24+
- uses: actions/setup-node@v3
25+
with:
26+
node-version: ${{ matrix.node-version }}
2527

26-
- name: Run tests
27-
run: npm test
28+
- name: Install dependencies
29+
run: npm ci
2830

29-
- name: Update snapshot
30-
run: npm run update-snapshot && git add --all
31+
- name: Run tests
32+
run: npm test
3133

32-
- name: Prepare diff for comment
33-
id: diff
34-
continue-on-error: true
35-
run: |
36-
set +e
37-
body=$(git diff --exit-code --diff-filter=AM $GITHUB_SHA -- '*.snap' 2>&1)
38-
echo "exitcode=$?" >> $GITHUB_OUTPUT
39-
body="${body//'<'/'&lt;'}"
40-
body="${body//'>'/'&gt;'}"
41-
delimiter="$(openssl rand -hex 8)"
42-
echo "body<<${delimiter}" >> $GITHUB_OUTPUT
43-
echo "${body:0:64000}" >> $GITHUB_OUTPUT
44-
echo "${delimiter}" >> $GITHUB_OUTPUT
34+
- name: Update snapshot
35+
run: npm run update-snapshot && git add --all
4536

46-
- uses: marocchino/sticky-pull-request-comment@v2
47-
if: github.event_name == 'pull_request' && steps.diff.outputs.exitcode == '1'
48-
with:
49-
header: sticky-comment-for-git-diff
50-
hide_and_recreate: true
51-
hide_classify: "OUTDATED"
52-
message: |
53-
**Found changes in the snapshot tests. Please review.**
54-
<details>
55-
<summary>Diff 📖</summary>
37+
- name: Prepare diff for comment
38+
id: diff
39+
continue-on-error: true
40+
run: |
41+
set +e
42+
body=$(git diff --exit-code --diff-filter=AM $GITHUB_SHA -- '*.snap' 2>&1)
43+
echo "exitcode=$?" >> $GITHUB_OUTPUT
44+
body="${body//'<'/'&lt;'}"
45+
body="${body//'>'/'&gt;'}"
46+
delimiter="$(openssl rand -hex 8)"
47+
echo "body<<${delimiter}" >> $GITHUB_OUTPUT
48+
echo "${body:0:64000}" >> $GITHUB_OUTPUT
49+
echo "${delimiter}" >> $GITHUB_OUTPUT
5650
57-
<pre lang="diff"><code>
58-
${{ steps.diff.outputs.body }}
59-
</code></pre>
51+
- uses: marocchino/sticky-pull-request-comment@v2
52+
if: github.event_name == 'pull_request' && steps.diff.outputs.exitcode == '1'
53+
with:
54+
header: sticky-comment-for-git-diff
55+
hide_and_recreate: true
56+
hide_classify: "OUTDATED"
57+
message: |
58+
**Found changes in the snapshot tests. Please review.**
59+
<details>
60+
<summary>Diff 📖</summary>
6061
61-
</details>
62+
<pre lang="diff"><code>
63+
${{ steps.diff.outputs.body }}
64+
</code></pre>
6265
63-
- uses: marocchino/sticky-pull-request-comment@v2
64-
if: github.event_name == 'pull_request' && steps.diff.outputs.exitcode == '0'
65-
with:
66-
header: sticky-comment-for-git-diff
67-
hide: true
68-
hide_classify: "OUTDATED"
66+
</details>
67+
68+
- uses: marocchino/sticky-pull-request-comment@v2
69+
if: github.event_name == 'pull_request' && steps.diff.outputs.exitcode == '0'
70+
with:
71+
header: sticky-comment-for-git-diff
72+
hide: true
73+
hide_classify: "OUTDATED"

esbuild.mjs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -655,7 +655,6 @@ async function discoverEntryPoints() {
655655
external: ["vscode"],
656656
write: false, // Don't write to disk
657657
logLevel: "silent",
658-
inject: ["src/node-polyfills.js"],
659658
});
660659

661660
if (tempResult.outputFiles && tempResult.outputFiles.length > 0) {
@@ -721,7 +720,6 @@ async function main() {
721720
external: ["vscode"],
722721
logLevel: "silent",
723722
plugins: [resourceDiscoveryPlugin, wasmDiscoveryPlugin],
724-
inject: ["src/node-polyfills.js"],
725723
define: {
726724
// Define globals to prevent bundling issues
727725
"process.env.NODE_ENV": JSON.stringify(production ? "production" : "development"),

src/node-polyfills.js

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

tests/navigator-polyfill.test.ts

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

0 commit comments

Comments
 (0)