Skip to content

Commit

Permalink
Deprecate the url patch
Browse files Browse the repository at this point in the history
No more needed after wrangler 3.77+
  • Loading branch information
vicb committed Sep 13, 2024
1 parent 79f9ce6 commit a42378a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
6 changes: 2 additions & 4 deletions TODO.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

## TODO

- wrangler alias
- move the wrangler.toml to the templates
- dependency graph

DONE:

- figure out the assets
- copy the template folders
- remove the need for wrangler aliases
- remove url patch - unblocked by wrangler 3.77+

## Install:

Expand All @@ -30,8 +30,6 @@ const nextConfig = {
export default nextConfig;
```

- add "node-url": "npm:url@^0.11.4" to the package.json

- add a wrangler.toml int the generated app

```
Expand Down
3 changes: 1 addition & 2 deletions builder/src/build/build-worker/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { readdirSync, readFileSync, writeFileSync } from "node:fs";
import { cp, readFile, writeFile } from "node:fs/promises";

import { patchRequire } from "./patches/investigated/patchRequire";
import { patchUrl } from "./patches/investigated/patchUrl";
import { patchUrl } from "./patches/deprecated/patchUrl";
import { copyTemplates } from "./patches/investigated/copyTemplates";

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

patchedCode = patchRequire(patchedCode);
patchedCode = patchReadFile(patchedCode, nextjsAppPaths);
patchedCode = patchUrl(patchedCode);
patchedCode = inlineNextRequire(patchedCode, nextjsAppPaths);
patchedCode = patchFindDir(patchedCode, nextjsAppPaths);
patchedCode = inlineEvalManifest(patchedCode, nextjsAppPaths);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
/**
* No more needed with wrangler 3.77+
*
* This solves the fact that the workerd URL parsing is not compatible with the node.js one
* VERY IMPORTANT: this required the following dependency to be part of the application!!!! (this is very bad!!!)
* "node-url": "npm:url@^0.11.4"
Expand Down

0 comments on commit a42378a

Please sign in to comment.