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
7be3b1014883e4c9c8cf4ad24776020c8d03fd69.json
Add experimental Storybook preset (#12934)
packages/next-plugin-storybook/preset.js
@@ -0,0 +1,62 @@ +const { PHASE_PRODUCTION_BUILD } = require('next/constants') +const { findPagesDir } = require('next/dist/lib/find-pages-dir') +const loadConfig = require('next/dist/next-server/server/config').default +const getWebpackConfig = require('next/dist/build/webpack-config').default + +const CWD = process.c...
true
Other
vercel
next.js
7be3b1014883e4c9c8cf4ad24776020c8d03fd69.json
Add experimental Storybook preset (#12934)
packages/next-plugin-storybook/readme.md
@@ -0,0 +1,3 @@ +# Unstable @next/plugin-storybook + +This package is still very experimental and should not be used at this point
true
Other
vercel
next.js
9acc7cfc68186779ef485689c3602a00d1ffb064.json
Add reference to deployment wiki page (#1423)
readme.md
@@ -432,7 +432,7 @@ componentWillReceiveProps(nextProps) { ``` > NOTES: -> +> > Shallow routing works **only** for same page URL changes. For an example, let's assume we've another page called `about`, and you run this: > ```js > Router.push('/about?counter=10', '/about?counter=10', { shallow: true }) @@ -679,7...
false
Other
vercel
next.js
228bbbef74cb79952b2d598110b67a32776ee9dd.json
Use jsonPageRes instead of xhr (#1424)
examples/with-flow/types/next.js.flow
@@ -42,7 +42,7 @@ declare module "next/document" { declare export var Main: Class<React$Component<void, any, any>>; declare export var NextScript: Class<React$Component<void, any, any>>; declare export default Class<React$Component<void, any, any>> & { - getInitialProps: (ctx: {pathname: string, query: any,...
true
Other
vercel
next.js
228bbbef74cb79952b2d598110b67a32776ee9dd.json
Use jsonPageRes instead of xhr (#1424)
lib/error.js
@@ -3,8 +3,8 @@ import HTTPStatus from 'http-status' import Head from './head' export default class Error extends React.Component { - static getInitialProps ({ res, xhr }) { - const statusCode = res ? res.statusCode : (xhr ? xhr.status : null) + static getInitialProps ({ res, jsonPageRes }) { + const status...
true
Other
vercel
next.js
228bbbef74cb79952b2d598110b67a32776ee9dd.json
Use jsonPageRes instead of xhr (#1424)
lib/router/router.js
@@ -341,7 +341,7 @@ export default class Router { const res = await promise // We need to clone this to prevent reading the body twice - // Becuase it's possible only once to read res.json() or a similar method. + // Because it's possible only once to read res.json() or a similar method. return r...
true
Other
vercel
next.js
228bbbef74cb79952b2d598110b67a32776ee9dd.json
Use jsonPageRes instead of xhr (#1424)
readme.md
@@ -223,7 +223,7 @@ _Note: `getInitialProps` can **not** be used in children components. Only in `pa - `query` - query string section of URL parsed as an object - `req` - HTTP request object (server only) - `res` - HTTP response object (server only) -- `xhr` - XMLHttpRequest object (client only) +- `jsonPageRes` - [...
true
Other
vercel
next.js
68a7b59b19ebb8e100a25392042096e7a99757e1.json
Upgrade styled-components. Fixes #1416 (#1422)
examples/with-styled-components/package.json
@@ -10,7 +10,7 @@ "next": "^2.0.0-beta", "react": "^15.4.2", "react-dom": "^15.4.2", - "styled-components": "1.2.1" + "styled-components": "^1.4.4" }, "author": "", "license": "ISC"
false
Other
vercel
next.js
4ad5e2e0dc994abc8b0254a450f6f6652b6402cc.json
Examples: Update Inferno & Preact (#1407) * clean & bump inferno & preact pkgs * reenable UglifyJS for preact
examples/using-inferno/package.json
@@ -7,13 +7,11 @@ "start": "NODE_ENV=production node server.js" }, "dependencies": { - "inferno": "^1.0.7", - "inferno-compat": "^1.0.7", - "inferno-server": "^1.3.0-rc.9", + "inferno": "^1.4.0", + "inferno-compat": "^1.4.0", + "inferno-server": "^1.4.0", "module-alias": "^2.0.0", - ...
true
Other
vercel
next.js
4ad5e2e0dc994abc8b0254a450f6f6652b6402cc.json
Examples: Update Inferno & Preact (#1407) * clean & bump inferno & preact pkgs * reenable UglifyJS for preact
examples/using-preact/next.config.js
@@ -11,10 +11,6 @@ module.exports = { 'react-dom': 'preact-compat/dist/preact-compat' } - // Disable uglify. This has been fixed in https://github.com/developit/preact-compat/issues/155. - // Can be removed once there is a new preact-compat release. - config.plugins = config.plugins.filter((plugi...
true
Other
vercel
next.js
4ad5e2e0dc994abc8b0254a450f6f6652b6402cc.json
Examples: Update Inferno & Preact (#1407) * clean & bump inferno & preact pkgs * reenable UglifyJS for preact
examples/using-preact/package.json
@@ -1,5 +1,5 @@ { - "name": "hello-world", + "name": "using-preact", "version": "1.0.0", "scripts": { "dev": "node server.js", @@ -9,15 +9,9 @@ "dependencies": { "module-alias": "^2.0.0", "next": "^2.0.0-beta", - "preact": "^7.1.0", - "preact-compat": "^3.9.4", - "react": "^15.4.2", ...
true
Other
vercel
next.js
57099a544cbc5de99d02675335de988e3cb4f28e.json
Use mitt instead of EventEmitter. (#1398) EventEmitter is quite bit and mitt is a pretty good/small replacement.
client/on-demand-entries-client.js
@@ -4,7 +4,7 @@ import Router from '../lib/router' import fetch from 'unfetch' Router.ready(() => { - Router.router.on('routeChangeComplete', ping) + Router.router.events.on('routeChangeComplete', ping) }) async function ping () {
true
Other
vercel
next.js
57099a544cbc5de99d02675335de988e3cb4f28e.json
Use mitt instead of EventEmitter. (#1398) EventEmitter is quite bit and mitt is a pretty good/small replacement.
lib/router/index.js
@@ -39,7 +39,7 @@ coreMethodFields.forEach((field) => { routerEvents.forEach((event) => { SingletonRouter.ready(() => { - SingletonRouter.router.on(event, (...args) => { + SingletonRouter.router.events.on(event, (...args) => { const eventField = `on${event.charAt(0).toUpperCase()}${event.substring(1)...
true
Other
vercel
next.js
57099a544cbc5de99d02675335de988e3cb4f28e.json
Use mitt instead of EventEmitter. (#1398) EventEmitter is quite bit and mitt is a pretty good/small replacement.
lib/router/router.js
@@ -1,5 +1,5 @@ import { parse, format } from 'url' -import { EventEmitter } from 'events' +import mitt from 'mitt' import fetch from 'unfetch' import evalScript from '../eval-script' import shallowEquals from '../shallow-equals' @@ -25,9 +25,8 @@ if (typeof window !== 'undefined' && typeof navigator.serviceWorker ...
true
Other
vercel
next.js
57099a544cbc5de99d02675335de988e3cb4f28e.json
Use mitt instead of EventEmitter. (#1398) EventEmitter is quite bit and mitt is a pretty good/small replacement.
package.json
@@ -68,6 +68,7 @@ "json-loader": "0.5.4", "loader-utils": "1.0.3", "minimist": "1.2.0", + "mitt": "1.1.0", "mkdirp-then": "1.2.0", "mv": "2.1.1", "mz": "2.6.0",
true
Other
vercel
next.js
57099a544cbc5de99d02675335de988e3cb4f28e.json
Use mitt instead of EventEmitter. (#1398) EventEmitter is quite bit and mitt is a pretty good/small replacement.
yarn.lock
@@ -1213,15 +1213,14 @@ chokidar@^1.4.3, chokidar@^1.6.1: optionalDependencies: fsevents "^1.0.0" -chromedriver@2.26.1: - version "2.26.1" - resolved "https://registry.npmjs.org/chromedriver/-/chromedriver-2.26.1.tgz#60036732224580d2699afd2626f5f26ea1f6c9fe" +chromedriver@2.28.0: + version "2.28.0" + reso...
true
Other
vercel
next.js
38822717a982ebd400521ee14e5d442ddb00c350.json
Add support for URL objects in Link and Router (#1345) * Add support for URL objects in Link and Router * Fix typo in comment * Fix possible bug if the `href` prop is `null` * Document the usage of URL objects in Link and Router * Update readme.md * Parse URL to get the host & hostname in `isLocal` T...
examples/with-url-object-routing/README.md
@@ -0,0 +1,29 @@ +# URL object routing + +## How to use + +Download the example [or clone the repo](https://github.com/zeit/next.js): + +```bash +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/with-url-object-routing +cd with-url-object-routing +``` + +Install it...
true
Other
vercel
next.js
38822717a982ebd400521ee14e5d442ddb00c350.json
Add support for URL objects in Link and Router (#1345) * Add support for URL objects in Link and Router * Fix typo in comment * Fix possible bug if the `href` prop is `null` * Document the usage of URL objects in Link and Router * Update readme.md * Parse URL to get the host & hostname in `isLocal` T...
examples/with-url-object-routing/package.json
@@ -0,0 +1,13 @@ +{ + "scripts": { + "dev": "node server.js", + "build": "next build", + "start": "NODE_ENV=production node server.js" + }, + "dependencies": { + "next": "beta", + "path-match": "1.2.4", + "react": "^15.4.2", + "react-dom": "^15.4.2" + } +}
true
Other
vercel
next.js
38822717a982ebd400521ee14e5d442ddb00c350.json
Add support for URL objects in Link and Router (#1345) * Add support for URL objects in Link and Router * Fix typo in comment * Fix possible bug if the `href` prop is `null` * Document the usage of URL objects in Link and Router * Update readme.md * Parse URL to get the host & hostname in `isLocal` T...
examples/with-url-object-routing/pages/about.js
@@ -0,0 +1,28 @@ +import React from 'react' +import Link from 'next/link' +import Router from 'next/router' + +const href = { + pathname: '/about', + query: { name: 'zeit' } +} + +const as = { + pathname: '/about/zeit', + hash: 'title-1' +} + +const handleClick = () => Router.push(href, as) + +export default (props...
true
Other
vercel
next.js
38822717a982ebd400521ee14e5d442ddb00c350.json
Add support for URL objects in Link and Router (#1345) * Add support for URL objects in Link and Router * Fix typo in comment * Fix possible bug if the `href` prop is `null` * Document the usage of URL objects in Link and Router * Update readme.md * Parse URL to get the host & hostname in `isLocal` T...
examples/with-url-object-routing/pages/index.js
@@ -0,0 +1,21 @@ +import React from 'react' +import Link from 'next/link' + +const href = { + pathname: '/about', + query: { name: 'next' } +} + +const as = { + pathname: '/about/next', + hash: 'title-1' +} + +export default () => ( + <div> + <h1>Home page</h1> + <Link href={href} as={as}> + <a>Go to /a...
true
Other
vercel
next.js
38822717a982ebd400521ee14e5d442ddb00c350.json
Add support for URL objects in Link and Router (#1345) * Add support for URL objects in Link and Router * Fix typo in comment * Fix possible bug if the `href` prop is `null` * Document the usage of URL objects in Link and Router * Update readme.md * Parse URL to get the host & hostname in `isLocal` T...
examples/with-url-object-routing/server.js
@@ -0,0 +1,28 @@ +const { createServer } = require('http') +const { parse } = require('url') +const next = require('next') +const pathMatch = require('path-match') + +const dev = process.env.NODE_ENV !== 'production' +const app = next({ dev }) +const handle = app.getRequestHandler() +const route = pathMatch() +const ma...
true
Other
vercel
next.js
38822717a982ebd400521ee14e5d442ddb00c350.json
Add support for URL objects in Link and Router (#1345) * Add support for URL objects in Link and Router * Fix typo in comment * Fix possible bug if the `href` prop is `null` * Document the usage of URL objects in Link and Router * Update readme.md * Parse URL to get the host & hostname in `isLocal` T...
lib/link.js
@@ -1,12 +1,13 @@ -import { resolve } from 'url' +import { resolve, format, parse } from 'url' import React, { Component, Children, PropTypes } from 'react' import Router from './router' import { warn, execOnce, getLocationOrigin } from './utils' export default class Link extends Component { - constructor (props...
true
Other
vercel
next.js
38822717a982ebd400521ee14e5d442ddb00c350.json
Add support for URL objects in Link and Router (#1345) * Add support for URL objects in Link and Router * Fix typo in comment * Fix possible bug if the `href` prop is `null` * Document the usage of URL objects in Link and Router * Update readme.md * Parse URL to get the host & hostname in `isLocal` T...
lib/router/router.js
@@ -128,7 +128,12 @@ export default class Router extends EventEmitter { return this.change('replaceState', url, as, options) } - async change (method, url, as, options) { + async change (method, _url, _as, options) { + // If url and as provided as an object representation, + // we'll format them into ...
true
Other
vercel
next.js
38822717a982ebd400521ee14e5d442ddb00c350.json
Add support for URL objects in Link and Router (#1345) * Add support for URL objects in Link and Router * Fix typo in comment * Fix possible bug if the `href` prop is `null` * Document the usage of URL objects in Link and Router * Update readme.md * Parse URL to get the host & hostname in `isLocal` T...
readme.md
@@ -271,6 +271,27 @@ Each top-level component receives a `url` property with the following API: The second `as` parameter for `push` and `replace` is an optional _decoration_ of the URL. Useful if you configured custom routes on the server. +##### With URL object + +<p><details> + <summary><b>Examples</b></summar...
true
Other
vercel
next.js
38822717a982ebd400521ee14e5d442ddb00c350.json
Add support for URL objects in Link and Router (#1345) * Add support for URL objects in Link and Router * Fix typo in comment * Fix possible bug if the `href` prop is `null` * Document the usage of URL objects in Link and Router * Update readme.md * Parse URL to get the host & hostname in `isLocal` T...
test/integration/basic/pages/nav/index.js
@@ -1,5 +1,6 @@ import Link from 'next/link' import { Component } from 'react' +import Router from 'next/router' let counter = 0 @@ -13,13 +14,33 @@ export default class extends Component { this.forceUpdate() } + visitQueryStringPage () { + const href = { pathname: '/nav/querystring', query: { id: ...
true
Other
vercel
next.js
38822717a982ebd400521ee14e5d442ddb00c350.json
Add support for URL objects in Link and Router (#1345) * Add support for URL objects in Link and Router * Fix typo in comment * Fix possible bug if the `href` prop is `null` * Document the usage of URL objects in Link and Router * Update readme.md * Parse URL to get the host & hostname in `isLocal` T...
test/integration/basic/pages/nav/querystring.js
@@ -8,7 +8,7 @@ export default class AsyncProps extends React.Component { render () { return ( - <div> + <div className='nav-querystring'> <Link href={`/nav/querystring?id=${parseInt(this.props.id) + 1}`}> <a id='next-id-link'>Click here</a> </Link>
true
Other
vercel
next.js
38822717a982ebd400521ee14e5d442ddb00c350.json
Add support for URL objects in Link and Router (#1345) * Add support for URL objects in Link and Router * Fix typo in comment * Fix possible bug if the `href` prop is `null` * Document the usage of URL objects in Link and Router * Update readme.md * Parse URL to get the host & hostname in `isLocal` T...
test/integration/basic/test/client-navigation.js
@@ -236,5 +236,33 @@ export default (context, render) => { browser.close() }) }) + + describe('with URL objects', () => { + it('should work with <Link/>', async () => { + const browser = await webdriver(context.appPort, '/nav') + const text = await browser + .elementB...
true
Other
vercel
next.js
634a62441d69479a10736b2d51ce56ae0ec4cd8e.json
send credentials when fetching new route (#1371)
lib/router/router.js
@@ -343,6 +343,7 @@ export default class Router extends EventEmitter { return fetch(url, { method: 'GET', + credentials: 'same-origin', headers: { 'Accept': 'application/json' } }) }
false
Other
vercel
next.js
5947716ff7828278d4febb095c7f98db40a17454.json
Implement preact/inferno SSR (#1346) * Use module-alias to alias preact server side * Use module-alias to alias inferno server side * Remove unneeded routes example
examples/using-inferno/next.config.js
@@ -1,5 +1,11 @@ module.exports = { - webpack: function (config) { + 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 = { 'react': 'infern...
true
Other
vercel
next.js
5947716ff7828278d4febb095c7f98db40a17454.json
Implement preact/inferno SSR (#1346) * Use module-alias to alias preact server side * Use module-alias to alias inferno server side * Remove unneeded routes example
examples/using-inferno/package.json
@@ -2,13 +2,15 @@ "name": "using-inferno", "version": "1.0.0", "scripts": { - "dev": "next", + "dev": "node server.js", "build": "next build", - "start": "next start" + "start": "NODE_ENV=production node server.js" }, "dependencies": { "inferno": "^1.0.7", "inferno-compat": "^1...
true
Other
vercel
next.js
5947716ff7828278d4febb095c7f98db40a17454.json
Implement preact/inferno SSR (#1346) * Use module-alias to alias preact server side * Use module-alias to alias inferno server side * Remove unneeded routes example
examples/using-inferno/server.js
@@ -0,0 +1,29 @@ +const dev = process.env.NODE_ENV !== 'production' +const moduleAlias = require('module-alias') + +// For the development version, we'll use React. +// Because, it support react hot loading and so on. +if (!dev) { + moduleAlias.addAlias('react', 'inferno-compat') + moduleAlias.addAlias('react-dom/ser...
true
Other
vercel
next.js
5947716ff7828278d4febb095c7f98db40a17454.json
Implement preact/inferno SSR (#1346) * Use module-alias to alias preact server side * Use module-alias to alias inferno server side * Remove unneeded routes example
examples/using-preact/next.config.js
@@ -1,9 +1,26 @@ module.exports = { - webpack: function (config) { + 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 = { 'react': 'preact...
true
Other
vercel
next.js
5947716ff7828278d4febb095c7f98db40a17454.json
Implement preact/inferno SSR (#1346) * Use module-alias to alias preact server side * Use module-alias to alias inferno server side * Remove unneeded routes example
examples/using-preact/package.json
@@ -2,11 +2,12 @@ "name": "hello-world", "version": "1.0.0", "scripts": { - "dev": "next", + "dev": "node server.js", "build": "next build", - "start": "next start" + "start": "NODE_ENV=production node server.js" }, "dependencies": { + "module-alias": "^2.0.0", "next": "^2.0.0-be...
true
Other
vercel
next.js
5947716ff7828278d4febb095c7f98db40a17454.json
Implement preact/inferno SSR (#1346) * Use module-alias to alias preact server side * Use module-alias to alias inferno server side * Remove unneeded routes example
examples/using-preact/server.js
@@ -0,0 +1,28 @@ +const dev = process.env.NODE_ENV !== 'production' +const moduleAlias = require('module-alias') + +// For the development version, we'll use React. +// Because, it support react hot loading and so on. +if (dev) { + moduleAlias.addAlias('react', 'preact-compat') + moduleAlias.addAlias('react-dom', 'pr...
true
Other
vercel
next.js
ef2bbfee5acada10be2e943e421a7e080cedf067.json
Add default entries to main.js (#1343) So, we don't need to add them to individual pages. This also fix the issue where, error pages doesn't ping the server.
server/build/webpack.js
@@ -28,15 +28,22 @@ const relativeResolve = rootModuleRelativePath(require) export default async function createCompiler (dir, { dev = false, quiet = false, buildDir } = {}) { dir = resolve(dir) const config = getConfig(dir) - const defaultEntries = dev - ? [join(__dirname, '..', '..', 'client/webpack-hot-mi...
true
Other
vercel
next.js
ef2bbfee5acada10be2e943e421a7e080cedf067.json
Add default entries to main.js (#1343) So, we don't need to add them to individual pages. This also fix the issue where, error pages doesn't ping the server.
server/on-demand-entry-handler.js
@@ -71,11 +71,7 @@ export default function onDemandEntryHandler (devMiddleware, compiler, { const pathname = await resolvePath(pagePath) const name = join('bundles', pathname.substring(dir.length)) - const entry = [ - join(__dirname, '..', 'client/webpack-hot-middleware-client'), - jo...
true
Other
vercel
next.js
62fcb2b664c27689d565d6709f83c6ac322a9a7c.json
Add a global Promise polyfill. (#1344) * Add a global Promise polyfill. This is because Webpack2 depends on it. * Change the polyfill location.
client/index.js
@@ -7,6 +7,15 @@ import App from '../lib/app' import evalScript from '../lib/eval-script' import { loadGetInitialProps, getURL } from '../lib/utils' +// Polyfill Promise globally +// This is needed because Webpack2's dynamic loading(common chunks) code +// depends on Promise. +// So, we need to polyfill it. +// See...
false
Other
vercel
next.js
a0b16e03b89122295fb46d3e9ecb9e9f90d9056a.json
Remove unused webpack import in flyfile.js (#1332)
flyfile.js
@@ -1,4 +1,3 @@ -const webpack = require('webpack') const notifier = require('node-notifier') const childProcess = require('child_process') const isWindows = /^win/.test(process.platform)
false
Other
vercel
next.js
40738c6e44ffd901be0935bbf865ed19499d7ece.json
Throw Error when url.parse without true is parsed (#1282) * Throw Error when url.parse without true is parsed This is a bit more descriptive when this mistake is made by the user. * Parse when needed * Parse querystring if it is not provided
server/index.js
@@ -1,5 +1,6 @@ import { resolve, join } from 'path' -import { parse } from 'url' +import { parse as parseUrl } from 'url' +import { parse as parseQs } from 'querystring' import fs from 'mz/fs' import http, { STATUS_CODES } from 'http' import { @@ -33,12 +34,14 @@ export default class Server { getRequestHandle...
false
Other
vercel
next.js
68d48cb004ac2e0df34c143c82d96b2e12750f3f.json
Update Koa example for Koa 2 with async/await (#1317)
examples/custom-server-koa/package.json
@@ -6,8 +6,8 @@ "start": "NODE_ENV=production node server.js" }, "dependencies": { - "koa": "^1.2.4", - "koa-router": "^5.4.0", + "koa": "^2.0.1", + "koa-router": "^7.1.0", "next": "^2.0.0-beta", "react": "^15.4.2", "react-dom": "^15.4.2"
true
Other
vercel
next.js
68d48cb004ac2e0df34c143c82d96b2e12750f3f.json
Update Koa example for Koa 2 with async/await (#1317)
examples/custom-server-koa/server.js
@@ -11,26 +11,24 @@ app.prepare() const server = new Koa() const router = new Router() - router.get('/a', function *() { - app.render(this.req, this.res, '/b', this.query) - this.respond = false + router.get('/a', async ctx => { + await app.render(ctx.req, ctx.res, '/b', ctx.query) + ctx.respond =...
true
Other
vercel
next.js
e3d298dc621c50db4a74ece68cebd0114d087daf.json
Add support for rewriting to external resources (#10041) * Add support for rewriting to external resources * Update rewrite proxying test Co-authored-by: Tim Neutkens <tim@timneutkens.nl> Co-authored-by: Joe Haddad <timer150@gmail.com>
package.json
@@ -40,6 +40,7 @@ "@babel/preset-react": "7.7.0", "@fullhuman/postcss-purgecss": "1.3.0", "@mdx-js/loader": "0.18.0", + "@types/http-proxy": "1.17.3", "@types/jest": "24.0.13", "@types/string-hash": "1.1.1", "@typescript-eslint/eslint-plugin": "2.17.0", @@ -53,7 +54,9 @@ "babel-cor...
true
Other
vercel
next.js
e3d298dc621c50db4a74ece68cebd0114d087daf.json
Add support for rewriting to external resources (#10041) * Add support for rewriting to external resources * Update rewrite proxying test Co-authored-by: Tim Neutkens <tim@timneutkens.nl> Co-authored-by: Joe Haddad <timer150@gmail.com>
packages/next/lib/check-custom-routes.ts
@@ -127,8 +127,13 @@ export default function checkCustomRoutes( invalidParts.push('`destination` is missing') } else if (typeof _route.destination !== 'string') { invalidParts.push('`destination` is not a string') - } else if (type === 'rewrite' && !_route.destination.startsWith('/')) { - ...
true
Other
vercel
next.js
e3d298dc621c50db4a74ece68cebd0114d087daf.json
Add support for rewriting to external resources (#10041) * Add support for rewriting to external resources * Update rewrite proxying test Co-authored-by: Tim Neutkens <tim@timneutkens.nl> Co-authored-by: Joe Haddad <timer150@gmail.com>
packages/next/next-server/server/next-server.ts
@@ -1,5 +1,6 @@ import compression from 'compression' import fs from 'fs' +import Proxy from 'http-proxy' import { IncomingMessage, ServerResponse } from 'http' import { join, resolve, sep } from 'path' import { compile as compilePathToRegex } from 'path-to-regexp' @@ -451,7 +452,7 @@ export default class Server {...
true
Other
vercel
next.js
e3d298dc621c50db4a74ece68cebd0114d087daf.json
Add support for rewriting to external resources (#10041) * Add support for rewriting to external resources * Update rewrite proxying test Co-authored-by: Tim Neutkens <tim@timneutkens.nl> Co-authored-by: Joe Haddad <timer150@gmail.com>
packages/next/package.json
@@ -102,6 +102,7 @@ "fork-ts-checker-webpack-plugin": "3.1.1", "fresh": "0.5.2", "gzip-size": "5.1.1", + "http-proxy": "1.18.0", "ignore-loader": "0.1.2", "is-docker": "2.0.0", "is-wsl": "2.1.1",
true
Other
vercel
next.js
e3d298dc621c50db4a74ece68cebd0114d087daf.json
Add support for rewriting to external resources (#10041) * Add support for rewriting to external resources * Update rewrite proxying test Co-authored-by: Tim Neutkens <tim@timneutkens.nl> Co-authored-by: Joe Haddad <timer150@gmail.com>
test/integration/custom-routes/next.config.js
@@ -55,6 +55,10 @@ module.exports = { source: '/hidden/_next/:path*', destination: '/_next/:path*', }, + { + source: '/proxy-me/:path*', + destination: 'http://localhost:__EXTERNAL_PORT__/:path*', + }, { source: '/api-hello', ...
true
Other
vercel
next.js
e3d298dc621c50db4a74ece68cebd0114d087daf.json
Add support for rewriting to external resources (#10041) * Add support for rewriting to external resources * Update rewrite proxying test Co-authored-by: Tim Neutkens <tim@timneutkens.nl> Co-authored-by: Joe Haddad <timer150@gmail.com>
test/integration/custom-routes/test/index.test.js
@@ -1,5 +1,6 @@ /* eslint-env jest */ /* global jasmine */ +import http from 'http' import url from 'url' import stripAnsi from 'strip-ansi' import fs from 'fs-extra' @@ -24,9 +25,13 @@ jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 let appDir = join(__dirname, '..') const nextConfigPath = join(appDir, 'next...
true
Other
vercel
next.js
e3d298dc621c50db4a74ece68cebd0114d087daf.json
Add support for rewriting to external resources (#10041) * Add support for rewriting to external resources * Update rewrite proxying test Co-authored-by: Tim Neutkens <tim@timneutkens.nl> Co-authored-by: Joe Haddad <timer150@gmail.com>
test/integration/invalid-custom-routes/test/index.test.js
@@ -167,7 +167,7 @@ const runTests = () => { ) expect(stderr).toContain( - `\`destination\` does not start with / for route {"source":"/hello","destination":"another"}` + `\`destination\` does not start with \`/\`, \`http://\`, or \`https://\` for route {"source":"/hello","destination":"another"}`...
true
Other
vercel
next.js
e3d298dc621c50db4a74ece68cebd0114d087daf.json
Add support for rewriting to external resources (#10041) * Add support for rewriting to external resources * Update rewrite proxying test Co-authored-by: Tim Neutkens <tim@timneutkens.nl> Co-authored-by: Joe Haddad <timer150@gmail.com>
yarn.lock
@@ -2583,6 +2583,13 @@ "@types/tough-cookie" "*" form-data "^2.5.0" +"@types/http-proxy@1.17.3": + version "1.17.3" + resolved "https://registry.yarnpkg.com/@types/http-proxy/-/http-proxy-1.17.3.tgz#348e1b808ff9585423cb909e9992d89ccdbf4c14" + integrity sha512-wIPqXANye5BbORbuh74exbwNzj+UWCwWyeEFJzUQ7Fq3W...
true
Other
vercel
next.js
bc81379618c0a4de4bff9aff2d555d2232643d18.json
Detect Invalid Pages Before Optimize (#10418)
packages/next/build/index.ts
@@ -1,5 +1,6 @@ import chalk from 'chalk' import ciEnvironment from 'ci-info' +import escapeStringRegexp from 'escape-string-regexp' import findUp from 'find-up' import fs from 'fs' import Worker from 'jest-worker' @@ -11,14 +12,14 @@ import { promisify } from 'util' import formatWebpackMessages from '../client/d...
true
Other
vercel
next.js
bc81379618c0a4de4bff9aff2d555d2232643d18.json
Detect Invalid Pages Before Optimize (#10418)
packages/next/telemetry/events/build.ts
@@ -1,15 +1,34 @@ +const REGEXP_DIRECTORY_DUNDER = /[\\/]__[^\\/]+(?<![\\/]__(?:tests|mocks))__[\\/]/i +const REGEXP_DIRECTORY_TESTS = /[\\/]__(tests|mocks)__[\\/]/i +const REGEXP_FILE_TEST = /\.(?:spec|test)\.[^.]+$/i + const EVENT_BUILD_DURATION = 'NEXT_BUILD_COMPLETED' type EventBuildCompleted = { durationInSec...
true
Other
vercel
next.js
bc81379618c0a4de4bff9aff2d555d2232643d18.json
Detect Invalid Pages Before Optimize (#10418)
test/integration/telemetry/test/index.test.js
@@ -108,8 +108,13 @@ describe('Telemetry CLI', () => { path.join(appDir, 'pages', 'hello.test.skip') ) - expect(stderr).toMatch(/hasDunderPages.*?true/) - expect(stderr).toMatch(/hasTestPages.*?true/) + const event1 = /NEXT_BUILD_COMPLETED[\s\S]+?{([\s\S]+?)}/.exec(stderr).pop() + expect(event...
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/blog-starter/now.json
@@ -1,8 +1,6 @@ { - "version": 2, "name": "nextjs-blog-starter", "alias": ["nextjs-blog-starter.now.sh"], - "builds": [{ "src": "package.json", "use": "@now/next" }], "routes": [ { "src": "/feed.json", "dest": "/_next/static/feed.json" }, { "src": "/blog/(?<page>[^/]+)$", "dest": "/blog?page=$page...
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/with-now-env/now.json
@@ -1,11 +1,4 @@ { - "version": 2, - "builds": [ - { - "src": "package.json", - "use": "@now/next" - } - ], "build": { "env": { "SECRET": "@my-secret-key",
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/with-stencil/README.md
@@ -47,6 +47,8 @@ Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit. now ``` +> Choose `packages/web-app` as root directory when deploying. + ## The idea behind the example Stencil is a compiler that generates Web Components (more specifically, Custom Elements). Stencil combines th...
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/with-stencil/now.json
@@ -1,5 +0,0 @@ -{ - "version": 2, - "builds": [{ "src": "packages/web-app/package.json", "use": "@now/next" }], - "routes": [{ "src": "(.*)", "dest": "packages/web-app$1", "continue": true }] -}
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/with-yarn-workspaces/README.md
@@ -48,6 +48,8 @@ Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit. now ``` +> Choose `packages/web-app` as root directory when deploying. + ## Useful Links - [Documentation](https://yarnpkg.com/en/docs/workspaces)
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/with-yarn-workspaces/now.json
@@ -1,5 +0,0 @@ -{ - "version": 2, - "builds": [{ "src": "packages/web-app/package.json", "use": "@now/next" }], - "routes": [{ "src": "(.*)", "dest": "packages/web-app$1", "continue": true }] -}
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/with-zones/blog/.gitignore
@@ -1,2 +1,4 @@ .next node_modules + +.now \ No newline at end of file
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/with-zones/blog/now.json
@@ -0,0 +1,13 @@ +{ + "build": { + "env": { + "BUILDING_FOR_NOW": "true" + } + }, + "rewrites": [ + { + "source": "/blog/_next$1", + "destination": "/_next$1" + } + ] +}
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/with-zones/home/.gitignore
@@ -1,2 +1,4 @@ .next node_modules + +.now \ No newline at end of file
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/with-zones/home/now.json
@@ -0,0 +1,8 @@ +{ + "rewrites": [ + { + "source": "/blog(.*)", + "destination": "https://with-zones-blog.now.sh$1" + } + ] +}
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/with-zones/now.json
@@ -1,18 +0,0 @@ -{ - "name": "with-zones", - "version": 2, - "builds": [ - { "src": "blog/next.config.js", "use": "@now/next" }, - { "src": "home/next.config.js", "use": "@now/next" } - ], - "routes": [ - { "src": "/blog/(_next|static)(.*)" }, - { "src": "/blog(.*)", "dest": "blog/blog$1", "continue":...
true
Other
vercel
next.js
44e234e93422819033afb92a2363cbb7d007b1f8.json
Remove `builds` from examples (#10417) * Remove `builds` from examples * Fix with-zones example * Run prettier on now.json
examples/z-experimental-next-news/now.json
@@ -1,3 +0,0 @@ -{ - "builds": [{ "src": "package.json", "use": "@now/next@canary" }] -}
true
Other
vercel
next.js
c480c37c8e23d95fb976012e879376bb3a8bb275.json
Skip undefined attribute in Head (#9856) * Fix #8655, skip rendering meta tags with undefined props * Filter all tags, not just meta * Only render defined props * Remove filtering of undefined strings Co-Authored-By: Tim Neutkens <tim@timneutkens.nl> * Replace Object.entries * Remove filtering code * Simplify c...
packages/next/client/head-manager.js
@@ -95,6 +95,9 @@ function reactElementToDOM({ type, props }) { if (!props.hasOwnProperty(p)) continue if (p === 'children' || p === 'dangerouslySetInnerHTML') continue + // we don't render undefined props to the DOM + if (props[p] === undefined) continue + const attr = DOMAttributeNames[p] || p....
true
Other
vercel
next.js
c480c37c8e23d95fb976012e879376bb3a8bb275.json
Skip undefined attribute in Head (#9856) * Fix #8655, skip rendering meta tags with undefined props * Filter all tags, not just meta * Only render defined props * Remove filtering of undefined strings Co-Authored-By: Tim Neutkens <tim@timneutkens.nl> * Replace Object.entries * Remove filtering code * Simplify c...
test/integration/client-navigation/pages/head.js
@@ -16,6 +16,9 @@ export default () => ( <meta content="my meta" /> + {/* this will not render the content prop */} + <meta name="empty-content" content={undefined} /> + {/* allow duplicates for specific tags */} <meta property="article:tag" content="tag1" key="tag1key" /> <met...
true
Other
vercel
next.js
c480c37c8e23d95fb976012e879376bb3a8bb275.json
Skip undefined attribute in Head (#9856) * Fix #8655, skip rendering meta tags with undefined props * Filter all tags, not just meta * Only render defined props * Remove filtering of undefined strings Co-Authored-By: Tim Neutkens <tim@timneutkens.nl> * Replace Object.entries * Remove filtering code * Simplify c...
test/integration/client-navigation/test/index.test.js
@@ -1097,6 +1097,15 @@ describe('Client Navigation', () => { await browser.close() }) + it('should handle undefined prop in head client-side', async () => { + const browser = await webdriver(context.appPort, '/head') + const value = await browser.eval( + `document.querySelector('meta[name="empty-c...
true
Other
vercel
next.js
c480c37c8e23d95fb976012e879376bb3a8bb275.json
Skip undefined attribute in Head (#9856) * Fix #8655, skip rendering meta tags with undefined props * Filter all tags, not just meta * Only render defined props * Remove filtering of undefined strings Co-Authored-By: Tim Neutkens <tim@timneutkens.nl> * Replace Object.entries * Remove filtering code * Simplify c...
test/integration/client-navigation/test/rendering.js
@@ -17,6 +17,14 @@ export default function(render, fetch) { expect(html.includes('My component!')).toBeTruthy() }) + it('should handle undefined prop in head server-side', async () => { + const html = await render('/head') + const $ = cheerio.load(html) + const value = 'content' in $('me...
true
Other
vercel
next.js
3d507abe0c95f5de4dffb4f6a4cf9f8f44e9aa1e.json
Remove Old Records (#10398)
packages/next/build/webpack-config.ts
@@ -579,7 +579,6 @@ export default async function getBaseWebpackConfig( }), ].filter(Boolean), }, - recordsPath: path.join(outputPath, 'records.json'), context: dir, // Kept as function to be backwards compatible entry: async () => {
false
Other
vercel
next.js
683486da63d00c071ca9d08525d327e6310c0aa7.json
Add TypeScript Definitions for Sass (#10363) * Add TypeScript Definitions for Sass * fix test
lint-staged.config.js
@@ -14,7 +14,7 @@ module.exports = { `git add ${escapedFileNames}`, ] }, - '**/*.{json,md,mdx,css,html,yml,yaml,scss,sass}': filenames => { + '**/*.{json,md,mdx,css,html,yml,yaml,scss}': filenames => { const escapedFileNames = filenames .map(filename => `"${isWin ? filename : escape([filena...
true
Other
vercel
next.js
683486da63d00c071ca9d08525d327e6310c0aa7.json
Add TypeScript Definitions for Sass (#10363) * Add TypeScript Definitions for Sass * fix test
package.json
@@ -23,8 +23,8 @@ "lint-eslint": "eslint . --ext js,jsx,ts,tsx --max-warnings=0", "lint": "run-p lint-typescript prettier-check lint-eslint", "lint-fix": "yarn prettier-fix && eslint . --ext js,jsx,ts,tsx --fix --max-warnings=0", - "prettier-check": "prettier --check \"**/*.{js,jsx,json,ts,tsx,md,mdx,...
true
Other
vercel
next.js
683486da63d00c071ca9d08525d327e6310c0aa7.json
Add TypeScript Definitions for Sass (#10363) * Add TypeScript Definitions for Sass * fix test
packages/next/types/global.d.ts
@@ -15,3 +15,13 @@ declare module '*.module.css' { const classes: { readonly [key: string]: string } export default classes } + +declare module '*.module.sass' { + const classes: { readonly [key: string]: string } + export default classes +} + +declare module '*.module.scss' { + const classes: { readonly [key...
true
Other
vercel
next.js
683486da63d00c071ca9d08525d327e6310c0aa7.json
Add TypeScript Definitions for Sass (#10363) * Add TypeScript Definitions for Sass * fix test
test/integration/typescript/components/hello.module.sass
@@ -0,0 +1,2 @@ +.hello + content: 'hello'
true
Other
vercel
next.js
683486da63d00c071ca9d08525d327e6310c0aa7.json
Add TypeScript Definitions for Sass (#10363) * Add TypeScript Definitions for Sass * fix test
test/integration/typescript/components/hello.module.scss
@@ -0,0 +1,3 @@ +.hello { + content: 'hello'; +}
true
Other
vercel
next.js
683486da63d00c071ca9d08525d327e6310c0aa7.json
Add TypeScript Definitions for Sass (#10363) * Add TypeScript Definitions for Sass * fix test
test/integration/typescript/components/hello.ts
@@ -1,6 +1,10 @@ import helloStyles from './hello.module.css' +import helloStyles2 from './hello.module.scss' +import helloStyles3 from './hello.module.sass' export function hello(): string { console.log(helloStyles.hello) + console.log(helloStyles2.hello) + console.log(helloStyles3.hello) return 'Hello' }
true
Other
vercel
next.js
683486da63d00c071ca9d08525d327e6310c0aa7.json
Add TypeScript Definitions for Sass (#10363) * Add TypeScript Definitions for Sass * fix test
test/integration/typescript/next.config.js
@@ -3,5 +3,5 @@ module.exports = { // Make sure entries are not getting disposed. maxInactiveAge: 1000 * 60 * 60, }, - experimental: { css: true }, + experimental: { scss: true }, }
true
Other
vercel
next.js
a433b9be6a3a73b300c21e28f57296471b0ced66.json
Fix bug in catch-all routes with SSG (#10379) * Fix bug in catch-all routes with SSG * fix slash Co-authored-by: Joe Haddad <timer150@gmail.com>
packages/next/build/utils.ts
@@ -592,11 +592,9 @@ export async function isPageStatic( builtPage = builtPage.replace( `[${repeat ? '...' : ''}${validParamKey}]`, - encodeURIComponent( - repeat - ? (paramValue as string[]).join('/') - : (paramValue as string)...
true
Other
vercel
next.js
a433b9be6a3a73b300c21e28f57296471b0ced66.json
Fix bug in catch-all routes with SSG (#10379) * Fix bug in catch-all routes with SSG * fix slash Co-authored-by: Joe Haddad <timer150@gmail.com>
test/integration/prerender/test/index.test.js
@@ -109,8 +109,8 @@ const expectedManifestRoutes = () => ({ initialRevalidateSeconds: false, srcRoute: null, }, - '/catchall/another%2Fvalue': { - dataRoute: `/_next/data/${buildId}/catchall/another%2Fvalue.json`, + '/catchall/another/value': { + dataRoute: `/_next/data/${buildId}/catchall/another/...
true
Other
vercel
next.js
aa5f918c30667cf95044a19838bdcf0403413cd0.json
Update Preact Example (#10380)
examples/using-preact/README.md
@@ -1,6 +1,6 @@ # Preact example -This example uses [Preact](https://github.com/developit/preact) instead of React. It's a React like UI framework which is fast and small. Here we've customized Next.js to use Preact instead of React. +This example uses [Preact](https://github.com/preactjs/preact) instead of React. I...
true
Other
vercel
next.js
aa5f918c30667cf95044a19838bdcf0403413cd0.json
Update Preact Example (#10380)
examples/using-preact/package.json
@@ -9,8 +9,8 @@ "dependencies": { "module-alias": "2.2.2", "next": "latest", - "preact": "10.0.0", - "preact-render-to-string": "5.0.7" + "preact": "10.2.1", + "preact-render-to-string": "5.1.4" }, "license": "ISC", "devDependencies": {
true
Other
vercel
next.js
afc278f56787762795368800ea79f8e7cccce612.json
Add support for runtimeConfigs in serverless mode (#10365) * Add support for runtimeConfigs in serverless mode * Update test
errors/serverless-publicRuntimeConfig.md
@@ -1,23 +0,0 @@ -# Using `publicRuntimeConfig` or `serverRuntimeConfig` with `target` set to `serverless` - -#### Why This Error Occurred - -In the `serverless` target environment `next.config.js` is not loaded, so we don't support `publicRuntimeConfig` or `serverRuntimeConfig`. - -#### Possible Ways to Fix It - -Use ...
true
Other
vercel
next.js
afc278f56787762795368800ea79f8e7cccce612.json
Add support for runtimeConfigs in serverless mode (#10365) * Add support for runtimeConfigs in serverless mode * Update test
packages/next/build/entries.ts
@@ -67,6 +67,10 @@ export function createEntrypoints( const client: WebpackEntrypoints = {} const server: WebpackEntrypoints = {} + const hasRuntimeConfig = + Object.keys(config.publicRuntimeConfig).length > 0 || + Object.keys(config.serverRuntimeConfig).length > 0 + const defaultServerlessOptions = {...
true
Other
vercel
next.js
afc278f56787762795368800ea79f8e7cccce612.json
Add support for runtimeConfigs in serverless mode (#10365) * Add support for runtimeConfigs in serverless mode * Update test
packages/next/build/webpack/loaders/next-serverless-loader.ts
@@ -22,6 +22,7 @@ export type ServerlessLoaderQuery = { generateEtags: string canonicalBase: string basePath: string + runtimeConfig: string } const nextServerlessLoader: loader.Loader = function() { @@ -37,6 +38,7 @@ const nextServerlessLoader: loader.Loader = function() { absoluteErrorPath, ge...
true
Other
vercel
next.js
afc278f56787762795368800ea79f8e7cccce612.json
Add support for runtimeConfigs in serverless mode (#10365) * Add support for runtimeConfigs in serverless mode * Update test
packages/next/next-server/server/config.ts
@@ -254,20 +254,6 @@ export default function loadConfig( : canonicalBase) || '' } - if ( - userConfig.target && - userConfig.target !== 'server' && - ((userConfig.publicRuntimeConfig && - Object.keys(userConfig.publicRuntimeConfig).length !== 0) || - (userConfig.serverR...
true
Other
vercel
next.js
afc278f56787762795368800ea79f8e7cccce612.json
Add support for runtimeConfigs in serverless mode (#10365) * Add support for runtimeConfigs in serverless mode * Update test
test/integration/handle-non-page-in-pages/test/index.test.js
@@ -11,7 +11,7 @@ describe('Handle non-page in pages when target: serverless', () => { const { stderr } = await nextBuild(appDir, [], { stderr: true }) expect(stderr).toMatch( - /webpack build failed: found page without a React Component as default export in/ + /found page without a React Componen...
true
Other
vercel
next.js
afc278f56787762795368800ea79f8e7cccce612.json
Add support for runtimeConfigs in serverless mode (#10365) * Add support for runtimeConfigs in serverless mode * Update test
test/integration/serverless-runtime-configs/pages/config.js
@@ -0,0 +1,5 @@ +import getConfig from 'next/config' + +const config = getConfig() + +export default () => <p id="config">{JSON.stringify(config)}</p>
true
Other
vercel
next.js
afc278f56787762795368800ea79f8e7cccce612.json
Add support for runtimeConfigs in serverless mode (#10365) * Add support for runtimeConfigs in serverless mode * Update test
test/integration/serverless-runtime-configs/test/index.test.js
@@ -2,7 +2,15 @@ /* global jasmine */ import fs from 'fs-extra' import { join } from 'path' -import { nextBuild } from 'next-test-utils' +import { + nextBuild, + findPort, + nextStart, + killApp, + renderViaHTTP, +} from 'next-test-utils' +import cheerio from 'cheerio' +import webdriver from 'next-webdriver' ...
true
Other
vercel
next.js
73972577e1dc129ab89678f804706aef26c44ae9.json
Increase watch limit for GitHub actions testing (#10367)
.github/workflows/build_test_deploy.yml
@@ -49,6 +49,10 @@ jobs: with: path: '.' key: ${{ github.sha }} + + # TODO: remove after we fix watchpack watching too much + - run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p + - run: node run-tests.js --timings -g ${{ matrix...
true
Other
vercel
next.js
73972577e1dc129ab89678f804706aef26c44ae9.json
Increase watch limit for GitHub actions testing (#10367)
.github/workflows/test_react_next.yml
@@ -47,4 +47,7 @@ jobs: - run: yarn upgrade react@next react-dom@next -W --dev + # TODO: remove after we fix watchpack watching too much + - run: echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf && sudo sysctl -p + - run: node run-tests.js --timings -g ${{ matrix.group ...
true
Other
vercel
next.js
81fd704681fcac4d241e6f94bb45232ddc403e72.json
Update the default template of create-next-app (#10327) * Update the default template for create-next-app * Fix link
packages/create-next-app/templates/default/components/nav.js
@@ -1,56 +0,0 @@ -import React from 'react' -import Link from 'next/link' - -const links = [ - { href: 'https://zeit.co/now', label: 'ZEIT' }, - { href: 'https://github.com/zeit/next.js', label: 'GitHub' }, -].map(link => ({ - ...link, - key: `nav-link-${link.href}-${link.label}`, -})) - -const Nav = () => ( - <na...
true
Other
vercel
next.js
81fd704681fcac4d241e6f94bb45232ddc403e72.json
Update the default template of create-next-app (#10327) * Update the default template for create-next-app * Fix link
packages/create-next-app/templates/default/pages/index.js
@@ -1,85 +1,194 @@ import React from 'react' import Head from 'next/head' -import Nav from '../components/nav' const Home = () => ( - <div> + <div className="container"> <Head> - <title>Home</title> + <title>Create Next App</title> <link rel="icon" href="/favicon.ico" /> </Head> - ...
true
Other
vercel
next.js
81fd704681fcac4d241e6f94bb45232ddc403e72.json
Update the default template of create-next-app (#10327) * Update the default template for create-next-app * Fix link
packages/create-next-app/templates/default/public/zeit.svg
@@ -0,0 +1,10 @@ +<svg width="82" height="16" fill="none" xmlns="http://www.w3.org/2000/svg"> + <path fill="url(#prefix__paint0_linear)" d="M9.018 0l9.019 16H0L9.018 0z"/> + <path fill="#333" fill-rule="evenodd" d="M51.634 12.028h-6.492V2.052h6.492v1.256H46.61v3.007h4.37V7.57h-4.37v3.202h5.024v1.255zm-14.063 0h-7...
true
Other
vercel
next.js
6f16cef3e2f5bfff569e46ab4f5fde7e7060e0e6.json
Repair advanced feature reference (#10330) * Repair advanced feature reference The explanation of the custom document feature had been moved. * Update README.md Co-authored-by: Joe Haddad <timer150@gmail.com>
examples/with-google-analytics/README.md
@@ -1,6 +1,6 @@ # Example app with analytics -This example shows how to use [Next.js](https://github.com/zeit/next.js) along with [Google Analytics](https://developers.google.com/analytics/devguides/collection/gtagjs/). A custom [\_document](https://github.com/zeit/next.js/#custom-document) is used to inject [tracki...
false
Other
vercel
next.js
7e2170b03e4ad3c90dc861a230b5e471851b6d6d.json
Update workflow for testing against react@next (#10323)
.github/workflows/test_react_next.yml
@@ -11,11 +11,11 @@ jobs: steps: - uses: actions/checkout@v2 - - run: cd repo && yarn install --frozen-lockfile --check-files + - run: yarn install --frozen-lockfile --check-files env: NEXT_TELEMETRY_DISABLED: 1 - - run: cd repo && yarn upgrade react@next react-dom@nex...
false
Other
vercel
next.js
372031246daf598bd2896fe923280ddfee84b5d7.json
Fix typo in FaunaDB example (#10304) Colleciton -> Collection
examples/with-graphql-faunadb/scripts/setup.js
@@ -42,7 +42,7 @@ readline.question(`Please provide the FaunaDB admin key\n`, adminKey => { console.error(`Could not import schema, closing`) }) .then(res => { - // The GraphQL schema is important, this means that we now have a GuestbookEntry Colleciton and an entries index. + // The GraphQL ...
false
Other
vercel
next.js
c24daa21722fadfce2d1d561ce65ecc0efa6a7ea.json
Add initial support for unstable_getServerProps (#10077) * Add support for unstable_getServerProps * Apply suggestions from review * Add no-cache header and update types * Revert sharing of load-components type * Add catchall test and update routes-manifest field * Update header check * Update to pass query for ...
packages/next/build/babel/plugins/next-ssg-transform.ts
@@ -1,20 +1,25 @@ import { NodePath, PluginObj } from '@babel/core' import * as BabelTypes from '@babel/types' +import { SERVER_PROPS_SSG_CONFLICT } from '../../../lib/constants' const pageComponentVar = '__NEXT_COMP' const prerenderId = '__N_SSG' +const serverPropsId = '__N_SSP' export const EXPORT_NAME_GET_S...
true
Other
vercel
next.js
c24daa21722fadfce2d1d561ce65ecc0efa6a7ea.json
Add initial support for unstable_getServerProps (#10077) * Add support for unstable_getServerProps * Apply suggestions from review * Add no-cache header and update types * Revert sharing of load-components type * Add catchall test and update routes-manifest field * Update header check * Update to pass query for ...
packages/next/build/index.ts
@@ -63,6 +63,7 @@ import { } from './utils' import getBaseWebpackConfig from './webpack-config' import { writeBuildId } from './write-build-id' +import escapeStringRegexp from 'escape-string-regexp' const fsAccess = promisify(fs.access) const fsUnlink = promisify(fs.unlink) @@ -258,22 +259,23 @@ export default a...
true
Other
vercel
next.js
c24daa21722fadfce2d1d561ce65ecc0efa6a7ea.json
Add initial support for unstable_getServerProps (#10077) * Add support for unstable_getServerProps * Apply suggestions from review * Add no-cache header and update types * Revert sharing of load-components type * Add catchall test and update routes-manifest field * Update header check * Update to pass query for ...
packages/next/build/utils.ts
@@ -9,7 +9,11 @@ import { Rewrite, getRedirectStatus, } from '../lib/check-custom-routes' -import { SSG_GET_INITIAL_PROPS_CONFLICT } from '../lib/constants' +import { + SSG_GET_INITIAL_PROPS_CONFLICT, + SERVER_PROPS_GET_INIT_PROPS_CONFLICT, + SERVER_PROPS_SSG_CONFLICT, +} from '../lib/constants' import prett...
true
Other
vercel
next.js
c24daa21722fadfce2d1d561ce65ecc0efa6a7ea.json
Add initial support for unstable_getServerProps (#10077) * Add support for unstable_getServerProps * Apply suggestions from review * Add no-cache header and update types * Revert sharing of load-components type * Add catchall test and update routes-manifest field * Update header check * Update to pass query for ...
packages/next/build/webpack/loaders/next-serverless-loader.ts
@@ -186,6 +186,7 @@ const nextServerlessLoader: loader.Loader = function() { export const unstable_getStaticProps = ComponentInfo['unstable_getStaticProp' + 's'] export const unstable_getStaticParams = ComponentInfo['unstable_getStaticParam' + 's'] export const unstable_getStaticPaths = ComponentInfo['un...
true
Other
vercel
next.js
c24daa21722fadfce2d1d561ce65ecc0efa6a7ea.json
Add initial support for unstable_getServerProps (#10077) * Add support for unstable_getServerProps * Apply suggestions from review * Add no-cache header and update types * Revert sharing of load-components type * Add catchall test and update routes-manifest field * Update header check * Update to pass query for ...
packages/next/export/worker.js
@@ -191,7 +191,7 @@ export default async function({ html = components.Component queryWithAutoExportWarn() } else { - curRenderOpts = { ...components, ...renderOpts, ampPath } + curRenderOpts = { ...components, ...renderOpts, ampPath, params } html = await renderMethod(req...
true