rsnext/test/integration
Damien Simonin Feugas 90bbac44db
fix(edge): error handling for edge route and middleware is inconsistent (#38401)
## What’s in there?

This PR brings more consistency in how errors and warnings are reported when running code in the Edge Runtime:

- Dynamic code evaluation (`eval()`, `new Function()`, `WebAssembly.instantiate()`, `WebAssembly.compile()`…)
- Usage of Node.js global APIs (`BroadcastChannel`, `Buffer`, `TextDecoderStream`, `setImmediate()`...)
- Usage of Node.js modules (`fs`, `path`, `child_process`…)

The new error messages should mention *Edge Runtime* instead of *Middleware*, so they are valid in both cases.

It also fixes a bug where the process polyfill would issue a warning for  `process.cwd` (which is `undefined` but legit). Now, one has to invoke the function `process.cwd()` to trigger the error.

It finally fixes the react-dev-overlay, where links from middleware and Edge API route files could not be opened because of the `(middleware)/` prefix in their name.

About the later, please note that we can’t easily remove the prefix or change it for Edge API routes. It comes from the Webpack layer, which is the same for both. We may consider renaming it to *edge* instead in the future.

## How to test?

These changes are almost fully covered with tests:

```bash
pnpm testheadless --testPathPattern runtime-dynamic
pnpm testheadless --testPathPattern runtime-with-node
pnpm testheadless --testPathPattern runtime-module
pnpm testheadless --testPathPattern middleware-dev-errors
```

To try them out manually, you can write a middleware and Edge route files like these:

```jsx
// middleware.js
import { NextResponse } from 'next/server'
import { basename } from 'path'

export default async function middleware() {
  eval('2+2')
  setImmediate(() => {})
  basename()
  return NextResponse.next()
}

export const config = { matcher: '/' }
```

```jsx
// pages/api/route.js
import { basename } from 'path'

export default async function handle() {
  eval('2+2')
  setImmediate(() => {})
  basename()
  return Response.json({ ok: true })
}

export const config = { runtime: 'experimental-edge' }
```

The expected behaviours are:

- [x] dev, middleware/edge route is using a node.js module: error at runtime (logs + read-dev-overlay):

```bash
error - (middleware)/pages/api/route.js (1:0) @ Object.handle [as handler]
error - The edge runtime does not support Node.js 'path' module.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
> 1 | import { basename } from "path";
  2 | export default async function handle() {
```

- [x] build, middleware/edge route is using a node.js module: warning but succeeds

```bash
warn  - Compiled with warnings

./middleware.js
A Node.js module is loaded ('path' at line 4) which is not supported in the Edge Runtime.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime

./pages/api/route.js
A Node.js module is loaded ('path' at line 1) which is not supported in the Edge Runtime.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
```

- [x] production, middleware/edge route is using a node.js module: error at runtime (logs + 500 error)

```bash
Error: The edge runtime does not support Node.js 'path' module.
Learn More: https://nextjs.org/docs/messages/node-module-in-edge-runtime
    at <unknown> (file:///Users/damien/dev/next.js/packages/next/server/web/sandbox/context.ts:149)
```

- [x] dev, middleware/edge route is using a node.js global API: error at runtime (logs + read-dev-overlay):

```bash
error - (middleware)/pages/api/route.js (4:2) @ Object.handle [as handler]
error - A Node.js API is used (setImmediate) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime
  2 |
  3 | export default async function handle() {
> 4 |   setImmediate(() => {})
    |  ^
```

- [x] build, middleware/edge route is using a node.js global API: warning but succeeds

```bash
warn  - Compiled with warnings

./middleware.js
A Node.js API is used (setImmediate at line: 6) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime

./pages/api/route.js
A Node.js API is used (setImmediate at line: 3) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime
```

- [x] production, middleware/edge route is using a node.js module: error at runtime (logs + 500 error)

```bash
Error: A Node.js API is used (setImmediate) which is not supported in the Edge Runtime.
Learn more: https://nextjs.org/docs/api-reference/edge-runtime
    at <unknown> (file:///Users/damien/dev/next.js/packages/next/server/web/sandbox/context.ts:330)
```

- [x] dev, middleware/edge route is loading dynamic code: warning at runtime (logs + read-dev-overlay) and request succeeds (we allow dynamic code in dev only):

```bash
warn  - (middleware)/middleware.js (7:2) @ Object.middleware [as handler]
warn  - Dynamic Code Evaluation (e. g. 'eval', 'new Function') not allowed in Edge Runtime
   5 |
   6 | export default async function middleware() {
>  7 |   eval('2+2')
```

- [x] build, middleware/edge route is loading dynamic code: build fails with error:

```bash
Failed to compile.

./middleware.js
Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime
Used by default

./pages/api/route.js
Dynamic Code Evaluation (e. g. 'eval', 'new Function', 'WebAssembly.compile') not allowed in Edge Runtime
Used by default
```

## Notes to reviewers

Edge-related errors are either issued from `next/server/web/sandbox/context.ts` file (runtime errors) or from `next/build/webpack/plugins/middleware-plugin.ts` (webpack compilation).

The previous implementation (I’m pleading guilty here) was way too verbose: some errors (Node.js global APIs like using `process.cwd()`) could be reported several times, and the previous mechanism to dedupe them (in middleware-plugin) wasn’t really effective.

Changes in tests are due to renaming existing tests such as `test/integration/middleware-with-node.js-apis` into `test/integration/edge-runtime-with-node.js-apis`. I extended them to cover Edge API route.

@hanneslund I’ve pushed the improvement you did in https://github.com/vercel/next.js/pull/38289/ one step further to avoid duplication.
2022-07-21 14:53:23 +00:00
..
404-page ignore .d.ts files inside pages folder (#30728) 2022-01-01 17:16:03 +00:00
404-page-app Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
404-page-custom-error Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
404-page-ssg Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
500-page Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
absolute-assetprefix Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
amp-export-validation Update AMP validation tests (#32327) 2021-12-09 12:27:38 -06:00
amphtml Display full refresh warning even when error has occurred (#37425) 2022-06-19 00:00:14 +00:00
amphtml-custom-optimizer Upgrade amp optimizer to v2.8.3 (#27106) 2022-05-29 19:38:23 -05:00
amphtml-custom-validator Update to latest version of amphtml-validator (#33967) 2022-02-03 20:33:38 -06:00
amphtml-fragment-style Wait for shell resolve with gIP is customized in react 18 (#36792) 2022-05-11 13:25:23 +00:00
amphtml-ssg Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
api-body-parser Remove un-needed test dependency (#32616) 2022-01-03 10:08:30 -06:00
api-catch-all Include message body in redirect responses (#31886) 2021-12-16 05:41:43 +00:00
api-support Fix res.json support for string / null (#36186) 2022-04-15 16:04:00 +02:00
app-aspath Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
app-document test: clean up duplicated tests (#36871) 2022-05-13 00:46:12 +00:00
app-document-add-hmr Remove full reload overlay and warn in CLI instead (#37874) 2022-06-22 15:41:23 +00:00
app-document-import-order Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
app-document-remove-hmr Remove full reload overlay and warn in CLI instead (#37874) 2022-06-22 15:41:23 +00:00
app-document-style-fragment Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
app-functional Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
app-tree Fix missing _app component of AppTree in gIP context (#36206) 2022-04-16 01:55:16 +00:00
async-modules chore: narrows regexp to enable middleware source maps (#37582) 2022-06-10 20:22:03 -05:00
auto-export Add error link when hydration error occurs (#31519) 2021-11-23 13:10:56 +00:00
auto-export-error-bail Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
auto-export-query-error feat(next export): add warning if using getInitialProps (#37642) 2022-06-13 02:34:23 +00:00
auto-export-serverless Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
auto-export-serverless-error Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
babel Enable SWC by default when there is no custom Babel config (#29811) 2021-10-23 10:21:44 +02:00
babel-custom Enable SWC by default when there is no custom Babel config (#29811) 2021-10-23 10:21:44 +02:00
basepath-root-catch-all Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
bigint Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
broken-webpack-plugin Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
build-indicator Fix build activity indicator position (#36208) 2022-04-15 23:53:00 -05:00
build-output Stabilize flakey build-output test (#36195) 2022-04-15 13:43:50 -05:00
build-trace-extra-entries Decouple entries for server components and client components (#36860) 2022-05-13 19:48:53 +02:00
build-warnings Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
bundle-size-profiling Enable polyfillsOptimization (#10574) 2020-02-18 19:26:55 +01:00
catches-missing-getStaticProps Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
chunking Update components in GitHub Actions (#36669) 2022-05-04 18:51:25 +00:00
clean-distdir fix(next/swc): set cache dir explicitly (#38175) 2022-06-29 21:59:52 +00:00
cli feat(cli): report eslint-config-next version in next info (#38062) 2022-06-27 14:04:47 -05:00
client-404 Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
client-navigation fix(#37981): handle legacy link behavior with number type children (#38013) 2022-06-25 20:07:40 +00:00
client-navigation-a11y Migrate head side effects to hooks (#37526) 2022-06-08 11:26:57 +00:00
client-shallow-routing Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
compression Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
config improve production error message printing (#30065) 2021-10-20 18:23:44 -05:00
config-devtool-dev Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
config-empty Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
config-experimental-warning Add next.config.js validation with ajv (#38498) 2022-07-13 13:31:55 -05:00
config-mjs improve production error message printing (#30065) 2021-10-20 18:23:44 -05:00
config-promise-error Add support for async fn / promise in next.config.js/.mjs (#33662) 2022-02-07 08:48:35 +00:00
config-resolve-alias Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
config-syntax-error Ensure error message prints next.config.mjs (#30152) 2021-10-21 23:04:40 +00:00
config-validation Add next.config.js validation with ajv (#38498) 2022-07-13 13:31:55 -05:00
conflicting-public-file-page Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
conflicting-ssg-paths/test Fix conflicting paths grammar (#29658) 2021-10-05 22:22:46 -05:00
create-next-app Fix create-next-app tests from changed example (#38154) 2022-06-29 10:53:30 -05:00
critical-css Enable html post optimization for react 18 (#36837) 2022-05-12 17:41:37 +00:00
css/test fix: data url handling in css-loader (#34034) 2022-02-06 11:10:14 -06:00
css-client-nav/test Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
css-customization/test Update swc (#32210) 2021-12-08 18:54:21 +01:00
css-features chore: upgrade PostCSS dependencies (#34354) 2022-04-22 13:14:29 +02:00
css-fixtures fix: data url handling in css-loader (#34034) 2022-02-06 11:10:14 -06:00
css-minify Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
css-modules/test use loader-utils 2 for resolve-url-loader to fix ./data: urls in sass (#31134) 2021-11-08 18:37:25 +00:00
custom-error Enable SWC by default when there is no custom Babel config (#29811) 2021-10-23 10:21:44 +02:00
custom-error-page-exception Alias react and react-dom by default (#38245) 2022-07-01 23:57:45 +00:00
custom-page-extension Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
custom-routes Update rewrite destination for flakey rewrite tests (#36519) 2022-04-27 13:04:16 -05:00
custom-routes-catchall Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
custom-routes-i18n Include message body in redirect responses (#31886) 2021-12-16 05:41:43 +00:00
custom-server fix: hardcoded protocol in request url (#37925) 2022-06-24 19:31:23 -05:00
custom-server-types Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
data-fetching-errors fix: ensure revalidation error is logged from response-cache (#32657) 2022-01-05 19:40:04 +00:00
dedupes-scripts Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
development-hmr-refresh Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
development-runtime-config Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
disable-js Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
disable-js-preload Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
dist-dir Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
document-file-dependencies Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
document-head-warnings Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
duplicate-pages Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
dynamic-optional-routing Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
dynamic-optional-routing-root-fallback Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
dynamic-optional-routing-root-static-paths Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
dynamic-require Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
dynamic-route-rename Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
dynamic-routing Fix pageProps is missing when route changes (#38178) 2022-06-30 18:13:07 +00:00
edge-runtime-dynamic-code fix(edge): error handling for edge route and middleware is inconsistent (#38401) 2022-07-21 14:53:23 +00:00
edge-runtime-module-errors feat: build edge functions with node.js modules and fail at runtime (#38234) 2022-07-06 20:54:44 +00:00
edge-runtime-with-node.js-apis fix(edge): error handling for edge route and middleware is inconsistent (#38401) 2022-07-21 14:53:23 +00:00
empty-object-getInitialProps Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
empty-project Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
env-config Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
error-in-error Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
error-load-fail Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
error-plugin-stack-overflow test and fix error reporting for stack overflows and other fatal errors (#30169) 2021-10-22 10:30:50 +00:00
errors-on-output-to-public Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
errors-on-output-to-static Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
eslint [ESLint] Make src/ a default linting directory (#38810) 2022-07-19 20:58:13 +00:00
export fix(#30300): force export 404.html (#36827) 2022-05-11 18:44:25 +00:00
export-404 fix(#36855/#30300): export 404.html correctly (#36910) 2022-05-14 13:57:48 +00:00
export-default-map Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
export-default-map-serverless Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
export-dynamic-pages Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
export-dynamic-pages-serverless Fix typos (#35683) 2022-03-28 22:53:51 -05:00
export-fallback-true-error Update check for fallback pages during export (#33323) 2022-01-17 14:44:45 +00:00
export-getInitialProps-warn feat(next export): add warning if using getInitialProps (#37642) 2022-06-13 02:34:23 +00:00
export-image-default Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
export-image-loader Add images.unoptimized: true for easy next export (#37698) 2022-06-16 20:20:17 +00:00
export-intent Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
export-no-build Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
export-progress-status-message Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
export-serverless chore: replace deprecated String.prototype.substr() (#35421) 2022-03-24 17:49:38 -04:00
export-subfolders Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
export-subfolders-serverless Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
external-assets Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
externalize-next-server Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
externals-esm fix external fallback for invalid packages (#30427) 2021-10-27 13:53:44 +00:00
externals-esm-loose fixes #29553 (#29611) 2021-10-04 23:57:27 +00:00
fallback-false-rewrite Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
fallback-modules Remove webpack 4 support (#29660) 2021-10-06 17:40:01 +02:00
fallback-route-params Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
fetch-polyfill Remove un-needed test dependency (#32616) 2022-01-03 10:08:30 -06:00
fetch-polyfill-ky-universal Remove un-needed test dependency (#32616) 2022-01-03 10:08:30 -06:00
file-serving Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
filesystempublicroutes Remove un-needed test dependency (#32616) 2022-01-03 10:08:30 -06:00
firebase-grpc Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
font-optimization Fix font-optimization snapshot test (#37432) 2022-06-03 15:59:27 +00:00
future Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
getinitialprops Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
getserversideprops-export-error Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
getserversideprops-preview Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
gip-identifier Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
gsp-build-errors Ensure we do not ignore module not found errors during build (#38026) 2022-06-26 19:34:58 -05:00
gsp-extension Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
gssp-pageProps-merge Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
gssp-redirect test: add inline flight response reuse test (#34364) 2022-02-15 18:53:45 +00:00
gssp-redirect-base-path test: add inline flight response reuse test (#34364) 2022-02-15 18:53:45 +00:00
gssp-redirect-with-rewrites Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
handle-non-page-in-pages Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
handles-export-errors Check stack property for page export exceptions (#32289) 2021-12-16 09:41:45 +01:00
hashbang Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
hydrate-then-render Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
hydration Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
i18n-support Refactor server routing (#37725) 2022-06-16 21:43:01 +00:00
i18n-support-base-path Refactor server routing (#37725) 2022-06-16 21:43:01 +00:00
i18n-support-catchall Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
i18n-support-custom-error Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
i18n-support-fallback-rewrite Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
i18n-support-fallback-rewrite-legacy Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
i18n-support-index-rewrite Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
i18n-support-same-page-hash-change Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
image-component Improve next/image error message when src prop is missing (#38847) 2022-07-20 21:26:38 +00:00
image-future Improve next/image error message when src prop is missing (#38847) 2022-07-20 21:26:38 +00:00
image-optimizer Correctly check if width is lte 0 in Image Optimization API (#38226) 2022-07-06 14:09:29 +00:00
import-assertion test: organize react 18 tests (#36003) 2022-04-08 15:29:35 +00:00
index-index Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
initial-ref Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
invalid-config-values Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
invalid-custom-routes Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
invalid-document-image-import Fix incorrect _document.js error when disableStaticImages: true (#30768) 2021-11-02 20:25:12 +00:00
invalid-href Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
invalid-multi-match Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
invalid-page-automatic-static-optimization Ensure non-error thrown in getStaticPaths shows correctly (#33753) 2022-01-27 16:31:54 -06:00
invalid-revalidate-values Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
invalid-server-options Update err.sh links to use nextjs.org/docs/messages instead (#23353) 2021-03-29 10:25:00 +02:00
jsconfig Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
jsconfig-baseurl Update to filter loader specific files from traces (#32267) 2021-12-14 10:41:10 -06:00
jsconfig-empty Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
jsconfig-paths Update to filter loader specific files from traces (#32267) 2021-12-14 10:41:10 -06:00
json-serialize-original-error Fix bug with "Circular Structure" error (#23905) 2022-02-09 20:28:24 -06:00
legacy-pkg-gently Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
legacy-ssg-methods-error Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
link-ref Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
link-with-encoding Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
link-without-router Only prefetch Link if router is in context (#19857) 2021-01-06 16:19:57 +00:00
middleware-build-errors feat: build edge functions with node.js modules and fail at runtime (#38234) 2022-07-06 20:54:44 +00:00
middleware-dev-errors fix(edge): error handling for edge route and middleware is inconsistent (#38401) 2022-07-21 14:53:23 +00:00
middleware-nested-error feat: build edge functions with node.js modules and fail at runtime (#38234) 2022-07-06 20:54:44 +00:00
middleware-overrides-node.js-api fix(edge): error handling for edge route and middleware is inconsistent (#38401) 2022-07-21 14:53:23 +00:00
middleware-prefetch Fix hard navigation guard on popstate and handle fetching fresh data (#37970) 2022-06-24 10:50:41 -05:00
middleware-src fix(#37106): middleware can not be loaded from src folder (#37428) 2022-06-08 14:10:05 +00:00
missing-document-component-error Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
mixed-ssg-serverprops-error improve getStaticProps error message (#34287) 2022-05-22 16:50:21 -05:00
next-dynamic chore: bump react dev dep to 18.2 (#37697) 2022-06-15 10:14:43 -05:00
next-dynamic-css Remove webpack 4 support (#29660) 2021-10-06 17:40:01 +02:00
next-dynamic-lazy-compilation chore: bump react dev dep to 18.2 (#37697) 2022-06-15 10:14:43 -05:00
no-duplicate-compile-error Remove full reload overlay and warn in CLI instead (#37874) 2022-06-22 15:41:23 +00:00
no-op-export/test Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
no-override-next-props Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
no-page-props Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
node-fetch-keep-alive Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
non-next-dist-exclude Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
non-standard-node-env-warning Ensure ENOENT error is not ignored when loading pages (#37486) 2022-06-06 14:35:26 -04:00
not-found-revalidate Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
nullish-config simplify output messages (#31454) 2021-11-16 15:57:30 +00:00
numeric-sep Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
ondemand Remove un-needed test dependency (#32616) 2022-01-03 10:08:30 -06:00
optimized-loading Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
optional-chaining-nullish-coalescing Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
page-config Add page config swc transform (#30183) 2021-10-22 16:08:09 -07:00
page-extensions ignore .d.ts files inside pages folder (#30728) 2022-01-01 17:16:03 +00:00
plugin-mdx Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
polyfilling-minimal Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
polyfills Fix global process testing for the process polyfill (#33220) 2022-01-13 16:44:55 +00:00
port-env-var Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
preload-viewport Update to not trigger revalidation during prefetch (#37201) 2022-05-29 23:05:23 +00:00
prerender Migrate prerender tests to new set-up (#29245) 2021-09-21 16:21:05 +02:00
prerender-fallback-aspath Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
prerender-fallback-encoding Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
prerender-invalid-catchall-params Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
prerender-invalid-paths Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
prerender-legacy Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
prerender-no-revalidate Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
prerender-preview Update flakey preview test (#37518) 2022-06-07 11:33:14 -05:00
prerender-revalidate Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
preview-fallback Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
process-env-stub Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
production Ensure history navigation is correct after query update (#38086) 2022-06-27 21:08:08 -05:00
production-browser-sourcemaps Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
production-build-dir Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
production-config Add process env NEXT_RUNTIME (#36383) 2022-04-26 17:54:28 +00:00
production-nav Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
production-start-no-build Don't swallow test failures caused by POSIX signals (#32688) 2021-12-21 12:52:07 -06:00
production-swcminify Refactor Page Paths utils and Middleware Plugin (#36576) 2022-04-30 11:19:27 +00:00
profiling Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
query-with-encoding Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
re-export-all-exports-from-page-disallowed Move swcMinify out of experimental (#29810) 2021-10-25 13:49:11 +02:00
react-18 Fix invalid config warning for runtime config (#38122) 2022-06-28 15:54:45 -05:00
react-18-invalid-config Ensure server components entries are not part of the pages buildmanifest (#38416) 2022-07-07 22:17:17 +02:00
react-profiling-mode Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
react-streaming Migrate rsc tests to app dir tests (#38158) 2022-06-29 23:12:57 +00:00
read-only-source-hmr Don't require source files to be writeable in dev mode (#30758) 2021-11-02 19:48:23 +00:00
relay-analytics add method to measure Interaction to Next Paint (INP) (#36490) 2022-06-07 18:28:58 +00:00
relay-analytics-disabled Drop the unstable web vital hook and remove exports of flush effects (#36912) 2022-05-14 21:20:24 +00:00
relay-graphql-swc-multi-project Chore/stable swc compiler options (#34074) 2022-02-10 01:54:28 +00:00
relay-graphql-swc-single-project Chore/stable swc compiler options (#34074) 2022-02-10 01:54:28 +00:00
render-error-on-module-error Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
render-error-on-top-level-error Call Error.getInitialProps for the top level error (#21240) 2022-07-06 13:44:15 -05:00
repeated-slashes Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
required-server-files-ssr-404 Update matched path params priority (#37646) 2022-06-13 13:34:08 +00:00
revalidate-as-path Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
rewrite-with-browser-history Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
rewrites-client-resolving Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
rewrites-destination-query-array Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
rewrites-has-condition Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
rewrites-manual-href-as Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
root-optional-revalidate Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
route-index Escape string when converting to regexp (#31791) 2021-11-30 19:15:13 +00:00
route-indexes Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
route-load-cancel Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
route-load-cancel-css Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
router-hash-navigation fix(router): scroll to top when href="/" and hash already present (#32954) 2022-01-03 02:57:02 +00:00
router-is-ready Enable SWC by default when there is no custom Babel config (#29811) 2021-10-23 10:21:44 +02:00
router-is-ready-app-gip Enable SWC by default when there is no custom Babel config (#29811) 2021-10-23 10:21:44 +02:00
router-prefetch Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
script-loader [Script] Allow next/script to be placed in _document body (#37894) 2022-06-27 17:56:53 +00:00
scroll-back-restoration Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
scroll-forward-restoration Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
scss/test Fix: Cleaner error message when importing sass without it being installed in dev (#35051) 2022-05-22 06:56:18 +00:00
scss-fixtures Move resolve-url-loader into Next.js (#32932) 2022-01-02 16:16:17 -06:00
scss-modules/test use loader-utils 2 for resolve-url-loader to fix ./data: urls in sass (#31134) 2021-11-08 18:37:25 +00:00
server-asset-modules add support for new URL() (#28940) 2021-09-17 19:20:09 +00:00
server-side-dev-errors Don't convert error to string (#36804) 2022-05-11 17:02:15 +00:00
serverless Add deprecation note for target (#30200) 2021-10-24 10:38:24 -05:00
serverless-runtime-configs Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
serverless-trace Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
serverless-trace-revalidate Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
src-dir-support Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
src-dir-support-double-dir Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
ssg-data-404 Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
ssg-dynamic-routes-404-page Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
ssr-ctx Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
ssr-prepass Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
static-404 Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
static-page-name Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
styled-jsx-module Wait for shell resolve with gIP is customized in react 18 (#36792) 2022-05-11 13:25:23 +00:00
styled-jsx-plugin Move swcMinify out of experimental (#29810) 2021-10-25 13:49:11 +02:00
telemetry fix(next/build): correct payload for plugin telemetry (#38468) 2022-07-11 12:39:02 -05:00
trailing-slash-dist Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
trailing-slashes Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
trailing-slashes-href-resolving Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
trailing-slashes-rewrite Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
tsconfig-verifier Add support for tsconfig moduleResolution node | node12 | nodenext (#36189) 2022-04-15 17:09:12 +00:00
typeof-window-replace Enable SWC by default when there is no custom Babel config (#29811) 2021-10-23 10:21:44 +02:00
typescript fix(typescript): worker execution failed with custom next.config.js (#37125) 2022-05-23 20:30:48 +00:00
typescript-app-type-declarations Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
typescript-baseurl Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
typescript-custom-tsconfig feat: allow setting custom tsconfig file (#28104) 2021-09-23 22:52:05 +00:00
typescript-external-dir Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
typescript-filtered-files Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
typescript-hmr Remove full reload overlay and warn in CLI instead (#37874) 2022-06-22 15:41:23 +00:00
typescript-ignore-errors Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
typescript-only-remove-type-imports Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
typescript-paths Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
typescript-version-warning Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
typescript-workspaces-paths Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
undefined-webpack-config Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
url add support for new URL() (#28940) 2021-09-17 19:20:09 +00:00
url-imports test, fix and document all possible import types for URL imports (#30165) 2021-10-25 01:54:16 +02:00
webpack-config-mainjs Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
webpack-require-hook Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
with-electron Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
with-router Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
worker-webpack5 Update test set-up to leverage playwright when able to (#28634) 2021-09-13 14:36:25 +02:00
test-file.txt Add additional file serving tests (#12479) 2020-05-04 11:58:19 -05:00