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
d19e825daaa1526fc75125c28f8f02e51131bc0c.json
Implement custom routes RFC (#9157) * add initial custom-routes handling * Add tests for custom-routes * Handle chained redirects, separate dev custom routes reading, and add version to routes manifest * Handle no routes manifest * Swap build custom routes calling * Add flatten-routes * Add flattening of custom ...
yarn.lock
@@ -4090,9 +4090,9 @@ caniuse-api@^3.0.0: lodash.uniq "^4.5.0" caniuse-lite@^1.0.0, caniuse-lite@^1.0.30000980, caniuse-lite@^1.0.30000981, caniuse-lite@^1.0.30001002, caniuse-lite@^1.0.30001004: - version "1.0.30001004" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001004.tgz#d87...
true
Other
vercel
next.js
ab5e606e1e0dfaac5c6dc5b22dabcc21bba2e802.json
Ignore shell-quote on Windows (#9296)
lint-staged.config.js
@@ -1,9 +1,10 @@ const escape = require('shell-quote').quote +const isWin = process.platform === 'win32' module.exports = { '**/*.{js,jsx}': filenames => { const escapedFileNames = filenames - .map(filename => `"${escape([filename])}"`) + .map(filename => `"${isWin ? filename : escape([filename])}...
false
Other
vercel
next.js
820a9790baafd36f14a79cf416162e3263cb00c4.json
Add a routes manifest with the dynamic routes (#9347) * Add a routes manifest with the dynamic routes * Update to use pageKeys for windows compat * Update routes-manifest test
packages/next/build/index.ts
@@ -20,8 +20,13 @@ import { PRERENDER_MANIFEST, SERVER_DIRECTORY, SERVERLESS_DIRECTORY, + ROUTES_MANIFEST, } from '../next-server/lib/constants' -import { getRouteRegex, isDynamicRoute } from '../next-server/lib/router/utils' +import { + getRouteRegex, + isDynamicRoute, + getSortedRoutes, +} from '../next...
true
Other
vercel
next.js
820a9790baafd36f14a79cf416162e3263cb00c4.json
Add a routes manifest with the dynamic routes (#9347) * Add a routes manifest with the dynamic routes * Update to use pageKeys for windows compat * Update routes-manifest test
packages/next/next-server/lib/constants.ts
@@ -5,6 +5,7 @@ export const PHASE_DEVELOPMENT_SERVER = 'phase-development-server' export const PAGES_MANIFEST = 'pages-manifest.json' export const BUILD_MANIFEST = 'build-manifest.json' export const PRERENDER_MANIFEST = 'prerender-manifest.json' +export const ROUTES_MANIFEST = 'routes-manifest.json' export const R...
true
Other
vercel
next.js
820a9790baafd36f14a79cf416162e3263cb00c4.json
Add a routes manifest with the dynamic routes (#9347) * Add a routes manifest with the dynamic routes * Update to use pageKeys for windows compat * Update routes-manifest test
test/integration/dynamic-routing/test/index.test.js
@@ -225,6 +225,38 @@ function runTests (dev) { await fs.access(bundlePath + '.js', fs.constants.F_OK) await fs.access(bundlePath + '.module.js', fs.constants.F_OK) }) + + it('should output a routes-manifest correctly', async () => { + const manifest = await fs.readJson( + join(appDir, ...
true
Other
vercel
next.js
820a9790baafd36f14a79cf416162e3263cb00c4.json
Add a routes manifest with the dynamic routes (#9347) * Add a routes manifest with the dynamic routes * Update to use pageKeys for windows compat * Update routes-manifest test
yarn.lock
@@ -4761,7 +4761,14 @@ conventional-recommended-bump@^4.0.4: meow "^4.0.0" q "^1.5.1" -convert-source-map@1.6.0, convert-source-map@^1.1.0, convert-source-map@^1.4.0: +convert-source-map@1.7.0: + version "1.7.0" + resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.7.0.tgz#17a...
true
Other
vercel
next.js
0499316650478d4340addc2c64ebe53c5e7e146f.json
Add check for now.json and custom server (#9346) * Check if the user has a now.json * Check for now.json * Add check for custom server
packages/next/build/index.ts
@@ -6,7 +6,7 @@ import mkdirpOrig from 'mkdirp' import nanoid from 'next/dist/compiled/nanoid/index.js' import path from 'path' import { promisify } from 'util' - +import findUp from 'find-up' import formatWebpackMessages from '../client/dev/error-overlay/format-webpack-messages' import { PUBLIC_DIR_MIDDLEWARE_CON...
true
Other
vercel
next.js
0499316650478d4340addc2c64ebe53c5e7e146f.json
Add check for now.json and custom server (#9346) * Check if the user has a now.json * Check for now.json * Add check for custom server
packages/next/cli/next-dev.ts
@@ -1,5 +1,5 @@ #!/usr/bin/env node -import { resolve, join } from 'path' +import { resolve } from 'path' import arg from 'next/dist/compiled/arg/index.js' import { existsSync } from 'fs' import startServer from '../server/lib/start-server' @@ -57,7 +57,11 @@ const nextDev: cliCommand = argv => { startedDevelo...
true
Other
vercel
next.js
0499316650478d4340addc2c64ebe53c5e7e146f.json
Add check for now.json and custom server (#9346) * Check if the user has a now.json * Check for now.json * Add check for custom server
packages/next/export/index.ts
@@ -5,7 +5,7 @@ import mkdirpModule from 'mkdirp' import { cpus } from 'os' import { dirname, join, resolve, sep } from 'path' import { promisify } from 'util' - +import findUp from 'find-up' import { AmpPageStatus, formatAmpMessages } from '../build/output/index' import createSpinner from '../build/spinner' impo...
true
Other
vercel
next.js
0499316650478d4340addc2c64ebe53c5e7e146f.json
Add check for now.json and custom server (#9346) * Check if the user has a now.json * Check for now.json * Add check for custom server
packages/next/server/next-dev-server.ts
@@ -6,7 +6,7 @@ import React from 'react' import { UrlWithParsedQuery } from 'url' import { promisify } from 'util' import Watchpack from 'watchpack' - +import findUp from 'find-up' import { ampValidation } from '../build/output/index' import * as Log from '../build/output/log' import { PUBLIC_DIR_MIDDLEWARE_CONF...
true
Other
vercel
next.js
0499316650478d4340addc2c64ebe53c5e7e146f.json
Add check for now.json and custom server (#9346) * Check if the user has a now.json * Check for now.json * Add check for custom server
packages/next/telemetry/events/version.ts
@@ -5,6 +5,8 @@ type EventCliSessionStarted = { nodeVersion: string cliCommand: string isSrcDir: boolean | null + hasNowJson: boolean + isCustomServer: boolean | null } export function eventVersion( @@ -23,6 +25,8 @@ export function eventVersion( nodeVersion: process.version, cliCommand...
true
Other
vercel
next.js
ec89e7387f4dce77406fec0c00ee2774dd02fa04.json
Add readme with experimental warning for plugins (#9345)
packages/next-plugin-google-analytics/readme.md
@@ -0,0 +1,3 @@ +# Unstable @next/plugin-google-analytics + +This package is still very experimental and should not be used at this point
true
Other
vercel
next.js
ec89e7387f4dce77406fec0c00ee2774dd02fa04.json
Add readme with experimental warning for plugins (#9345)
packages/next-plugin-material-ui/readme.md
@@ -0,0 +1,3 @@ +# Unstable @next/plugin-material-ui + +This package is still very experimental and should not be used at this point
true
Other
vercel
next.js
ec89e7387f4dce77406fec0c00ee2774dd02fa04.json
Add readme with experimental warning for plugins (#9345)
packages/next-plugin-sentry/readme.md
@@ -0,0 +1,3 @@ +# Unstable @next/plugin-sentry + +This package is still very experimental and should not be used at this point
true
Other
vercel
next.js
dee28884042a7d5485166c961bd4a6d514260b5f.json
Allow TypeScript Namespaces (#9308)
packages/next/build/babel/preset.ts
@@ -116,7 +116,7 @@ module.exports = ( ...options['preset-react'], }, ], - require('@babel/preset-typescript'), + [require('@babel/preset-typescript'), { allowNamespaces: true }], ], plugins: [ [
false
Other
vercel
next.js
8e62c9b688aa7a92e339b728237e8c63ec31f1b5.json
Enforce the `framework` Chunk (#9250)
packages/next/build/webpack-config.ts
@@ -293,6 +293,9 @@ export default async function getBaseWebpackConfig( // https://github.com/zeit/next.js/pull/9012 test: /(?<!node_modules.*)[\\/]node_modules[\\/](react|react-dom|scheduler|prop-types|use-subscription)[\\/]/, priority: 40, + // Don't let webpack eliminate thi...
false
Other
vercel
next.js
bbf705f26271cbb679b2a6f9e59bdf28c7f7880e.json
Simplify Build Output (#9281) * Simplify Build Output * Remove noop tests * Drop ⚡ * Remove bolding
examples/with-patternfly/next.config.js
@@ -15,10 +15,22 @@ module.exports = withCSS( // if they live under a 'fonts' or 'pficon' directory include: [ path.resolve(__dirname, 'node_modules/patternfly/dist/fonts'), - path.resolve(__dirname, 'node_modules/@patternfly/react-core/dist/styles/assets/fonts'), - path.r...
true
Other
vercel
next.js
bbf705f26271cbb679b2a6f9e59bdf28c7f7880e.json
Simplify Build Output (#9281) * Simplify Build Output * Remove noop tests * Drop ⚡ * Remove bolding
packages/next/build/index.ts
@@ -45,7 +45,6 @@ import { printTreeView, } from './utils' import getBaseWebpackConfig from './webpack-config' -import { getPageChunks } from './webpack/plugins/chunk-graph-plugin' import { writeBuildId } from './write-build-id' const fsAccess = promisify(fs.access) @@ -347,8 +346,6 @@ export default async fun...
true
Other
vercel
next.js
bbf705f26271cbb679b2a6f9e59bdf28c7f7880e.json
Simplify Build Output (#9281) * Simplify Build Output * Remove noop tests * Drop ⚡ * Remove bolding
packages/next/build/utils.ts
@@ -2,16 +2,15 @@ import chalk from 'chalk' import fs from 'fs' import textTable from 'next/dist/compiled/text-table' import path from 'path' +import { isValidElementType } from 'react-is' import stripAnsi from 'strip-ansi' import { promisify } from 'util' -import { isValidElementType } from 'react-is' +import {...
true
Other
vercel
next.js
bbf705f26271cbb679b2a6f9e59bdf28c7f7880e.json
Simplify Build Output (#9281) * Simplify Build Output * Remove noop tests * Drop ⚡ * Remove bolding
packages/next/build/webpack-config.ts
@@ -25,8 +25,14 @@ import { } from '../next-server/lib/constants' import { findPageFile } from '../server/lib/find-page-file' import { WebpackEntrypoints } from './entries' +import { + collectPlugins, + PluginMetaData, + VALID_MIDDLEWARE, +} from './plugins/collect-plugins' +// @ts-ignore: JS file +import { plugi...
true
Other
vercel
next.js
bbf705f26271cbb679b2a6f9e59bdf28c7f7880e.json
Simplify Build Output (#9281) * Simplify Build Output * Remove noop tests * Drop ⚡ * Remove bolding
packages/next/build/webpack/plugins/chunk-graph-plugin.ts
@@ -1,272 +0,0 @@ -import { CLIENT_STATIC_FILES_RUNTIME_MAIN } from '../../../next-server/lib/constants' -import path from 'path' -import { parse } from 'querystring' -import { Compiler, Plugin } from 'webpack' - -type StringDictionary = { [pageName: string]: string[] } -const manifest: { - sharedFiles: string[] - pa...
true
Other
vercel
next.js
bbf705f26271cbb679b2a6f9e59bdf28c7f7880e.json
Simplify Build Output (#9281) * Simplify Build Output * Remove noop tests * Drop ⚡ * Remove bolding
test/integration/build-stats-output/react-site/pages/something.js
@@ -1,3 +0,0 @@ -import fetch from 'isomorphic-unfetch' -console.log(fetch) -export default () => <p>Hello world</p>
true
Other
vercel
next.js
bbf705f26271cbb679b2a6f9e59bdf28c7f7880e.json
Simplify Build Output (#9281) * Simplify Build Output * Remove noop tests * Drop ⚡ * Remove bolding
test/integration/build-stats-output/test/index.test.js
@@ -1,14 +0,0 @@ -/* eslint-env jest */ -/* global jasmine */ -import { join } from 'path' -import { nextBuild } from 'next-test-utils' - -jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 1 -const appDir = join(__dirname, '../react-site') - -describe('Build Stats Output', () => { - it('Shows correct package count in out...
true
Other
vercel
next.js
739322d06bad930fa0d126cf75c03319e7d04229.json
Handle backslashes for plugins (#9282)
packages/next/build/plugins/collect-plugins.ts
@@ -126,7 +126,7 @@ async function collectPluginMeta( return { middleware, - directory: pkgDir, + directory: pkgDir.replace(/\\/g, '/'), requiredEnv: pluginMetaData['required-env'], version: pluginPackageJson.version, pluginName: pluginMetaData.name,
true
Other
vercel
next.js
739322d06bad930fa0d126cf75c03319e7d04229.json
Handle backslashes for plugins (#9282)
packages/next/build/webpack-config.ts
@@ -133,7 +133,7 @@ export default async function getBaseWebpackConfig( /next[\\/]dist[\\/]pages/, /[\\/](strip-ansi|ansi-regex)[\\/]/, ...(config.experimental.plugins - ? VALID_MIDDLEWARE.map(name => new RegExp(`src/${name}`)) + ? VALID_MIDDLEWARE.map(name => new RegExp(`src(\\\\|/)${name}`)) ...
true
Other
vercel
next.js
d21ad2b44f8843ac73f822776ce5068a3f9034aa.json
Add Patternfly example (#9251) * Add Patternfly example * Fix lint * Add missing space * Remove trailing comma
examples/with-patternfly/README.md
@@ -0,0 +1,42 @@ +# Patternfly example + +## How to use + +### Using `create-next-app` + +Execute [`create-next-app`](https://github.com/zeit/next.js/tree/canary/packages/create-next-app) with [Yarn](https://yarnpkg.com/lang/en/docs/cli/create/) or [npx](https://github.com/zkat/npx#readme) to bootstrap the example: + +...
true
Other
vercel
next.js
d21ad2b44f8843ac73f822776ce5068a3f9034aa.json
Add Patternfly example (#9251) * Add Patternfly example * Fix lint * Add missing space * Remove trailing comma
examples/with-patternfly/next.config.js
@@ -0,0 +1,95 @@ +const path = require('path') +const withCSS = require('@zeit/next-css') +const withTM = require('next-transpile-modules') + +const BG_IMAGES_DIRNAME = 'bgimages' + +module.exports = withCSS( + withTM({ + transpileModules: ['@patternfly'], + // Webpack config from https://github.com/patternfly/p...
true
Other
vercel
next.js
d21ad2b44f8843ac73f822776ce5068a3f9034aa.json
Add Patternfly example (#9251) * Add Patternfly example * Fix lint * Add missing space * Remove trailing comma
examples/with-patternfly/package.json
@@ -0,0 +1,24 @@ +{ + "name": "with-patternfly", + "author": "Daniel Reinoso <danielreinoso1807@gmail.com>", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "@patternfly/react-core": "^3.112.3", + "next": "latest", + ...
true
Other
vercel
next.js
d21ad2b44f8843ac73f822776ce5068a3f9034aa.json
Add Patternfly example (#9251) * Add Patternfly example * Fix lint * Add missing space * Remove trailing comma
examples/with-patternfly/pages/_app.js
@@ -0,0 +1,4 @@ +import App from 'next/app' +import '@patternfly/react-core/dist/styles/base.css' + +export default App
true
Other
vercel
next.js
d21ad2b44f8843ac73f822776ce5068a3f9034aa.json
Add Patternfly example (#9251) * Add Patternfly example * Fix lint * Add missing space * Remove trailing comma
examples/with-patternfly/pages/index.js
@@ -0,0 +1,34 @@ +import { useState } from 'react' +import { Button, Wizard } from '@patternfly/react-core' + +const steps = [ + { name: 'Step 1', component: <p>Step 1</p> }, + { name: 'Step 2', component: <p>Step 2</p> }, + { name: 'Step 3', component: <p>Step 3</p> }, + { name: 'Step 4', component: <p>Step 4</p> ...
true
Other
vercel
next.js
683903785aa21376b98ecb4b1bb20247ed262ed3.json
Require Node 8.10 (#9278)
packages/next/package.json
@@ -178,6 +178,6 @@ "unistore": "3.4.1" }, "engines": { - "node": ">= 8.0.0" + "node": ">=8.10.0" } }
false
Other
vercel
next.js
c966900768bc53452f5fccfa0bd0cf21b4ae3cf7.json
Bugfix/Performance: Start the modern child compiler earlier (#9257) * Start the modern Child Compiler earlier during builds * fix child compiler errors not bubbling
packages/next/build/webpack/plugins/next-esm-plugin.ts
@@ -254,24 +254,36 @@ export default class NextEsmPlugin implements Plugin { } } - compilation.hooks.additionalAssets.tapAsync( - PLUGIN_NAME, - childProcessDone => { - this.updateOptions(childCompiler) - - childCompiler.runAsChild((err, entries, childCompilation) => { - ...
false
Other
vercel
next.js
8dd394a05586741fe613bb6ba330539e75f53fcf.json
Load granular chunks with correct asset prefix (#8993) * closes #8989 fix closes #8989 * test * Update next.config.js * Revert page1.js * Revert page2.js * Delete page4.js * Delete page3.js * Update index.test.js * Revert index.test.js * Revert next.config.js
packages/next/client/page-loader.js
@@ -187,11 +187,13 @@ export default class PageLoader { ) { scriptRoute = scriptRoute.replace(/\.js$/, '.module.js') } - const url = isDependency - ? route - : `${this.assetPrefix}/_next/static/${encodeURIComponent( - this.buildId - )}/pages${scriptRoute}` + const url = + ...
false
Other
vercel
next.js
f632567bcf6652333ab57e7c13adeabe15bf1074.json
Add experimental config for React Mode (#9207) * Add experimental config for React Mode * Use latest types * Use latest types
packages/next/build/webpack-config.ts
@@ -753,6 +753,9 @@ export default async function getBaseWebpackConfig( 'process.env.__NEXT_STRICT_MODE': JSON.stringify( config.reactStrictMode ), + 'process.env.__NEXT_REACT_MODE': JSON.stringify( + config.experimental.reactMode + ), ...(isServer ...
true
Other
vercel
next.js
f632567bcf6652333ab57e7c13adeabe15bf1074.json
Add experimental config for React Mode (#9207) * Add experimental config for React Mode * Use latest types * Use latest types
packages/next/client/index.js
@@ -18,6 +18,8 @@ import { DataManager } from '../next-server/lib/data-manager' import { parse as parseQs, stringify as stringifyQs } from 'querystring' import { isDynamicRoute } from '../next-server/lib/router/utils/is-dynamic' +/// <reference types="react-dom/experimental" /> + // Polyfill Promise globally // T...
true
Other
vercel
next.js
f632567bcf6652333ab57e7c13adeabe15bf1074.json
Add experimental config for React Mode (#9207) * Add experimental config for React Mode * Use latest types * Use latest types
packages/next/next-server/server/config.ts
@@ -7,6 +7,7 @@ import { CONFIG_FILE } from '../lib/constants' import { execOnce } from '../lib/utils' const targets = ['server', 'serverless', 'experimental-serverless-trace'] +const reactModes = ['legacy', 'blocking', 'concurrent'] const defaultConfig: { [key: string]: any } = { env: [], @@ -49,6 +50,7 @@ c...
true
Other
vercel
next.js
f632567bcf6652333ab57e7c13adeabe15bf1074.json
Add experimental config for React Mode (#9207) * Add experimental config for React Mode * Use latest types * Use latest types
packages/next/package.json
@@ -158,7 +158,7 @@ "@types/nanoid": "2.0.0", "@types/node-fetch": "2.3.4", "@types/react": "16.8.18", - "@types/react-dom": "16.8.4", + "@types/react-dom": "16.9.3", "@types/react-is": "16.7.1", "@types/resolve": "0.0.8", "@types/send": "0.14.4",
true
Other
vercel
next.js
f632567bcf6652333ab57e7c13adeabe15bf1074.json
Add experimental config for React Mode (#9207) * Add experimental config for React Mode * Use latest types * Use latest types
yarn.lock
@@ -2452,10 +2452,10 @@ resolved "https://registry.yarnpkg.com/@types/range-parser/-/range-parser-1.2.3.tgz#7ee330ba7caafb98090bece86a5ee44115904c2c" integrity sha512-ewFXqrQHlFsgc09MK5jP5iR7vumV/BYayNC6PgJO2LPe8vrnNFyjQjSppfEngITi0qvfKtzFvgKymGheFM9UOA== -"@types/react-dom@16.8.4": - version "16.8.4" - resol...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/.gitignore
@@ -0,0 +1,2 @@ +node_modules +.next
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/comment-form.js
@@ -0,0 +1,23 @@ +export default () => ( + <div> + <textarea /> + <button>add comment</button> + <style jsx>{` + textarea { + width: 400px; + height: 100px; + display: block; + margin-bottom: 10px; + } + + button { + padding: 3px 4px; + } + @media (m...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/comment.js
@@ -0,0 +1,84 @@ +import timeAgo from '../lib/time-ago' +import React from 'react' + +export default class Comment extends React.Component { + constructor (props) { + super(props) + this.state = {} + this.toggle = this.toggle.bind(this) + } + + render () { + const { user, text, date, comments } = this.pr...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/header.js
@@ -0,0 +1,91 @@ +import Nav from './nav' +import Logo from './logo' +import Link from 'next/link' + +export default () => ( + <header> + <div className='left'> + <Link href='/'> + <a> + <span className='logo'> + <Logo /> + </span> + <span className='title'>Hacker N...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/item.js
@@ -0,0 +1,45 @@ +import Story from '../components/story' +import Comment from '../components/comment' +import CommentForm from '../components/comment-form' + +export default ({ story, comments = null }) => ( + <div className='item'> + <Story {...story} /> + + <div className='form'> + <CommentForm /> + <...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/login-form.js
@@ -0,0 +1,27 @@ +export default () => ( + <div> + <h4>Login</h4> + <p> + username: <input type='text' /> + <br /> + password: <input type='password' /> + </p> + <button>login</button> + <p> + <a href='#'>Forgot your password?</a> + </p> + <h4>Create Account</h4> + <p> + ...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/logo.js
@@ -0,0 +1,15 @@ +export default () => ( + <span> + N + <style jsx>{` + span { + border: 1px solid #fff; + display: inline-block; + color: #fff; + font-weight: bold; + font-size: 11px; + padding: 5px 8px; + } + `}</style> + </span> +)
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/meta.js
@@ -0,0 +1,56 @@ +import Head from 'next/head' +import NProgress from 'nprogress' +import Router from 'next/router' + +Router.onRouteChangeStart = () => NProgress.start() +Router.onRouteChangeComplete = () => NProgress.done() +Router.onRouteChangeError = () => NProgress.done() + +export default () => ( + <div> + <H...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/nav.js
@@ -0,0 +1,44 @@ +import Link from 'next/link' + +export default () => ( + <ul> + <Item href='/newest'>new</Item> + <Item href='/show'>show</Item> + <Item href='/ask'>ask</Item> + <Item href='/jobs'>jobs</Item> + <Item href='/submit'>submit</Item> + + <style jsx>{` + ul { + list-style-typ...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/page.js
@@ -0,0 +1,32 @@ +import Header from './header' +import Meta from './meta' + +export default ({ children }) => ( + <div className='main'> + <Meta /> + <Header /> + + <div className='page'>{children}</div> + + <style jsx>{` + .main { + width: 85%; + margin: auto; + padding: 10px 0 ...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/stories.js
@@ -0,0 +1,60 @@ +import Story from './updating-story' +import Link from 'next/link' + +export default ({ stories, page = 1, offset = null }) => ( + <div> + {stories.map((story, i) => ( + <div key={story.id} className='item'> + {offset != null ? ( + <span className='count'>{i + offset + 1}</spa...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/story.js
@@ -0,0 +1,80 @@ +import Link from 'next/link' +import timeAgo from '../lib/time-ago' +import parse from 'url-parse' + +export default ({ id, title, date, url, user, score, commentsCount }) => { + const { host } = parse(url) + return ( + <div> + <div className='title'> + {url ? ( + <a href={ur...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/components/updating-story.js
@@ -0,0 +1,22 @@ +import React from 'react' +import Story from './story' +import { observe } from '../lib/get-item' + +export default class extends React.Component { + constructor (props) { + super(props) + this.state = props + } + + componentDidMount () { + this.unsubscribe = observe(this.props.id, data =>...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/lib/db.js
@@ -0,0 +1,17 @@ +import firebase from 'firebase' + +try { + firebase.initializeApp({ + databaseURL: 'https://hacker-news.firebaseio.com' + }) +} catch (err) { + // we skip the "already exists" message which is + // not an actual error when we're hot-reloading + if (!/already exists/.test(err.message)) { + c...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/lib/get-comments.js
@@ -0,0 +1,22 @@ +import db from './db' + +// hydrate comments based on an array of item ids +export default function fetch (ids) { + return Promise.all( + ids.map(async id => { + const item = await db + .child('item') + .child(id) + .once('value') + const val = item.val() + retu...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/lib/get-item.js
@@ -0,0 +1,36 @@ +import db from './db' + +export default async id => { + const item = await db + .child('item') + .child(id) + .once('value') + const val = item.val() + if (val) { + return transform(val) + } else { + return null + } +} + +export function observe (id, fn) { + const onval = data => ...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/lib/get-stories.js
@@ -0,0 +1,20 @@ +import db from './db' +import { transform } from './get-item' + +export default async (type = 'topstories', { page = 1, max = 30 } = {}) => { + const start = max * (page - 1) + const end = start + max - 1 + const ids = await db.child(type).once('value') + const stories = await Promise.all( + id...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/lib/time-ago.js
@@ -0,0 +1,12 @@ +import ms from 'ms' + +const map = { + s: 'seconds', + ms: 'milliseconds', + m: 'minutes', + h: 'hours', + d: 'days' +} + +export default date => + ms(new Date() - date).replace(/[a-z]+/, str => ' ' + map[str])
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/now.json
@@ -0,0 +1,3 @@ +{ + "builds": [{ "src": "package.json", "use": "@now/next@canary" }] +}
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/package.json
@@ -0,0 +1,18 @@ +{ + "name": "next-news", + "license": "MIT", + "dependencies": { + "firebase": "^7.2.1", + "ms": "^2.1.2", + "next": "^9.1.2-canary.7", + "nprogress": "^0.2.0", + "react": "^16.10.2", + "react-dom": "^16.10.2", + "url-parse": "^1.4.7" + }, + "scripts": { + "dev": "next", +...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/pages/ask.js
@@ -0,0 +1,22 @@ +import React from 'react' +import Page from '../components/page' +import Stories from '../components/stories' +import getStories from '../lib/get-stories' + +// eslint-disable-next-line camelcase +export async function unstable_getStaticProps () { + const page = 1 + const stories = await getStories(...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/pages/index.js
@@ -0,0 +1,22 @@ +import React from 'react' +import Page from '../components/page' +import Stories from '../components/stories' +import getStories from '../lib/get-stories' + +// eslint-disable-next-line camelcase +export async function unstable_getStaticProps () { + const page = 1 + const stories = await getStories(...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/pages/item/[id].js
@@ -0,0 +1,27 @@ +import React, { useState, useEffect } from 'react' +import Page from '../../components/page' +import Item from '../../components/item' +import getItem from '../../lib/get-item' +import getComments from '../../lib/get-comments' + +// eslint-disable-next-line camelcase +export async function unstable_ge...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/pages/jobs.js
@@ -0,0 +1,21 @@ +import React from 'react' +import Page from '../components/page' +import Stories from '../components/stories' +import getStories from '../lib/get-stories' + +// eslint-disable-next-line camelcase +export async function unstable_getStaticProps () { + const page = 1 + const stories = await getStories(...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/pages/login.js
@@ -0,0 +1,7 @@ +import LoginForm from '../components/login-form' + +function Login () { + return <LoginForm /> +} + +export default Login
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/pages/newest.js
@@ -0,0 +1,22 @@ +import React from 'react' +import Page from '../components/page' +import Stories from '../components/stories' +import getStories from '../lib/get-stories' + +// eslint-disable-next-line camelcase +export async function unstable_getStaticProps () { + const page = 1 + const stories = await getStories(...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/pages/news/[id].js
@@ -0,0 +1,22 @@ +import React from 'react' +import Page from '../../components/page' +import Stories from '../../components/stories' +import getStories from '../../lib/get-stories' + +// eslint-disable-next-line camelcase +export async function unstable_getStaticProps ({ params }) { + const page = Number(params.id) +...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/pages/show.js
@@ -0,0 +1,22 @@ +import React from 'react' +import Page from '../components/page' +import Stories from '../components/stories' +import getStories from '../lib/get-stories' + +// eslint-disable-next-line camelcase +export async function unstable_getStaticProps () { + const page = 1 + const stories = await getStories(...
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/pages/submit.js
@@ -0,0 +1,9 @@ +import React from 'react' +import LoginForm from '../components/login-form' + +export default () => ( + <div> + <p>You have to be logged in to submit</p> + <LoginForm /> + </div> +)
true
Other
vercel
next.js
4c6e294ca2f38688cfc33d9ae849a103e3f9034e.json
Add experimental example of next-news (#9249) * Add next-news example * Update components * Use getStaticProps * Move directory
examples/z-experimental-next-news/pages/user/[id].js
@@ -0,0 +1 @@ +export default () => <>user page (WIP)</>
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
examples/with-netlify-cms/public/static/admin/config.yml
@@ -31,6 +31,16 @@ collections: slug: '{{year}}-{{month}}-{{day}}_{{slug}}' fields: - { label: 'Title', name: 'title', widget: 'string', required: true } - - { label: 'Publish Date', name: 'date', widget: 'datetime', required: true } - - { label: 'Featured Image', name: 'thumbnail', widget: '...
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
examples/with-next-offline/pages/index.js
@@ -1 +1,3 @@ -export default () => <div>Next-Offline Example, try to install app via chrome</div> +export default () => ( + <div>Next-Offline Example, try to install app via chrome</div> +)
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
examples/with-next-offline/public/manifest.json
@@ -13,4 +13,4 @@ "background_color": "#ffffff", "start_url": "/", "display": "standalone" -} \ No newline at end of file +}
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
examples/with-quill-js/next.config.js
@@ -1,3 +1,5 @@ // next.config.js const withCSS = require('@zeit/next-css') -module.exports = withCSS({/* my next config */}) +module.exports = withCSS({ + /* my next config */ +})
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
examples/with-tailwindcss/README.md
@@ -42,11 +42,14 @@ now ## The idea behind the example This setup is a basic starting point for using [Tailwind CSS](https://tailwindcss.com) with Next.js. This example also includes the following [PostCSS](https://github.com/postcss/postcss) plugins: + - [autoprefixer](https://github.com/postcss/autoprefixer) - A...
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
examples/with-typescript/pages/api/users/[id].ts
@@ -3,7 +3,7 @@ import { sampleUserData } from '../../../utils/sample-data' export default (req: NextApiRequest, res: NextApiResponse) => { try { - const { id } = req.query; + const { id } = req.query const selected = sampleUserData.find(data => data.id === Number(id)) if (!selected) { @@ -15,4 ...
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
examples/with-typescript/pages/users/[id].tsx
@@ -15,7 +15,9 @@ class InitialPropsDetail extends React.Component<Props> { static getInitialProps = async ({ query }: NextPageContext) => { try { const { id } = query - const item = await sampleFetchWrapper(`http://localhost:3000/api/users/${Array.isArray(id) ? id[0] : id}`) + const item = awa...
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
examples/with-zeit-fetch/fetch/package.json
@@ -1,4 +1,4 @@ { "browser": "./browser.js", "main": "./server.js" -} \ No newline at end of file +}
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
lerna.json
@@ -1,19 +1,14 @@ { "npmClient": "yarn", "useWorkspaces": true, - "packages": [ - "packages/*" - ], + "packages": ["packages/*"], "command": { "version": { "exact": true }, "publish": { "npmClient": "npm", - "allowBranch": [ - "master", - "canary" - ]...
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
lint-staged.config.js
@@ -0,0 +1,23 @@ +const escape = require('shell-quote').quote + +module.exports = { + '**/*.{js,jsx}': filenames => { + const escapedFileNames = filenames + .map(filename => `"${escape([filename])}"`) + .join(' ') + return [ + `prettier --write ${escapedFileNames}`, + `standard --fix ${escape...
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
package.json
@@ -28,25 +28,6 @@ "next": "./packages/next/dist/bin/next" }, "pre-commit": "lint-staged", - "lint-staged": { - "*.js": [ - "prettier --write", - "standard --fix", - "git add" - ], - "*.tsx": [ - "prettier --write", - "git add" - ], - "*.ts": [ - "prettier --writ...
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
packages/next/build/webpack-config.ts
@@ -338,9 +338,9 @@ export default async function getBaseWebpackConfig( // are relative to requests we've already resolved here. // Absolute requires (require('/foo')) are extremely uncommon, but // also have no need for customization as they're already resolved. - cons...
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
test/integration/prerender/pages/blog/[post]/[comment].js
@@ -3,10 +3,7 @@ import Link from 'next/link' // eslint-disable-next-line camelcase export async function unstable_getStaticParams () { - return [ - '/blog/post-1/comment-1', - { post: 'post-2', comment: 'comment-2' } - ] + return ['/blog/post-1/comment-1', { post: 'post-2', comment: 'comment-2' }] } /...
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
test/integration/prerender/pages/blog/[post]/index.js
@@ -3,11 +3,7 @@ import Link from 'next/link' // eslint-disable-next-line camelcase export async function unstable_getStaticParams () { - return [ - '/blog/post-1', - { post: 'post-2' }, - '/blog/[post3]' - ] + return ['/blog/post-1', { post: 'post-2' }, '/blog/[post3]'] } // eslint-disable-next-lin...
true
Other
vercel
next.js
6b54e9ed665b4090c6fb3a562d0f5c7bd0c7276d.json
Fix Prettier Commit Hook (#9245) * Apply format to webpack config * hit all files
yarn.lock
@@ -872,13 +872,6 @@ dependencies: regenerator-runtime "^0.13.2" -"@babel/runtime@^7.0.0": - version "7.4.5" - resolved "https://registry.yarnpkg.com/@babel/runtime/-/runtime-7.4.5.tgz#582bb531f5f9dc67d2fcb682979894f75e253f12" - integrity sha512-TuI4qpWZP6lGOGIuGWtp9sPluqYICmbk8T/1vpSysqJxRPkudh/ofFWyqdcMs...
true
Other
vercel
next.js
636be2466ef303b5a48ef35fb4014fce13398dd3.json
Add test for #8924 (#9243) This adds a test for PR #8924.
test/integration/amphtml/test/index.test.js
@@ -229,6 +229,27 @@ describe('AMP Usage', () => { }) }) + describe('AMP dev no-warn', () => { + let dynamicAppPort + let ampDynamic + + it('should not warn on valid amp', async () => { + let inspectPayload = '' + dynamicAppPort = await findPort() + ampDynamic = await launchApp(join(_...
false
Other
vercel
next.js
5f203b8342786407af70c44c52836e6344b93981.json
Improve serverless build performance (#9155) * Improve serverless build performance Next's serverless build uses a custom resolver, injected the via Webpack's `externals` option that delegates out to `resolve-request` to more aggressively pull node modules into the serverless bundles. When profiling a large Next.j...
packages/next/build/webpack-config.ts
@@ -334,6 +334,15 @@ export default async function getBaseWebpackConfig( return callback() } + // Relative requires don't need custom resolution, because they + // are relative to requests we've already resolved here. + // Absolute requires (require('/foo')...
false
Other
vercel
next.js
17d7544f456feb22e37549b0e85310c98cef6391.json
Remove concurrency option from next export (#9197) Usage of this option was removed in 61b8b7323e089c8cc0372ce0f32402c8d70096f8 but the cli was not updated.
packages/next/cli/next-export.ts
@@ -14,7 +14,6 @@ const nextExport: cliCommand = argv => { '--silent': Boolean, '--outdir': String, '--threads': Number, - '--concurrency': Number, // Aliases '-h': '--help', @@ -54,7 +53,6 @@ const nextExport: cliCommand = argv => { const options = { silent: args['--si...
false
Other
vercel
next.js
c4bef164ce3a792f2376d102125b98bcea2ed3a5.json
Add unique identifier to router instance (#9015) * Update to use a historyId to track invalid popstates * Remove log from debugging * Use Math.random instead of Date.getTime to avoid mocks
packages/next/next-server/lib/router/router.ts
@@ -71,6 +71,7 @@ export default class Router implements BaseRouter { _bps: BeforePopStateCallback | undefined events: MittEmitter _wrapApp: (App: ComponentType) => any + historyId: number static events: MittEmitter = mitt() @@ -126,6 +127,8 @@ export default class Router implements BaseRouter { t...
false
Other
vercel
next.js
48e2c19de0423dbd10b9e1791854d6214f0023fd.json
Serialize JSON Warnings Before Event (#11976)
packages/next/build/output/index.ts
@@ -336,13 +336,15 @@ export function watchCompilers( stats.compilation.errors.push(...(filteredErrors || [])) stats.compilation.warnings.push(...(filteredWarnings || [])) + const { + errors: newErrors, + warnings: newWarnings, + } = formatWebp...
false
Other
vercel
next.js
29c697b36b9e6565ae4cf8cd9189520803036c0e.json
Add initial configuration changes for webpack 5 (#11917) * Disable PnP plugin in webpack 5 Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com> * Use full hashes for hot update names Co-Authored-By: Zack Jackson <zackary.l.jackson@gmail.com> * Disable autodll in webpack 5 Co-Authored-By: Zack Jack...
packages/next/build/webpack-config.ts
@@ -53,6 +53,8 @@ import WebpackConformancePlugin, { type ExcludesFalse = <T>(x: T | false) => x is T +const isWebpack5 = parseInt(webpack.version!) === 5 + const escapePathVariables = (value: any) => { return typeof value === 'string' ? value.replace(/\[(\\*[\w:]+\\*)\]/gi, '[\\$1\\]') @@ -277,7 +279,10 ...
false
Other
vercel
next.js
6202a7f3bd913670cff5fd43523aad764678f10b.json
Fix: Update shallow routing docs (#11894)
docs/routing/shallow-routing.md
@@ -27,7 +27,7 @@ function Page() { useEffect(() => { // Always do navigations after the first render - router.push('/?counter=10', null, { shallow: true }) + router.push('/?counter=10', undefined, { shallow: true }) }, []) useEffect(() => { @@ -43,7 +43,7 @@ If you don't need to add the router ...
false
Other
vercel
next.js
ab18c7929e1938b1428c4a337d3d6b7eefa98d7b.json
Add support for params in header key/values (#10324) * Add support for params in header key/values * Update todo * Update with handling for named patterns * Use compiled package Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
packages/next/next-server/server/next-server.ts
@@ -63,6 +63,7 @@ import { } from './spr-cache' import { execOnce } from '../lib/utils' import { isBlockedPage } from './utils' +import { compile as compilePathToRegex } from 'next/dist/compiled/path-to-regexp' import { loadEnvConfig } from '../../lib/load-env-config' const getCustomRouteMatcher = pathMatch(true...
true
Other
vercel
next.js
ab18c7929e1938b1428c4a337d3d6b7eefa98d7b.json
Add support for params in header key/values (#10324) * Add support for params in header key/values * Update todo * Update with handling for named patterns * Use compiled package Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
test/integration/custom-routes/next.config.js
@@ -217,6 +217,19 @@ module.exports = { }, ], }, + { + source: '/my-other-header/:path', + headers: [ + { + key: 'x-path', + value: ':path', + }, + { + key: 'some:path', + value...
true
Other
vercel
next.js
ab18c7929e1938b1428c4a337d3d6b7eefa98d7b.json
Add support for params in header key/values (#10324) * Add support for params in header key/values * Update todo * Update with handling for named patterns * Use compiled package Co-authored-by: Joe Haddad <joe.haddad@zeit.co>
test/integration/custom-routes/test/index.test.js
@@ -306,6 +306,18 @@ const runTests = (isDev = false) => { expect(res.headers.get('x-second-header')).toBe('second') }) + it('should apply params for header key/values', async () => { + const res = await fetchViaHTTP(appPort, '/my-other-header/first') + expect(res.headers.get('x-path')).toBe('first') +...
true
Other
vercel
next.js
b1aa594a80e3af13ad22f9c97eab346f36242222.json
Handle Potential Promise Rejection in Serverless (#11882)
packages/next/build/webpack/loaders/next-serverless-loader.ts
@@ -177,7 +177,7 @@ const nextServerlessLoader: loader.Loader = function() { } const resolver = require('${absolutePagePath}') - apiResolver( + await apiResolver( req, res, Object.assign({}, parsedUrl.query, params ),
false
Other
vercel
next.js
841cd6c4d78abdf8bee8fa64feb2f401db45a5d2.json
Fix Situation Where Build Can Hang Indefinitely (#11881)
packages/next/build/webpack/plugins/terser-webpack-plugin/src/TaskRunner.js
@@ -57,18 +57,39 @@ export default class TaskRunner { const done = () => step(index, result) if (cachePath) { writeFileP(cachePath, JSON.stringify(result), 'utf8') - .then(done) - .catch(done) + // This is important to stay as `.then(fn1, fn2)` a...
true
Other
vercel
next.js
841cd6c4d78abdf8bee8fa64feb2f401db45a5d2.json
Fix Situation Where Build Can Hang Indefinitely (#11881)
packages/next/build/webpack/plugins/terser-webpack-plugin/src/index.js
@@ -4,7 +4,7 @@ import stringHash from 'next/dist/compiled/string-hash' import { SourceMapConsumer } from 'next/dist/compiled/source-map' import { SourceMapSource, RawSource } from 'webpack-sources' -import { RequestShortener } from 'webpack' +import RequestShortener from 'webpack/lib/RequestShortener' import TaskR...
true
Other
vercel
next.js
4e6d6d206c596d96bf4335f1bb64e8e57513ea65.json
Remove unused import (#11875)
packages/next-polyfill-nomodule/src/index.js
@@ -8,7 +8,6 @@ import 'core-js/features/array/from' import 'core-js/features/array/includes' import 'core-js/features/array/iterator' import 'core-js/features/array/of' -import 'core-js/features/array/species' import 'core-js/features/function/has-instance' import 'core-js/features/map' import 'core-js/features/...
false
Other
vercel
next.js
0b51b2340a701f46b67bbb7470e7624ff9377237.json
Add stats config for load tests (#11868)
test/.stats-app/stats-config.js
@@ -142,6 +142,15 @@ module.exports = { 'http://localhost:$PORT/link', 'http://localhost:$PORT/withRouter', ], + pagesToBench: [ + 'http://localhost:$PORT/', + 'http://localhost:$PORT/error-in-render', + ], + benchOptions: { + reqTimeout: 60, + concurr...
false
Other
vercel
next.js
2b1f959b7d5ad980f8903cbb648d3d2f134b0195.json
Update shallow routing docs (#11616) * Updated shallow routing docs * Include getStaticProps
docs/routing/shallow-routing.md
@@ -11,7 +11,7 @@ description: You can use shallow routing to change the URL without triggering a </ul> </details> -Shallow routing allows you to change the URL without running [`getInitialProps`](/docs/api-reference/data-fetching/getInitialProps.md). +Shallow routing allows you to change the URL without running ...
false
Other
vercel
next.js
ee372f472ffcb07dd1b7c19f0c707f0260f55d4e.json
feat(example): add CRUD example with next-connect and passport (#11359) * Add with-next-connect example * Update README * Fix code and lint * Fix typo * Run prettier * Include username * Rename example * Match with-passport styling * Add comments in code * Run prettier * Rewrite example ...
examples/with-passport-and-next-connect/README.md
@@ -0,0 +1,27 @@ +# next-connect and Passport + +This example creates a basic [CRUD](https://en.wikipedia.org/wiki/Create,_read,_update_and_delete) app using [next-connect](https://github.com/hoangvvo/next-connect) and cookie-based authentication with [Passport.js](http://www.passportjs.org/). The cookie is securely en...
true