rsnext/test/unit
Jiachi Liu e117c000e4
Redesign nextjs logging (#54713)
The current logging styles has been existed for a while, this PR gives a fresh impression for the logging output from Next.js.
We want to achieve few new goals that makes the output clean, modernized, sweet 🍫 .

Few goals are addressed with this redesign:

## Refresh Impression & Simplification

The new design of logging is much more information centralized and streamlined.

* Given a `ready` message at the begining when compilers are bootstrapped.
* Only show `compiled` event with green check mark indicating succesful compilation, this will merge the unclear `compiling` event which shows `(client and server)` before, now tell you the route compilation info in one line.

hello world app

### `next dev`

#### After vs Before


<img src="https://github.com/vercel/next.js/assets/4800338/9649b340-8241-4756-a2b3-a989f0b74003" height="120"> 
<img src="https://github.com/vercel/next.js/assets/4800338/ee181263-3dd4-40d0-9ffc-819a56b45900" height="120">  

 


 

### `next build`

#### After vs Before


<img src="https://github.com/vercel/next.js/assets/4800338/5db9829a-9ffc-49f0-b030-93ee92f5c248" width="360"> 
<img src="https://github.com/vercel/next.js/assets/4800338/b9527b83-27c8-4426-9c0d-c0d4072b7d58" width="360">





### error status

#### After vs Before

<img src="https://github.com/vercel/next.js/assets/4800338/00455226-ace7-468b-8d90-0d36bf038489" height="120"> 
<img src="https://github.com/vercel/next.js/assets/4800338/1be8c451-d3f0-465c-9ef7-6b0dde7cff85" height="120"> 



## Streamlization

If you have customized envs and experiments Next.js will give the brief in the early summary about your network information, env vars, and enabled experimental features

<img src="https://github.com/vercel/next.js/assets/4800338/ca1a7409-1532-46cb-850f-687e61e587b2" width="400">


## Polish

### fetching logging structure 

#### After vs Before
<img src="https://github.com/vercel/next.js/assets/4800338/97526397-dffe-4736-88ed-e5cbe5e945bd" width="400">
<img src="https://github.com/vercel/next.js/assets/4800338/ab77c907-5ab5-48bb-8347-6146d2e60932" width="400">


### Dedupe Duplicates

The logging is moved from `@next/env` to `next` itself, `@next/env` will only notify the invoker that the env is reloaded. Then the duplicated logs for the env reloading cases can be avoid.

#### After vs Before
<img src="https://github.com/vercel/next.js/assets/4800338/04799295-e739-4035-87aa-61cec962fc39" width="400">
<img src="https://github.com/vercel/next.js/assets/4800338/e29020c9-0031-4bf3-a21b-8b64633f43a2" width="400"> 


### Different indicators

Use unicode text icons for different situation: 
* passed -> check mark
* warning -> warning
* error -> red cross
* loading -> circle

<img src="https://github.com/vercel/next.js/assets/4800338/715c34bd-298f-4990-a5d7-e12e455ead44" width="400">



Co-authored-by: Tim Neutkens <6324199+timneutkens@users.noreply.github.com>
2023-09-05 11:40:00 +00:00
..
cssnano-simple test(unit): add cases for cssnano simple (#46862) 2023-03-07 06:28:53 +00:00
eslint-plugin-next Fix eslint async client component (#51952) 2023-06-28 20:03:32 -07:00
esm-interpolate Make esm default interpolation work with jest mock (#36877) 2022-05-13 16:39:38 +00:00
fixtures Fix static info parsing when export data fetching method as variable (#40317) 2022-09-07 09:28:15 -07:00
image-optimizer Add auto-detection of image/x-icon content type (#47013) 2023-03-10 20:36:33 +00:00
incremental-cache Update tag handling for app cache (#53321) 2023-08-31 15:17:40 -07:00
isolated Clean up leftover loaders (#46801) 2023-03-25 10:21:27 +01:00
next-image-loader fix(next/image): empty blur image when animated (#54028) 2023-08-15 02:17:40 +00:00
web-runtime Upgrade precompiled ua-parser-js (#54404) 2023-08-22 23:56:05 +00:00
accept-headers.test.ts (Fix)(Tests)Fix typo in unit testing (#47644) 2023-04-01 22:23:15 -07:00
babel-plugin-next-page-config.test.ts Babel & next-swc: Fix exporting page config with AsExpression (#32702) 2022-02-05 21:15:49 +00:00
babel-plugin-next-ssg-transform.test.ts Include submodules in exported type definition (#28316) 2021-11-26 14:46:56 +01:00
cli.test.ts Opt-into worker mode when appDir is enabled (#47857) 2023-04-11 22:26:49 +02:00
example.txt Add util for generating new tests/error documents (#33001) 2022-01-06 09:45:04 -06:00
find-config.test.ts Support postcss.config.cjs (#38486) 2022-07-18 14:34:29 -05:00
find-page-file.test.ts Support generate dynamic sitemaps for dynamic routes (#48867) 2023-04-26 20:41:37 +00:00
get-node-options-without-inspect.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
get-page-static-infos.test.ts ensure original matcher source is free of mutations (#47980) 2023-04-12 16:55:45 +02:00
get-project-dir.test.ts fix(next): dev server starting when importing a file using get-projec… (#38274) 2022-08-07 17:31:30 +00:00
getDisplayName.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
htmlescape.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
infer-get-server-side-props-type.test.ts fix: InferGetServerSidePropsType and InferGetStaticPropsType (#40635) 2022-09-20 15:25:01 -07:00
infer-get-static-props.test.ts fix: InferGetServerSidePropsType and InferGetStaticPropsType (#40635) 2022-09-20 15:25:01 -07:00
is-equal-node.unit.test.ts correctly assess node equality when nonce attribute is present (#27573) 2021-11-10 19:31:32 -06:00
is-serializable-props.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
jest-next-swc.test.ts Ensure mjs files are transformed with jest (#34698) 2022-03-09 13:49:58 +01:00
link-rendering.test.ts Update next/link default legacyBehavior (#42623) 2022-11-30 20:01:29 -08:00
link-warnings.test.tsx Update repo to use react 18 by default (#35888) 2022-04-05 21:51:47 +00:00
loadGetInitialProps.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
mitt.test.ts (Fix)(Tests)Fix typo in unit testing (#47644) 2023-04-01 22:23:15 -07:00
next-babel-loader-dev.test.ts Export RedirectType from next/navigation (#54729) 2023-08-29 11:05:44 -07:00
next-babel-loader-prod.test.ts Export RedirectType from next/navigation (#54729) 2023-08-29 11:05:44 -07:00
next-babel.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
next-dynamic.test.tsx Separate next/dynamic implementation for app and pages (#45565) 2023-02-04 01:45:35 +00:00
next-head-rendering.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
next-image-get-img-props.test.ts Add unstable_getImgProps export from next/image (#51205) 2023-06-29 01:35:08 +00:00
next-image-legacy.test.ts BREAKING CHANGE: Rename next/image to next/legacy/image & rename next/future/image to next/image (#41399) 2022-10-14 01:59:22 +00:00
next-image-new.test.ts fix: add missing <preload> for next/image in App Router (#52425) 2023-07-14 15:36:35 +00:00
next-server-utils.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
next-swc.test.ts Update swc_core to v0.75.23 (#48098) 2023-04-18 08:59:52 +02:00
oxford-comma.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
page-route-sorter.test.ts Revert "fix the dynamic routing of middleware" (#35932) 2022-04-06 14:35:52 +00:00
parse-page-static-info.test.ts Add export runtime test for pages and fully remove experimental.runtime (#48630) 2023-04-20 22:37:38 +00:00
parse-relative-url.test.ts fix(#33081): handle relative path correctly (#36823) 2022-05-22 16:43:48 +00:00
phaseConstants.test.ts Move unit tests to one folder and migrate them to TypeScript (#28427) 2021-08-24 07:52:45 -05:00
preserve-process-env.test.ts Do not re-assign process.env (#46914) 2023-03-09 14:41:50 -08:00
recursive-copy.test.ts Fix windows unit tests (#53412) 2023-07-31 18:06:18 -07:00
recursive-delete.test.ts File Reader Improvements (#54645) 2023-08-28 18:09:56 +00:00
recursive-readdir.test.ts File Reader Improvements (#54645) 2023-08-28 18:09:56 +00:00
router-add-base-path.test.ts Extract router utils to common functions (#37313) 2022-05-30 20:19:37 +02:00
split-cookies-string.test.ts Allow custom path for preview mode cookies (#38313) 2022-08-07 20:45:30 -05:00
validate-url.test.ts Fix canonical url for dynamic routes (#49512) 2023-05-09 16:31:06 -07:00
warn-removed-experimental-config.test.ts Redesign nextjs logging (#54713) 2023-09-05 11:40:00 +00:00
webpack-config-overrides.test.ts Update to leverage turbo for build/prepublish (#37280) 2022-05-30 19:05:27 -05:00
write-app-declarations.test.ts fix: generate next-env.d.ts file during next lint command (#46249) 2023-02-28 11:51:22 -08:00