opennextjs / opennextjs-aws

Open-source Next.js adapter for AWS
https://opennext.js.org
MIT License
4.14k stars 126 forks source link

fix(middleware): always compiles the middleware #604

Closed vicb closed 2 weeks ago

vicb commented 2 weeks ago

Prior to this PR the middleware would only be compiled when a middleware.ts exists.

@conico974 Please double check the !external path - I'm less familiar with that one. Thanks!

changeset-bot[bot] commented 2 weeks ago

🦋 Changeset detected

Latest commit: 78aa0eb008c1ec005c1ded2b46a875770e11b477

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages | Name | Type | | ---------------- | ----- | | @opennextjs/aws | Patch | | app-pages-router | Patch | | app-router | Patch |

Not sure what this means? Click here to learn what changesets are.

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

pkg-pr-new[bot] commented 2 weeks ago

Open in Stackblitz

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

commit: 78aa0eb

github-actions[bot] commented 2 weeks ago

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 19.31% 1409 / 7293
🔵 Statements 19.31% 1409 / 7293
🔵 Functions 53.14% 93 / 175
🔵 Branches 67.13% 331 / 493
File Coverage
File Stmts % Branch % Funcs % Lines Uncovered Lines
Changed Files
packages/open-next/src/build/createMiddleware.ts 0% 0% 0% 0% 1, 18-19, 21, 24-29, 31, 35-37, 40-44, 47-60, 62-76
packages/open-next/src/build/createServerBundle.ts 0% 0% 0% 0% 1, 17-19, 21-22, 25-30, 32-40, 45, 47, 49, 51, 54-61, 64-79, 82-97, 100-101, 103-106, 108-115, 118, 125-127, 129-133, 135-137, 140-143, 146-151, 154-157, 160, 163-169, 176-178, 180, 182-185, 187, 189-208, 210-214, 216-222, 224-252, 254-256, 258, 260-262, 264-270, 277-279, 281-283, 287-288, 291-297, 300, 308-313, 315-316, 318-322
packages/open-next/src/build/edge/createEdgeBundle.ts 0% 0% 0% 0% 1, 34-52, 54-113, 120-122, 135-136, 138-141, 143-159, 161-167, 170-171, 174, 177-182, 185-187, 189-192, 195-202, 205-212, 214-226
packages/open-next/src/core/requestHandler.ts 0% 0% 0% 0% 1, 16, 21, 23, 25-32, 34-39, 42-46, 49-52, 54-67, 69, 71-92, 98-126, 128-133, 135, 137-143, 146, 148, 150-155, 157-162, 166, 168, 172, 174-176, 178, 182-184, 186, 189-195, 197-225
packages/open-next/src/plugins/edge.ts 0% 0% 0% 0% 1, 31-48, 50-53, 55-60, 62-66, 70, 74-77, 81-89, 92-94, 97, 100-102, 143-152, 154-157, 159-167, 169, 183-190, 195-201
Generated in workflow #660 for commit 78aa0eb by the Vitest Coverage Report Action