Skip to content

Commit 359fe55

Browse files
rhyslbwclaude
andcommitted
fix(e2e): add explicit url polyfill for web-extension webpack build
The web-extension bundle pulls jsonschema, which does `require('url')`. The webpack base config polyfills node builtins via resolve.fallback but had no `url` entry — it only built because the `url` polyfill package happened to be present transitively. Dropping the legacy artillery chain removed that transitive `url`, exposing the gap (CI: "Module not found: Can't resolve 'url'"). Adds `url: require.resolve('url/')` to the fallback and `url` as an explicit e2e devDependency, so the build no longer depends on `url` being present by accident. Verified: `test:web-extension:build:sw` compiles successfully. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
1 parent 65c6f08 commit 359fe55

3 files changed

Lines changed: 21 additions & 1 deletion

File tree

packages/e2e/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,7 @@
170170
"typeorm": "^0.3.15",
171171
"typeorm-extension": "^2.7.0",
172172
"typescript": "^4.7.4",
173+
"url": "^0.11.4",
173174
"util": "^0.12.4",
174175
"wdio-chromedriver-service": "^7.3.2",
175176
"webassembly-loader-sw": "^1.1.0",

packages/e2e/test/web-extension/webpack.config.base.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ module.exports = {
8888
perf_hooks: false,
8989
process: false,
9090
stream: require.resolve('readable-stream'),
91+
url: require.resolve('url/'),
9192
util: require.resolve('util/')
9293
}
9394
},

yarn.lock

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2864,6 +2864,7 @@ __metadata:
28642864
typeorm: ^0.3.15
28652865
typeorm-extension: ^2.7.0
28662866
typescript: ^4.7.4
2867+
url: ^0.11.4
28672868
util: ^0.12.4
28682869
uuid: ^8.3.2
28692870
wdio-chromedriver-service: ^7.3.2
@@ -21244,6 +21245,13 @@ __metadata:
2124421245
languageName: node
2124521246
linkType: hard
2124621247

21248+
"punycode@npm:^1.4.1":
21249+
version: 1.4.1
21250+
resolution: "punycode@npm:1.4.1"
21251+
checksum: fa6e698cb53db45e4628559e557ddaf554103d2a96a1d62892c8f4032cd3bc8871796cae9eabc1bc700e2b6677611521ce5bb1d9a27700086039965d0cf34518
21252+
languageName: node
21253+
linkType: hard
21254+
2124721255
"punycode@npm:^2.1.0, punycode@npm:^2.1.1":
2124821256
version: 2.1.1
2124921257
resolution: "punycode@npm:2.1.1"
@@ -21294,7 +21302,7 @@ __metadata:
2129421302
languageName: node
2129521303
linkType: hard
2129621304

21297-
"qs@npm:~6.15.1":
21305+
"qs@npm:^6.12.3, qs@npm:~6.15.1":
2129821306
version: 6.15.2
2129921307
resolution: "qs@npm:6.15.2"
2130021308
dependencies:
@@ -24688,6 +24696,16 @@ __metadata:
2468824696
languageName: node
2468924697
linkType: hard
2469024698

24699+
"url@npm:^0.11.4":
24700+
version: 0.11.4
24701+
resolution: "url@npm:0.11.4"
24702+
dependencies:
24703+
punycode: ^1.4.1
24704+
qs: ^6.12.3
24705+
checksum: c25e587723d343d5d4248892393bfa5039ded9c2c07095a9d005bc64b7cb8956d623c0d8da8d1a28f71986a7a8d80fc2e9f9cf84235e48fa435a5cb4451062c6
24706+
languageName: node
24707+
linkType: hard
24708+
2469124709
"usb@npm:^2.11.0":
2469224710
version: 2.11.0
2469324711
resolution: "usb@npm:2.11.0"

0 commit comments

Comments
 (0)