Skip to content

Commit 3749441

Browse files
committed
rename files to kebab-case
1 parent 61db398 commit 3749441

File tree

11 files changed

+18
-16
lines changed

11 files changed

+18
-16
lines changed

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

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
import { NextjsAppPaths } from "../../nextjsPaths";
1+
import { NextjsAppPaths } from "../../nextjs-paths";
22
import { build, Plugin } from "esbuild";
33
import { readdirSync, readFileSync, writeFileSync } from "node:fs";
44
import { cp, readFile, writeFile } from "node:fs/promises";
55

6-
import { patchRequire } from "./patches/investigated/patchRequire";
7-
import { patchUrl } from "./patches/investigated/patchUrl";
8-
import { copyTemplates } from "./patches/investigated/copyTemplates";
6+
import { patchRequire } from "./patches/investigated/patch-require";
7+
import { patchUrl } from "./patches/investigated/patch-url";
8+
import { copyTemplates } from "./patches/investigated/copy-templates";
99

10-
import { patchReadFile } from "./patches/to-investigate/patchReadFile";
11-
import { patchFindDir } from "./patches/to-investigate/patchFindDir";
12-
import { inlineNextRequire } from "./patches/to-investigate/inlineNextRequire";
13-
import { inlineEvalManifest } from "./patches/to-investigate/inlineEvalManifest";
14-
import { patchWranglerDeps } from "./patches/to-investigate/wranglerDeps";
10+
import { patchReadFile } from "./patches/to-investigate/patch-read-file";
11+
import { patchFindDir } from "./patches/to-investigate/patch-find-dir";
12+
import { inlineNextRequire } from "./patches/to-investigate/inline-next-require";
13+
import { inlineEvalManifest } from "./patches/to-investigate/inline-eval-manifest";
14+
import { patchWranglerDeps } from "./patches/to-investigate/wrangler-deps";
1515

1616
/**
1717
* Using the Next.js build output in the `.next` directory builds a workerd compatible output
@@ -92,6 +92,8 @@ export async function buildWorker(
9292
globalThis.__dirname ??= "";
9393
9494
// Do not crash on cache not supported
95+
// https://github.com/cloudflare/workerd/pull/2434
96+
// compatibility flag "cache_option_enabled" -> does not support "force-cache"
9597
let isPatchedAlready = globalThis.fetch.__nextPatched;
9698
const curFetch = globalThis.fetch;
9799
globalThis.fetch = (input, init) => {

builder/src/build/build-worker/patches/investigated/copyTemplates.ts renamed to builder/src/build/build-worker/patches/investigated/copy-templates.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import path from "node:path";
2-
import { NextjsAppPaths } from "../../../../nextjsPaths";
2+
import { NextjsAppPaths } from "../../../../nextjs-paths";
33
import { cpSync } from "node:fs";
44

55
/**
File renamed without changes.
File renamed without changes.

builder/src/build/build-worker/patches/to-investigate/inlineEvalManifest.ts renamed to builder/src/build/build-worker/patches/to-investigate/inline-eval-manifest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { globSync } from "glob";
2-
import { NextjsAppPaths } from "../../../../nextjsPaths";
2+
import { NextjsAppPaths } from "../../../../nextjs-paths";
33

44
/**
55
* `evalManifest` relies on readFileSync so we need to patch the function so that it instead returns the content of the manifest files

builder/src/build/build-worker/patches/to-investigate/inlineNextRequire.ts renamed to builder/src/build/build-worker/patches/to-investigate/inline-next-require.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { readFileSync, existsSync } from "node:fs";
2-
import { NextjsAppPaths } from "../../../../nextjsPaths";
2+
import { NextjsAppPaths } from "../../../../nextjs-paths";
33

44
/**
55
* The following avoid various Next.js specific files `require`d at runtime since we can just read

builder/src/build/build-worker/patches/to-investigate/patchFindDir.ts renamed to builder/src/build/build-worker/patches/to-investigate/patch-find-dir.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { NextjsAppPaths } from "../../../../nextjsPaths";
1+
import { NextjsAppPaths } from "../../../../nextjs-paths";
22
import { existsSync } from "node:fs";
33

44
/**

builder/src/build/build-worker/patches/to-investigate/patchReadFile.ts renamed to builder/src/build/build-worker/patches/to-investigate/patch-read-file.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { readFileSync } from "node:fs";
22
import { globSync } from "glob";
3-
import { NextjsAppPaths } from "../../../../nextjsPaths";
3+
import { NextjsAppPaths } from "../../../../nextjs-paths";
44

55
export function patchReadFile(
66
code: string,

builder/src/build/build-worker/patches/to-investigate/wranglerDeps.ts renamed to builder/src/build/build-worker/patches/to-investigate/wrangler-deps.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import path from "node:path";
22
import fs, { writeFileSync } from "node:fs";
3-
import { NextjsAppPaths } from "../../../../nextjsPaths";
3+
import { NextjsAppPaths } from "../../../../nextjs-paths";
44

55
export function patchWranglerDeps(paths: NextjsAppPaths) {
66
console.log("# patchWranglerDeps");

builder/src/build/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { rm } from "node:fs/promises";
22
import { buildNextjsApp } from "./build-next-app";
33
import { buildWorker } from "./build-worker";
4-
import { getNextjsAppPaths } from "../nextjsPaths";
4+
import { getNextjsAppPaths } from "../nextjs-paths";
55
import path from "node:path";
66
import { fileURLToPath } from "node:url";
77
import { cpSync, rmSync } from "node:fs";

0 commit comments

Comments
 (0)