language
stringclasses
1 value
owner
stringlengths
2
15
repo
stringlengths
2
21
sha
stringlengths
45
45
message
stringlengths
7
36.3k
path
stringlengths
1
199
patch
stringlengths
15
102k
is_multipart
bool
2 classes
Other
vercel
next.js
4328eea3a7f0ea8ee93cd704bdec526f06a83ca6.json
Add WSL to Metadata (#9171)
packages/next/telemetry/anonymous-meta.ts
@@ -1,4 +1,5 @@ import isDockerFunction from 'is-docker' +import isWslBoolean from 'is-wsl' import os from 'os' import * as ciEnvironment from './ci-info' @@ -13,6 +14,7 @@ type AnonymousMeta = { memoryInMb: number isDocker: boolean isNowDev: boolean + isWsl: boolean isCI: boolean ciName: string | ...
true
Other
vercel
next.js
4328eea3a7f0ea8ee93cd704bdec526f06a83ca6.json
Add WSL to Metadata (#9171)
yarn.lock
@@ -8082,6 +8082,11 @@ is-word-character@^1.0.0: resolved "https://registry.yarnpkg.com/is-word-character/-/is-word-character-1.0.3.tgz#264d15541cbad0ba833d3992c34e6b40873b08aa" integrity sha512-0wfcrFgOOOBdgRNT9H33xe6Zi6yhX/uoc4U8NBZGeQQB0ctU1dnlNTyL9JM2646bHDTpsDm1Brb3VPoCIMrd/A== +is-wsl@2.1.1: + version "2...
true
Other
vercel
next.js
c0a1c0f93966fe33edd93fb53e5fafb0dcd80a9e.json
Test React integration using `next` dist-tag (#9165) Instead of `canary`. React uses `next` to represent the next minor release.
.circleci/config.yml
@@ -41,11 +41,11 @@ commands: - run: name: Linting command: yarn lint - yarn_react_canary: + yarn_react_integration: steps: - run: - name: Upgrade to React Canary - command: yarn upgrade react@canary react-dom@canary -W --dev # upgrade (vs add) will skip re-b...
false
Other
vercel
next.js
94c2c084adc632b9bb3cdd3a3f470eb3b3472660.json
Upgrade React dependencies (#9152) * Upgrade React dependencies * Disable data tests * Increase allowed default sizes
package.json
@@ -106,8 +106,8 @@ "node-sass": "4.12.0", "pre-commit": "1.2.2", "prettier": "1.17.1", - "react": "16.8.6", - "react-dom": "16.8.6", + "react": "16.10.2", + "react-dom": "16.10.2", "react-ssr-prepass": "1.0.5", "release": "6.0.1", "request-promise-core": "1.1.2",
true
Other
vercel
next.js
94c2c084adc632b9bb3cdd3a3f470eb3b3472660.json
Upgrade React dependencies (#9152) * Upgrade React dependencies * Disable data tests * Increase allowed default sizes
packages/next/package.json
@@ -112,6 +112,7 @@ "raw-body": "2.4.0", "react-error-overlay": "5.1.6", "react-is": "16.8.6", + "react-ssr-prepass": "1.0.7", "send": "0.17.1", "source-map": "0.6.1", "string-hash": "1.1.3",
true
Other
vercel
next.js
94c2c084adc632b9bb3cdd3a3f470eb3b3472660.json
Upgrade React dependencies (#9152) * Upgrade React dependencies * Disable data tests * Increase allowed default sizes
test/integration/data/test/index.test.js
@@ -15,7 +15,7 @@ let appPort let server jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 -describe('AMP Bind Initial Data', () => { +describe.skip('AMP Bind Initial Data', () => { beforeAll(async () => { appPort = await findPort() server = await launchApp(appDir, appPort)
true
Other
vercel
next.js
94c2c084adc632b9bb3cdd3a3f470eb3b3472660.json
Upgrade React dependencies (#9152) * Upgrade React dependencies * Disable data tests * Increase allowed default sizes
test/integration/size-limit/test/index.test.js
@@ -81,7 +81,7 @@ describe('Production response size', () => { ) // These numbers are without gzip compression! - expect(responseSizeKilobytes).toBeLessThanOrEqual(213) // Kilobytes + expect(responseSizeKilobytes).toBeLessThanOrEqual(220) // Kilobytes }) it('should not increase the overall res...
true
Other
vercel
next.js
94c2c084adc632b9bb3cdd3a3f470eb3b3472660.json
Upgrade React dependencies (#9152) * Upgrade React dependencies * Disable data tests * Increase allowed default sizes
yarn.lock
@@ -12125,15 +12125,15 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7: minimist "^1.2.0" strip-json-comments "~2.0.1" -react-dom@16.8.6: - version "16.8.6" - resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f" - integrity sha512-1nL7PIq9LTL3fthPqwkvr2zY7p...
true
Other
vercel
next.js
d28e46ac155949c600e7f80e882fab9aab9dedeb.json
Support Concurrent Mode in Loadable (#9026)
packages/next/build/webpack-config.ts
@@ -220,7 +220,7 @@ export default async function getBaseWebpackConfig( react: { name: 'commons', chunks: 'all', - test: /[\\/]node_modules[\\/](react|react-dom|scheduler)[\\/]/, + test: /[\\/]node_modules[\\/](react|react-dom|scheduler|use-subscription)[\\/]/, ...
true
Other
vercel
next.js
d28e46ac155949c600e7f80e882fab9aab9dedeb.json
Support Concurrent Mode in Loadable (#9026)
packages/next/next-server/lib/loadable.js
@@ -22,6 +22,7 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE // Modified to be compatible with webpack 4 / Next.js import React from 'react' +import { useSubscription } from 'use-subscription' import { LoadableContext } from './loadable-context' const ALL_INITIALIZERS = [] @@ -121,13 +122,19...
true
Other
vercel
next.js
d28e46ac155949c600e7f80e882fab9aab9dedeb.json
Support Concurrent Mode in Loadable (#9026)
packages/next/package.json
@@ -121,6 +121,7 @@ "terser": "4.0.0", "unfetch": "4.1.0", "url": "0.11.0", + "use-subscription": "1.1.1", "watchpack": "2.0.0-beta.5", "webpack": "4.39.0", "webpack-dev-middleware": "3.7.0",
true
Other
vercel
next.js
d28e46ac155949c600e7f80e882fab9aab9dedeb.json
Support Concurrent Mode in Loadable (#9026)
yarn.lock
@@ -14577,6 +14577,11 @@ url@0.11.0, url@^0.11.0: punycode "1.3.2" querystring "0.2.0" +use-subscription@1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/use-subscription/-/use-subscription-1.1.1.tgz#5509363e9bb152c4fb334151d4dceb943beaa7bb" + integrity sha512-gk4fPTYvNhs6Ia7u8/+K7bM7sZ7...
true
Other
vercel
next.js
8b48508ce8cbbe65be24d2190c05037833636886.json
Remove inferno example (#9108)
examples/using-inferno/README.md
@@ -1,49 +0,0 @@ -# Inferno example - -> **Important**: Inferno does not support hooks nor Suspense. It may work on development where React is utilized instead of Inferno, but it will break as soon as you try to build it or start it out of development. - -## How to use - -### Using `create-next-app` - -Execute [`create...
true
Other
vercel
next.js
8b48508ce8cbbe65be24d2190c05037833636886.json
Remove inferno example (#9108)
examples/using-inferno/lib/inferno-compat.js
@@ -1,11 +0,0 @@ -const React = require('inferno-compat') -const createContext = require('create-react-context/lib/implementation') - -Object.keys(React).forEach(key => { - if (key === 'default' || key === '__esModule') return - exports[key] = React[key] -}) - -// bypass export of React.createContext -exports.createC...
true
Other
vercel
next.js
8b48508ce8cbbe65be24d2190c05037833636886.json
Remove inferno example (#9108)
examples/using-inferno/next.config.js
@@ -1,20 +0,0 @@ -const path = require('path') - -module.exports = { - webpack: function (config, { dev }) { - // For the development version, we'll use React. - // Because, it support react hot loading and so on. - if (dev) { - return config - } - - config.resolve.alias = { - ...config.resolv...
true
Other
vercel
next.js
8b48508ce8cbbe65be24d2190c05037833636886.json
Remove inferno example (#9108)
examples/using-inferno/package.json
@@ -1,20 +0,0 @@ -{ - "name": "using-inferno", - "version": "1.0.0", - "scripts": { - "dev": "node server.js", - "build": "next build", - "start": "NODE_ENV=production node server.js" - }, - "dependencies": { - "create-react-context": "0.3.0", - "inferno": "7.3.2", - "inferno-compat": "7.3.2", - ...
true
Other
vercel
next.js
8b48508ce8cbbe65be24d2190c05037833636886.json
Remove inferno example (#9108)
examples/using-inferno/pages/about.js
@@ -1,3 +0,0 @@ -import React from 'react' - -export default () => <div>About us</div>
true
Other
vercel
next.js
8b48508ce8cbbe65be24d2190c05037833636886.json
Remove inferno example (#9108)
examples/using-inferno/pages/index.js
@@ -1,11 +0,0 @@ -import React from 'react' -import Link from 'next/link' - -export default () => ( - <div> - Hello World.{' '} - <Link href='/about'> - <a>About</a> - </Link> - </div> -)
true
Other
vercel
next.js
8b48508ce8cbbe65be24d2190c05037833636886.json
Remove inferno example (#9108)
examples/using-inferno/server.js
@@ -1,29 +0,0 @@ -const port = parseInt(process.env.PORT, 10) || 3000 -const dev = process.env.NODE_ENV !== 'production' -const moduleAlias = require('module-alias') -const path = require('path') - -// For the development version, we'll use React. -// Because, it support react hot loading and so on. -if (!dev) { - mod...
true
Other
vercel
next.js
ff5dcacc2e845d3c2c0d5c0b2821ed7b48c83c5d.json
Add the example of Tailwind CSS with emotion (#8931) * Add the example of tailwindcss with emotion * Add README.md * Fix Unexpected trailing comma. * Update the readme, and use latest Next.js version
examples/with-tailwindcss-emotion/.babelrc
@@ -0,0 +1,4 @@ +{ + "presets": ["next/babel"], + "plugins": [["emotion"], ["macros"]] +}
true
Other
vercel
next.js
ff5dcacc2e845d3c2c0d5c0b2821ed7b48c83c5d.json
Add the example of Tailwind CSS with emotion (#8931) * Add the example of tailwindcss with emotion * Add README.md * Fix Unexpected trailing comma. * Update the readme, and use latest Next.js version
examples/with-tailwindcss-emotion/README.md
@@ -0,0 +1,65 @@ +# Tailwind CSS with Emotion.js example + +This is an example of how you can add the tailwind CSS with Emotion.js in your web app. + +## How to use + +### Using `create-next-app` + +Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [Yarn](https://yar...
true
Other
vercel
next.js
ff5dcacc2e845d3c2c0d5c0b2821ed7b48c83c5d.json
Add the example of Tailwind CSS with emotion (#8931) * Add the example of tailwindcss with emotion * Add README.md * Fix Unexpected trailing comma. * Update the readme, and use latest Next.js version
examples/with-tailwindcss-emotion/babel-plugin-macros.config.js
@@ -0,0 +1,5 @@ +module.exports = { + tailwind: { + styled: '@emotion/styled' + } +}
true
Other
vercel
next.js
ff5dcacc2e845d3c2c0d5c0b2821ed7b48c83c5d.json
Add the example of Tailwind CSS with emotion (#8931) * Add the example of tailwindcss with emotion * Add README.md * Fix Unexpected trailing comma. * Update the readme, and use latest Next.js version
examples/with-tailwindcss-emotion/next.config.js
@@ -0,0 +1,10 @@ +module.exports = { + webpack: (config, options) => { + // Fixes npm packages that depend on `fs` module + config.node = { + fs: 'empty' + } + + return config + } +}
true
Other
vercel
next.js
ff5dcacc2e845d3c2c0d5c0b2821ed7b48c83c5d.json
Add the example of Tailwind CSS with emotion (#8931) * Add the example of tailwindcss with emotion * Add README.md * Fix Unexpected trailing comma. * Update the readme, and use latest Next.js version
examples/with-tailwindcss-emotion/package.json
@@ -0,0 +1,23 @@ +{ + "name": "with-tailwindcss-emotion", + "version": "0.1.0", + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "@emotion/core": "10.0.17", + "@emotion/styled": "10.0.17", + "next": "latest", + ...
true
Other
vercel
next.js
ff5dcacc2e845d3c2c0d5c0b2821ed7b48c83c5d.json
Add the example of Tailwind CSS with emotion (#8931) * Add the example of tailwindcss with emotion * Add README.md * Fix Unexpected trailing comma. * Update the readme, and use latest Next.js version
examples/with-tailwindcss-emotion/pages/index.js
@@ -0,0 +1,38 @@ +import React from 'react' +import { css } from '@emotion/core' +import styled from '@emotion/styled' +import tw from 'tailwind.macro' + +/** + * We can use macros in `styled`. + */ +const Header = styled.div` + ${tw`font-mono text-sm text-gray-800 hover:text-red-500`} +` + +const Button = styled.butt...
true
Other
vercel
next.js
ff5dcacc2e845d3c2c0d5c0b2821ed7b48c83c5d.json
Add the example of Tailwind CSS with emotion (#8931) * Add the example of tailwindcss with emotion * Add README.md * Fix Unexpected trailing comma. * Update the readme, and use latest Next.js version
examples/with-tailwindcss-emotion/tailwind.js
@@ -0,0 +1,490 @@ +/** + * default config from https://github.com/tailwindcss/tailwindcss/blob/master/stubs/defaultConfig.stub.js + * we also use `tailwind.js` because the default of `babel-plugin-macros` set this file as a tailwind default config. + */ +module.exports = { + prefix: '', + important: false, + separat...
true
Other
vercel
next.js
393af8e6b3314bfced369e414ed35c09dc62f3f6.json
Fix SPR header name (#9104)
packages/next/build/webpack/loaders/next-serverless-loader.ts
@@ -133,13 +133,13 @@ const nextServerlessLoader: loader.Loader = function() { : `const params = {};` } ${ - // Temporary work around -- `x-now-route-params` is a platform header + // Temporary work around: `x-now-route-matches` is a platform header // _only_ ...
true
Other
vercel
next.js
393af8e6b3314bfced369e414ed35c09dc62f3f6.json
Fix SPR header name (#9104)
test/integration/serverless/test/index.test.js
@@ -207,7 +207,7 @@ describe('Serverless', () => { it('should have the correct query string for a spr route', async () => { const paramRaw = 'test % 123' const html = await fetchViaHTTP(appPort, `/dr/[slug]`, '', { - headers: { 'x-now-route-params': qs.stringify({ 1: paramRaw }) } + headers: { 'x...
true
Other
vercel
next.js
beed775e554ee57bf187af8d072bd668d7329243.json
Update legacy _app context (#9083)
packages/next/client/router.ts
@@ -13,7 +13,7 @@ type SingletonRouterBase = { ready(cb: () => any): void } -export { Router, NextRouter } +export { Router, RouterContext, NextRouter } export type SingletonRouter = SingletonRouterBase & NextRouter
true
Other
vercel
next.js
beed775e554ee57bf187af8d072bd668d7329243.json
Update legacy _app context (#9083)
packages/next/client/with-router.tsx
@@ -1,7 +1,6 @@ import React from 'react' -import PropTypes from 'prop-types' import { NextComponentType, NextPageContext } from '../next-server/lib/utils' -import { NextRouter } from './router' +import { NextRouter, RouterContext } from './router' export type WithRouterProps = { router: NextRouter @@ -21,19 +2...
true
Other
vercel
next.js
beed775e554ee57bf187af8d072bd668d7329243.json
Update legacy _app context (#9083)
packages/next/pages/_app.tsx
@@ -1,13 +1,12 @@ import React, { ErrorInfo } from 'react' -import PropTypes from 'prop-types' import { execOnce, loadGetInitialProps, AppContextType, AppInitialProps, AppPropsType, } from '../next-server/lib/utils' -import { Router, makePublicRouterInstance } from '../client/router' +import { Router ...
true
Other
vercel
next.js
beed775e554ee57bf187af8d072bd668d7329243.json
Update legacy _app context (#9083)
test/integration/build-stats-output/test/index.test.js
@@ -9,6 +9,6 @@ const appDir = join(__dirname, '../react-site') describe('Build Stats Output', () => { it('Shows correct package count in output', async () => { const { stdout } = await nextBuild(appDir, undefined, { stdout: true }) - expect(stdout).toMatch(/\/something .*?5/) + expect(stdout).toMatch(/\...
true
Other
vercel
next.js
b6be95ba3263303844a212e608ede526b0ce6c1c.json
Fix language fallback in with-react-intl example (#8894) The call to `accept.languages()` made the fallback not work. When called e.g. with `Accept-Language: es-ES,es;q=0.9`, `locale` would contain `[ 'es-ES', 'es' ]` instead of `en`. (See also: https://www.npmjs.com/package/accepts#languagelanguages )
examples/with-react-intl/server.js
@@ -46,7 +46,7 @@ const getMessages = locale => { app.prepare().then(() => { createServer((req, res) => { const accept = accepts(req) - const locale = accept.language(accept.languages(supportedLanguages)) || 'en' + const locale = accept.language(supportedLanguages) || 'en' req.locale = locale r...
false
Other
vercel
next.js
0208356f6756c2b6c88e91db54092d2dec323a70.json
Temporary: SPR: Use Group Index Mapping (#9089) This pull request is a temporary addition that uses the `x-now-route-params` header in serverless. This header returns the regex groups with indexes, not their named variants. As a result, we must use the getRouteMatcher utility to reverse this into Next.js' expected na...
packages/next/build/webpack/loaders/next-serverless-loader.ts
@@ -70,6 +70,7 @@ const nextServerlessLoader: loader.Loader = function() { } else { return ` import {parse} from 'url' + import {parse as parseQs} from 'querystring' import {renderToHTML} from 'next/dist/next-server/server/render'; import {sendHTML} from 'next/dist/next-server/server/send-html...
true
Other
vercel
next.js
0208356f6756c2b6c88e91db54092d2dec323a70.json
Temporary: SPR: Use Group Index Mapping (#9089) This pull request is a temporary addition that uses the `x-now-route-params` header in serverless. This header returns the regex groups with indexes, not their named variants. As a result, we must use the getRouteMatcher utility to reverse this into Next.js' expected na...
test/integration/serverless/pages/dr/[slug].js
@@ -0,0 +1,5 @@ +const SlugPage = ({ query }) => <div>{JSON.stringify(query)}</div> + +SlugPage.getInitialProps = ({ query }) => ({ query }) + +export default SlugPage
true
Other
vercel
next.js
0208356f6756c2b6c88e91db54092d2dec323a70.json
Temporary: SPR: Use Group Index Mapping (#9089) This pull request is a temporary addition that uses the `x-now-route-params` header in serverless. This header returns the regex groups with indexes, not their named variants. As a result, we must use the getRouteMatcher utility to reverse this into Next.js' expected na...
test/integration/serverless/test/index.test.js
@@ -12,6 +12,7 @@ import { fetchViaHTTP, renderViaHTTP } from 'next-test-utils' +import qs from 'querystring' import fetch from 'node-fetch' const appDir = join(__dirname, '../') @@ -192,6 +193,28 @@ describe('Serverless', () => { expect(res.status).toBe(404) }) + it('should have the correct query...
true
Other
vercel
next.js
c77338bd3166cc8e09a0e809e604a7b770fcce5f.json
Temporary: Add Support for Now Platform Headers (#9085)
packages/next/build/webpack/loaders/next-serverless-loader.ts
@@ -131,7 +131,17 @@ const nextServerlessLoader: loader.Loader = function() { ? `const params = fromExport && !unstable_getStaticProps ? {} : getRouteMatcher(getRouteRegex("${page}"))(parsedUrl.pathname) || {};` : `const params = {};` } - const result = await renderToHTML(req, ...
false
Other
vercel
next.js
7d1f18799be2e347a1cfa6ce5c3590e246d21a00.json
Fix import in `@zeit/fetch` example (#9074)
examples/with-zeit-fetch/fetch/browser.js
@@ -1,3 +1,3 @@ -import fetch from 'isomorphic-fetch' +import fetch from 'unfetch' export default fetch
false
Other
vercel
next.js
f8978cc29cf90d93909f6a74085b1e7685c468e3.json
Detect built ins in externals (#7083)
packages/next/build/webpack-config.ts
@@ -88,8 +88,9 @@ export default function getBaseWebpackConfig (dir: string, {dev = false, debug = 'string-hash', 'next/constants' ] + const nodeBuiltins = new Set([...require("repl")._builtinLibs, "constants", "module", "timers", "console", "_stream_writable", "_stream_readable", ...
false
Other
vercel
next.js
7f4147d424925fe58d8d4145fb169b49efaed178.json
Run optimizer after validating in dirty AMP mode (#7063)
packages/next-server/server/render.tsx
@@ -443,12 +443,17 @@ export async function renderToHTML( }) if (amphtml && html) { - html = await optimizeAmp(html, { amphtml, query }) + if (ampMode.hasQuery) { + html = await optimizeAmp(html, { amphtml, query }) + } - // don't validate dirty AMP - if (renderOpts.ampValidator && query.a...
false
Other
vercel
next.js
8e5ef488220ab0f6242b1478b8ac227eab731e57.json
Fix broken link (#7087)
examples/with-react-toolbox/README.md
@@ -39,4 +39,4 @@ Notice that `yarn toolbox` (or `npm run toolbox`) should be rerun every time the This is a simple example of getting react-toolbox up and running, using [react-toolbox-themr](https://github.com/react-toolbox/react-toolbox-themr). -For actual use, you probably also want to add Roboto Font, and Mat...
false
Other
vercel
next.js
b00501e632a8e8479b15d8897b13ea9b6ec2f1f8.json
Add test for /dashboard/index (#7065) This adds a test to the custom-server suite to make sure we don't regress on this
packages/next-server/server/get-page-files.ts
@@ -9,7 +9,11 @@ export type BuildManifest = { export function getPageFiles(buildManifest: BuildManifest, page: string): string[] { const normalizedPage = normalizePagePath(page) - const files = buildManifest.pages[normalizedPage] + let files = buildManifest.pages[normalizedPage] + + if (!files) { + files =...
true
Other
vercel
next.js
b00501e632a8e8479b15d8897b13ea9b6ec2f1f8.json
Add test for /dashboard/index (#7065) This adds a test to the custom-server suite to make sure we don't regress on this
packages/next-server/server/require.ts
@@ -22,9 +22,13 @@ export function getPagePath(page: string, distDir: string): string { } if (!pagesManifest[page]) { - throw pageNotFoundError(page) + const cleanedPage = page.replace(/\/index$/, '') || '/' + if (!pagesManifest[cleanedPage]) { + throw pageNotFoundError(page) + } else { + ...
true
Other
vercel
next.js
b00501e632a8e8479b15d8897b13ea9b6ec2f1f8.json
Add test for /dashboard/index (#7065) This adds a test to the custom-server suite to make sure we don't regress on this
test/integration/custom-server/pages/dashboard/index.js
@@ -0,0 +1 @@ +export default () => <p>made it to dashboard</p>
true
Other
vercel
next.js
b00501e632a8e8479b15d8897b13ea9b6ec2f1f8.json
Add test for /dashboard/index (#7065) This adds a test to the custom-server suite to make sure we don't regress on this
test/integration/custom-server/server.js
@@ -28,6 +28,10 @@ app.prepare().then(() => { return app.render(req, res, '/index') } + if (/dashboard/.test(req.url)) { + return app.render(req, res, '/dashboard/index') + } + handleNextRequests(req, res) })
true
Other
vercel
next.js
b00501e632a8e8479b15d8897b13ea9b6ec2f1f8.json
Add test for /dashboard/index (#7065) This adds a test to the custom-server suite to make sure we don't regress on this
test/integration/custom-server/test/index.test.js
@@ -68,6 +68,11 @@ describe('Custom Server', () => { expect(dynamicUsage).toMatch(/127\.0\.0\.1/) } }) + + it('should render nested index', async () => { + const html = await renderViaHTTP(appPort, '/dashboard') + expect(html).toMatch(/made it to dashboard/) + }) }) describe...
true
Other
vercel
next.js
549965282045beda0cf0b31823b35a13014a0d6b.json
Update AMP example to AMP-first wording
examples/amp/pages/dog.js
@@ -9,9 +9,9 @@ export default withAmp( return ( <div> <Head> - <title>The Dog (Hybrid AMP Page)</title> + <title>The Dog</title> </Head> - <h1>The Dog</h1> + <h1>The Dog (Hybrid AMP Page)</h1> <Byline author='Meow Meow Fuzzyface' /> <p> ...
true
Other
vercel
next.js
549965282045beda0cf0b31823b35a13014a0d6b.json
Update AMP example to AMP-first wording
examples/amp/pages/index.js
@@ -9,9 +9,9 @@ export default withAmp(() => { return ( <Layout> <Head> - <title>The Cat (AMP-only Page)</title> + <title>The Cat</title> </Head> - <h1>The Cat</h1> + <h1>The Cat (AMP-first Page)</h1> <Byline author='Dan Zajdband' /> <p className='caption'>Meo...
true
Other
vercel
next.js
3b6aeaae8270588cd1b6d48cc72beb0b3bc0643a.json
Update AMP example (#7056)
examples/amp/pages/dog.js
@@ -2,89 +2,92 @@ import Head from 'next/head' import { useAmp, withAmp } from 'next/amp' import Byline from '../components/Byline' -export default withAmp(() => { - const isAmp = useAmp() +export default withAmp( + () => { + const isAmp = useAmp() - return ( - <div> - <Head> - <title>The Dog...
true
Other
vercel
next.js
3b6aeaae8270588cd1b6d48cc72beb0b3bc0643a.json
Update AMP example (#7056)
examples/amp/pages/index.js
@@ -9,15 +9,10 @@ export default withAmp(() => { return ( <Layout> <Head> - <title>The Cat</title> + <title>The Cat (AMP-only Page)</title> </Head> <h1>The Cat</h1> <Byline author='Dan Zajdband' /> - <p> - <a href={isAmp ? '/' : '/?amp=1'}> - {isAmp...
true
Other
vercel
next.js
3b6aeaae8270588cd1b6d48cc72beb0b3bc0643a.json
Update AMP example (#7056)
examples/amp/pages/normal.js
@@ -1,3 +1 @@ -export default () => ( - <p>I'm just a normal old page, no AMP for me</p> -) +export default () => <p>I'm just a normal old page, no AMP for me</p>
true
Other
vercel
next.js
dbb849e90c3f14604fdecd2aa0d577ba07f1e32d.json
Remove un-needed config from example (#7055)
examples/amp/next.config.js
@@ -1,5 +0,0 @@ -module.exports = { - experimental: { - amp: true - } -}
false
Other
vercel
next.js
abae1734d85f453e0f4d56af073df8a8a276ea40.json
Add a dot to a note in README.md (#7053)
packages/next/README.md
@@ -311,7 +311,7 @@ export default IndexPage In this case only the second `<meta name="viewport" />` is rendered. -_Note: The contents of `<head>` get cleared upon unmounting the component, so make sure each page completely defines what it needs in `<head>`, without making assumptions about what other pages added_...
false
Other
vercel
next.js
59b328b5c3dffae2d241b559f850d89c63989320.json
Remove client bundles for AMP only pages (#7034) * Remove client bundles for AMP pages after build since they are not used * Remove trailing white space * Use async-sema to limit removing AMP client bundles * Bring AMP client bundle removing semaphore concurrency down to 20 * Don't check blocked pages wh...
packages/next-server/lib/amp.ts
@@ -27,6 +27,7 @@ export function withAmp( return React.createElement(Component, props) } + WithAmpWrapper.__nextAmpOnly = !hybrid WithAmpWrapper.getInitialProps = Component.getInitialProps return WithAmpWrapper }
true
Other
vercel
next.js
59b328b5c3dffae2d241b559f850d89c63989320.json
Remove client bundles for AMP only pages (#7034) * Remove client bundles for AMP pages after build since they are not used * Remove trailing white space * Use async-sema to limit removing AMP client bundles * Bring AMP client bundle removing semaphore concurrency down to 20 * Don't check blocked pages wh...
packages/next/build/index.ts
@@ -1,8 +1,10 @@ import chalk from 'chalk' -import { PHASE_PRODUCTION_BUILD } from 'next-server/constants' +import { PHASE_PRODUCTION_BUILD, BLOCKED_PAGES } from 'next-server/constants' import loadConfig from 'next-server/next-config' import nanoid from 'next/dist/compiled/nanoid/index.js' +import Sema from 'async-s...
true
Other
vercel
next.js
59b328b5c3dffae2d241b559f850d89c63989320.json
Remove client bundles for AMP only pages (#7034) * Remove client bundles for AMP pages after build since they are not used * Remove trailing white space * Use async-sema to limit removing AMP client bundles * Bring AMP client bundle removing semaphore concurrency down to 20 * Don't check blocked pages wh...
packages/next/lib/recursive-delete.ts
@@ -35,8 +35,8 @@ const unlinkFile = async (p: string, t = 1): Promise<void> => { * Recursively delete directory contents * @param {string} dir Directory to delete the contents of * @param {RegExp} [filter] Filter for the relative file path - * @param {boolean} [ensure] Esures that parameter dir exists, this i...
true
Other
vercel
next.js
59b328b5c3dffae2d241b559f850d89c63989320.json
Remove client bundles for AMP only pages (#7034) * Remove client bundles for AMP pages after build since they are not used * Remove trailing white space * Use async-sema to limit removing AMP client bundles * Bring AMP client bundle removing semaphore concurrency down to 20 * Don't check blocked pages wh...
packages/next/server/hot-reloader.js
@@ -341,8 +341,11 @@ export default class HotReloader { const onDemandEntries = onDemandEntryHandler(webpackDevMiddleware, multiCompiler, { dir: this.dir, buildId: this.buildId, + distDir: this.config.distDir, reload: this.reload.bind(this), pageExtensions: this.config.pageExtensio...
true
Other
vercel
next.js
59b328b5c3dffae2d241b559f850d89c63989320.json
Remove client bundles for AMP only pages (#7034) * Remove client bundles for AMP pages after build since they are not used * Remove trailing white space * Use async-sema to limit removing AMP client bundles * Bring AMP client bundle removing semaphore concurrency down to 20 * Don't check blocked pages wh...
packages/next/server/on-demand-entry-handler.js
@@ -2,6 +2,7 @@ import DynamicEntryPlugin from 'webpack/lib/DynamicEntryPlugin' import { EventEmitter } from 'events' import { join, posix } from 'path' import { parse } from 'url' +import fs from 'fs' import { pageNotFoundError } from 'next-server/dist/server/require' import { normalizePagePath } from 'next-serve...
true
Other
vercel
next.js
5054e943d4590b3e426760be9bc5f96ef933ee1b.json
Remove experimental flag (#7048)
packages/next/README.md
@@ -1886,11 +1886,6 @@ The [polyfills](https://github.com/zeit/next.js/tree/canary/examples/with-polyfi To enable AMP support for a page, first enable experimental AMP support in your `next.config.js` and then import `withAmp` from `next/amp` and wrap your page's component in it. ```js -// next.config.js -module.ex...
false
Other
vercel
next.js
c48340cd8cd45c05edaf2e21c5949099251892d2.json
Move next/router to Typescript (#7019) Added types to next/router
packages/next/client/router.ts
@@ -1,20 +1,38 @@ /* global window */ import React from 'react' -import _Router from 'next-server/dist/lib/router/router' +import Router, { IRouterInterface } from 'next-server/dist/lib/router/router' import { RouterContext } from 'next-server/dist/lib/router-context' import { RequestContext } from 'next-server/dis...
true
Other
vercel
next.js
c48340cd8cd45c05edaf2e21c5949099251892d2.json
Move next/router to Typescript (#7019) Added types to next/router
packages/next/types/index.d.ts
@@ -4,6 +4,11 @@ declare module 'next-server/constants'; declare module 'webpack/lib/GraphHelpers'; declare module 'unfetch' +declare module 'next/router' { + import * as all from 'next/client/router' + export = all +} + declare module 'next-server/dist/lib/data-manager-context' { import * as all from 'next-s...
true
Other
vercel
next.js
8b136a6f9d6ded180435b70b13ceda5ddbff383d.json
Add experimental option to enable terser loader (#7033)
packages/next-server/server/config.js
@@ -30,6 +30,7 @@ const defaultConfig = { ), ampBindInitData: false, exportTrailingSlash: true, + terserLoader: false, profiling: false, flyingShuttle: false, asyncToPromises: false
true
Other
vercel
next.js
8b136a6f9d6ded180435b70b13ceda5ddbff383d.json
Add experimental option to enable terser loader (#7033)
packages/next/build/webpack-config.ts
@@ -179,7 +179,7 @@ export default function getBaseWebpackConfig (dir: string, {dev = false, debug = new TerserPlugin({...terserPluginConfig, terserOptions: { safari10: true, - ...(selectivePageBuilding ? { compress: false, mangle: true } : undefined) + ...((select...
true
Other
vercel
next.js
a79baccadc74706786eecc329bd9f33943a0412e.json
Remove noDirtyAmp option (#7032)
packages/next-server/server/config.js
@@ -23,7 +23,6 @@ const defaultConfig = { }, experimental: { amp: false, - noDirtyAmp: false, cpus: Math.max( 1, (Number(process.env.CIRCLE_NODE_TOTAL) ||
true
Other
vercel
next.js
a79baccadc74706786eecc329bd9f33943a0412e.json
Remove noDirtyAmp option (#7032)
packages/next-server/server/next-server.ts
@@ -36,7 +36,6 @@ export default class Server { buildId: string renderOpts: { poweredByHeader: boolean - noDirtyAmp: boolean ampBindInitData: boolean staticMarkup: boolean buildId: string @@ -75,7 +74,6 @@ export default class Server { this.buildId = this.readBuildId() this.rend...
true
Other
vercel
next.js
a79baccadc74706786eecc329bd9f33943a0412e.json
Remove noDirtyAmp option (#7032)
packages/next-server/server/optimize-amp.ts
@@ -13,18 +13,17 @@ interface IOptimizer { interface IOptimizeOptions { amphtml?: boolean - noDirtyAmp?: boolean query?: ParsedUrlQuery } -export default async function optimize(html: string, { amphtml, noDirtyAmp, query }: IOptimizeOptions): Promise<string> { +export default async function optimize(html: ...
true
Other
vercel
next.js
a79baccadc74706786eecc329bd9f33943a0412e.json
Remove noDirtyAmp option (#7032)
packages/next-server/server/render.tsx
@@ -113,7 +113,6 @@ function render( } type RenderOpts = { - noDirtyAmp: boolean ampBindInitData: boolean staticMarkup: boolean buildId: string @@ -228,7 +227,6 @@ export async function renderToHTML( dev = false, ampBindInitData = false, staticMarkup = false, - noDirtyAmp = false, a...
true
Other
vercel
next.js
a79baccadc74706786eecc329bd9f33943a0412e.json
Remove noDirtyAmp option (#7032)
packages/next/export/index.js
@@ -94,8 +94,7 @@ export default async function (dir, options, configuration) { distDir, dev: false, staticMarkup: false, - hotReloader: null, - noDirtyAmp: nextConfig.experimental.noDirtyAmp + hotReloader: null } const { serverRuntimeConfig, publicRuntimeConfig } = nextConfig
true
Other
vercel
next.js
a79baccadc74706786eecc329bd9f33943a0412e.json
Remove noDirtyAmp option (#7032)
packages/next/export/worker.js
@@ -25,7 +25,6 @@ process.on( exportPathMap, outDir, renderOpts, - noDirtyAmp, serverRuntimeConfig, concurrency }) => { @@ -90,8 +89,7 @@ process.on( await validateAmp(html, path) } if ( - (curRenderOpts.amphtml && !query.amp && !noDirtyAmp) || - ...
true
Other
vercel
next.js
a79baccadc74706786eecc329bd9f33943a0412e.json
Remove noDirtyAmp option (#7032)
test/integration/amp-export-validation/test/index.test.js
@@ -34,23 +34,6 @@ describe('AMP Validation on Export', () => { })) }) - it('should disable dirty AMP with noDirtyAmp set', async () => { - nextConfig.replace(/experimental:[\w\W]*?}/, ` - experimental: { - amp: true, - noDirtyAmp: true - } - `) - await nextExport(appDir, { o...
true
Other
vercel
next.js
016c197b7f3dabedbc354fc73c794da34338ec08.json
Add AMP docs to README (#7031) * Add AMP docs to README * Update wording Co-Authored-By: ijjk <jj@jjsweb.site> * remove extra space Co-Authored-By: ijjk <jj@jjsweb.site> * Apply suggestions from code review Co-Authored-By: ijjk <jj@jjsweb.site> * Apply suggestions from code review Co-Authored-B...
packages/next/README.md
@@ -75,6 +75,7 @@ - [One Level Lower](#one-level-lower) - [Summary](#summary) - [Browser support](#browser-support) +- [AMP Support](#amp-support) - [Static HTML export](#static-html-export) - [Usage](#usage) - [Copying custom files](#copying-custom-files) @@ -1878,6 +1879,102 @@ Next.js supports IE11...
false
Other
vercel
next.js
3363f26a42e5743540218d3ea46cda160ea4b560.json
Fix missing dash
examples/with-dotenv/README.md
@@ -11,7 +11,7 @@ Execute [`create-next-app`](https://github.com/segmentio/create-next-app) with [ ```bash npx create-next-app --example with-dotenv with-dotenv-app # or -yarn create next-app --example with-dotenv with-dotenv-app +yarn create-next-app --example with-dotenv with-dotenv-app ``` ### Download manual...
false
Other
vercel
next.js
9281f4651ad9f7cfee830e40a6d55af941022a75.json
Fix GitHub spelling (#7024) Just a minor typo fix: `Github` -> `GitHub`.
examples/form-handler/components/Social.js
@@ -16,7 +16,7 @@ const Social = () => { <Input controlLabel='Twitter' title='social' name='twitter' /> </Col> <Col lg={8}> - <Input controlLabel='Github' title='social' name='github' /> + <Input controlLabel='GitHub' title='social' name='github' /> </Col> ...
true
Other
vercel
next.js
9281f4651ad9f7cfee830e40a6d55af941022a75.json
Fix GitHub spelling (#7024) Just a minor typo fix: `Github` -> `GitHub`.
examples/with-cloud9/README.md
@@ -3,7 +3,7 @@ ## Install NVM and set node to the latest version ## Cloud 9 environment comes with a preinstalled nvm, but its better to use the latest -version - follow the install instructions from the [NVM Github page](https://github.com/creationix/nvm) +version - follow the install instructions from the [NVM G...
true
Other
vercel
next.js
9281f4651ad9f7cfee830e40a6d55af941022a75.json
Fix GitHub spelling (#7024) Just a minor typo fix: `Github` -> `GitHub`.
examples/with-freactal/README.md
@@ -47,7 +47,7 @@ When it comes to state management of the React webapp, Redux is the most popular ### example app -In this example the `index` page renders list of public repos on Github for selected username. It fetches list of repos from public gihub api. First page of this list is rendered by SSR. *serverState...
true
Other
vercel
next.js
9281f4651ad9f7cfee830e40a6d55af941022a75.json
Fix GitHub spelling (#7024) Just a minor typo fix: `Github` -> `GitHub`.
examples/with-tailwindcss/components/nav.js
@@ -1,7 +1,7 @@ import Link from 'next/link' const links = [ - { href: 'https://github.com/zeit/next.js', label: 'Github' }, + { href: 'https://github.com/zeit/next.js', label: 'GitHub' }, { href: 'https://nextjs.org/docs', label: 'Docs' } ]
true
Other
vercel
next.js
c564c1416a0b33337cd522d38369d27aceb17d15.json
add package.json to example (#7004)
examples/with-cookie-auth/package.json
@@ -0,0 +1,5 @@ +{ + "name": "with-cookie-auth", + "version": "1.0.0", + "description": "Monorepo with a Next.js example of cookie based authorization" +}
false
Other
vercel
next.js
65fcf351c3030baafca7480230ef6b996fa4275d.json
Add new getFileForPage helper to build utils (#6999)
packages/next/build/utils.ts
@@ -45,6 +45,24 @@ function getPossibleFiles(pageExtensions: string[], pages: string[]) { return flatten<string>(res) } +export async function getFileForPage({ + page, + pagesDirectory, + pageExtensions, +}: { + page: string + pagesDirectory: string + pageExtensions: string[] +}) { + const theFile = getPos...
false
Other
vercel
next.js
0e68d3c2d9feed2ee68b36da7d4e161008babc2b.json
Adjust all modules identified plugin output (#6995) This output clashed with the new output style. This output is more inline with existing behavior.
packages/next/build/webpack/plugins/all-modules-identified-plugin.ts
@@ -1,20 +1,20 @@ -import { Compiler, Plugin } from 'webpack' import { createHash } from 'crypto' import path from 'path' +import { Compiler, Plugin } from 'webpack' /** * From escape-string-regexp: https://github.com/sindresorhus/escape-string-regexp * brought here to reduce the bundle size * MIT License ...
false
Other
vercel
next.js
1810cf5abeeebd79b91825b2c31d744f34f5ec33.json
Add an experimental mode for flyingShuttle (#6985)
packages/next-server/server/config.js
@@ -30,7 +30,8 @@ const defaultConfig = { ), ampBindInitData: false, exportTrailingSlash: true, - profiling: false + profiling: false, + flyingShuttle: false } }
true
Other
vercel
next.js
1810cf5abeeebd79b91825b2c31d744f34f5ec33.json
Add an experimental mode for flyingShuttle (#6985)
packages/next/build/index.ts
@@ -57,14 +57,15 @@ function getPossibleFiles(pageExtensions: string[], pages: string[]) { export async function getSpecifiedPages( dir: string, pages: string[], - pageExtensions: string[] + pageExtensions: string[], + assumeAll: boolean ) { const pagesDir = path.join(dir, 'pages') const reservedPage...
true
Other
vercel
next.js
1810cf5abeeebd79b91825b2c31d744f34f5ec33.json
Add an experimental mode for flyingShuttle (#6985)
packages/next/build/webpack-config.ts
@@ -18,7 +18,7 @@ import { ChunkGraphPlugin } from './webpack/plugins/chunk-graph-plugin' import { WebpackEntrypoints } from './entries' type ExcludesFalse = <T>(x: T | false) => x is T -export default function getBaseWebpackConfig (dir: string, {dev = false, debug = false, isServer = false, buildId, config, target...
true
Other
vercel
next.js
f301c4f0631e936addcf23d827775bca9b9f5d5d.json
Adjust onFinishCallback polyfill (#6984)
packages/next/client/event-source-polyfill.js
@@ -435,7 +435,7 @@ FetchTransport.prototype.open = function (xhr, onStartCallback, onProgressCallba }).then(function(result) { onFinishCallback() return result - })['catch'](function(error) { + }, function(error) { onFinishCallback() return Promise.reject(error) })
false
Other
vercel
next.js
9b999b1ce30f1bd4779e3cb33a41cce6467c2ebc.json
Convert wrapper class to function component (#9095) * Convert wrapper class to function component * Remove unneeded export * Check versions of chrome and chromedriver * Update to chromedriver 76 * Revert config.yml * Update with-router.tsx
packages/next/client/router.ts
@@ -13,7 +13,7 @@ type SingletonRouterBase = { ready(cb: () => any): void } -export { Router, RouterContext, NextRouter } +export { Router, NextRouter } export type SingletonRouter = SingletonRouterBase & NextRouter
true
Other
vercel
next.js
9b999b1ce30f1bd4779e3cb33a41cce6467c2ebc.json
Convert wrapper class to function component (#9095) * Convert wrapper class to function component * Remove unneeded export * Check versions of chrome and chromedriver * Update to chromedriver 76 * Revert config.yml * Update with-router.tsx
packages/next/client/with-router.tsx
@@ -1,6 +1,6 @@ import React from 'react' import { NextComponentType, NextPageContext } from '../next-server/lib/utils' -import { NextRouter, RouterContext } from './router' +import { NextRouter, useRouter } from './router' export type WithRouterProps = { router: NextRouter @@ -16,27 +16,19 @@ export default fu...
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
packages/next/build/index.ts
@@ -51,6 +51,7 @@ import { } from './utils' import getBaseWebpackConfig from './webpack-config' import { writeBuildId } from './write-build-id' +import pathToRegexp from 'path-to-regexp' const fsAccess = promisify(fs.access) const fsUnlink = promisify(fs.unlink) @@ -93,6 +94,15 @@ export default async function b...
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
packages/next/next-server/server/lib/path-match.ts
@@ -4,10 +4,19 @@ // (When webpack resolving packages) const pathToRegexp = require('path-to-regexp') -export default () => { +export default (customRoute = false) => { return (path: string) => { const keys: any[] = [] - const re = pathToRegexp(path, keys, {}) + const re = pathToRegexp( + path, +...
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
packages/next/next-server/server/next-server.ts
@@ -15,6 +15,7 @@ import { PHASE_PRODUCTION_SERVER, SERVER_DIRECTORY, SERVERLESS_DIRECTORY, + ROUTES_MANIFEST, } from '../lib/constants' import { getRouteMatcher, @@ -35,9 +36,23 @@ import { sendHTML } from './send-html' import { serveStatic } from './serve-static' import { getSprCache, initializeSprCa...
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
packages/next/package.json
@@ -103,7 +103,7 @@ "mkdirp": "0.5.1", "node-fetch": "2.6.0", "ora": "3.4.0", - "path-to-regexp": "2.1.0", + "path-to-regexp": "3.1.0", "pnp-webpack-plugin": "1.5.0", "postcss-flexbugs-fixes": "4.1.0", "postcss-loader": "3.0.0",
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
packages/next/server/hot-reloader.ts
@@ -73,7 +73,7 @@ function addCorsSupport(req: IncomingMessage, res: ServerResponse) { } const matchNextPageBundleRequest = route( - '/_next/static/:buildId/pages/:path*.js(.map)?' + '/_next/static/:buildId/pages/:path*.js(\\.map|)' ) // Recursively look up the issuer till it ends up at the root
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
packages/next/server/next-dev-server.ts
@@ -196,6 +196,16 @@ export default class DevServer extends Server { async prepare() { await verifyTypeScriptSetup(this.dir, this.pagesDir!) + await this.loadCustomRoutes() + + if (this.customRoutes) { + const { redirects, rewrites } = this.customRoutes + + if (redirects.length || rewrites.len...
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
test/integration/custom-routes/next.config.js
@@ -0,0 +1,78 @@ +module.exports = { + experimental: { + async rewrites () { + return [ + { + source: '/', + destination: '/another' + }, + { + source: '/another', + destination: '/multi-rewrites' + }, + { + source: '/first', + ...
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
test/integration/custom-routes/pages/hello-again.js
@@ -0,0 +1,10 @@ +import Link from 'next/link' + +export default () => ( + <> + <h3 id='hello-again'>Hello again</h3> + <Link href='/nav'> + <a id='to-nav'>to nav</a> + </Link> + </> +)
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
test/integration/custom-routes/pages/hello.js
@@ -0,0 +1,10 @@ +import Link from 'next/link' + +export default () => ( + <> + <h3 id='hello'>Hello</h3> + <Link href='/nav'> + <a id='to-nav'>to nav</a> + </Link> + </> +)
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
test/integration/custom-routes/pages/multi-rewrites.js
@@ -0,0 +1 @@ +export default () => 'multi-rewrites'
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
test/integration/custom-routes/pages/nav.js
@@ -0,0 +1,13 @@ +import Link from 'next/link' + +export default () => ( + <> + <h3 id='nav'>Nav</h3> + <Link href='/hello' as='/first'> + <a id='to-hello'>to hello</a> + </Link> + <Link href='/hello-again' as='/second'> + <a id='to-hello-again'>to hello-again</a> + </Link> + </> +)
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
test/integration/custom-routes/pages/with-params.js
@@ -0,0 +1,10 @@ +import { useRouter } from 'next/router' + +const Page = () => { + const { query } = useRouter() + return <p>{JSON.stringify(query)}</p> +} + +Page.getInitialProps = () => ({ hello: 'GIPGIP' }) + +export default Page
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
test/integration/custom-routes/test/index.test.js
@@ -0,0 +1,130 @@ +/* eslint-env jest */ +/* global jasmine */ +import url from 'url' +import { join } from 'path' +import webdriver from 'next-webdriver' +import { + launchApp, + killApp, + findPort, + nextBuild, + nextStart, + fetchViaHTTP, + renderViaHTTP, + getBrowserBodyText, + waitFor +} from 'next-test-...
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
test/integration/dynamic-routing/test/index.test.js
@@ -232,7 +232,9 @@ function runTests (dev) { ) expect(manifest).toEqual({ - version: 0, + version: 1, + rewrites: [], + redirects: [], dynamicRoutes: [ { page: '/blog/[name]/comment/[id]',
true
Other
vercel
next.js
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
test/integration/error-in-error/pages/_error.js
@@ -1,8 +1,10 @@ import React from 'react' class Error extends React.Component { - static async getInitialProps ({ res, err }) { - await Promise.reject(new Error('an error in error')) + static async getInitialProps ({ req, res, err }) { + if (req.url !== '/404.html') { + await Promise.reject(new Error(...
true