Skip to content

Commit

Permalink
refactor: move ast-grep based patches to patches/ast
Browse files Browse the repository at this point in the history
  • Loading branch information
vicb committed Jan 29, 2025
1 parent 1b3a972 commit 5d89e66
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion packages/cloudflare/src/cli/build/bundle-server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { getCrossPlatformPathRegex } from "@opennextjs/aws/utils/regex.js";
import { build, Plugin } from "esbuild";

import { patchOptionalDependencies } from "./patches/ast/optional-deps.js";
import { patchVercelOgLibrary } from "./patches/ast/patch-vercel-og-library.js";
import * as patches from "./patches/index.js";
import inlineRequirePagePlugin from "./patches/plugins/require-page.js";
import setWranglerExternal from "./patches/plugins/wrangler-external.js";
Expand Down Expand Up @@ -36,7 +37,7 @@ export async function bundleServer(buildOpts: BuildOptions): Promise<void> {

patches.patchWranglerDeps(buildOpts);
await patches.updateWebpackChunksFile(buildOpts);
patches.patchVercelOgLibrary(buildOpts);
patchVercelOgLibrary(buildOpts);

const outputPath = path.join(outputDir, "server-functions", "default");
const packagePath = getPackagePath(buildOpts);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import type { BuildOptions } from "@opennextjs/aws/build/helper.js";
import { getPackagePath } from "@opennextjs/aws/build/helper.js";
import { globSync } from "glob";

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

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

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from "./copy-package-cli-files.js";
export * from "./patch-cache.js";
export * from "./patch-require.js";
export * from "./patch-vercel-og-library.js";
export * from "./update-webpack-chunks-file/index.js";

0 comments on commit 5d89e66

Please sign in to comment.