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

Create a custom not-found edge route for next applications using the app router #4625

Merged
merged 6 commits into from
Jan 4, 2024

Conversation

dario-piotrowicz
Copy link
Member

@dario-piotrowicz dario-piotrowicz commented Dec 18, 2023

This PR generates a not-found custom edge route for users creating next-on-pages applications that use the app router.

Having such route is not mandatory but it helps avoiding a gotcha that can trip people over: https://github.com/cloudflare/next-on-pages/blob/56391355c3028737a4b0069a5126ccaec24e53b1/packages/next-on-pages/docs/gotchas.md#not-found

Copy link

changeset-bot bot commented Dec 18, 2023

🦋 Changeset detected

Latest commit: cf26143

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

This PR includes changesets to release 1 package
Name Type
create-cloudflare Minor

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

Copy link
Contributor

github-actions bot commented Dec 18, 2023

A wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7408676904/npm-package-wrangler-4625

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/7408676904/npm-package-wrangler-4625

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7408676904/npm-package-wrangler-4625 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7408676904/npm-package-miniflare-4625
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7408676904/npm-package-cloudflare-pages-shared-4625
npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/7408676904/npm-package-create-cloudflare-4625 --no-auto-update

Note that these links will no longer work once the GitHub Actions artifact expires.


wrangler@3.22.2 includes the following runtime dependencies:

Package Constraint Resolved
miniflare workspace:* 3.20231218.0
workerd 1.20231218.0 1.20231218.0
workerd --version 1.20231218.0 2023-12-18

|

Please ensure constraints are pinned, and miniflare/workerd minor versions match.

@dario-piotrowicz dario-piotrowicz marked this pull request as ready for review January 2, 2024 10:02
@dario-piotrowicz dario-piotrowicz requested a review from a team as a code owner January 2, 2024 10:02
Copy link

codecov bot commented Jan 2, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (98dee93) 75.41% compared to head (cf26143) 75.67%.
Report is 37 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #4625      +/-   ##
==========================================
+ Coverage   75.41%   75.67%   +0.25%     
==========================================
  Files         242      243       +1     
  Lines       12965    13095     +130     
  Branches     3337     3375      +38     
==========================================
+ Hits         9778     9909     +131     
+ Misses       3187     3186       -1     

see 23 files with indirect coverage changes

Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Let's move the error handling out of probePaths().

@dario-piotrowicz dario-piotrowicz requested a review from a team as a code owner January 4, 2024 11:03
Copy link
Contributor

@petebacondarwin petebacondarwin left a comment

Choose a reason for hiding this comment

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

Cool!

@dario-piotrowicz dario-piotrowicz merged commit e805355 into main Jan 4, 2024
24 checks passed
@dario-piotrowicz dario-piotrowicz deleted the c3-next-on-pages-app-not-found branch January 4, 2024 15:08
@workers-devprod workers-devprod mentioned this pull request Jan 4, 2024
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