Skip to content

Commit a42378a

Browse files
committed
Deprecate the url patch
No more needed after wrangler 3.77+
1 parent 79f9ce6 commit a42378a

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

TODO.txt

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
## TODO
44

5-
- wrangler alias
65
- move the wrangler.toml to the templates
7-
- dependency graph
86

97
DONE:
108

119
- figure out the assets
1210
- copy the template folders
11+
- remove the need for wrangler aliases
12+
- remove url patch - unblocked by wrangler 3.77+
1313

1414
## Install:
1515

@@ -30,8 +30,6 @@ const nextConfig = {
3030
export default nextConfig;
3131
```
3232

33-
- add "node-url": "npm:url@^0.11.4" to the package.json
34-
3533
- add a wrangler.toml int the generated app
3634

3735
```

builder/src/build/build-worker/index.ts

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

66
import { patchRequire } from "./patches/investigated/patchRequire";
7-
import { patchUrl } from "./patches/investigated/patchUrl";
7+
import { patchUrl } from "./patches/deprecated/patchUrl";
88
import { copyTemplates } from "./patches/investigated/copyTemplates";
99

1010
import { patchReadFile } from "./patches/to-investigate/patchReadFile";
@@ -126,7 +126,6 @@ async function updateWorkerBundledCode(
126126

127127
patchedCode = patchRequire(patchedCode);
128128
patchedCode = patchReadFile(patchedCode, nextjsAppPaths);
129-
patchedCode = patchUrl(patchedCode);
130129
patchedCode = inlineNextRequire(patchedCode, nextjsAppPaths);
131130
patchedCode = patchFindDir(patchedCode, nextjsAppPaths);
132131
patchedCode = inlineEvalManifest(patchedCode, nextjsAppPaths);

builder/src/build/build-worker/patches/investigated/patchUrl.ts renamed to builder/src/build/build-worker/patches/deprecated/patchUrl.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
/**
2+
* No more needed with wrangler 3.77+
3+
*
24
* This solves the fact that the workerd URL parsing is not compatible with the node.js one
35
* VERY IMPORTANT: this required the following dependency to be part of the application!!!! (this is very bad!!!)
46
* "node-url": "npm:url@^0.11.4"

0 commit comments

Comments
 (0)