Skip to content

Commit 5454280

Browse files
Merge pull request #11 from flarelabs-net/url
Drop the URL patch
2 parents 3eea24c + ef608c3 commit 5454280

File tree

7 files changed

+99
-141
lines changed

7 files changed

+99
-141
lines changed

TODO.md

+3-16
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

-2
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

-21
This file was deleted.

examples/api/package.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,14 @@
1313
"e2e": "playwright test"
1414
},
1515
"dependencies": {
16-
"next": "14.2.5",
17-
"react": "^18",
18-
"react-dom": "^18"
16+
"next": "catalog:",
17+
"react": "catalog:",
18+
"react-dom": "catalog:"
1919
},
2020
"devDependencies": {
2121
"@flarelabs-net/builder": "workspace:*",
22-
"@playwright/test": "1.47.0",
23-
"@types/node": "^22.2.0",
24-
"node-url": "npm:url@^0.11.4",
25-
"wrangler": "3.77.0"
22+
"@playwright/test": "catalog:",
23+
"@types/node": "catalog:",
24+
"wrangler": "catalog:"
2625
}
2726
}

examples/create-next-app/package.json

+11-12
Original file line numberDiff line numberDiff line change
@@ -13,22 +13,21 @@
1313
"e2e": "playwright test -c e2e/playwright.config.ts"
1414
},
1515
"dependencies": {
16-
"react": "^18",
17-
"react-dom": "^18",
18-
"next": "14.2.11"
16+
"react": "catalog:",
17+
"react-dom": "catalog:",
18+
"next": "catalog:"
1919
},
2020
"devDependencies": {
2121
"@flarelabs-net/builder": "workspace:*",
22-
"@playwright/test": "1.47.0",
23-
"@types/node": "^20",
24-
"@types/react": "^18",
25-
"@types/react-dom": "^18",
26-
"eslint": "^8",
27-
"eslint-config-next": "14.2.11",
22+
"@playwright/test": "catalog:",
23+
"@types/node": "catalog:",
24+
"@types/react": "catalog:",
25+
"@types/react-dom": "catalog:",
26+
"eslint": "catalog:",
27+
"eslint-config-next": "catalog:",
2828
"postcss": "^8",
29-
"node-url": "npm:url@^0.11.4",
3029
"tailwindcss": "^3.4.1",
31-
"typescript": "^5",
32-
"wrangler": "^3.77.0"
30+
"typescript": "catalog:",
31+
"wrangler": "catalog:"
3332
}
3433
}

0 commit comments

Comments
 (0)