Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor(cloudflare): enable using bunlded middleware #798

Merged
merged 1 commit into from
Mar 25, 2025
Merged

Conversation

vicb
Copy link
Contributor

@vicb vicb commented Mar 25, 2025

No description provided.

Copy link

changeset-bot bot commented Mar 25, 2025

⚠️ No Changeset found

Latest commit: 038a854

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

pkg-pr-new bot commented Mar 25, 2025

Open in Stackblitz

pnpm add https://pkg.pr.new/@opennextjs/aws@798

commit: 038a854

Copy link
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 26.21% 2358 / 8995
🔵 Statements 26.21% 2358 / 8995
🔵 Functions 52.71% 126 / 239
🔵 Branches 73.15% 586 / 801
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/open-next/src/build/createMiddleware.ts 0% 0% 0% 0% 1-102
packages/open-next/src/build/helper.ts 19.12% 100% 5% 19.12% 21-101, 104-185, 206-224, 235-241, 252-261, 264-270, 273-274, 278-289, 353-365, 368-382, 388-398, 401-402, 405-406, 417-438, 441-442
Generated in workflow #1104 for commit 038a854 by the Vitest Coverage Report Action

@@ -94,6 +94,7 @@ export async function createMiddleware(
outfile: path.join(options.buildDir, "middleware.mjs"),
middlewareInfo: edgeMiddlewareInfo,
options,
overrides: config.default.override,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really needed here ?
It should use the default override provided by the default function itself

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would that cause any issue?
It's here so that the other change in this PR can see the cloudflare wrapper

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ho right, it should be a no-op in this case

Copy link
Contributor

@conico974 conico974 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -94,6 +94,7 @@ export async function createMiddleware(
outfile: path.join(options.buildDir, "middleware.mjs"),
middlewareInfo: edgeMiddlewareInfo,
options,
overrides: config.default.override,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ho right, it should be a no-op in this case

@vicb
Copy link
Contributor Author

vicb commented Mar 25, 2025

Thanks Nico!

@vicb vicb merged commit 9bc06e4 into main Mar 25, 2025
3 checks passed
@vicb vicb deleted the vicb/cf-bm branch March 25, 2025 12:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants