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
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/client/next-dev.js
@@ -15,12 +15,12 @@ const { } = window const prefix = assetPrefix || '' -const webpackHMR = initWebpackHMR({assetPrefix: prefix}) +const webpackHMR = initWebpackHMR({ assetPrefix: prefix }) window.next = next initNext({ webpackHMR }) .then((emitter) => { - initOnDemandEntries({assetPrefix: prefix}) + i...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/client/router.js
@@ -99,7 +99,7 @@ export function makePublicRouterInstance (router) { for (const property of urlPropertyFields) { if (typeof router[property] === 'object') { - instance[property] = {...router[property]} // makes sure query is not stateful + instance[property] = { ...router[property] } // makes sure ...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/client/webpack-hot-middleware-client.js
@@ -1,6 +1,6 @@ import 'event-source-polyfill' import connect from './dev-error-overlay/hot-dev-client' -export default ({assetPrefix}) => { +export default ({ assetPrefix }) => { const options = { path: `${assetPrefix}/_next/webpack-hmr` }
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/export/index.js
@@ -91,7 +91,7 @@ export default async function (dir, options, configuration) { hotReloader: null } - const {serverRuntimeConfig, publicRuntimeConfig} = nextConfig + const { serverRuntimeConfig, publicRuntimeConfig } = nextConfig if (publicRuntimeConfig) { renderOpts.runtimeConfig = publicRuntimeC...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/export/worker.js
@@ -7,7 +7,7 @@ const mkdirp = require('mkdirp-then') const { renderToHTML } = require('next-server/dist/server/render') const { writeFile } = require('fs') const Sema = require('async-sema') -const {loadComponents} = require('next-server/dist/server/load-components') +const { loadComponents } = require('next-server...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/lib/constants.js
@@ -1,4 +1,4 @@ -import {join} from 'path' +import { join } from 'path' export const NEXT_PROJECT_ROOT = join(__dirname, '..', '..') export const NEXT_PROJECT_ROOT_DIST = join(NEXT_PROJECT_ROOT, 'dist') export const NEXT_PROJECT_ROOT_NODE_MODULES = join(NEXT_PROJECT_ROOT, 'node_modules')
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/pages/_app.js
@@ -10,7 +10,7 @@ export default class App extends Component { static async getInitialProps ({ Component, router, ctx }) { const pageProps = await loadGetInitialProps(Component, ctx) - return {pageProps} + return { pageProps } } getChildContext () { @@ -26,7 +26,7 @@ export default class App ext...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/server/error-debug.js
@@ -4,7 +4,7 @@ import Head from 'next-server/head' // This component is rendered through dev-error-overlay on the client side. // On the server side it's rendered directly -export default function ErrorDebug ({error, info}) { +export default function ErrorDebug ({ error, info }) { const { name, message } = erro...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/server/hot-reloader.js
@@ -3,15 +3,15 @@ import WebpackDevMiddleware from 'webpack-dev-middleware' import WebpackHotMiddleware from 'webpack-hot-middleware' import errorOverlayMiddleware from './lib/error-overlay-middleware' import del from 'del' -import onDemandEntryHandler, {normalizePage} from './on-demand-entry-handler' +import onDema...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/server/next-dev-server.js
@@ -1,8 +1,8 @@ import Server from 'next-server/dist/server/next-server' import { join } from 'path' import HotReloader from './hot-reloader' -import {route} from 'next-server/dist/server/router' -import {PHASE_DEVELOPMENT_SERVER} from 'next-server/constants' +import { route } from 'next-server/dist/server/router' +...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/server/on-demand-entry-handler.js
@@ -1,14 +1,14 @@ import DynamicEntryPlugin from 'webpack/lib/DynamicEntryPlugin' import { EventEmitter } from 'events' import { join } from 'path' -import {parse} from 'url' +import { parse } from 'url' import fs from 'fs' import promisify from '../lib/promisify' import globModule from 'glob' -import {pageNotFou...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/taskfile-typescript.js
@@ -6,7 +6,7 @@ try { module.exports = function (task) { task.plugin('typescript', { every: true }, function * (file, options) { - const {stripExtension} = options + const { stripExtension } = options const opts = { fileName: file.base, compilerOptions: {
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
packages/next/taskfile.js
@@ -23,38 +23,38 @@ export async function compile (task) { } export async function bin (task, opts) { - await task.source(opts.src || 'bin/*').typescript({module: 'commonjs', stripExtension: true}).target('dist/bin', {mode: '0755'}) + await task.source(opts.src || 'bin/*').typescript({ module: 'commonjs', stripEx...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/amphtml/pages/use-amp-hook.js
@@ -1,4 +1,4 @@ -import {useAmp} from 'next/amp' +import { useAmp } from 'next/amp' export default () => { const isAmp = useAmp()
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/app-aspath/pages/_app.js
@@ -1,16 +1,16 @@ import React from 'react' -import App, {Container} from 'next/app' +import App, { Container } from 'next/app' export default class MyApp extends App { // find this static async getInitialProps ({ ctx }) { const { query, pathname, asPath } = ctx - return {url: {query, pathname, asPa...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/app-document/pages/_app.js
@@ -1,6 +1,6 @@ -import App, {Container} from 'next/app' +import App, { Container } from 'next/app' import React from 'react' -import {setState} from '../shared-module' +import { setState } from '../shared-module' setState(typeof window === 'undefined' ? 'UPDATED' : 'UPDATED CLIENT') @@ -10,12 +10,12 @@ class Lay...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/lib/cdm.js
@@ -1,4 +1,4 @@ -import React, {Component} from 'react' +import React, { Component } from 'react' export default class extends Component { constructor (props) { @@ -10,7 +10,7 @@ export default class extends Component { } componentDidMount () { - this.setState({mounted: true}) + this.setState({ moun...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/custom-encoding.js
@@ -1,6 +1,6 @@ import React from 'react' export default class extends React.Component { - static async getInitialProps ({res}) { + static async getInitialProps ({ res }) { if (res) { res.setHeader('Content-Type', 'text/html; charset=iso-8859-2') }
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/custom-extension.jsx
@@ -1,5 +1,5 @@ -import {World} from '../components/world' -import {Hello} from '../components/hello.jsx' +import { World } from '../components/world' +import { Hello } from '../components/hello.jsx' export default () => ( <div><Hello /> <World /></div>
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/dynamic/head.js
@@ -12,7 +12,7 @@ const Test = dynamic({ background-color: green; height: 200px; } - `}} /> + ` }} /> </Head> test </div>
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/nav/as-path-pushstate.js
@@ -1,7 +1,7 @@ import Link from 'next/link' -import {withRouter} from 'next/router' +import { withRouter } from 'next/router' -export default withRouter(({router: {asPath, query}}) => { +export default withRouter(({ router: { asPath, query } }) => { return <div id={asPath.replace('/', '').replace('/', '-')}> ...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/nav/hash-changes.js
@@ -31,10 +31,10 @@ export default class SelfReload extends Component { <a id='scroll-to-name-item-400'>Go to name item 400</a> </Link> <p>COUNT: {this.props.count}</p> - {Array.from({length: 500}, (x, i) => i + 1).map(i => { + {Array.from({ length: 500 }, (x, i) => i + 1).map...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/nav/on-click.js
@@ -2,7 +2,7 @@ import { Component } from 'react' import Link from 'next/link' export default class OnClick extends Component { - static getInitialProps ({ res, query: {count} }) { + static getInitialProps ({ res, query: { count } }) { return { count: count ? parseInt(count) : 0 } } @@ -11,17 +11,17 @@ ...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/nav/pass-href-prop.js
@@ -2,8 +2,8 @@ import Link from 'next/link' const UnexpectedNestedA = () => { const UnexpectedWrapper = (props) => { - const {href, id} = props - const safeProps = {href, id} + const { href, id } = props + const safeProps = { href, id } return (<a {...safeProps}>{props.children}</a>) }
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/nav/url-prop-change.js
@@ -23,7 +23,7 @@ export default class UrlPropChange extends React.Component { } render () { - const {previousUrl, url} = this.state + const { previousUrl, url } = this.state return <div> Current: <div id='url-result'>
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/nav/with-hoc.js
@@ -1,6 +1,6 @@ import { withRouter } from 'next/router' -const Link = withRouter(({router, children, href}) => { +const Link = withRouter(({ router, children, href }) => { const handleClick = (e) => { e.preventDefault() router.push(href)
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/read-only-object-error.js
@@ -6,7 +6,7 @@ function ReadOnlyObjectError () { ReadOnlyObjectError.getInitialProps = async () => { const result = await test() - return {result} + return { result } } export default ReadOnlyObjectError
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/url-prop-override.js
@@ -6,7 +6,7 @@ export default class extends React.Component { } } render () { - const {url} = this.props + const { url } = this.props return <div> <p id='pathname'>{url.pathname}</p> <p id='query'>{Object.keys(url.query).length}</p>
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/pages/url-prop.js
@@ -1,4 +1,4 @@ -export default ({url}) => { +export default ({ url }) => { return <div> <p id='pathname'>{url.pathname}</p> <p id='query'>{Object.keys(url.query).length}</p>
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/test/client-navigation.js
@@ -1,7 +1,7 @@ /* eslint-env jest */ import webdriver from 'next-webdriver' -import {waitFor, getReactErrorOverlayContent} from 'next-test-utils' +import { waitFor, getReactErrorOverlayContent } from 'next-test-utils' export default (context) => { describe('Client Navigation', () => { @@ -40,8 +40,8 @@ expor...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/basic/test/rendering.js
@@ -1,7 +1,7 @@ /* eslint-env jest */ import cheerio from 'cheerio' -import {BUILD_MANIFEST, REACT_LOADABLE_MANIFEST} from 'next-server/constants' +import { BUILD_MANIFEST, REACT_LOADABLE_MANIFEST } from 'next-server/constants' import { join } from 'path' export default function ({ app }, suiteName, render, fet...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/cli/test/index.test.js
@@ -5,7 +5,7 @@ import { runNextCommandDev, findPort } from 'next-test-utils' -import {join} from 'path' +import { join } from 'path' import pkg from 'next/package' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/config/next.config.js
@@ -17,7 +17,7 @@ module.exports = withCSS(withSass({ env: { customVar: 'hello' }, - webpack (config, {buildId}) { + webpack (config, { buildId }) { // When next-css is `npm link`ed we have to solve loaders from the project root const nextLocation = path.join(require.resolve('next/package.json'),...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/config/pages/next-config.js
@@ -1,5 +1,5 @@ import getConfig from 'next/config' -const {serverRuntimeConfig, publicRuntimeConfig} = getConfig() +const { serverRuntimeConfig, publicRuntimeConfig } = getConfig() export default () => <div> <p id='server-only'>{serverRuntimeConfig.mySecret}</p>
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/dist-dir/test/index.test.js
@@ -2,7 +2,7 @@ /* global jasmine */ import { join } from 'path' import { existsSync } from 'fs' -import {BUILD_ID_FILE} from 'next-server/constants' +import { BUILD_ID_FILE } from 'next-server/constants' import { nextServer, nextBuild,
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/export/next.config.js
@@ -1,4 +1,4 @@ -const {PHASE_DEVELOPMENT_SERVER} = require('next-server/constants') +const { PHASE_DEVELOPMENT_SERVER } = require('next-server/constants') module.exports = (phase) => { return {
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/filesystempublicroutes/next.config.js
@@ -6,7 +6,7 @@ module.exports = { useFileSystemPublicRoutes: false, exportPathMap () { return { - '/exportpathmap-route': {page: '/exportpathmap-route'} + '/exportpathmap-route': { page: '/exportpathmap-route' } } } }
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/production-build-dir/test/index.test.js
@@ -48,7 +48,7 @@ function runNextCommand (argv, options = {}) { describe('Production Custom Build Directory', () => { describe('With basic usage', () => { it('should render the page', async () => { - const result = await runNextCommand(['build', 'build'], {stdout: true, stderr: true}) + const result...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/production-config/pages/index.js
@@ -1,4 +1,4 @@ -import React, {Component} from 'react' +import React, { Component } from 'react' export default class extends Component { constructor (props) { @@ -10,7 +10,7 @@ export default class extends Component { } componentDidMount () { - this.setState({mounted: true}) + this.setState({ moun...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/production-config/test/index.test.js
@@ -41,27 +41,27 @@ describe('Production Config Usage', () => { describe('env', () => { it('should fail with __ in env key', async () => { - const result = await runNextCommand(['build', appDir], {spawnOptions: { + const result = await runNextCommand(['build', appDir], { spawnOptions: { env...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/production/test/index.test.js
@@ -16,7 +16,7 @@ import fetch from 'node-fetch' import dynamicImportTests from './dynamic' import processEnv from './process-env' import security from './security' -import {BUILD_MANIFEST, REACT_LOADABLE_MANIFEST, PAGES_MANIFEST} from 'next-server/constants' +import { BUILD_MANIFEST, REACT_LOADABLE_MANIFEST, PAGES_...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/serverless/pages/fetch.js
@@ -7,17 +7,17 @@ export default class extends React.Component { const res = await fetch('') const text = await res.text() console.log(text) - return {text} + return { text } } catch (err) { if (err.message.includes('is not a function')) { - return {failed: true, error:...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/size-limit/next.config.js
@@ -1,6 +1,6 @@ -const {BundleAnalyzerPlugin} = require('webpack-bundle-analyzer') +const { BundleAnalyzerPlugin } = require('webpack-bundle-analyzer') module.exports = { - webpack (config, {isServer}) { + webpack (config, { isServer }) { config.plugins.push(new BundleAnalyzerPlugin({ analyzerMode: 'stat...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/integration/with-router/pages/_app.js
@@ -10,7 +10,7 @@ export default class MyApp extends App { pageProps = await Component.getInitialProps(ctx) } - return {pageProps} + return { pageProps } } render () {
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/isolated/_resolvedata/with-function/next.config.js
@@ -1,4 +1,4 @@ -module.exports = (phase, {defaultConfig}) => { +module.exports = (phase, { defaultConfig }) => { return { phase, defaultConfig,
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/isolated/config.test.js
@@ -1,8 +1,8 @@ /* eslint-env jest */ -import {join} from 'path' +import { join } from 'path' import loadConfig from 'next-server/next-config' -import {PHASE_DEVELOPMENT_SERVER} from 'next-server/constants' +import { PHASE_DEVELOPMENT_SERVER } from 'next-server/constants' const pathToConfig = join(__dirname, '_r...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/isolated/require-page.test.js
@@ -1,9 +1,9 @@ /* eslint-env jest */ import { join } from 'path' -import {SERVER_DIRECTORY, CLIENT_STATIC_FILES_PATH} from 'next-server/constants' -import {requirePage, getPagePath, pageNotFoundError} from 'next-server/dist/server/require' -import {normalizePagePath} from 'next-server/dist/server/normalize-page-pa...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/lib/next-test-utils.js
@@ -140,7 +140,7 @@ export function nextBuild (dir, args = []) { return runNextCommand(['build', dir, ...args]) } -export function nextExport (dir, {outdir}) { +export function nextExport (dir, { outdir }) { return runNextCommand(['export', dir, '--outdir', outdir]) } @@ -203,9 +203,9 @@ export async functi...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/lib/next-webdriver.js
@@ -37,7 +37,7 @@ function getBrowser (url, timeout) { reject(error) }, timeout) - browser.init({browserName: 'chrome'}).get(url, err => { + browser.init({ browserName: 'chrome' }).get(url, err => { if (timeouted) { try { browser.close(() => {
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/unit/htmlescape.test.js
@@ -1,43 +1,43 @@ /* eslint-env jest */ // These tests are based on https://github.com/zertosh/htmlescape/blob/3e6cf0614dd0f778fd0131e69070b77282150c15/test/htmlescape-test.js // License: https://github.com/zertosh/htmlescape/blob/0527ca7156a524d256101bb310a9f970f63078ad/LICENSE -import {htmlEscapeJsonString} from '...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
test/unit/phaseConstants.test.js
@@ -1,5 +1,5 @@ /* eslint-env jest */ -import {PHASE_EXPORT, PHASE_PRODUCTION_BUILD, PHASE_PRODUCTION_SERVER, PHASE_DEVELOPMENT_SERVER} from 'next/constants' +import { PHASE_EXPORT, PHASE_PRODUCTION_BUILD, PHASE_PRODUCTION_SERVER, PHASE_DEVELOPMENT_SERVER } from 'next/constants' describe('phaseConstants', () => { ...
true
Other
vercel
next.js
fcf1167cd4c8604a90d4fb1e28b13e0af8bbe046.json
Upgrade standard and fix files (#6358) Upgrades `standard` to major version 12
yarn.lock
@@ -1762,13 +1762,6 @@ acorn-globals@^4.1.0: acorn "^6.0.1" acorn-walk "^6.0.1" -acorn-jsx@^3.0.0: - version "3.0.1" - resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-3.0.1.tgz#afdf9488fb1ecefc8348f6fb22f464e32a58b36b" - integrity sha1-r9+UiPsezvyDSPb7IvRk4ypYs2s= - dependencies: - acorn...
true
Other
vercel
next.js
3db53610477ba5ab160e7bb8d97745872a2e99f3.json
Update readme with ZEIT Now deployment guide link (#6341) * Update readme with ZEIT Now deployment guide link * Update links to ZEIT Now deployment guide * Fix missing word
packages/next/README.md
@@ -1761,23 +1761,7 @@ next build next start ``` -For example, to deploy with [`now`](https://zeit.co/now) a `package.json` like follows is recommended: - -```json -{ - "name": "my-app", - "dependencies": { - "next": "latest" - }, - "scripts": { - "dev": "next", - "build": "next build", - "start": "...
false
Other
vercel
next.js
ee18967dfcf9f65a4b2c05620c253deb92b4f360.json
Add tests for AMP style tags (#6355) Relevant commit: https://github.com/zeit/next.js/commit/f913aabe163aebfbe57a2c407be5e7108559cc3a ~~I needed to upgrade Standard to work with JSX fragment syntax.~~ This caused too much noise so I just stopped using Fragments.
test/integration/amphtml/components/Bar.js
@@ -0,0 +1,12 @@ +export default function Bar () { + return ( + <div> + <span>Bar!</span> + <style jsx>{` + span { + color: blue; + } + `}</style> + </div> + ) +}
true
Other
vercel
next.js
ee18967dfcf9f65a4b2c05620c253deb92b4f360.json
Add tests for AMP style tags (#6355) Relevant commit: https://github.com/zeit/next.js/commit/f913aabe163aebfbe57a2c407be5e7108559cc3a ~~I needed to upgrade Standard to work with JSX fragment syntax.~~ This caused too much noise so I just stopped using Fragments.
test/integration/amphtml/components/Foo.js
@@ -0,0 +1,12 @@ +export default function Foo () { + return ( + <div> + <div>Foo!</div> + <style jsx>{` + div { + color: red; + } + `}</style> + </div> + ) +}
true
Other
vercel
next.js
ee18967dfcf9f65a4b2c05620c253deb92b4f360.json
Add tests for AMP style tags (#6355) Relevant commit: https://github.com/zeit/next.js/commit/f913aabe163aebfbe57a2c407be5e7108559cc3a ~~I needed to upgrade Standard to work with JSX fragment syntax.~~ This caused too much noise so I just stopped using Fragments.
test/integration/amphtml/pages/styled.js
@@ -0,0 +1,14 @@ +import Foo from '../components/Foo' +import Bar from '../components/Bar' + +export default () => ( + <div> + <Foo /> + <Bar /> + <style jsx global>{` + body { + background-color: green; + } + `}</style> + </div> +)
true
Other
vercel
next.js
ee18967dfcf9f65a4b2c05620c253deb92b4f360.json
Add tests for AMP style tags (#6355) Relevant commit: https://github.com/zeit/next.js/commit/f913aabe163aebfbe57a2c407be5e7108559cc3a ~~I needed to upgrade Standard to work with JSX fragment syntax.~~ This caused too much noise so I just stopped using Fragments.
test/integration/amphtml/test/index.test.js
@@ -135,4 +135,18 @@ describe('AMP Usage', () => { ).toBe('/use-amp-hook') }) }) + + describe('combined styles', () => { + it('should combine style tags', async () => { + const html = await renderViaHTTP(appPort, '/styled?amp=1') + const $ = cheerio.load(html) + expect( + $('sty...
true
Other
vercel
next.js
a2f37ba4cc19ba5baf4d5377acec8c3e1a415eab.json
Join merged style tags (#6345)
packages/next/pages/_document.js
@@ -135,7 +135,7 @@ export class Head extends Component { {/* https://www.ampproject.org/docs/fundamentals/optimize_amp#optimize-the-amp-runtime-loading */} <link rel="preload" as="script" href="https://cdn.ampproject.org/v0.js" /> {/* Add custom styles before AMP styles to prevent accidental...
false
Other
vercel
next.js
fb672478c130faaea5aa1e119d6c40077126ab1f.json
fix: pass full path to `launch-editor` (#6302) * fix(launch-editor): resolve filename including current working directory * refactor: handle when fileName is already absolute * feat: use Next.js dir instead of process.cwd()
packages/next/server/hot-reloader.js
@@ -254,7 +254,7 @@ export default class HotReloader { this.middlewares = [ webpackDevMiddleware, webpackHotMiddleware, - errorOverlayMiddleware, + errorOverlayMiddleware({ dir: this.dir }), onDemandEntries.middleware() ] }
true
Other
vercel
next.js
fb672478c130faaea5aa1e119d6c40077126ab1f.json
fix: pass full path to `launch-editor` (#6302) * fix(launch-editor): resolve filename including current working directory * refactor: handle when fileName is already absolute * feat: use Next.js dir instead of process.cwd()
packages/next/server/lib/error-overlay-middleware.js
@@ -1,14 +1,25 @@ import url from 'url' import launchEditor from 'launch-editor' +import fs from 'fs' +import path from 'path' -export default function errorOverlayMiddleware (req, res, next) { - if (req.url.startsWith('/_next/development/open-stack-frame-in-editor')) { - const query = url.parse(req.url, true)....
true
Other
vercel
next.js
dd9811b206bb554251b34f4daebb052eb67f9b69.json
Fix recursive hydration of next/dynamic (#6326) Fixes #5347 The main issue is that we were waiting only 1 level of dynamic imports, so the dynamic imports nested inside other dynamic import files were not awaited. This would cause either a flash of loading states or you wouldn't see the loading state (because of pr...
packages/next-server/lib/loadable.js
@@ -25,7 +25,7 @@ import React from 'react' import PropTypes from 'prop-types' const ALL_INITIALIZERS = [] -const READY_INITIALIZERS = new Map() +const READY_INITIALIZERS = [] let initialized = false function load (loader) { @@ -138,11 +138,13 @@ function createLoadableComponent (loadFn, options) { // Client...
true
Other
vercel
next.js
dd9811b206bb554251b34f4daebb052eb67f9b69.json
Fix recursive hydration of next/dynamic (#6326) Fixes #5347 The main issue is that we were waiting only 1 level of dynamic imports, so the dynamic imports nested inside other dynamic import files were not awaited. This would cause either a flash of loading states or you wouldn't see the loading state (because of pr...
test/integration/basic/components/nested1.js
@@ -0,0 +1,8 @@ +import dynamic from 'next/dynamic' + +const Nested2 = dynamic(() => import('./nested2')) + +export default () => <div> + Nested 1 + <Nested2 /> +</div>
true
Other
vercel
next.js
dd9811b206bb554251b34f4daebb052eb67f9b69.json
Fix recursive hydration of next/dynamic (#6326) Fixes #5347 The main issue is that we were waiting only 1 level of dynamic imports, so the dynamic imports nested inside other dynamic import files were not awaited. This would cause either a flash of loading states or you wouldn't see the loading state (because of pr...
test/integration/basic/components/nested2.js
@@ -0,0 +1,12 @@ +import dynamic from 'next/dynamic' + +const BrowserLoaded = dynamic(async () => () => <div>Browser hydrated</div>, { + ssr: false +}) + +export default () => <div> + <div> + Nested 2 + </div> + <BrowserLoaded /> +</div>
true
Other
vercel
next.js
dd9811b206bb554251b34f4daebb052eb67f9b69.json
Fix recursive hydration of next/dynamic (#6326) Fixes #5347 The main issue is that we were waiting only 1 level of dynamic imports, so the dynamic imports nested inside other dynamic import files were not awaited. This would cause either a flash of loading states or you wouldn't see the loading state (because of pr...
test/integration/basic/pages/dynamic/nested.js
@@ -0,0 +1,5 @@ +import dynamic from 'next/dynamic' + +const DynamicComponent = dynamic(() => import('../../components/nested1')) + +export default DynamicComponent
true
Other
vercel
next.js
dd9811b206bb554251b34f4daebb052eb67f9b69.json
Fix recursive hydration of next/dynamic (#6326) Fixes #5347 The main issue is that we were waiting only 1 level of dynamic imports, so the dynamic imports nested inside other dynamic import files were not awaited. This would cause either a flash of loading states or you wouldn't see the loading state (because of pr...
test/integration/basic/test/dynamic.js
@@ -37,6 +37,26 @@ export default (context, render) => { } }) + it('should hydrate nested chunks', async () => { + let browser + try { + browser = await webdriver(context.appPort, '/dynamic/nested') + await check(() => browser.elementByCss('body').text(), /Nested 1...
true
Other
vercel
next.js
5cef35b8116400d9fdd3e5d4bceaf5a41f4a8565.json
Fix style importing (#6322)
examples/with-next-sass/README.md
@@ -49,6 +49,6 @@ This example features: * An app with next-sass -This example uses next-sass without css-modules. The config can be found in `next.config.js`, change `withSass()` to `withSass({cssModules: true})` if you use css-modules. Then in the code, you import the stylesheet as `import style '../styles/style...
false
Other
vercel
next.js
46d870ab8a6e87c5f80159c1a3eb8b364c4b1b23.json
Fix url in docs (#6323)
packages/next/README.md
@@ -227,7 +227,7 @@ function HiThere() { export default HiThere ``` -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 that wraps ea...
false
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
errors/env-key-not-allowed.md
@@ -0,0 +1,9 @@ +# The key "<your key>" under "env" in next.config.js is not allowed. + +#### Why This Error Occurred + +Next.js configures internal variables for replacement itself. These start with `__` or `NODE_`, for this reason they are not allowed as values for `env` in `next.config.js` + +#### Possible Ways to F...
true
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
packages/next-server/server/config.js
@@ -4,6 +4,7 @@ import {CONFIG_FILE} from 'next-server/constants' const targets = ['server', 'serverless'] const defaultConfig = { + env: [], webpack: null, webpackDevMiddleware: null, poweredByHeader: true,
true
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
packages/next-server/server/next-server.ts
@@ -249,7 +249,7 @@ export default class Server { } if (this.nextConfig.poweredByHeader) { - res.setHeader('X-Powered-By', 'Next.js ' + process.env.NEXT_VERSION) + res.setHeader('X-Powered-By', 'Next.js ' + process.env.__NEXT_VERSION) } return this.sendHTML(req, res, html) }
true
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
packages/next-server/taskfile-typescript.js
@@ -35,7 +35,7 @@ try { } // update file's data - file.data = Buffer.from(result.outputText.replace(/process\.env\.NEXT_VERSION/, `"${require('./package.json').version}"`), 'utf8') + file.data = Buffer.from(result.outputText.replace(/process\.env\.__NEXT_VERSION/, `"${require('./package.json')...
true
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
packages/next/bin/next.ts
@@ -37,7 +37,7 @@ const args = arg({ // Version is inlined into the file using taskr build pipeline if (args['--version']) { // tslint:disable-next-line - console.log(`Next.js v${process.env.NEXT_VERSION}`) + console.log(`Next.js v${process.env.__NEXT_VERSION}`) process.exit(0) }
true
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
packages/next/build/webpack-config.js
@@ -291,18 +291,20 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer dev && new CaseSensitivePathPlugin(), // Since on macOS the filesystem is case-insensitive this will make sure your path are case-sensitive !dev && new webpack.HashedModuleIdsPlugin(), // Removes s...
true
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
packages/next/client/on-demand-entries-client.js
@@ -20,7 +20,7 @@ export default async ({ assetPrefix }) => { } return new Promise(resolve => { - ws = new WebSocket(`${wsProtocol}://${hostname}:${process.env.NEXT_WS_PORT}${process.env.NEXT_WS_PROXY_PATH}`) + ws = new WebSocket(`${wsProtocol}://${hostname}:${process.env.__NEXT_WS_PORT}${process....
true
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
packages/next/server/hot-reloader.js
@@ -167,8 +167,8 @@ export default class HotReloader { addWsConfig (configs) { const { websocketProxyPath, websocketProxyPort } = this.config.onDemandEntries const opts = { - 'process.env.NEXT_WS_PORT': websocketProxyPort || this.wsPort, - 'process.env.NEXT_WS_PROXY_PATH': JSON.stringify(websocke...
true
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
packages/next/taskfile-typescript.js
@@ -40,7 +40,7 @@ try { if (file.base === 'next-dev.js') result.outputText = result.outputText.replace('// REPLACE_NOOP_IMPORT', `import('./noop');`) // update file's data - file.data = Buffer.from(result.outputText.replace(/process\.env\.NEXT_VERSION/, `"${require('./package.json').version}"`), 'u...
true
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
test/integration/production-config/next.config.js
@@ -2,11 +2,19 @@ const withCSS = require('@zeit/next-css') const withSass = require('@zeit/next-sass') const path = require('path') module.exports = withCSS(withSass({ + env: { + ...(process.env.ENABLE_ENV_FAIL_UNDERSCORE ? { + '__NEXT_MY_VAR': 'test' + } : {}), + ...(process.env.ENABLE_ENV_FAIL_NODE...
true
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
test/integration/production-config/test/index.test.js
@@ -5,18 +5,20 @@ import { nextServer, nextBuild, startApp, - stopApp + stopApp, + runNextCommand } from 'next-test-utils' import webdriver from 'next-webdriver' jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5 +const appDir = join(__dirname, '../') + let appPort let server describe('Production ...
true
Other
vercel
next.js
1e5d0908d0987c7d57862e8084b11cfd3819bd6f.json
Block Certain Env Keys That Are Used Internally (#6260) Closes: #6244 This will block the following keys: ``` NODE_.+ __.+ ``` There doesn't seem to be a way to simulate a failed build or else I'd add tests for it.
test/lib/next-test-utils.js
@@ -69,7 +69,14 @@ export function runNextCommand (argv, options = {}) { const cwd = path.dirname(require.resolve('next/package')) return new Promise((resolve, reject) => { console.log(`Running command "next ${argv.join(' ')}"`) - const instance = spawn('node', ['dist/bin/next', ...argv], { cwd, stdio: op...
true
Other
vercel
next.js
d2ef34429c779c3b803eaf3fd97efee81634d523.json
push redux-saga to major release 1.0.1. (#6300)
examples/with-redux-saga/package.json
@@ -11,13 +11,13 @@ "es6-promise": "4.1.1", "isomorphic-unfetch": "2.0.0", "next": "latest", - "next-redux-saga": "3.0.0", + "next-redux-saga": "4.0.0", "next-redux-wrapper": "2.0.0", "react": "^16.0.0", "react-dom": "^16.0.0", "react-redux": "5.0.7", - "redux": "4.0.0", - ...
true
Other
vercel
next.js
d2ef34429c779c3b803eaf3fd97efee81634d523.json
push redux-saga to major release 1.0.1. (#6300)
examples/with-redux-saga/pages/_app.js
@@ -29,4 +29,4 @@ class MyApp extends App { } } -export default withRedux(createStore)(withReduxSaga({ async: true })(MyApp)) +export default withRedux(createStore)(withReduxSaga(MyApp))
true
Other
vercel
next.js
d2ef34429c779c3b803eaf3fd97efee81634d523.json
push redux-saga to major release 1.0.1. (#6300)
examples/with-redux-saga/saga.js
@@ -1,7 +1,6 @@ /* global fetch */ -import { delay } from 'redux-saga' -import { all, call, put, take, takeLatest } from 'redux-saga/effects' +import { all, call, delay, put, take, takeLatest } from 'redux-saga/effects' import es6promise from 'es6-promise' import 'isomorphic-unfetch' @@ -13,7 +12,7 @@ function *...
true
Other
vercel
next.js
04ce3e7174e67b8bcc8749ecc2bb437edc953fb3.json
Use process.browser instead of env probing (#6286)
examples/with-mobx/pages/_app.js
@@ -21,7 +21,7 @@ class MyMobxApp extends App { constructor(props) { super(props) - const isServer = typeof window === 'undefined' + const isServer = !process.browser; this.mobxStore = isServer ? props.initialMobxState : initializeStore(props.initialMobxState)
true
Other
vercel
next.js
04ce3e7174e67b8bcc8749ecc2bb437edc953fb3.json
Use process.browser instead of env probing (#6286)
examples/with-mobx/store.js
@@ -1,7 +1,7 @@ import { action, observable } from 'mobx' import { useStaticRendering } from 'mobx-react' -const isServer = typeof window === 'undefined' +const isServer = !process.browser useStaticRendering(isServer) class Store { @@ -25,7 +25,8 @@ class Store { } let store = null -export function initiali...
true
Other
vercel
next.js
36946f970979b8e35830676c7d87570c7bdaf0c6.json
Remove lerna bootstrap (#6289)
.circleci/config.yml
@@ -9,9 +9,6 @@ jobs: - run: name: Installing dependencies command: yarn install - - run: - name: Bootstrapping - command: yarn bootstrap - run: name: Linting command: yarn lint @@ -31,4 +28,4 @@ workflows: version: 2 build-and-deplo...
true
Other
vercel
next.js
36946f970979b8e35830676c7d87570c7bdaf0c6.json
Remove lerna bootstrap (#6289)
.travis.yml
@@ -20,6 +20,6 @@ before_cache: [ "rm -rf node_modules/.cache" ], - before_script: ["npm run bootstrap"], + before_script: [], after_script: ["npm run coveralls"] }
true
Other
vercel
next.js
36946f970979b8e35830676c7d87570c7bdaf0c6.json
Remove lerna bootstrap (#6289)
azure-pipelines.yml
@@ -19,10 +19,6 @@ steps: yarn install displayName: 'Install dependencies' -- script: | - yarn bootstrap - displayName: 'Lerna bootstrap' - - script: | yarn test displayName: 'Run tests'
true
Other
vercel
next.js
36946f970979b8e35830676c7d87570c7bdaf0c6.json
Remove lerna bootstrap (#6289)
contributing.md
@@ -3,10 +3,9 @@ Our Commitment to Open Source can be found [here](https://zeit.co/blog/oss) 1. [Fork](https://help.github.com/articles/fork-a-repo/) this repository to your own GitHub account and then [clone](https://help.github.com/articles/cloning-a-repository/) it to your local device. -2. Install yarn: `npm in...
true
Other
vercel
next.js
36946f970979b8e35830676c7d87570c7bdaf0c6.json
Remove lerna bootstrap (#6289)
package.json
@@ -6,7 +6,6 @@ ], "scripts": { "lerna": "lerna", - "bootstrap": "lerna bootstrap", "dev": "lerna run build --stream --parallel", "testonly": "jest", "testall": "yarn check && npm run testonly -- --coverage --forceExit --runInBand --reporters=default --reporters=jest-junit",
true
Other
vercel
next.js
bd249180c67e96e609bff92fe3e751015a94861f.json
Fix Runtime Config in `next export` (#6258)
packages/next/export/index.js
@@ -7,7 +7,6 @@ import { resolve, join } from 'path' import { existsSync, readFileSync } from 'fs' import loadConfig from 'next-server/next-config' import { PHASE_EXPORT, SERVER_DIRECTORY, PAGES_MANIFEST, CONFIG_FILE, BUILD_ID_FILE, CLIENT_STATIC_FILES_PATH } from 'next-server/constants' -import * as envConfig from ...
true
Other
vercel
next.js
bd249180c67e96e609bff92fe3e751015a94861f.json
Fix Runtime Config in `next export` (#6258)
packages/next/export/worker.js
@@ -8,6 +8,7 @@ const { renderToHTML } = require('next-server/dist/server/render') const { writeFile } = require('fs') const Sema = require('async-sema') const {loadComponents} = require('next-server/dist/server/load-components') +const envConfig = require('next-server/config') process.on( 'message', @@ -18,6 ...
true
Other
vercel
next.js
bd249180c67e96e609bff92fe3e751015a94861f.json
Fix Runtime Config in `next export` (#6258)
test/integration/export/next.config.js
@@ -3,6 +3,12 @@ const {PHASE_DEVELOPMENT_SERVER} = require('next-server/constants') module.exports = (phase) => { return { distDir: phase === PHASE_DEVELOPMENT_SERVER ? '.next-dev' : '.next', + publicRuntimeConfig: { + foo: 'foo' + }, + serverRuntimeConfig: { + bar: 'bar' + }, expor...
true
Other
vercel
next.js
bd249180c67e96e609bff92fe3e751015a94861f.json
Fix Runtime Config in `next export` (#6258)
test/integration/export/pages/about.js
@@ -1,12 +1,20 @@ import Link from 'next/link' +import getConfig from 'next/config' +const { publicRuntimeConfig, serverRuntimeConfig } = getConfig() -export default () => ( +const About = ({ bar }) => ( <div id='about-page'> <div> <Link href='/'> <a>Go Back</a> </Link> </div> - ...
true
Other
vercel
next.js
bd249180c67e96e609bff92fe3e751015a94861f.json
Fix Runtime Config in `next export` (#6258)
test/integration/export/test/browser.js
@@ -20,7 +20,7 @@ export default function (context) { .waitForElementByCss('#about-page') .elementByCss('#about-page p').text() - expect(text).toBe('This is the About page') + expect(text).toBe('This is the About page foo') browser.close() }) @@ -31,7 +31,7 @@ export default ...
true
Other
vercel
next.js
bd249180c67e96e609bff92fe3e751015a94861f.json
Fix Runtime Config in `next export` (#6258)
test/integration/export/test/ssr.js
@@ -9,6 +9,11 @@ export default function (context) { expect(html).toMatch(/This is the home page/) }) + it('should render the about page', async () => { + const html = await renderViaHTTP(context.port, '/about') + expect(html).toMatch(/This is the About page foobar/) + }) + it('should...
true
Other
vercel
next.js
e1056e32cf2310b38cf13a20fbbb508cfeab86e0.json
Add yarn check to test (#6257)
package.json
@@ -9,7 +9,7 @@ "bootstrap": "lerna bootstrap", "dev": "lerna run build --stream --parallel", "testonly": "jest", - "testall": "npm run testonly -- --coverage --forceExit --runInBand --reporters=default --reporters=jest-junit", + "testall": "yarn check && npm run testonly -- --coverage --forceExit ...
true
Other
vercel
next.js
e1056e32cf2310b38cf13a20fbbb508cfeab86e0.json
Add yarn check to test (#6257)
yarn.lock
@@ -1762,6 +1762,11 @@ acorn-jsx@^3.0.0: dependencies: acorn "^3.0.4" +acorn-jsx@^5.0.0: + version "5.0.1" + resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.0.1.tgz#32a064fd925429216a09b141102bfdd185fae40e" + integrity sha512-HJ7CfNHrfJLlNTzIEUTj43LNWGkqpRLxm3YjAlcD0ACydk9XynzYsCBHxut+iqt+1a...
true
Other
vercel
next.js
4dd60946395419b45b3d2f6d2851438ac094e9c5.json
styled-components example: use a fragment for styles initial prop (#6252) `initialProps.styles` is a React node, but not guaranteed to be an array, so we can use a fragment to concatenate additional styles. See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/32932#issuecomment-462372319
examples/with-styled-components/pages/_document.js
@@ -15,7 +15,7 @@ export default class MyDocument extends Document { const initialProps = await Document.getInitialProps(ctx) return { ...initialProps, - styles: [...initialProps.styles, ...sheet.getStyleElement()] + styles: <>{initialProps.styles}{sheet.getStyleElement()}</> ...
false
Other
vercel
next.js
734513b9bea3c765eb1dcad741df757047b356a3.json
Apply babel to .mjs files (#6253)
packages/next/build/webpack-config.js
@@ -242,7 +242,7 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer module: { rules: [ { - test: /\.(js|jsx)$/, + test: /\.(js|mjs|jsx)$/, include: [dir, /next-server[\\/]dist[\\/]lib/], exclude: (path) => { if (/n...
false
Other
vercel
next.js
b31819fa50806fe44338c247ee338f928bdd6768.json
Remove build directory
build/webpack/plugins/terser-webpack-plugin/LICENSE
@@ -1,20 +0,0 @@ -Copyright JS Foundation and other contributors - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, mod...
true