rsnext/packages/next/package.json

196 lines
5.4 KiB
JSON
Raw Normal View History

{
"name": "next",
2019-12-23 22:22:42 +01:00
"version": "9.1.7-canary.3",
2019-01-21 13:46:01 +01:00
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
"repository": "zeit/next.js",
"bugs": "https://github.com/zeit/next.js/issues",
2018-10-01 01:34:54 +02:00
"homepage": "https://nextjs.org",
"types": "types/index.d.ts",
"files": [
"dist",
"app.js",
"app.d.ts",
"babel.js",
"babel.d.ts",
"client.js",
"client.d.ts",
"config.js",
"config.d.ts",
"constants.js",
"constants.d.ts",
"data.js",
"data.d.ts",
"document.js",
"document.d.ts",
"dynamic.js",
"dynamic.d.ts",
"error.js",
"error.d.ts",
"head.js",
"head.d.ts",
"link.js",
"link.d.ts",
"router.js",
"router.d.ts",
"amp.js",
"amp.d.ts",
"types/index.d.ts",
"types/global.d.ts"
],
"bin": {
"next": "./dist/bin/next"
},
"scripts": {
"build": "taskr",
"release": "taskr release",
"prepublish": "npm run release && yarn types",
"types": "tsc --declaration --emitDeclarationOnly --declarationDir dist",
"typescript": "tsc --noEmit --declaration"
},
"taskr": {
"requires": [
"./taskfile-ncc.js",
"./taskfile-babel.js",
"./taskfile-typescript.js"
]
},
"dependencies": {
"@ampproject/toolbox-optimizer": "1.1.1",
"@babel/core": "7.7.2",
"@babel/plugin-proposal-class-properties": "7.7.0",
"@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4",
"@babel/plugin-proposal-object-rest-spread": "7.6.2",
"@babel/plugin-proposal-optional-chaining": "7.7.4",
"@babel/plugin-syntax-dynamic-import": "7.2.0",
"@babel/plugin-transform-modules-commonjs": "7.7.0",
"@babel/plugin-transform-runtime": "7.6.2",
"@babel/preset-env": "7.7.1",
"@babel/preset-modules": "0.1.1",
"@babel/preset-react": "7.7.0",
"@babel/preset-typescript": "7.7.2",
"@babel/runtime": "7.7.2",
"@babel/runtime-corejs2": "7.7.2",
"amphtml-validator": "1.0.23",
"async-retry": "1.2.3",
"async-sema": "3.0.0",
"autodll-webpack-plugin": "0.4.2",
"babel-core": "7.0.0-bridge.0",
"babel-loader": "8.0.6",
"babel-plugin-syntax-jsx": "6.18.0",
"babel-plugin-transform-define": "2.0.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.24",
"chalk": "2.4.2",
"ci-info": "2.0.0",
2019-09-05 16:11:08 +02:00
"compression": "1.7.4",
"conf": "5.0.0",
2019-09-05 16:11:08 +02:00
"content-type": "1.0.4",
"cookie": "0.4.0",
"css-loader": "3.3.0",
"cssnano-simple": "1.0.0",
"devalue": "2.0.1",
2019-09-05 16:11:08 +02:00
"etag": "1.8.1",
"file-loader": "4.2.0",
"find-up": "4.0.0",
"fork-ts-checker-webpack-plugin": "3.1.1",
"fresh": "0.5.2",
2019-12-14 07:39:59 +01:00
"gzip-size": "5.1.1",
"ignore-loader": "0.1.2",
"is-docker": "2.0.0",
2019-10-23 03:13:18 +02:00
"is-wsl": "2.1.1",
"jest-worker": "24.9.0",
"json5": "2.1.1",
"launch-editor": "2.2.1",
"loader-utils": "1.2.3",
"lodash.curry": "4.1.1",
Add experimental SPR support (#8832) * initial commit for SPRv2 * Add initial SPR cache handling * update SPR handling * Implement SPR handling in render * Update tests, handle caching with serverless next start, add TODOs, and update manifest generating * Handle no prerender-manifest from not being used * Fix url.parse error * Apply suggestions from code review Co-Authored-By: Joe Haddad <joe.haddad@zeit.co> * Replace set with constants in next-page-config * simplify sprStatus.used * Add error if getStaticProps is used with getInitialProps * Remove stale TODO * Update revalidate values in SPR cache for non-seeded routes * Apply suggestions from code review * Remove concurrency type * Rename variable for clarity * Add copying prerender files during export * Add comment for clarity * Fix exporting * Update comment * Add additional note * Rename variable * Update to not re-export SPR pages from build * Hard navigate when fetching data fails * Remove default extension * Add brackets * Add checking output files to prerender tests * Adjust export move logic * Clarify behavior of export aggregation * Update variable names for clarity * Update tests * Add comment * s/an oxymoron/contradictory/ * rename * Extract error case * Add tests for exporting SPR pages and update /_next/data endpoint to end with .json * Relocate variable * Adjust route building * Rename to unstable * Rename unstable_getStaticParams * Fix linting * Only add this when a data request * Update prerender data tests * s/isServerless/isLikeServerless/ * Don't rely on query for `next start` in serverless mode * Rename var * Update renderedDuringBuild check * Add test for dynamic param with bracket * Fix serverless next start handling * remove todo * Adjust comment * Update calculateRevalidate * Remove cache logic from render.tsx * Remove extra imports * Move SPR cache logic to next-server * Remove old isDynamic prop * Add calling App getInitialProps for SPR pages * Update revalidate logic * Add isStale to SprCacheValue * Update headers for SPR * add awaiting pendingRevalidation * Dont return null for revalidation render * Adjust logic * Be sure to remove coalesced render * Fix data for serverless * Create a method coalescing utility * Remove TODO * Extract send payload helper * Wrap in-line * Move around some code * Add tests for de-duping and revalidating * Update prerender manifest test
2019-09-24 10:50:04 +02:00
"lru-cache": "5.1.1",
"mini-css-extract-plugin": "0.8.0",
"mkdirp": "0.5.1",
"native-url": "0.2.3",
"node-fetch": "2.6.0",
"object-assign": "4.1.1",
2019-09-16 20:35:55 +02:00
"ora": "3.4.0",
"path-to-regexp": "6.1.0",
"pnp-webpack-plugin": "1.5.0",
"postcss-flexbugs-fixes": "4.1.0",
"postcss-loader": "3.0.0",
"postcss-preset-env": "6.7.0",
"prop-types": "15.7.2",
"prop-types-exact": "1.2.0",
2019-09-05 16:11:08 +02:00
"raw-body": "2.4.0",
"react-error-overlay": "5.1.6",
"react-is": "16.8.6",
2019-09-05 16:11:08 +02:00
"send": "0.17.1",
2019-02-10 04:56:14 +01:00
"source-map": "0.6.1",
2019-04-02 16:09:34 +02:00
"string-hash": "1.1.3",
"strip-ansi": "5.2.0",
"style-loader": "1.0.0",
"styled-jsx": "3.2.4",
"terser": "4.4.2",
"unfetch": "4.1.0",
"url": "0.11.0",
"url-polyfill": "1.1.7",
"use-subscription": "1.1.1",
"watchpack": "2.0.0-beta.5",
"webpack": "4.41.2",
"webpack-dev-middleware": "3.7.0",
"webpack-hot-middleware": "2.25.0",
"webpack-sources": "1.4.3",
"whatwg-fetch": "3.0.0"
},
"peerDependencies": {
"react": "^16.6.0",
"react-dom": "^16.6.0"
},
"devDependencies": {
"@taskr/clear": "1.1.0",
"@taskr/esnext": "1.1.0",
"@taskr/watch": "1.1.0",
"@types/amphtml-validator": "1.0.0",
"@types/babel-types": "7.0.7",
"@types/babel__core": "7.1.3",
"@types/babel__generator": "7.6.0",
"@types/babel__template": "7.0.2",
"@types/babel__traverse": "7.0.8",
"@types/ci-info": "2.0.0",
"@types/compression": "0.0.36",
2019-09-05 16:11:08 +02:00
"@types/content-type": "1.1.3",
"@types/cookie": "0.3.2",
2019-07-30 23:35:15 +02:00
"@types/cross-spawn": "6.0.0",
"@types/etag": "1.8.0",
"@types/find-up": "2.1.1",
"@types/fresh": "0.5.0",
"@types/json5": "0.0.30",
2019-01-14 16:19:20 +01:00
"@types/loader-utils": "1.1.3",
"@types/lodash.curry": "4.1.6",
Add experimental SPR support (#8832) * initial commit for SPRv2 * Add initial SPR cache handling * update SPR handling * Implement SPR handling in render * Update tests, handle caching with serverless next start, add TODOs, and update manifest generating * Handle no prerender-manifest from not being used * Fix url.parse error * Apply suggestions from code review Co-Authored-By: Joe Haddad <joe.haddad@zeit.co> * Replace set with constants in next-page-config * simplify sprStatus.used * Add error if getStaticProps is used with getInitialProps * Remove stale TODO * Update revalidate values in SPR cache for non-seeded routes * Apply suggestions from code review * Remove concurrency type * Rename variable for clarity * Add copying prerender files during export * Add comment for clarity * Fix exporting * Update comment * Add additional note * Rename variable * Update to not re-export SPR pages from build * Hard navigate when fetching data fails * Remove default extension * Add brackets * Add checking output files to prerender tests * Adjust export move logic * Clarify behavior of export aggregation * Update variable names for clarity * Update tests * Add comment * s/an oxymoron/contradictory/ * rename * Extract error case * Add tests for exporting SPR pages and update /_next/data endpoint to end with .json * Relocate variable * Adjust route building * Rename to unstable * Rename unstable_getStaticParams * Fix linting * Only add this when a data request * Update prerender data tests * s/isServerless/isLikeServerless/ * Don't rely on query for `next start` in serverless mode * Rename var * Update renderedDuringBuild check * Add test for dynamic param with bracket * Fix serverless next start handling * remove todo * Adjust comment * Update calculateRevalidate * Remove cache logic from render.tsx * Remove extra imports * Move SPR cache logic to next-server * Remove old isDynamic prop * Add calling App getInitialProps for SPR pages * Update revalidate logic * Add isStale to SprCacheValue * Update headers for SPR * add awaiting pendingRevalidation * Dont return null for revalidation render * Adjust logic * Be sure to remove coalesced render * Fix data for serverless * Create a method coalescing utility * Remove TODO * Extract send payload helper * Wrap in-line * Move around some code * Add tests for de-duping and revalidating * Update prerender manifest test
2019-09-24 10:50:04 +02:00
"@types/lru-cache": "5.1.0",
"@types/mini-css-extract-plugin": "0.8.0",
Serverless Next.js (#5927) **This does not change existing behavior.** building to serverless is completely opt-in. - Implements `target: 'serverless'` in `next.config.js` - Removes `next build --lambdas` (was only available on next@canary so far) This implements the concept of build targets. Currently there will be 2 build targets: - server (This is the target that already existed / the default, no changes here) - serverless (New target aimed at compiling pages to serverless handlers) The serverless target will output a single file per `page` in the `pages` directory: - `pages/index.js` => `.next/serverless/index.js` - `pages/about.js` => `.next/serverless/about.js` So what is inside `.next/serverless/about.js`? All the code needed to render that specific page. It has the Node.js `http.Server` request handler function signature: ```ts (req: http.IncomingMessage, res: http.ServerResponse) => void ``` So how do you use it? Generally you **don't** want to use the below example, but for illustration purposes it's shown how the handler is called using a plain `http.Server`: ```js const http = require('http') // Note that `.default` is needed because the exported module is an esmodule const handler = require('./.next/serverless/about.js').default const server = new http.Server((req, res) => handler(req, res)) server.listen(3000, () => console.log('Listening on http://localhost:3000')) ``` Generally you'll upload this handler function to an external service like [Now v2](https://zeit.co/now-2), the `@now/next` builder will be updated to reflect these changes. This means that it'll be no longer neccesary for `@now/next` to do some of the guesswork in creating smaller handler functions. As Next.js will output the smallest possible serverless handler function automatically. The function has 0 dependencies so no node_modules are required to run it, and is generally very small. 45Kb zipped is the baseline, but I'm sure we can make it even smaller in the future. One important thing to note is that the function won't try to load `next.config.js`, so `publicRuntimeConfig` / `serverRuntimeConfig` are not supported. Reasons are outlined here: #5846 So to summarize: - every page becomes a serverless function - the serverless function has 0 dependencies (they're all inlined) - "just" uses the `req` and `res` coming from Node.js - opt-in using `target: 'serverless'` in `next.config.js` - Does not load next.config.js when executing the function TODO: - [x] Compile next/dynamic / `import()` into the function file, so that no extra files have to be uploaded. - [x] Setting `assetPrefix` at build time for serverless target - [x] Support custom /_app - [x] Support custom /_document - [x] Support custom /_error - [x] Add `next.config.js` property for `target` Need discussion: - [ ] Since the serverless target won't support `publicRuntimeConfig` / `serverRuntimeConfig` as they're runtime values. I think we should support build-time env var replacement with webpack.DefinePlugin or similar. - [ ] Serving static files with the correct cache-control, as there is no static file serving in the serverless target
2018-12-28 11:39:12 +01:00
"@types/mkdirp": "0.5.2",
"@types/nanoid": "2.0.0",
"@types/node-fetch": "2.3.4",
"@types/react": "16.8.18",
"@types/react-dom": "16.9.3",
2019-09-05 16:11:08 +02:00
"@types/react-is": "16.7.1",
"@types/resolve": "0.0.8",
2019-09-05 16:11:08 +02:00
"@types/send": "0.14.4",
2019-04-23 09:40:24 +02:00
"@types/styled-jsx": "2.2.8",
"@types/text-table": "0.2.1",
"@types/webpack-dev-middleware": "2.0.3",
"@types/webpack-hot-middleware": "2.16.5",
"@types/webpack-sources": "0.1.5",
"@zeit/ncc": "0.18.5",
"arg": "4.1.0",
"babel-plugin-dynamic-import-node": "2.3.0",
"nanoid": "2.0.3",
"resolve": "1.11.0",
2019-03-24 14:34:44 +01:00
"taskr": "1.1.0",
"text-table": "0.2.0",
"typescript": "3.7.3",
"unistore": "3.4.1"
},
"engines": {
2019-11-01 18:43:29 +01:00
"node": ">=8.10.0"
}
}