2018-10-01 01:02:10 +02:00
|
|
|
{
|
|
|
|
"name": "next",
|
2024-02-21 00:21:37 +01:00
|
|
|
"version": "14.1.1-canary.65",
|
2019-01-21 13:46:01 +01:00
|
|
|
"description": "The React Framework",
|
2018-10-01 01:02:10 +02:00
|
|
|
"main": "./dist/server/next.js",
|
|
|
|
"license": "MIT",
|
2020-05-27 23:51:11 +02:00
|
|
|
"repository": "vercel/next.js",
|
|
|
|
"bugs": "https://github.com/vercel/next.js/issues",
|
2018-10-01 01:34:54 +02:00
|
|
|
"homepage": "https://nextjs.org",
|
2021-11-26 14:46:56 +01:00
|
|
|
"types": "index.d.ts",
|
2018-10-01 01:02:10 +02:00
|
|
|
"files": [
|
|
|
|
"dist",
|
|
|
|
"app.js",
|
2019-04-24 16:47:50 +02:00
|
|
|
"app.d.ts",
|
2018-10-01 01:02:10 +02:00
|
|
|
"babel.js",
|
2019-04-24 16:47:50 +02:00
|
|
|
"babel.d.ts",
|
2018-10-01 01:02:10 +02:00
|
|
|
"client.js",
|
2019-04-24 16:47:50 +02:00
|
|
|
"client.d.ts",
|
2022-11-10 04:26:34 +01:00
|
|
|
"compat",
|
2023-05-02 17:19:02 +02:00
|
|
|
"cache.js",
|
|
|
|
"cache.d.ts",
|
2018-10-01 01:02:10 +02:00
|
|
|
"config.js",
|
2019-04-24 16:47:50 +02:00
|
|
|
"config.d.ts",
|
2018-10-01 01:02:10 +02:00
|
|
|
"constants.js",
|
2019-04-24 16:47:50 +02:00
|
|
|
"constants.d.ts",
|
2018-10-01 01:02:10 +02:00
|
|
|
"document.js",
|
2019-04-24 16:47:50 +02:00
|
|
|
"document.d.ts",
|
2018-10-01 01:02:10 +02:00
|
|
|
"dynamic.js",
|
2019-04-24 16:47:50 +02:00
|
|
|
"dynamic.d.ts",
|
2018-10-01 01:02:10 +02:00
|
|
|
"error.js",
|
2019-04-24 16:47:50 +02:00
|
|
|
"error.d.ts",
|
2022-06-25 01:30:30 +02:00
|
|
|
"future",
|
2022-10-14 03:59:22 +02:00
|
|
|
"legacy",
|
2021-06-03 13:56:50 +02:00
|
|
|
"script.js",
|
|
|
|
"script.d.ts",
|
2021-10-20 19:52:11 +02:00
|
|
|
"server.js",
|
|
|
|
"server.d.ts",
|
2018-10-01 01:02:10 +02:00
|
|
|
"head.js",
|
2019-04-24 16:47:50 +02:00
|
|
|
"head.d.ts",
|
2020-10-16 14:40:05 +02:00
|
|
|
"image.js",
|
|
|
|
"image.d.ts",
|
2018-10-01 01:02:10 +02:00
|
|
|
"link.js",
|
2019-04-24 16:47:50 +02:00
|
|
|
"link.d.ts",
|
2019-02-14 16:22:57 +01:00
|
|
|
"router.js",
|
2019-04-24 16:47:50 +02:00
|
|
|
"router.d.ts",
|
2021-11-11 11:48:12 +01:00
|
|
|
"jest.js",
|
|
|
|
"jest.d.ts",
|
2019-04-24 16:47:50 +02:00
|
|
|
"amp.js",
|
2019-04-25 13:51:06 +02:00
|
|
|
"amp.d.ts",
|
2023-10-19 16:26:48 +02:00
|
|
|
"og.js",
|
|
|
|
"og.d.ts",
|
2021-11-26 14:46:56 +01:00
|
|
|
"index.d.ts",
|
2019-06-24 20:26:17 +02:00
|
|
|
"types/index.d.ts",
|
2021-06-22 20:50:59 +02:00
|
|
|
"types/global.d.ts",
|
2022-07-13 20:31:55 +02:00
|
|
|
"types/compiled.d.ts",
|
2022-09-26 21:59:38 +02:00
|
|
|
"image-types/global.d.ts",
|
2023-02-15 02:26:01 +01:00
|
|
|
"navigation-types/navigation.d.ts",
|
|
|
|
"navigation-types/compat/navigation.d.ts",
|
2022-10-13 11:13:39 +02:00
|
|
|
"font",
|
|
|
|
"navigation.js",
|
|
|
|
"navigation.d.ts",
|
|
|
|
"headers.js",
|
2023-02-15 02:26:01 +01:00
|
|
|
"headers.d.ts",
|
2023-03-24 11:13:50 +01:00
|
|
|
"navigation-types",
|
|
|
|
"web-vitals.js",
|
2023-08-14 20:45:50 +02:00
|
|
|
"web-vitals.d.ts",
|
|
|
|
"experimental/testmode/playwright.js",
|
|
|
|
"experimental/testmode/playwright.d.ts",
|
|
|
|
"experimental/testmode/playwright/msw.js",
|
|
|
|
"experimental/testmode/playwright/msw.d.ts",
|
|
|
|
"experimental/testmode/proxy.js",
|
|
|
|
"experimental/testmode/proxy.d.ts"
|
2018-10-01 01:02:10 +02:00
|
|
|
],
|
|
|
|
"bin": {
|
|
|
|
"next": "./dist/bin/next"
|
|
|
|
},
|
|
|
|
"scripts": {
|
2021-02-03 18:02:44 +01:00
|
|
|
"dev": "taskr",
|
2018-10-01 01:02:10 +02:00
|
|
|
"release": "taskr release",
|
2023-09-20 20:19:43 +02:00
|
|
|
"build": "pnpm release",
|
2022-05-31 02:05:27 +02:00
|
|
|
"prepublishOnly": "cd ../../ && turbo run build",
|
2023-02-15 02:26:01 +01:00
|
|
|
"types": "tsc --declaration --emitDeclarationOnly --stripInternal --declarationDir dist",
|
2022-02-25 01:59:18 +01:00
|
|
|
"typescript": "tsec --noEmit",
|
2023-04-18 14:12:00 +02:00
|
|
|
"ncc-compiled": "ncc cache clean && taskr ncc"
|
2018-10-01 01:02:10 +02:00
|
|
|
},
|
|
|
|
"taskr": {
|
|
|
|
"requires": [
|
2023-09-08 18:05:29 +02:00
|
|
|
"./taskfile-webpack.js",
|
2019-02-22 17:33:53 +01:00
|
|
|
"./taskfile-ncc.js",
|
2022-12-14 16:06:53 +01:00
|
|
|
"./taskfile-swc.js",
|
|
|
|
"./taskfile-watch.js"
|
2018-10-01 01:02:10 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
"dependencies": {
|
2024-02-21 00:21:37 +01:00
|
|
|
"@next/env": "14.1.1-canary.65",
|
2024-02-05 11:22:32 +01:00
|
|
|
"@swc/helpers": "0.5.5",
|
2023-03-24 13:01:10 +01:00
|
|
|
"busboy": "1.6.0",
|
2024-01-18 17:14:38 +01:00
|
|
|
"caniuse-lite": "^1.0.30001579",
|
2023-11-27 16:19:45 +01:00
|
|
|
"graceful-fs": "^4.2.11",
|
2023-09-29 23:57:35 +02:00
|
|
|
"postcss": "8.4.31",
|
2024-01-08 19:45:19 +01:00
|
|
|
"styled-jsx": "5.1.1"
|
2018-10-01 01:02:10 +02:00
|
|
|
},
|
|
|
|
"peerDependencies": {
|
2023-04-04 11:56:59 +02:00
|
|
|
"@opentelemetry/api": "^1.1.0",
|
2022-10-29 22:34:03 +02:00
|
|
|
"react": "^18.2.0",
|
|
|
|
"react-dom": "^18.2.0",
|
2023-02-22 16:15:07 +01:00
|
|
|
"sass": "^1.3.0"
|
2018-10-01 01:02:10 +02:00
|
|
|
},
|
2021-01-04 16:30:46 +01:00
|
|
|
"peerDependenciesMeta": {
|
|
|
|
"sass": {
|
|
|
|
"optional": true
|
|
|
|
},
|
2023-02-22 16:08:22 +01:00
|
|
|
"@opentelemetry/api": {
|
|
|
|
"optional": true
|
2021-01-04 16:30:46 +01:00
|
|
|
}
|
2020-10-21 12:21:42 +02:00
|
|
|
},
|
2018-10-01 01:02:10 +02:00
|
|
|
"devDependencies": {
|
2022-05-30 02:38:23 +02:00
|
|
|
"@ampproject/toolbox-optimizer": "2.8.3",
|
2023-10-17 04:25:57 +02:00
|
|
|
"@babel/code-frame": "7.22.5",
|
|
|
|
"@babel/core": "7.22.5",
|
|
|
|
"@babel/eslint-parser": "7.22.5",
|
|
|
|
"@babel/generator": "7.22.5",
|
|
|
|
"@babel/plugin-proposal-class-properties": "7.18.6",
|
|
|
|
"@babel/plugin-proposal-export-namespace-from": "7.18.9",
|
|
|
|
"@babel/plugin-proposal-numeric-separator": "7.18.6",
|
|
|
|
"@babel/plugin-proposal-object-rest-spread": "7.20.7",
|
2020-11-06 03:33:14 +01:00
|
|
|
"@babel/plugin-syntax-bigint": "7.8.3",
|
|
|
|
"@babel/plugin-syntax-dynamic-import": "7.8.3",
|
2023-10-17 04:25:57 +02:00
|
|
|
"@babel/plugin-syntax-import-assertions": "7.22.5",
|
|
|
|
"@babel/plugin-syntax-jsx": "7.22.5",
|
|
|
|
"@babel/plugin-transform-modules-commonjs": "7.22.5",
|
|
|
|
"@babel/plugin-transform-runtime": "7.22.5",
|
|
|
|
"@babel/preset-env": "7.22.5",
|
|
|
|
"@babel/preset-react": "7.22.5",
|
|
|
|
"@babel/preset-typescript": "7.22.5",
|
|
|
|
"@babel/runtime": "7.22.5",
|
|
|
|
"@babel/traverse": "7.22.5",
|
|
|
|
"@babel/types": "7.22.5",
|
2023-03-27 05:29:28 +02:00
|
|
|
"@capsizecss/metrics": "1.1.0",
|
2024-02-05 20:18:08 +01:00
|
|
|
"@edge-runtime/cookies": "4.0.2",
|
2023-10-16 09:08:44 +02:00
|
|
|
"@edge-runtime/ponyfill": "2.4.1",
|
2024-02-05 20:18:08 +01:00
|
|
|
"@edge-runtime/primitives": "4.0.2",
|
2021-12-20 14:01:35 +01:00
|
|
|
"@hapi/accept": "5.0.2",
|
2023-04-17 20:52:52 +02:00
|
|
|
"@jest/transform": "29.5.0",
|
|
|
|
"@jest/types": "29.5.0",
|
2023-08-15 04:31:00 +02:00
|
|
|
"@mswjs/interceptors": "0.23.0",
|
feat(next-swc): support wasm32-* build target (#61586)
<!-- 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
### How?
Closes NEXT-
Fixes #
-->
### What?
This PR introduces a ground work to generate wasm bindings package from
our napi bindings. This doesn't actually replace anything yet, however
aim to establish our napi bindings package can be built against wasm32
target.
### Why?
We currently have two bindings package to generate native / wasm target
support, one for napi and one other for wasm. Recently napi-rs started
to support to generate bindings for the wasm directly - which means we
can get rid of the wasm-pack based bindings code entirely and maintain a
single bindings code only.
This'll makes our `next-swc` simpler as well, since the invocation to
the bindings now becomes identical we don't have to additional wasm
specific logics to invoke functions (i.e transform, transformsync..).
Also napi generates wasi-supported wasm bindings, provides few more
features to the current wasm bindings.
#### Good
- Async napi binding fn works transparently (`transform`, `minify`...)
- (Experimental) thread supports depends on node.js runtime
- Wasi support: i.e it can even read filesystem directly!
#### Things to consider
- node.js's wasi support is experimental yet
- napi-rs's wasm support is in beta yet, specifically `packaging`
generated wasm output.
Due to `things to consider` reasons, this PR does not replace existing
wasm target yet. We should be able to plan out things later.
**What happens to the turbopack api in napi bindings?**
Simply put, this **does not support turbopack in wasm**. Build works by
disabling turbopack (more notably, underlying dependency doesn't support
wasm) features. It is something to explore separately.
Closes PACK-2367
There is a branch at https://github.com/vercel/next.js/pull/61586 shows
quick demo for importing, running sync / async / read external files.
2024-02-06 19:15:13 +01:00
|
|
|
"@napi-rs/triples": "1.2.0",
|
2024-02-21 00:21:37 +01:00
|
|
|
"@next/polyfill-module": "14.1.1-canary.65",
|
|
|
|
"@next/polyfill-nomodule": "14.1.1-canary.65",
|
|
|
|
"@next/react-refresh-utils": "14.1.1-canary.65",
|
|
|
|
"@next/swc": "14.1.1-canary.65",
|
2023-10-31 19:46:38 +01:00
|
|
|
"@opentelemetry/api": "1.6.0",
|
2024-02-14 20:14:24 +01:00
|
|
|
"@playwright/test": "1.41.2",
|
2018-10-01 01:02:10 +02:00
|
|
|
"@taskr/clear": "1.1.0",
|
2018-10-07 15:04:43 +02:00
|
|
|
"@taskr/esnext": "1.1.0",
|
2019-03-19 00:21:18 +01:00
|
|
|
"@types/amphtml-validator": "1.0.0",
|
2020-12-29 21:10:08 +01:00
|
|
|
"@types/babel__code-frame": "7.0.2",
|
|
|
|
"@types/babel__core": "7.1.12",
|
|
|
|
"@types/babel__generator": "7.6.2",
|
|
|
|
"@types/babel__template": "7.4.0",
|
|
|
|
"@types/babel__traverse": "7.11.0",
|
2022-02-25 03:04:02 +01:00
|
|
|
"@types/bytes": "3.1.1",
|
2019-08-29 18:43:06 +02:00
|
|
|
"@types/ci-info": "2.0.0",
|
2019-07-29 20:35:09 +02:00
|
|
|
"@types/compression": "0.0.36",
|
2021-11-02 00:23:24 +01:00
|
|
|
"@types/content-disposition": "0.5.4",
|
2019-09-05 16:11:08 +02:00
|
|
|
"@types/content-type": "1.1.3",
|
2020-04-03 19:18:04 +02:00
|
|
|
"@types/cookie": "0.3.3",
|
2019-07-30 23:35:15 +02:00
|
|
|
"@types/cross-spawn": "6.0.0",
|
2020-04-29 17:04:42 +02:00
|
|
|
"@types/debug": "4.1.5",
|
2023-02-22 16:08:22 +01:00
|
|
|
"@types/express-serve-static-core": "4.17.33",
|
2018-12-07 15:52:29 +01:00
|
|
|
"@types/fresh": "0.5.0",
|
2022-05-29 06:35:16 +02:00
|
|
|
"@types/glob": "7.1.1",
|
2023-11-27 16:19:45 +01:00
|
|
|
"@types/graceful-fs": "4.1.9",
|
2023-01-10 16:06:36 +01:00
|
|
|
"@types/jsonwebtoken": "9.0.0",
|
2023-09-07 20:46:05 +02:00
|
|
|
"@types/lodash": "4.14.198",
|
2019-12-09 21:08:15 +01:00
|
|
|
"@types/lodash.curry": "4.1.6",
|
2019-09-24 10:50:04 +02:00
|
|
|
"@types/lru-cache": "5.1.0",
|
2020-03-29 19:17:06 +02:00
|
|
|
"@types/path-to-regexp": "1.7.0",
|
2024-01-19 20:56:16 +01:00
|
|
|
"@types/picomatch": "2.3.3",
|
2022-10-11 16:11:57 +02:00
|
|
|
"@types/platform": "1.3.4",
|
2023-11-08 00:55:06 +01:00
|
|
|
"@types/react": "18.2.37",
|
|
|
|
"@types/react-dom": "18.2.15",
|
2023-04-21 11:33:23 +02:00
|
|
|
"@types/react-is": "17.0.3",
|
2020-08-06 16:41:11 +02:00
|
|
|
"@types/semver": "7.3.1",
|
2019-09-05 16:11:08 +02:00
|
|
|
"@types/send": "0.14.4",
|
2022-10-11 16:11:57 +02:00
|
|
|
"@types/shell-quote": "1.7.1",
|
2023-06-08 17:52:17 +02:00
|
|
|
"@types/tar": "6.1.5",
|
2019-05-23 09:52:36 +02:00
|
|
|
"@types/text-table": "0.2.1",
|
2021-10-20 19:52:11 +02:00
|
|
|
"@types/ua-parser-js": "0.7.36",
|
|
|
|
"@types/uuid": "8.3.1",
|
2021-09-21 19:17:16 +02:00
|
|
|
"@types/webpack-sources1": "npm:@types/webpack-sources@0.1.5",
|
2021-10-15 09:09:54 +02:00
|
|
|
"@types/ws": "8.2.0",
|
2022-08-29 18:56:02 +02:00
|
|
|
"@vercel/ncc": "0.34.0",
|
2024-02-14 00:53:01 +01:00
|
|
|
"@vercel/nft": "0.26.4",
|
2024-02-20 19:13:00 +01:00
|
|
|
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-240220.5",
|
2021-12-20 14:01:35 +01:00
|
|
|
"acorn": "8.5.0",
|
2022-02-04 03:33:38 +01:00
|
|
|
"amphtml-validator": "1.0.35",
|
2022-10-11 16:11:57 +02:00
|
|
|
"anser": "1.4.9",
|
2019-03-24 23:38:03 +01:00
|
|
|
"arg": "4.1.0",
|
2021-12-20 16:28:17 +01:00
|
|
|
"assert": "2.0.0",
|
2020-03-29 00:27:09 +01:00
|
|
|
"async-retry": "1.2.3",
|
|
|
|
"async-sema": "3.0.0",
|
2021-01-15 02:51:45 +01:00
|
|
|
"babel-plugin-transform-define": "2.0.0",
|
|
|
|
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
|
2021-12-20 14:01:35 +01:00
|
|
|
"browserify-zlib": "0.2.0",
|
2024-01-18 17:14:38 +01:00
|
|
|
"browserslist": "4.22.2",
|
2021-12-20 14:01:35 +01:00
|
|
|
"buffer": "5.6.0",
|
2022-02-25 11:15:18 +01:00
|
|
|
"bytes": "3.1.1",
|
2020-04-09 16:23:04 +02:00
|
|
|
"ci-info": "watson/ci-info#f43f6a1cefff47fb361c88cf4b943fdbcaafe540",
|
2021-08-04 23:53:15 +02:00
|
|
|
"cli-select": "1.1.2",
|
2023-01-13 23:55:34 +01:00
|
|
|
"client-only": "0.0.1",
|
2020-09-01 17:29:25 +02:00
|
|
|
"comment-json": "3.0.3",
|
2020-03-29 00:56:38 +01:00
|
|
|
"compression": "1.7.4",
|
2020-03-29 17:46:33 +02:00
|
|
|
"conf": "5.0.0",
|
2021-12-20 14:01:35 +01:00
|
|
|
"constants-browserify": "1.0.0",
|
2021-11-02 00:23:24 +01:00
|
|
|
"content-disposition": "0.5.3",
|
2020-03-29 00:56:38 +01:00
|
|
|
"content-type": "1.0.4",
|
2020-05-11 02:48:57 +02:00
|
|
|
"cookie": "0.4.1",
|
2023-02-14 23:27:08 +01:00
|
|
|
"cross-spawn": "7.0.3",
|
2021-12-20 14:01:35 +01:00
|
|
|
"crypto-browserify": "3.12.0",
|
2022-10-11 16:11:57 +02:00
|
|
|
"css.escape": "1.5.1",
|
2023-02-24 19:05:21 +01:00
|
|
|
"cssnano-preset-default": "5.2.14",
|
2022-10-11 16:11:57 +02:00
|
|
|
"data-uri-to-buffer": "3.0.1",
|
2020-04-29 17:04:42 +02:00
|
|
|
"debug": "4.1.1",
|
2020-03-29 01:18:22 +01:00
|
|
|
"devalue": "2.0.1",
|
2021-12-20 14:01:35 +01:00
|
|
|
"domain-browser": "4.19.0",
|
2024-02-05 20:18:08 +01:00
|
|
|
"edge-runtime": "2.5.4",
|
2021-12-20 14:01:35 +01:00
|
|
|
"events": "3.3.0",
|
2020-05-11 02:48:57 +02:00
|
|
|
"find-up": "4.1.0",
|
2020-03-29 01:27:13 +01:00
|
|
|
"fresh": "0.5.2",
|
2024-02-08 12:00:34 +01:00
|
|
|
"get-orientation": "1.1.2",
|
2021-08-16 21:29:11 +02:00
|
|
|
"glob": "7.1.7",
|
2020-03-29 01:29:14 +01:00
|
|
|
"gzip-size": "5.1.1",
|
2020-12-16 23:02:39 +01:00
|
|
|
"http-proxy": "1.18.1",
|
2023-03-08 21:23:32 +01:00
|
|
|
"http-proxy-agent": "5.0.0",
|
2021-12-20 16:28:17 +01:00
|
|
|
"https-browserify": "1.0.0",
|
2023-03-08 21:23:32 +01:00
|
|
|
"https-proxy-agent": "5.0.1",
|
2021-09-02 08:45:35 +02:00
|
|
|
"icss-utils": "5.1.0",
|
2020-03-30 03:37:41 +02:00
|
|
|
"ignore-loader": "0.1.2",
|
2024-02-08 12:00:34 +01:00
|
|
|
"image-size": "1.0.0",
|
2020-03-29 01:33:35 +01:00
|
|
|
"is-docker": "2.0.0",
|
2020-05-11 02:48:57 +02:00
|
|
|
"is-wsl": "2.2.0",
|
2023-09-27 06:41:26 +02:00
|
|
|
"jest-worker": "27.5.1",
|
2023-01-04 00:45:05 +01:00
|
|
|
"json5": "2.2.3",
|
2023-01-10 16:06:36 +01:00
|
|
|
"jsonwebtoken": "9.0.0",
|
2023-02-18 07:24:40 +01:00
|
|
|
"loader-runner": "4.3.0",
|
2021-11-08 19:37:25 +01:00
|
|
|
"loader-utils2": "npm:loader-utils@2.0.0",
|
|
|
|
"loader-utils3": "npm:loader-utils@3.1.3",
|
2020-03-29 01:43:59 +01:00
|
|
|
"lodash.curry": "4.1.1",
|
2020-03-29 01:46:22 +01:00
|
|
|
"lru-cache": "5.1.1",
|
2021-11-02 22:56:11 +01:00
|
|
|
"mini-css-extract-plugin": "2.4.3",
|
2023-09-07 20:46:05 +02:00
|
|
|
"msw": "1.3.0",
|
2022-07-11 22:32:49 +02:00
|
|
|
"nanoid": "3.1.32",
|
2021-10-18 17:46:39 +02:00
|
|
|
"native-url": "0.3.4",
|
2020-11-04 22:52:49 +01:00
|
|
|
"neo-async": "2.6.1",
|
2022-06-06 21:36:29 +02:00
|
|
|
"node-html-parser": "5.3.3",
|
2020-04-22 04:52:07 +02:00
|
|
|
"ora": "4.0.4",
|
2021-12-20 14:01:35 +01:00
|
|
|
"os-browserify": "0.3.0",
|
|
|
|
"p-limit": "3.1.0",
|
|
|
|
"path-browserify": "1.0.1",
|
2020-03-29 19:17:06 +02:00
|
|
|
"path-to-regexp": "6.1.0",
|
2024-02-09 00:16:30 +01:00
|
|
|
"picomatch": "4.0.1",
|
2022-10-11 16:11:57 +02:00
|
|
|
"platform": "1.3.6",
|
2021-04-28 15:16:41 +02:00
|
|
|
"postcss-flexbugs-fixes": "5.0.2",
|
2021-09-02 08:45:35 +02:00
|
|
|
"postcss-modules-extract-imports": "3.0.0",
|
|
|
|
"postcss-modules-local-by-default": "4.0.0",
|
|
|
|
"postcss-modules-scope": "3.0.0",
|
|
|
|
"postcss-modules-values": "4.0.0",
|
2022-04-22 13:14:29 +02:00
|
|
|
"postcss-preset-env": "7.4.3",
|
2021-09-02 08:45:35 +02:00
|
|
|
"postcss-safe-parser": "6.0.0",
|
2022-04-22 13:14:29 +02:00
|
|
|
"postcss-scss": "4.0.3",
|
|
|
|
"postcss-value-parser": "4.2.0",
|
2021-12-20 14:01:35 +01:00
|
|
|
"process": "0.11.10",
|
2022-01-03 22:46:09 +01:00
|
|
|
"punycode": "2.1.1",
|
2021-12-20 14:01:35 +01:00
|
|
|
"querystring-es3": "0.2.1",
|
|
|
|
"raw-body": "2.4.1",
|
2022-10-23 00:44:19 +02:00
|
|
|
"react-is": "18.2.0",
|
2022-03-30 14:16:17 +02:00
|
|
|
"react-refresh": "0.12.0",
|
2021-12-21 16:13:45 +01:00
|
|
|
"regenerator-runtime": "0.13.4",
|
2022-02-11 22:14:09 +01:00
|
|
|
"sass-loader": "12.4.0",
|
2021-09-21 19:17:16 +02:00
|
|
|
"schema-utils2": "npm:schema-utils@2.7.1",
|
|
|
|
"schema-utils3": "npm:schema-utils@3.0.0",
|
2020-08-06 16:41:11 +02:00
|
|
|
"semver": "7.3.2",
|
2020-03-29 03:40:29 +02:00
|
|
|
"send": "0.17.1",
|
2023-01-13 23:55:34 +01:00
|
|
|
"server-only": "0.0.1",
|
2022-01-03 22:46:09 +01:00
|
|
|
"setimmediate": "1.0.5",
|
2022-10-11 16:11:57 +02:00
|
|
|
"shell-quote": "1.7.3",
|
2020-03-29 05:41:35 +02:00
|
|
|
"source-map": "0.6.1",
|
2024-01-22 10:04:34 +01:00
|
|
|
"source-map08": "npm:source-map@0.8.0-beta.0",
|
2022-10-11 16:11:57 +02:00
|
|
|
"stacktrace-parser": "0.1.10",
|
2022-01-17 16:17:22 +01:00
|
|
|
"stream-browserify": "3.0.0",
|
2021-12-20 14:01:35 +01:00
|
|
|
"stream-http": "3.1.1",
|
2023-08-14 20:45:50 +02:00
|
|
|
"strict-event-emitter": "0.5.0",
|
2020-03-29 05:05:26 +02:00
|
|
|
"string-hash": "1.1.3",
|
2021-12-20 16:28:17 +01:00
|
|
|
"string_decoder": "1.3.0",
|
2020-04-22 04:52:07 +02:00
|
|
|
"strip-ansi": "6.0.0",
|
2023-09-28 11:05:36 +02:00
|
|
|
"superstruct": "1.0.3",
|
2023-06-08 17:52:17 +02:00
|
|
|
"tar": "6.1.15",
|
2019-03-24 14:34:44 +01:00
|
|
|
"taskr": "1.1.0",
|
2024-01-24 08:42:08 +01:00
|
|
|
"terser": "5.27.0",
|
2023-09-08 18:05:29 +02:00
|
|
|
"terser-webpack-plugin": "5.3.9",
|
2019-03-19 00:21:18 +01:00
|
|
|
"text-table": "0.2.0",
|
2021-12-20 14:01:35 +01:00
|
|
|
"timers-browserify": "2.0.12",
|
|
|
|
"tty-browserify": "0.0.1",
|
2023-08-23 01:56:05 +02:00
|
|
|
"ua-parser-js": "1.0.35",
|
2020-11-04 22:52:49 +01:00
|
|
|
"unistore": "3.4.1",
|
2021-12-20 14:01:35 +01:00
|
|
|
"util": "0.12.4",
|
2021-12-20 16:28:17 +01:00
|
|
|
"uuid": "8.3.2",
|
2021-12-20 14:01:35 +01:00
|
|
|
"vm-browserify": "1.1.2",
|
2022-06-02 15:09:21 +02:00
|
|
|
"watchpack": "2.4.0",
|
2022-08-29 18:56:02 +02:00
|
|
|
"web-vitals": "3.0.0",
|
2024-02-14 20:14:24 +01:00
|
|
|
"webpack": "5.90.0",
|
2021-09-21 19:17:16 +02:00
|
|
|
"webpack-sources1": "npm:webpack-sources@1.4.3",
|
2022-01-12 17:46:59 +01:00
|
|
|
"webpack-sources3": "npm:webpack-sources@3.2.3",
|
refactor: rewrite config schema in zod (#56383)
The PR supersedes the https://github.com/vercel/next.js/pull/53150, which is way too outdated, has way too many conflicts, and also heavily relies on GitHub Copilot (which makes the progress slow and tedious).
The PR uses [`json-schema-to-zod`](https://github.com/StefanTerdell/json-schema-to-zod) (instead of the GitHub Copilot) to generate the zod schema, and manually replaces all generated `z.customRefine` with my hand-written zod schema.
TODO:
- [x] Convert schema
- [x] Reduce `z.any()` usage
- [x] Create human-readable errors from the `ZodError`
- [x] Update test cases to reflect the latest error message
-----
The benefit of using zod over ajv:
- Easier maintenance: zod schema is straightforward to compose.
- Better typescript support: config schema now strictly reflects the `NextConfig` type.
- Smaller installation size: by replacing `ajv` and `@segment/ajv-human-errors` w/ `zod`, I am able to reduce installation size by 114 KiB.
- Better Extension: the zod error message is easy to customize.
-----
In the previous PR https://github.com/vercel/next.js/pull/56083, @feedthejim replaces `zod` w/ `superstruct`. `superstruct` is lightweight and fast, which makes it perfect for creating simple schemas for RSC payload. But, this also means `superstruct` has its limitations compared to `zod`:
- `superstruct`'s syntax is different, and some utilities's usage is counter-intuitive:
- `z.array(z.string()).gt(1)` vs `s.size(s.array(s.string()), 1)`
- `z.numer().gt(1)` vs `s.size(s.number(), 1)`, `s.min(s.number(), 1)`
- `z.boolean().optional().nullable()` vs `s.nullable(s.optional(z.boolean()))`
- `superstruct` has weaker TypeScript support and worse DX compared to `zod` when composing huge schema:
- `zod.ZodType + z.object()` can provide a more detailed type mismatch message on which specific property is the culprit, while `Describe + s.object()` provides almost no information at all.
- `zod`'s schema is more powerful
- `z.function()` supports `z.args()` and `z.returns()`, while `superstruct` only has `s.func()`
- zod also has Promise type `z.promise()` and intersection type `z.and()`
- `superstruct`'s error is harder to parse compared to `zod`'s `ZodError`
So in the PR, I re-introduced `zod` for `next.config.js` validation.
2023-10-05 17:46:53 +02:00
|
|
|
"ws": "8.2.3",
|
|
|
|
"zod": "3.22.3"
|
2021-09-21 19:17:16 +02:00
|
|
|
},
|
2018-11-21 21:56:24 +01:00
|
|
|
"engines": {
|
2023-10-17 23:15:31 +02:00
|
|
|
"node": ">=18.17.0"
|
2018-10-01 01:02:10 +02:00
|
|
|
}
|
|
|
|
}
|