Skip to content

Commit 1a40e35

Browse files
committed
Drop the URL patch
unenv has a fixed polyfill in wrangler 3.78.6
1 parent 3eea24c commit 1a40e35

File tree

7 files changed

+29
-95
lines changed

7 files changed

+29
-95
lines changed

TODO.md

Lines changed: 3 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,8 +32,7 @@ DONE:
3232
- add the following devDependency to the package.json:
3333

3434
```json
35-
"node-url": "npm:url@^0.11.4",
36-
"wrangler": "^3.77.0"
35+
"wrangler": "^3.78.6"
3736
```
3837

3938
- add a wrangler.toml int the generated app
@@ -90,23 +89,11 @@ Changes:
9089
...
9190
},
9291
"devDependencies": {
93-
"node-url": "npm:url@^0.11.4",
94-
"wrangler": "^3.77.0"
92+
"wrangler": "^3.78.6"
9593
...
9694
}
9795
```
9896

99-
- wrangler, update bundle.ts (based on 3.76.0)
100-
101-
```js
102-
//l 354
103-
conditions: [],
104-
platform: "node",
105-
```
106-
107-
The conditions (`export const BUILD_CONDITIONS = ["workerd", "worker", "browser"];`)
108-
would pull browser files that are not traced by nft.
109-
11097
- Build the app
11198

112-
- Use the updated wrangler `pnpm --filter wrangler start dev -c /path/to/open-next/example/wrangler.toml`
99+
- Serve with `WRANGLER_BUILD_CONDITIONS="" WRANGLER_BUILD_PLATFORM="node" wrangler dev`

builder/src/build/build-worker.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ import { readdirSync, readFileSync, writeFileSync } from "node:fs";
44
import { cp, readFile, writeFile } from "node:fs/promises";
55

66
import { patchRequire } from "./patches/investigated/patch-require";
7-
import { patchUrl } from "./patches/investigated/patch-url";
87
import { copyTemplates } from "./patches/investigated/copy-templates";
98

109
import { patchReadFile } from "./patches/to-investigate/patch-read-file";
@@ -149,7 +148,6 @@ async function updateWorkerBundledCode(
149148

150149
patchedCode = patchRequire(patchedCode);
151150
patchedCode = patchReadFile(patchedCode, nextjsAppPaths);
152-
patchedCode = patchUrl(patchedCode);
153151
patchedCode = inlineNextRequire(patchedCode, nextjsAppPaths);
154152
patchedCode = patchFindDir(patchedCode, nextjsAppPaths);
155153
patchedCode = inlineEvalManifest(patchedCode, nextjsAppPaths);

builder/src/build/patches/investigated/patch-url.ts

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

examples/api/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@
2121
"@flarelabs-net/builder": "workspace:*",
2222
"@playwright/test": "1.47.0",
2323
"@types/node": "^22.2.0",
24-
"node-url": "npm:url@^0.11.4",
25-
"wrangler": "3.77.0"
24+
"wrangler": "3.78.6"
2625
}
2726
}

examples/create-next-app/package.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,8 @@
2626
"eslint": "^8",
2727
"eslint-config-next": "14.2.11",
2828
"postcss": "^8",
29-
"node-url": "npm:url@^0.11.4",
3029
"tailwindcss": "^3.4.1",
3130
"typescript": "^5",
32-
"wrangler": "^3.77.0"
31+
"wrangler": "^3.78.6"
3332
}
3433
}

pnpm-lock.yaml

Lines changed: 23 additions & 51 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
@@ -13,4 +13,4 @@ catalog:
1313
"react": ^18
1414
"react-dom": ^18
1515
"typescript": ^5.5.4
16-
"wrangler": ^3.77.0
16+
"wrangler": ^3.78.6

0 commit comments

Comments
 (0)