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
7ebcc5bec9d0da258311a12634e16b3479f13b44.json
Eliminate context code based on process.browser (#5159) * Allow deadCodeElemination when using process.browser * Add process.browser test
test/integration/production/test/process-env.js
@@ -1,5 +1,11 @@ /* global describe, it, expect */ import webdriver from 'next-webdriver' +import { readFile } from 'fs' +import { promisify } from 'util' +import { join } from 'path' + +const readFileAsync = promisify(readFile) +const readNextBuildFile = (relativePath) => readFileAsync(join(__dirname, '../.next', re...
true
Other
vercel
next.js
3a9c419160c33613cadf3e44b0aba82767c44d3a.json
fix typo in dynamic import with multiple modules (#2344)
readme.md
@@ -664,7 +664,7 @@ import dynamic from 'next/dynamic' const HelloBundle = dynamic({ modules: (props) => { - const components { + const components = { Hello1: import('../components/hello1'), Hello2: import('../components/hello2') }
false
Other
vercel
next.js
8277d43190942feeccc692e37a8ba85fa431f163.json
Rewrite url when exporting only if there's a href. (#2316)
lib/link.js
@@ -129,6 +129,7 @@ export default class Link extends Component { // Add the ending slash to the paths. So, we can serve the // "<page>/index.html" directly. if ( + props.href && typeof __NEXT_DATA__ !== 'undefined' && __NEXT_DATA__.nextExport ) {
true
Other
vercel
next.js
8277d43190942feeccc692e37a8ba85fa431f163.json
Rewrite url when exporting only if there's a href. (#2316)
test/integration/static/next.config.js
@@ -3,6 +3,7 @@ module.exports = { return { '/': { page: '/' }, '/about': { page: '/about' }, + '/button-link': { page: '/button-link' }, '/get-initial-props-with-no-query': { page: '/get-initial-props-with-no-query' }, '/counter': { page: '/counter' }, '/dynamic-imports': {...
true
Other
vercel
next.js
8277d43190942feeccc692e37a8ba85fa431f163.json
Rewrite url when exporting only if there's a href. (#2316)
test/integration/static/pages/button-link.js
@@ -0,0 +1,12 @@ +import Link from 'next/link' + +export default () => ( + <div id='button-link-page'> + <div> + <Link href='/'> + <button>Go Back</button> + </Link> + </div> + <p>This is the About page</p> + </div> +)
true
Other
vercel
next.js
8277d43190942feeccc692e37a8ba85fa431f163.json
Rewrite url when exporting only if there's a href. (#2316)
test/integration/static/test/browser.js
@@ -135,6 +135,18 @@ export default function (context) { browser.close() }) + it('should navigate even if used a button inside <Link />', async () => { + const browser = await webdriver(context.port, '/button-link') + + const text = await browser + .elementByCss('button').click() + ...
true
Other
vercel
next.js
8277d43190942feeccc692e37a8ba85fa431f163.json
Rewrite url when exporting only if there's a href. (#2316)
yarn.lock
@@ -5319,7 +5319,11 @@ utils-merge@1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/utils-merge/-/utils-merge-1.0.0.tgz#0294fb922bb9375153541c4f7096231f287c8af8" -uuid@3.0.1, uuid@^3.0.0: +uuid@3.1.0: + version "3.1.0" + resolved "https://registry.yarnpkg.com/uuid/-/uuid-3.1.0.tgz#3dd3d3e790abc24...
true
Other
vercel
next.js
7b8a4ea234d67fd4e8fddba9ee53df36cd70adb7.json
Create displayName util (#2286)
lib/dynamic.js
@@ -1,4 +1,5 @@ import React from 'react' +import { getDisplayName } from './utils' let currentChunks = new Set() @@ -55,7 +56,7 @@ export default function dynamicComponent (p, o) { loadComponent () { promise.then((AsyncComponent) => { // Set a readable displayName for the wrapper component -...
true
Other
vercel
next.js
7b8a4ea234d67fd4e8fddba9ee53df36cd70adb7.json
Create displayName util (#2286)
lib/side-effect.js
@@ -1,4 +1,5 @@ import React, { Component } from 'react' +import { getDisplayName } from './utils' export default function withSideEffect (reduceComponentsToState, handleStateChangeOnClient, mapStateOnServer) { if (typeof reduceComponentsToState !== 'function') { @@ -13,10 +14,6 @@ export default function withSi...
true
Other
vercel
next.js
7b8a4ea234d67fd4e8fddba9ee53df36cd70adb7.json
Create displayName util (#2286)
lib/utils.js
@@ -42,12 +42,16 @@ export function printAndExit (message, code = 1) { process.exit(code) } +export function getDisplayName (Component) { + return Component.displayName || Component.name || 'Unknown' +} + export async function loadGetInitialProps (Component, ctx) { if (!Component.getInitialProps) return {} ...
true
Other
vercel
next.js
f36b4f9b4a703ccfc58a2468feabc9956f30ace9.json
Update Webpack to v2.6.1 (#2271) * Update Webpack to v2.6.1. Also, added the ^ so that future patches won’t be missed. Should fix https://github.com/zeit/next.js/issues/2244. * Update package.json
package.json
@@ -93,7 +93,7 @@ "url": "0.11.0", "uuid": "3.0.1", "walk": "^2.3.9", - "webpack": "2.6.0", + "webpack": "2.6.1", "webpack-dev-middleware": "1.10.2", "webpack-hot-middleware": "2.18.0", "write-file-webpack-plugin": "4.1.0",
true
Other
vercel
next.js
f36b4f9b4a703ccfc58a2468feabc9956f30ace9.json
Update Webpack to v2.6.1 (#2271) * Update Webpack to v2.6.1. Also, added the ^ so that future patches won’t be missed. Should fix https://github.com/zeit/next.js/issues/2244. * Update package.json
yarn.lock
@@ -5424,9 +5424,9 @@ webpack-sources@^0.2.3: source-list-map "^1.1.1" source-map "~0.5.3" -webpack@2.6.0: - version "2.6.0" - resolved "https://registry.yarnpkg.com/webpack/-/webpack-2.6.0.tgz#7e650a92816abff5db5f43316b0b8b19b13d76c1" +webpack@^2.6.1: + version "2.6.1" + resolved "https://registry.yarn...
true
Other
vercel
next.js
db1ee2e1617fa7cb8d30828e888b2905796179ad.json
Add Intl API polyfill in with-react-intl example (#2283) * Add Intl API polyfill in with-react-intl example * fix linting
examples/with-react-intl/pages/_document.js
@@ -5,19 +5,24 @@ import Document, {Head, Main, NextScript} from 'next/document' export default class IntlDocument extends Document { static async getInitialProps (context) { const props = await super.getInitialProps(context) - const {req: {localeDataScript}} = context + const {req: {locale, localeDataSc...
false
Other
vercel
next.js
c66cafd3625fe469cc2743ff33711f28ac92617e.json
Remove hardcoded address from ws example. (#2204) With a hard coded address on the client, the app no longer works when deploying, which is annoying since there's a handy 'deploy now' button on the readme. By removing the hard coded address socket.io will connect to the location host automatically so it works both ...
examples/with-socket.io/pages/index.js
@@ -22,7 +22,7 @@ class HomePage extends Component { // connect to WS server and listen event componentDidMount () { - this.socket = io('http://localhost:3000/') + this.socket = io() this.socket.on('message', this.handleMessage) }
false
Other
vercel
next.js
dbb6e995b666d7e4fa11069176405ae8096ae5b0.json
Ignore chrome checksum on appveyor (#2176) * 2.4.2 * Appveyor tests no longer breaks due to chrome installation. See: https://goo.gl/pNe7iu It failed randomly due to some checksum issues. Since we don't care about privacy or security in the CI, we can ignore checking the checksum.
appveyor.yml
@@ -6,7 +6,7 @@ environment: # Install scripts. (runs after repo cloning) install: # Install Google Chrome for e2e testing - - choco install googlechrome + - choco install --ignore-checksums googlechrome # Get the latest stable version of Node.js or io.js - ps: Install-Product node $env:nodejs_version #...
false
Other
vercel
next.js
daa7f821a956e1d0e8cf954d648b768a92e6fcb2.json
Docs: Add req.body to custom express server example (#12211)
examples/custom-server-express/README.md
@@ -36,3 +36,25 @@ npm run dev yarn yarn dev ``` + +### Populate body property + +Without the use of the body-parser package `req.body` will return undefined. To get express to populate `req.body` you need to install the body parser package and call the package within server.js. + +Install the package: + +```bash +n...
false
Other
vercel
next.js
ae1857ef33670b1b764a4ae99c66632c48a9bdd3.json
#12314 add auth to with-sentry-simple example (#12316)
examples/with-sentry-simple/README.md
@@ -49,9 +49,9 @@ This is a simple example showing how to use [Sentry](https://sentry.io) to catch - `_error.js` is rendered by Next.js while handling certain types of exceptions for you. It is overridden so those exceptions can be passed along to Sentry - `next.config.js` enables source maps in production for Sentry...
true
Other
vercel
next.js
ae1857ef33670b1b764a4ae99c66632c48a9bdd3.json
#12314 add auth to with-sentry-simple example (#12316)
examples/with-sentry-simple/next.config.js
@@ -4,9 +4,18 @@ const withSourceMaps = require('@zeit/next-source-maps')() // Use the SentryWebpack plugin to upload the source maps during build step const SentryWebpackPlugin = require('@sentry/webpack-plugin') -const { SENTRY_DSN, SENTRY_ORG, SENTRY_PROJECT } = process.env +const { + SENTRY_DSN, + SENTRY_ORG,...
true
Other
vercel
next.js
ae1857ef33670b1b764a4ae99c66632c48a9bdd3.json
#12314 add auth to with-sentry-simple example (#12316)
examples/with-sentry-simple/package.json
@@ -8,9 +8,9 @@ "start": "next start" }, "dependencies": { - "@sentry/browser": "^5.1.0", - "@sentry/node": "^5.6.2", - "@sentry/webpack-plugin": "^1.10.0", + "@sentry/browser": "^5.15.5", + "@sentry/node": "^5.15.5", + "@sentry/webpack-plugin": "^1.11.1", "@zeit/next-source-maps": "0....
true
Other
vercel
next.js
943209c05576b91b928e6df4201f4989f53d491a.json
Improve code quality of _document (#12342)
packages/next/pages/_document.tsx
@@ -261,22 +261,20 @@ export class Head extends Component< }) : [] - return preloadFiles.length === 0 + return !preloadFiles.length ? null - : preloadFiles.map((file: string) => { - return ( - <link - key={file} - nonce={this.props.no...
false
Other
vercel
next.js
eb9d10fa8097fc6475c6d6a7940b8232fa7441ba.json
Update @ampproject/toolbox-optimizer to v2.3.0 (#12039)
packages/next/package.json
@@ -58,7 +58,7 @@ ] }, "dependencies": { - "@ampproject/toolbox-optimizer": "2.2.0", + "@ampproject/toolbox-optimizer": "2.3.0", "@babel/core": "7.7.2", "@babel/plugin-proposal-class-properties": "7.7.0", "@babel/plugin-proposal-nullish-coalescing-operator": "7.7.4",
true
Other
vercel
next.js
eb9d10fa8097fc6475c6d6a7940b8232fa7441ba.json
Update @ampproject/toolbox-optimizer to v2.3.0 (#12039)
test/integration/amphtml-custom-optimizer/next.config.js
@@ -3,7 +3,6 @@ module.exports = { amp: { optimizer: { ampRuntimeVersion: '001515617716922', - ampUrlPrefix: '/amp', verbose: true, }, skipValidation: true,
true
Other
vercel
next.js
eb9d10fa8097fc6475c6d6a7940b8232fa7441ba.json
Update @ampproject/toolbox-optimizer to v2.3.0 (#12039)
test/integration/amphtml-custom-optimizer/test/index.test.js
@@ -30,7 +30,9 @@ describe('AMP Custom Optimizer', () => { 'amp-twitter width="500" height="500" layout="responsive" data-tweetid="1159145442896166912"' ) expect(html).toContain('i-amphtml-version="001515617716922"') - expect(html).toContain('script async src="/amp/rtv/001515617716922/v0.js"') + ...
true
Other
vercel
next.js
eb9d10fa8097fc6475c6d6a7940b8232fa7441ba.json
Update @ampproject/toolbox-optimizer to v2.3.0 (#12039)
yarn.lock
@@ -2,46 +2,46 @@ # yarn lockfile v1 -"@ampproject/toolbox-core@^2.2.0": - version "2.2.0" - resolved "https://registry.yarnpkg.com/@ampproject/toolbox-core/-/toolbox-core-2.2.0.tgz#3878c5fbdd2acdd865f070ded43ee84652a7a16b" - integrity sha512-g0NnZZqPJttIcdplIpiMDmOLewwvCWPSnFKvNdyYXN7vknRvR4krpV2qveuVgjnA+dSlD...
true
Other
vercel
next.js
960c18da53af89115c7e96dc8188646a51c53c15.json
Add docs for Router.back and Router.reload (#12396)
docs/api-reference/next/router.md
@@ -184,6 +184,26 @@ Router.beforePopState(({ url, as, options }) => { If the function you pass into `beforePopState` returns `false`, `Router` will not handle `popstate` and you'll be responsible for handling it, in that case. See [Disabling file-system routing](/docs/advanced-features/custom-server.md#disabling-fi...
false
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/build/index.ts
@@ -1,5 +1,5 @@ import crypto from 'crypto' -import fs from 'fs' +import { promises, writeFileSync } from 'fs' import Worker from 'jest-worker' import chalk from 'next/dist/compiled/chalk' import devalue from 'next/dist/compiled/devalue' @@ -8,7 +8,6 @@ import findUp from 'next/dist/compiled/find-up' import nanoid...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/build/is-writeable.ts
@@ -1,11 +1,8 @@ import fs from 'fs' -import { promisify } from 'util' - -const access = promisify(fs.access) export async function isWriteable(directory: string): Promise<boolean> { try { - await access(directory, (fs.constants || fs).W_OK) + await fs.promises.access(directory, (fs.constants || fs).W_OK) ...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/build/plugins/collect-plugins.ts
@@ -1,12 +1,9 @@ import findUp from 'next/dist/compiled/find-up' -import fs from 'fs' +import { promises } from 'fs' import path from 'path' -import { promisify } from 'util' import resolve from 'next/dist/compiled/resolve/index.js' import { execOnce } from '../../next-server/lib/utils' -const readdir = promisify...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/build/webpack/plugins/unlink-removed-pages-plugin.ts
@@ -1,11 +1,8 @@ import { join } from 'path' -import { promisify } from 'util' -import fs from 'fs' +import { promises } from 'fs' import { IS_BUNDLED_PAGE_REGEX } from '../../../next-server/lib/constants' import { Compiler } from 'webpack' -const unlink = promisify(fs.unlink) - // Makes sure removed pages are re...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/build/write-build-id.ts
@@ -1,14 +1,11 @@ -import fs from 'fs' -import { promisify } from 'util' +import { promises } from 'fs' import { join } from 'path' import { BUILD_ID_FILE } from '../next-server/lib/constants' -const writeFile = promisify(fs.writeFile) - export async function writeBuildId( distDir: string, buildId: string )...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/export/index.ts
@@ -1,10 +1,9 @@ import chalk from 'next/dist/compiled/chalk' import findUp from 'next/dist/compiled/find-up' import { - copyFile as copyFileOrig, + promises, existsSync, exists as existsOrig, - mkdir as mkdirOrig, readFileSync, writeFileSync, } from 'fs' @@ -37,8 +36,6 @@ import { Telemetry } from '...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/export/worker.js
@@ -1,8 +1,7 @@ -import { promisify } from 'util' import url from 'url' import { extname, join, dirname, sep } from 'path' import { renderToHTML } from '../next-server/server/render' -import { access, mkdir as mkdirOrig, writeFile } from 'fs' +import { promises } from 'fs' import AmpHtmlValidator from 'next/dist/co...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/lib/file-exists.ts
@@ -1,11 +1,8 @@ -import fs from 'fs' -import { promisify } from 'util' - -const access = promisify(fs.access) +import { promises, constants } from 'fs' export async function fileExists(fileName: string): Promise<boolean> { try { - await access(fileName, fs.constants.F_OK) + await promises.access(fileName, ...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/lib/recursive-copy.ts
@@ -1,14 +1,8 @@ import path from 'path' -import fs from 'fs' -import { promisify } from 'util' +import { promises, constants } from 'fs' import { Sema } from 'next/dist/compiled/async-sema' -const mkdir = promisify(fs.mkdir) -const stat = promisify(fs.stat) -const readdir = promisify(fs.readdir) -const copyFile = ...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/lib/recursive-delete.ts
@@ -1,16 +1,12 @@ -import fs from 'fs' +import { promises } from 'fs' import { join } from 'path' import { promisify } from 'util' -const readdir = promisify(fs.readdir) -const stat = promisify(fs.stat) -const rmdir = promisify(fs.rmdir) -const unlink = promisify(fs.unlink) const sleep = promisify(setTimeout) c...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/lib/recursive-readdir.ts
@@ -1,9 +1,5 @@ -import fs from 'fs' +import { promises } from 'fs' import { join } from 'path' -import { promisify } from 'util' - -const readdir = promisify(fs.readdir) -const stat = promisify(fs.stat) /** * Recursively read directory @@ -20,14 +16,14 @@ export async function recursiveReadDir( arr: string[] ...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/lib/verifyTypeScriptSetup.ts
@@ -2,17 +2,13 @@ import chalk from 'next/dist/compiled/chalk' import fs from 'fs' import os from 'os' import path from 'path' -import { promisify } from 'util' import { fileExists } from './file-exists' import { recursiveReadDir } from './recursive-readdir' import { resolveRequest } from './resolve-request' ...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/next-server/server/require.ts
@@ -1,15 +1,12 @@ -import fs from 'fs' +import { promises } from 'fs' import { join } from 'path' -import { promisify } from 'util' import { PAGES_MANIFEST, SERVER_DIRECTORY, SERVERLESS_DIRECTORY, } from '../lib/constants' import { normalizePagePath } from './normalize-page-path' -const readFile = promis...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/next-server/server/spr-cache.ts
@@ -1,15 +1,10 @@ -import fs from 'fs' +import { promises, readFileSync } from 'fs' import LRUCache from 'next/dist/compiled/lru-cache' import path from 'path' -import { promisify } from 'util' import { PrerenderManifest } from '../../build' import { PRERENDER_MANIFEST } from '../lib/constants' import { normalizeP...
true
Other
vercel
next.js
05e93e1520abc3a30efc344d304c46533cf098b8.json
Use fs.promises instead of promisify (#12026)
packages/next/server/next-dev-server.ts
@@ -7,7 +7,6 @@ import Worker from 'jest-worker' import { join, relative, resolve, sep } from 'path' import React from 'react' import { UrlWithParsedQuery } from 'url' -import { promisify } from 'util' import Watchpack from 'watchpack' import { ampValidation } from '../build/output/index' import * as Log from '.....
true
Other
vercel
next.js
82596124c6bed81e36915a7d85ed22177860ae76.json
Add cors example and update API routes docs (#12390)
docs/api-routes/api-middlewares.md
@@ -4,6 +4,14 @@ description: API Routes provide built-in middlewares that parse the incoming r # API Middlewares +<details open> + <summary><b>Examples</b></summary> + <ul> + <li><a href="https://github.com/zeit/next.js/tree/canary/examples/api-routes-middleware">API Routes with middleware</a></li> + <li>...
true
Other
vercel
next.js
82596124c6bed81e36915a7d85ed22177860ae76.json
Add cors example and update API routes docs (#12390)
docs/api-routes/dynamic-api-routes.md
@@ -4,6 +4,13 @@ description: You can add the dynamic routes used for pages to API Routes too. Le # Dynamic API Routes +<details open> + <summary><b>Examples</b></summary> + <ul> + <li><a href="https://github.com/zeit/next.js/tree/canary/examples/api-routes">Basic API Routes</a></li> + </ul> +</details> + A...
true
Other
vercel
next.js
82596124c6bed81e36915a7d85ed22177860ae76.json
Add cors example and update API routes docs (#12390)
docs/api-routes/introduction.md
@@ -4,13 +4,14 @@ description: Next.js supports API Routes, which allow you to build your API with # API Routes -<details> +<details open> <summary><b>Examples</b></summary> <ul> <li><a href="https://github.com/zeit/next.js/tree/canary/examples/api-routes">Basic API Routes</a></li> <li><a href="htt...
true
Other
vercel
next.js
82596124c6bed81e36915a7d85ed22177860ae76.json
Add cors example and update API routes docs (#12390)
docs/api-routes/response-helpers.md
@@ -4,6 +4,14 @@ description: API Routes include a set of Express.js-like methods for the respons # Response Helpers +<details open> + <summary><b>Examples</b></summary> + <ul> + <li><a href="https://github.com/zeit/next.js/tree/canary/examples/api-routes">Basic API Routes</a></li> + <li><a href="https://g...
true
Other
vercel
next.js
82596124c6bed81e36915a7d85ed22177860ae76.json
Add cors example and update API routes docs (#12390)
examples/api-routes-cors/README.md
@@ -0,0 +1,23 @@ +# API Routes Example with CORS + +Next.js ships with [API routes](https://nextjs.org/docs/api-routes/introduction) which provides an easy solution to build your own `API`. + +This example shows how to create an `API` endpoint with [CORS](https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS) headers,...
true
Other
vercel
next.js
82596124c6bed81e36915a7d85ed22177860ae76.json
Add cors example and update API routes docs (#12390)
examples/api-routes-cors/lib/init-middleware.js
@@ -0,0 +1,13 @@ +// Helper method to wait for a middleware to execute before continuing +// And to throw an error when an error happens in a middleware +export default function initMiddleware(middleware) { + return (req, res) => + new Promise((resolve, reject) => { + middleware(req, res, result => { + ...
true
Other
vercel
next.js
82596124c6bed81e36915a7d85ed22177860ae76.json
Add cors example and update API routes docs (#12390)
examples/api-routes-cors/package.json
@@ -0,0 +1,16 @@ +{ + "name": "api-routes-cors", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "cors": "2.8.5", + "next": "latest", + "react": "^16.13.1", + "react-dom": "^16.13.1" + }, + "license": "ISC" +}
true
Other
vercel
next.js
82596124c6bed81e36915a7d85ed22177860ae76.json
Add cors example and update API routes docs (#12390)
examples/api-routes-cors/pages/api/cors.js
@@ -0,0 +1,19 @@ +import Cors from 'cors' +import initMiddleware from '../../lib/init-middleware' + +// Initialize the cors middleware +const cors = initMiddleware( + // You can read more about the available options here: https://github.com/expressjs/cors#configuration-options + Cors({ + // Only allow requests wit...
true
Other
vercel
next.js
82596124c6bed81e36915a7d85ed22177860ae76.json
Add cors example and update API routes docs (#12390)
examples/api-routes-cors/pages/index.js
@@ -0,0 +1,9 @@ +export default function Index() { + return ( + <p> + To test the CORS route, open the console in a new tab on a different + domain and make a POST / GET / OPTIONS request to <b>/api/cors</b>. Using + a different method from those mentioned will be blocked by CORS + </p> + ) +}
true
Other
vercel
next.js
8f3931a0bec102b858afc99e6fa4f1257a0da6c0.json
Add docs for next dev and next start (#12392)
docs/api-reference/cli.md
@@ -48,6 +48,26 @@ NODE_OPTIONS='--inspect' next The first load is colored green, yellow, or red. Aim for green for performant applications. +## Development + +`next dev` starts the application in development mode with hot-code reloading, error reporting, and more: + +The application will start at `http://localhos...
false
Other
vercel
next.js
9590a8a977c0d8b2f707816542543c94d9a81d9f.json
docs(examples): upgrade next-iron-session to v4 (#12398)
examples/with-iron-session/README.md
@@ -12,6 +12,11 @@ It uses current best practices for authentication in the Next.js ecosystem. - Layout based on the user's logged-in/out status - Session data is signed and encrypted in a cookie +[`next-iron-session`](https://github.com/vvo/next-iron-session) also supports: + +- Express / Connect middlewares +- Mu...
true
Other
vercel
next.js
9590a8a977c0d8b2f707816542543c94d9a81d9f.json
docs(examples): upgrade next-iron-session to v4 (#12398)
examples/with-iron-session/lib/session/index.js
@@ -1,12 +1,13 @@ // this file is a wrapper with defaults to be used in both API routes and `getServerSideProps` functions -import withIronSession from 'next-iron-session' +import { withIronSession } from 'next-iron-session' export default function withSession(handler) { return withIronSession(handler, { //...
true
Other
vercel
next.js
9590a8a977c0d8b2f707816542543c94d9a81d9f.json
docs(examples): upgrade next-iron-session to v4 (#12398)
examples/with-iron-session/package.json
@@ -8,12 +8,12 @@ "start": "next start" }, "dependencies": { - "next": "9.3.0", - "next-iron-session": "3.1.0", + "next": "9.3.6", + "next-iron-session": "4.0.0", "node-fetch": "2.6.0", "prop-types": "15.7.2", - "react": "16.13.0", - "react-dom": "16.13.0", - "swr": "0.1.18" + ...
true
Other
vercel
next.js
703164e9159c92c37684a5bf7f7e6eb7b340c788.json
Add URL escaping for custom headers (#12031) * Add URL escaping for custom headers * Update to handle more header values Co-authored-by: JJ Kasper <jj@jjsweb.site>
packages/next/next-server/server/next-server.ts
@@ -480,6 +480,21 @@ export default class Server { fn: async (req, res, params, parsedUrl) => ({ finished: false }), } as Route & Rewrite & Header) + const updateHeaderValue = (value: string, params: Params): string => { + if (!value.includes(':')) { + return value + } ...
true
Other
vercel
next.js
703164e9159c92c37684a5bf7f7e6eb7b340c788.json
Add URL escaping for custom headers (#12031) * Add URL escaping for custom headers * Update to handle more header values Co-authored-by: JJ Kasper <jj@jjsweb.site>
packages/next/next-server/server/router.ts
@@ -38,7 +38,7 @@ export const prepareDestination = ( destination: string, params: Params, query: ParsedUrlQuery, - isRedirect?: boolean + appendParamsToQuery?: boolean ) => { const parsedDestination = parseUrl(destination, true) const destQuery = parsedDestination.query @@ -66,7 +66,7 @@ export const...
true
Other
vercel
next.js
703164e9159c92c37684a5bf7f7e6eb7b340c788.json
Add URL escaping for custom headers (#12031) * Add URL escaping for custom headers * Update to handle more header values Co-authored-by: JJ Kasper <jj@jjsweb.site>
test/integration/custom-routes/next.config.js
@@ -230,6 +230,33 @@ module.exports = { }, ], }, + { + source: '/without-params/url', + headers: [ + { + key: 'x-origin', + value: 'https://example.com', + }, + ], + }, + { + source:...
true
Other
vercel
next.js
703164e9159c92c37684a5bf7f7e6eb7b340c788.json
Add URL escaping for custom headers (#12031) * Add URL escaping for custom headers * Update to handle more header values Co-authored-by: JJ Kasper <jj@jjsweb.site>
test/integration/custom-routes/test/index.test.js
@@ -312,6 +312,23 @@ const runTests = (isDev = false) => { expect(res.headers.get('somefirst')).toBe('hi') }) + it('should support URL for header key/values', async () => { + const res = await fetchViaHTTP(appPort, '/without-params/url') + expect(res.headers.get('x-origin')).toBe('https://example.com')...
true
Other
vercel
next.js
06d5354476c4856d6880b967da9ac16b3680aa53.json
Remove documentMiddleware experimental option (#12218)
packages/next/next-server/server/config.ts
@@ -41,7 +41,6 @@ const defaultConfig: { [key: string]: any } = { (Number(process.env.CIRCLE_NODE_TOTAL) || (os.cpus() || { length: 1 }).length) - 1 ), - documentMiddleware: false, granularChunks: true, modern: false, plugins: false,
true
Other
vercel
next.js
06d5354476c4856d6880b967da9ac16b3680aa53.json
Remove documentMiddleware experimental option (#12218)
packages/next/next-server/server/load-components.ts
@@ -10,7 +10,6 @@ import { BuildManifest } from './get-page-files' import { AppType, DocumentType } from '../lib/utils' import { PageConfig, - NextPageContext, GetStaticPaths, GetServerSideProps, GetStaticProps, @@ -35,7 +34,6 @@ export type LoadComponentsReturnType = { buildManifest: BuildManifest ...
true
Other
vercel
next.js
06d5354476c4856d6880b967da9ac16b3680aa53.json
Remove documentMiddleware experimental option (#12218)
packages/next/next-server/server/next-server.ts
@@ -118,7 +118,6 @@ export default class Server { runtimeConfig?: { [key: string]: any } assetPrefix?: string canonicalBase: string - documentMiddlewareEnabled: boolean dev?: boolean previewProps: __ApiPreviewProps customServer?: boolean @@ -171,8 +170,6 @@ export default class Server {...
true
Other
vercel
next.js
06d5354476c4856d6880b967da9ac16b3680aa53.json
Remove documentMiddleware experimental option (#12218)
packages/next/next-server/server/render.tsx
@@ -153,7 +153,6 @@ export type RenderOptsPartial = { ampValidator?: (html: string, pathname: string) => Promise<void> ampSkipValidation?: boolean ampOptimizerConfig?: { [key: string]: any } - documentMiddlewareEnabled?: boolean isDataReq?: boolean params?: ParsedUrlQuery previewProps: __ApiPreviewPr...
true
Other
vercel
next.js
06d5354476c4856d6880b967da9ac16b3680aa53.json
Remove documentMiddleware experimental option (#12218)
test/integration/document-middleware/next.config.js
@@ -1,3 +0,0 @@ -module.exports = { - experimental: { documentMiddleware: true }, -}
true
Other
vercel
next.js
06d5354476c4856d6880b967da9ac16b3680aa53.json
Remove documentMiddleware experimental option (#12218)
test/integration/document-middleware/pages/_document.js
@@ -1,32 +0,0 @@ -import Document, { Html, Head, Main, NextScript } from 'next/document' - -export async function middleware({ req, res }) { - if (req.url === '/another') { - res.setHeader('next-middleware', 'hit another!') - return res.end() - } - res.setHeader('next-middleware', 'hi from middleware') -} - -c...
true
Other
vercel
next.js
06d5354476c4856d6880b967da9ac16b3680aa53.json
Remove documentMiddleware experimental option (#12218)
test/integration/document-middleware/pages/another.js
@@ -1,3 +0,0 @@ -const Another = () => <p>Hi again 👋</p> -Another.getInitialProps = () => ({}) -export default Another
true
Other
vercel
next.js
06d5354476c4856d6880b967da9ac16b3680aa53.json
Remove documentMiddleware experimental option (#12218)
test/integration/document-middleware/pages/index.js
@@ -1,3 +0,0 @@ -const Home = () => <p>Hi there 👋</p> -Home.getInitialProps = () => ({}) -export default Home
true
Other
vercel
next.js
06d5354476c4856d6880b967da9ac16b3680aa53.json
Remove documentMiddleware experimental option (#12218)
test/integration/document-middleware/test/index.test.js
@@ -1,46 +0,0 @@ -/* eslint-env jest */ -/* global jasmine */ -import { join } from 'path' -import { - renderViaHTTP, - fetchViaHTTP, - findPort, - launchApp, - killApp, -} from 'next-test-utils' - -jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 2 - -let app -let appPort - -describe('Document middleware', () => { ...
true
Other
vercel
next.js
52686690a9c974463a1439f9f26e979d40321175.json
Add namedRegex and routeKeys to routes manifest (#12250)
packages/next/build/index.ts
@@ -299,10 +299,15 @@ export default async function build(dir: string, conf = null): Promise<void> { redirects: redirects.map(r => buildCustomRoute(r, 'redirect')), rewrites: rewrites.map(r => buildCustomRoute(r, 'rewrite')), headers: headers.map(r => buildCustomRoute(r, 'header')), - dynamicRoutes: g...
true
Other
vercel
next.js
52686690a9c974463a1439f9f26e979d40321175.json
Add namedRegex and routeKeys to routes manifest (#12250)
packages/next/next-server/lib/router/utils/route-regex.ts
@@ -1,14 +1,18 @@ +// this isn't importing the escape-string-regex module +// to reduce bytes +function escapeRegex(str: string) { + return str.replace(/[|\\{}()[\]^$+*?.-]/g, '\\$&') +} + export function getRouteRegex( normalizedRoute: string ): { re: RegExp + namedRegex?: string groups: { [groupName: str...
true
Other
vercel
next.js
52686690a9c974463a1439f9f26e979d40321175.json
Add namedRegex and routeKeys to routes manifest (#12250)
test/integration/custom-routes/test/index.test.js
@@ -773,16 +773,22 @@ const runTests = (isDev = false) => { ], dynamicRoutes: [ { + namedRegex: '^/another/(?<id>[^/]+?)(?:/)?$', page: '/another/[id]', regex: normalizeRegEx('^\\/another\\/([^\\/]+?)(?:\\/)?$'), + routeKeys: ['id'], ...
true
Other
vercel
next.js
52686690a9c974463a1439f9f26e979d40321175.json
Add namedRegex and routeKeys to routes manifest (#12250)
test/integration/dynamic-routing/pages/index.js
@@ -3,23 +3,23 @@ import Link from 'next/link' const Page = () => ( <div> <h3>My blog</h3> - <Link href="/[post]" as="/post-1"> + <Link href="/[name]" as="/post-1"> <a id="view-post-1">View post 1</a> </Link> <br /> - <Link href="/[post]/comments" as="/post-1/comments"> + <Link hre...
true
Other
vercel
next.js
52686690a9c974463a1439f9f26e979d40321175.json
Add namedRegex and routeKeys to routes manifest (#12250)
test/integration/dynamic-routing/test/index.test.js
@@ -532,78 +532,110 @@ function runTests(dev) { redirects: [], dataRoutes: [ { + namedDataRouteRegex: `^/_next/data/${escapeRegex( + buildId + )}/p1/p2/all\\-ssg/(?<rest>.+?)\\.json$`, dataRouteRegex: normalizeRegEx( `^\\/_next\...
true
Other
vercel
next.js
52686690a9c974463a1439f9f26e979d40321175.json
Add namedRegex and routeKeys to routes manifest (#12250)
test/integration/getserversideprops/test/index.test.js
@@ -47,24 +47,36 @@ const expectedManifestRoutes = () => [ page: '/blog', }, { + namedDataRouteRegex: `^/_next/data/${escapeRegex( + buildId + )}/blog/(?<post>[^/]+?)\\.json$`, dataRouteRegex: normalizeRegEx( `^\\/_next\\/data\\/${escapeRegex(buildId)}\\/blog\\/([^\\/]+?)\\.json$` ...
true
Other
vercel
next.js
52686690a9c974463a1439f9f26e979d40321175.json
Add namedRegex and routeKeys to routes manifest (#12250)
test/integration/prerender/test/index.test.js
@@ -771,36 +771,52 @@ const runTests = (dev = false, looseMode = false) => { page: '/blog', }, { + namedDataRouteRegex: `^/_next/data/${escapeRegex( + buildId + )}/blog/(?<post>[^/]+?)\\.json$`, dataRouteRegex: normalizeRegEx( `^\\/_next\...
true
Other
vercel
next.js
2457df5d06de51501ad9a78de9f6e9d85aacdffb.json
examples/with-reasonml: use bs-next for Next.Link (#4214) Fixes #4028
examples/with-reasonml/bsconfig.json
@@ -1,7 +1,7 @@ { "name": "with-reasonml", "sources": ["components", "pages"], - "bs-dependencies": ["reason-react"], + "bs-dependencies": ["reason-react", "bs-next"], "reason": { "react-jsx": 2 }, "package-specs": ["commonjs"], "bsc-flags": [
true
Other
vercel
next.js
2457df5d06de51501ad9a78de9f6e9d85aacdffb.json
examples/with-reasonml: use bs-next for Next.Link (#4214) Fixes #4028
examples/with-reasonml/components/Header.re
@@ -6,7 +6,11 @@ let make = (_children) => { ...component, render: (_self) => <div> - <a href="/" style=styles> (ReasonReact.stringToElement("Home")) </a> - <a href="/about" style=styles> (ReasonReact.stringToElement("About")) </a> + <Next.Link href="/"> + <a style=styles> (ReasonReact....
true
Other
vercel
next.js
2457df5d06de51501ad9a78de9f6e9d85aacdffb.json
examples/with-reasonml: use bs-next for Next.Link (#4214) Fixes #4028
examples/with-reasonml/package.json
@@ -12,7 +12,8 @@ "next": "latest", "react": "^16.1.1", "react-dom": "^16.1.1", - "reason-react": "^0.3.0" + "reason-react": "^0.3.0", + "bs-next": "^2.0.0" }, "devDependencies": { "bs-platform": "^2.1.0",
true
Other
vercel
next.js
e6b5567b20126b12c6b5b640357ff91bfb04e3df.json
Update url for componentDidCatch
readme.md
@@ -954,7 +954,7 @@ export default () => <HelloBundle title="Dynamic Bundle" /> <p><details> <summary><b>Examples</b></summary> <ul><li><a href="./examples/layout-component">Using `_app.js` for layout</a></li></ul> - <ul><li><a href="./examples/componentdidcatch">Using `_app.js` to override `componentDidCatch`<...
false
Other
vercel
next.js
326c84a730b28a477dd16ae735a514b267b3cade.json
Add readme for componentDidCatch example
examples/with-componentdidcatch/package.json
@@ -1,5 +1,5 @@ { - "name": "hello-world", + "name": "with-componentdidcatch", "version": "1.0.0", "scripts": { "dev": "next",
true
Other
vercel
next.js
326c84a730b28a477dd16ae735a514b267b3cade.json
Add readme for componentDidCatch example
examples/with-componentdidcatch/readme.md
@@ -0,0 +1,44 @@ +[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-componentdidcatch) + +# With `componentDidCatch` example + +## How to use + +### Using `create-next-app` + +Execute [`create-next-app`](https://github.com/s...
true
Other
vercel
next.js
65c0014ad174e5dcf3b991cfacd9c91edb3972d4.json
Add componentDidCatch example
examples/.babelrc
@@ -1,3 +1,3 @@ { - "babelrc": false -} \ No newline at end of file + "presets": ["../babel"] +}
true
Other
vercel
next.js
65c0014ad174e5dcf3b991cfacd9c91edb3972d4.json
Add componentDidCatch example
examples/with-componentdidcatch/package.json
@@ -0,0 +1,15 @@ +{ + "name": "hello-world", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "next": "6.0.0-canary.6", + "react": "^16.0.0", + "react-dom": "^16.0.0" + }, + "license": "ISC" +}
true
Other
vercel
next.js
65c0014ad174e5dcf3b991cfacd9c91edb3972d4.json
Add componentDidCatch example
examples/with-componentdidcatch/pages/_app.js
@@ -0,0 +1,9 @@ +import App from 'next/app' + +export default class MyApp extends App { + componentDidCatch (error, errorInfo) { + console.log('CUSTOM ERROR HANDLING', error) + // This is needed to render errors correctly in development / production + super.componentDidCatch(error, errorInfo) + } +}
true
Other
vercel
next.js
65c0014ad174e5dcf3b991cfacd9c91edb3972d4.json
Add componentDidCatch example
examples/with-componentdidcatch/pages/index.js
@@ -0,0 +1,4 @@ +export default () => { + // Render time error + throw new Error('Test') +}
true
Other
vercel
next.js
0f2c8f5eb1af62963a057b4c53aac52f5096dc16.json
Exclude _app.js since it’s not a normal page (#4201)
server/export.js
@@ -29,7 +29,8 @@ export default async function (dir, options, configuration) { const defaultPathMap = {} for (const page of pages) { - if (page === '/_document') { + // _document and _app are not real pages. + if (page === '/_document' || page === '/_app') { continue } defaultPathMap[...
false
Other
vercel
next.js
23716d448757254fc6c9c4451ea189b17e0ac17e.json
Fix grammatical errors in readme.md (#4199)
readme.md
@@ -525,7 +525,7 @@ The second `as` parameter for `push` and `replace` is an optional _decoration_ o _Note: in order to programmatically change the route without triggering navigation and component-fetching, use `props.url.push` and `props.url.replace` within a component_ ##### With URL object -You can use an URL o...
false
Other
vercel
next.js
bc03c59f5744dd08a90fefe81807133e7ccfd667.json
Upgrade react hot loader (#4171) * Upgrade react hot loader * Upgrade to 4.1.1
package.json
@@ -87,7 +87,7 @@ "path-to-regexp": "2.1.0", "prop-types": "15.6.0", "prop-types-exact": "1.1.1", - "react-hot-loader": "4.0.1", + "react-hot-loader": "4.1.1", "recursive-copy": "2.0.6", "resolve": "1.5.0", "send": "0.16.1",
true
Other
vercel
next.js
bc03c59f5744dd08a90fefe81807133e7ccfd667.json
Upgrade react hot loader (#4171) * Upgrade react hot loader * Upgrade to 4.1.1
yarn.lock
@@ -8,11 +8,11 @@ dependencies: "@babel/highlight" "7.0.0-beta.42" -"@babel/code-frame@7.0.0-beta.43", "@babel/code-frame@^7.0.0-beta.40": - version "7.0.0-beta.43" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.43.tgz#57281887da181b4f9a3e72151f54f3237bf011eb" +"@babel/co...
true
Other
vercel
next.js
1d884efe78bbe3989e8a9381208895b738128129.json
Fix url prop override (#4191) * Fix url prop override * Remove console.log
lib/app.js
@@ -45,7 +45,7 @@ export default class App extends Component { const {router, Component, pageProps} = this.props const url = createUrl(router) return <Container> - <Component url={url} {...pageProps} /> + <Component {...pageProps} url={url} /> </Container> } }
true
Other
vercel
next.js
1d884efe78bbe3989e8a9381208895b738128129.json
Fix url prop override (#4191) * Fix url prop override * Remove console.log
test/integration/basic/pages/url-prop-override.js
@@ -0,0 +1,16 @@ +import React from 'react' +export default class extends React.Component { + static getInitialProps () { + return { + url: 'test' // This gets overridden by Next in lib/_app.js + } + } + render () { + const {url} = this.props + return <div> + <p id='pathname'>{url.pathname}</p>...
true
Other
vercel
next.js
1d884efe78bbe3989e8a9381208895b738128129.json
Fix url prop override (#4191) * Fix url prop override * Remove console.log
test/integration/basic/pages/url-prop.js
@@ -0,0 +1,7 @@ +export default ({url}) => { + return <div> + <p id='pathname'>{url.pathname}</p> + <p id='query'>{Object.keys(url.query).length}</p> + <p id='aspath'>{url.asPath}</p> + </div> +}
true
Other
vercel
next.js
1d884efe78bbe3989e8a9381208895b738128129.json
Fix url prop override (#4191) * Fix url prop override * Remove console.log
test/integration/basic/test/index.test.js
@@ -40,6 +40,8 @@ describe('Basic Features', () => { renderViaHTTP(context.appPort, '/custom-extension'), renderViaHTTP(context.appPort, '/styled-jsx'), renderViaHTTP(context.appPort, '/with-cdm'), + renderViaHTTP(context.appPort, '/url-prop'), + renderViaHTTP(context.appPort, '/url-prop-...
true
Other
vercel
next.js
1d884efe78bbe3989e8a9381208895b738128129.json
Fix url prop override (#4191) * Fix url prop override * Remove console.log
test/integration/basic/test/rendering.js
@@ -119,6 +119,22 @@ export default function ({ app }, suiteName, render, fetch) { expect($('.as-path-content').text()).toBe('/nav/as-path?aa=10') }) + describe('Url prop', () => { + it('should provide pathname, query and asPath', async () => { + const $ = await get$('/url-prop') + e...
true
Other
vercel
next.js
676d82abf9d1752fa89ccd432584e62da8e0bf05.json
fix(examples/using-preact): use latest next-preact (#4152)
examples/using-preact/package.json
@@ -7,7 +7,7 @@ "start": "NODE_ENV=production node server.js" }, "dependencies": { - "@zeit/next-preact": "0.0.4", + "@zeit/next-preact": "0.0.7", "next": "latest", "preact": "8.2.7", "preact-compat": "3.18.0"
false
Other
vercel
next.js
c486682b44ba74069fcf8ea809fbcdb3ab1dce53.json
Relay modern example fixes (#4120) * Fix with-relay-modern example Starting with react-relay 1.5.0 the schema canno't be in the same dir as the src. This can be fixed by excluding the schema dir. Globs should also be inside quotation marks, to avoid non-deterministic behavior of different shells. * Add missin...
examples/with-relay-modern/components/BlogPosts.js
@@ -7,7 +7,7 @@ const BlogPosts = props => { <div> <h1>Blog posts</h1> {props.viewer.allBlogPosts.edges.map(({ node }) => - <BlogPostPreview post={node} /> + <BlogPostPreview key={node.id}post={node} /> )} </div> ) @@ -20,6 +20,7 @@ export default createFragmentContainer(...
true
Other
vercel
next.js
c486682b44ba74069fcf8ea809fbcdb3ab1dce53.json
Relay modern example fixes (#4120) * Fix with-relay-modern example Starting with react-relay 1.5.0 the schema canno't be in the same dir as the src. This can be fixed by excluding the schema dir. Globs should also be inside quotation marks, to avoid non-deterministic behavior of different shells. * Add missin...
examples/with-relay-modern/package.json
@@ -7,7 +7,7 @@ "dev": "next", "build": "next build", "start": "next start", - "relay": "relay-compiler --src ./ --exclude **/.next/** **/node_modules/** **/test/** **/__generated__/** --schema ./schema/schema.graphql", + "relay": "relay-compiler --src ./ --exclude '**/.next/**' '**/node_modules/*...
true
Other
vercel
next.js
dac2f39a257a690124abf372c25d2c2b0e769d23.json
Add support for exportPathMap in development (#4094) * Add support for exportPathMap in development * Add comment about what it does
server/index.js
@@ -81,7 +81,6 @@ export default class Server { }) this.setAssetPrefix(assetPrefix) - this.defineRoutes() } getHotReloader (dir, options) { @@ -119,6 +118,7 @@ export default class Server { } async prepare () { + await this.defineRoutes() if (this.hotReloader) { await this....
true
Other
vercel
next.js
dac2f39a257a690124abf372c25d2c2b0e769d23.json
Add support for exportPathMap in development (#4094) * Add support for exportPathMap in development * Add comment about what it does
test/integration/static/test/dev.js
@@ -0,0 +1,24 @@ +/* global describe, it, expect */ +import webdriver from 'next-webdriver' + +export default function (context) { + describe('Render in development mode', () => { + it('should render the home page', async () => { + const browser = await webdriver(context.port, '/') + const text = await br...
true
Other
vercel
next.js
dac2f39a257a690124abf372c25d2c2b0e769d23.json
Add support for exportPathMap in development (#4094) * Add support for exportPathMap in development * Add comment about what it does
test/integration/static/test/index.test.js
@@ -5,16 +5,22 @@ import { nextBuild, nextExport, startStaticServer, - stopApp + launchApp, + stopApp, + killApp, + findPort, + renderViaHTTP } from 'next-test-utils' import ssr from './ssr' import browser from './browser' +import dev from './dev' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5 ...
true
Other
vercel
next.js
b393833aeab99647fc9851981b2156c497927206.json
Update doc for @zeit/next-stylus (#4107)
readme.md
@@ -165,13 +165,14 @@ export default () => <p style={{ color: 'red' }}>hi there</p> To use more sophisticated CSS-in-JS solutions, you typically have to implement style flushing for server-side rendering. We enable this by allowing you to define your own [custom `<Document>`](#user-content-custom-document) component...
false
Other
vercel
next.js
2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json
Upgrade Babel 6 to Babel 7 (major) (#4050) Upgrade Babel 6 to Babel 7 (major)
.babelrc
@@ -1,19 +1,22 @@ { "presets": [ - "env", - "react", - "flow" + "@babel/preset-env", + "@babel/preset-react", + "@babel/preset-flow" ], "plugins": [ - "transform-object-rest-spread", - "transform-class-properties", - "transform-runtime" + "@babel/plugin-proposal-object-rest-sprea...
true