rsnext/test/production
Zack Tanner 3050f45a0a
fix node.js module warning in middleware (#65112)
`server-utils` should not be imported into middleware as it contains
imports that won't work in the edge runtime. Those imports aren't
technically used, but it was causing a warning nonetheless.

This adds a regression test to confirm the warning is only present when
actually importing a Node.js module in userland.

Closes NEXT-3246

<!-- Thanks for opening a PR! Your contribution is much appreciated.
To make sure your PR is handled as smoothly as possible we request that
you follow the checklist sections below.
Choose the right checklist for the change(s) that you're making:

## For Contributors

### Improving Documentation

- Run `pnpm prettier-fix` to fix formatting issues before opening the
PR.
- Read the Docs Contribution Guide to ensure your contribution follows
the docs guidelines:
https://nextjs.org/docs/community/contribution-guide

### Adding or Updating Examples

- The "examples guidelines" are followed from our contributing doc
https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md
- Make sure the linting passes by running `pnpm build && pnpm lint`. See
https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md

### Fixing a bug

- Related issues linked using `fixes #number`
- Tests added. See:
https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md

### Adding a feature

- Implements an existing feature request or RFC. Make sure the feature
request has been accepted for implementation before opening a PR. (A
discussion must be opened, see
https://github.com/vercel/next.js/discussions/new?category=ideas)
- Related issues/discussions are linked using `fixes #number`
- e2e tests added
(https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs)
- Documentation added
- Telemetry added. In case of a feature if it's used or not.
- Errors have a helpful link attached, see
https://github.com/vercel/next.js/blob/canary/contributing.md


## For Maintainers

- Minimal description (aim for explaining to someone not on the team to
understand the PR)
- When linking to a Slack thread, you might want to share details of the
conclusion
- Link both the Linear (Fixes NEXT-xxx) and the GitHub issues
- Add review comments if necessary to explain to the reviewer the logic
behind a change

### What?

### Why?

### How?

Closes NEXT-
Fixes #

-->
2024-04-27 07:36:23 -07:00
..
app-dir fix node.js module warning in middleware (#65112) 2024-04-27 07:36:23 -07:00
app-dir-edge-runtime-with-wasm Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
app-dir-hide-suppressed-error-during-next-export Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
app-dir-prefetch-non-iso-url Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
app-dir-prevent-304-caching Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
bfcache-routing Improve handling of failed nextBuild() calls in test suite (#63717) 2024-03-27 19:29:16 +01:00
build-spinners Use consistent name for App Router tests (#56352) 2023-10-06 11:06:06 +02:00
ci-missing-typescript-deps Add types as a default dependency into tests (#44140) 2022-12-19 19:05:53 +01:00
custom-error-500 Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
custom-server Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
dependencies-can-use-env-vars-in-middlewares Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
deployment-id-handling Improve initial setup with new App Router TypeScript project (#64826) 2024-04-26 18:19:50 +02:00
disable-fallback-polyfills Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
edge-config-validations Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
edge-dynamic-code-eval fix(log): improve error when dynamic code eval is disallowed (#62999) 2024-03-12 23:31:32 +01:00
edge-runtime-is-addressable Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
emit-decorator-metadata Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
enoent-during-require Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
error-hydration Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
escheck-output Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
eslint-plugin-deps Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
export Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
exported-runtimes-value-validation Revert "refactor(analysis): rust based page-static-info, deprecate js parse interface in next-swc" (#62838) 2024-03-04 21:43:56 +00:00
fallback-export-error Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
fatal-render-errror Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
generate-middleware-source-maps Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
graceful-shutdown Improve initial setup with new App Router TypeScript project (#64826) 2024-04-26 18:19:50 +02:00
handle-already-sent-response Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
ipc-forbidden-headers Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
jest Update @testing-library/react used in tests (#64851) 2024-04-21 21:47:39 +00:00
middleware-typescript Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
next-font Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
pages-dir/production Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
pnpm-support Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
postcss-plugin-config-as-string Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
prerender-prefetch Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
reading-request-body-in-middleware Stop using baseUrl in root tsconfig (#64117) 2024-04-09 00:25:43 +02:00
sharp-basic Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
standalone-mode Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
supports-module-resolution-nodenext Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
terser-class-static-blocks Improve initial setup with new App Router TypeScript project (#64826) 2024-04-26 18:19:50 +02:00
transpile-packages Replace createNextDescribe with nextTestSetup (#64817) 2024-04-25 12:06:12 -06:00
typescript-basic Add typechecking test for all entrypoints (#64478) 2024-04-15 17:52:44 +02:00