Skip to content

Commit 60ccdbd

Browse files
[wrangler] Update capnweb to 0.12.0 (#15923)
1 parent 3bdcd0d commit 60ccdbd

6 files changed

Lines changed: 23 additions & 17 deletions

File tree

‎.changeset/brave-cats-connect.md‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
"miniflare": patch
3+
"wrangler": patch
4+
---
5+
6+
Upgrade the bundled capnweb implementation to 0.12.0
7+
8+
This updates the RPC implementation shipped in Miniflare and remote-binding proxy workers to the latest capnweb release.

‎fixtures/browser-run/src/playwright.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ export default {
88
if (url) {
99
url = new URL(url).toString(); // normalize
1010
switch (action) {
11-
case "select": {
11+
case "title": {
1212
await using browser = await playwright.launch(env.MYBROWSER);
1313
const page = await browser.newPage();
1414
await page.goto(url);
15-
const h1Text = await page.locator("h1").textContent();
16-
return new Response(h1Text);
15+
return new Response(await page.title());
1716
}
1817

1918
case "alter": {

‎fixtures/browser-run/src/puppeteer.ts‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,11 @@ export default {
88
if (url) {
99
url = new URL(url).toString(); // normalize
1010
switch (action) {
11-
case "select": {
11+
case "title": {
1212
const browser = await puppeteer.launch(env.MYBROWSER);
1313
const page = await browser.newPage();
1414
await page.goto(url);
15-
const h1Text = await page.$eval("h1", (el) => el.textContent.trim());
16-
return new Response(h1Text);
15+
return new Response(await page.title());
1716
}
1817

1918
case "alter": {

‎fixtures/browser-run/test/index.spec.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,12 +56,12 @@ describe.sequential("Local Browser", () => {
5656
});
5757

5858
it(
59-
"Run a browser, and check h1 text content",
59+
"Run a browser, and check the page title",
6060
BROWSER_RENDERING_RETRY,
6161
async ({ expect }) => {
6262
await expect(
6363
fetchText(
64-
`http://${ip}:${port}/?lib=${lib}&url=https://example.com&action=select`
64+
`http://${ip}:${port}/?lib=${lib}&url=https://example.com&action=title`
6565
)
6666
).resolves.toEqual("Example Domain");
6767
}

‎pnpm-lock.yaml‎

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎pnpm-workspace.yaml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ catalog:
139139
tinyglobby: "0.2.16"
140140
"tree-kill": "1.2.2"
141141
"capnp-es": "0.0.16"
142-
"capnweb": "0.5.0"
142+
"capnweb": "0.12.0"
143143
zod: "4.4.3"
144144
"ci-info": "4.4.0"
145145
"open": "11.0.0"

0 commit comments

Comments
 (0)