Skip to content

Commit 675d58d

Browse files
authored
refactor: move ast-grep based patches to patches/ast (#298)
1 parent 5c90521 commit 675d58d

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

packages/cloudflare/src/cli/build/bundle-server.ts

+2-1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import { getCrossPlatformPathRegex } from "@opennextjs/aws/utils/regex.js";
99
import { build, Plugin } from "esbuild";
1010

1111
import { patchOptionalDependencies } from "./patches/ast/optional-deps.js";
12+
import { patchVercelOgLibrary } from "./patches/ast/patch-vercel-og-library.js";
1213
import * as patches from "./patches/index.js";
1314
import inlineRequirePagePlugin from "./patches/plugins/require-page.js";
1415
import setWranglerExternal from "./patches/plugins/wrangler-external.js";
@@ -50,7 +51,7 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {
5051

5152
patches.patchWranglerDeps(buildOpts);
5253
await patches.updateWebpackChunksFile(buildOpts);
53-
patches.patchVercelOgLibrary(buildOpts);
54+
patchVercelOgLibrary(buildOpts);
5455

5556
const outputPath = path.join(outputDir, "server-functions", "default");
5657
const packagePath = getPackagePath(buildOpts);

packages/cloudflare/src/cli/build/patches/investigated/patch-vercel-og-library.ts packages/cloudflare/src/cli/build/patches/ast/patch-vercel-og-library.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import type { BuildOptions } from "@opennextjs/aws/build/helper.js";
55
import { getPackagePath } from "@opennextjs/aws/build/helper.js";
66
import { globSync } from "glob";
77

8-
import { parseFile } from "../ast/util.js";
9-
import { patchVercelOgFallbackFont, patchVercelOgImport } from "../ast/vercel-og.js";
8+
import { parseFile } from "./util.js";
9+
import { patchVercelOgFallbackFont, patchVercelOgImport } from "./vercel-og.js";
1010

1111
type TraceInfo = { version: number; files: string[] };
1212

Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
export * from "./copy-package-cli-files.js";
22
export * from "./patch-cache.js";
33
export * from "./patch-require.js";
4-
export * from "./patch-vercel-og-library.js";
54
export * from "./update-webpack-chunks-file/index.js";

0 commit comments

Comments
 (0)