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
67df497092bd0645d9a452eabfd21734ae6e3265.json
Convert export worker to typescript (#13381) This is purely adding types except for the line: ```js params = getRouteMatcher(getRouteRegex(page))(path) || undefined ``` Also added a couple of `@ts-ignore` as to avoid having to make any more functional changes
packages/next/export/index.ts
@@ -36,6 +36,7 @@ import { Telemetry } from '../telemetry/storage' import { normalizePagePath } from '../next-server/server/normalize-page-path' import { loadEnvConfig } from '../lib/load-env-config' import { PrerenderManifest } from '../build' +import type exportPage from './worker' import { PagesManifest } from '...
true
Other
vercel
next.js
67df497092bd0645d9a452eabfd21734ae6e3265.json
Convert export worker to typescript (#13381) This is purely adding types except for the line: ```js params = getRouteMatcher(getRouteRegex(page))(path) || undefined ``` Also added a couple of `@ts-ignore` as to avoid having to make any more functional changes
packages/next/export/worker.ts
@@ -10,14 +10,65 @@ import { getRouteRegex } from '../next-server/lib/router/utils/route-regex' import { normalizePagePath } from '../next-server/server/normalize-page-path' import { SERVER_PROPS_EXPORT_ERROR } from '../lib/constants' import 'next/dist/next-server/server/node-polyfill-fetch' +import { IncomingMessag...
true
Other
vercel
next.js
0dd818b79ade92e189d2e4284705fc627c494fc9.json
Update Amp dependencies (#13354)
packages/next/package.json
@@ -58,7 +58,7 @@ ] }, "dependencies": { - "@ampproject/toolbox-optimizer": "2.3.1", + "@ampproject/toolbox-optimizer": "2.4.0", "@babel/code-frame": "7.8.3", "@babel/core": "7.7.7", "@babel/plugin-proposal-class-properties": "7.8.3",
true
Other
vercel
next.js
0dd818b79ade92e189d2e4284705fc627c494fc9.json
Update Amp dependencies (#13354)
yarn.lock
@@ -2,33 +2,37 @@ # yarn lockfile v1 -"@ampproject/toolbox-core@^2.3.0": - version "2.3.0" - resolved "https://registry.yarnpkg.com/@ampproject/toolbox-core/-/toolbox-core-2.3.0.tgz#f27bd17e01fdc6725c440aefa844f63466c0f37e" +"@ampproject/toolbox-core@^2.4.0-alpha.1": + version "2.4.0-alpha.1" + resolved "https...
true
Other
vercel
next.js
8079fa27c1ce24307c5a1b360166fda41952f817.json
skip node internals (#13345)
.vscode/launch.json
@@ -11,6 +11,7 @@ "cwd": "${workspaceFolder}", "runtimeExecutable": "yarn", "runtimeArgs": ["run", "debug", "dev", "test/integration/basic"], + "skipFiles": ["<node_internals>/**"], "port": 9229 }, { @@ -20,6 +21,7 @@ "cwd": "${workspaceFolder}", "runtimeExecutab...
false
Other
vercel
next.js
2ecb7c6e375bd75846b2911385349f85dc83242f.json
Fix retry for Windows tests (#13296) Noticed these tests failed for Windows on `canary`, then traced down the cause.
test/integration/basic/test/hmr.js
@@ -1,9 +1,9 @@ /* eslint-env jest */ +import cheerio from 'cheerio' +import { existsSync, readFileSync, renameSync, writeFileSync } from 'fs' +import { check, getBrowserBodyText, waitFor } from 'next-test-utils' import webdriver from 'next-webdriver' -import { readFileSync, writeFileSync, renameSync, existsSync } fr...
false
Other
vercel
next.js
e66bcfa8384c258728cb0f3429310ebdced942ff.json
Add support for sass-loader prependData option (#12277) This PR adds support for prepending sass code before the actual entry file. It's common for developers to import their sass mixins and variables once on their project config so they don't need to import them on every file that requires it. Frameworks like gatsby...
packages/next/build/webpack/config/blocks/css/index.ts
@@ -28,6 +28,8 @@ export const css = curry(async function css( ctx: ConfigurationContext, config: Configuration ) { + const { prependData: sassPrependData, ...sassOptions } = ctx.sassOptions + const sassPreprocessors: webpack.RuleSetUseItem[] = [ // First, process files with `sass-loader`: this inlines ...
true
Other
vercel
next.js
e66bcfa8384c258728cb0f3429310ebdced942ff.json
Add support for sass-loader prependData option (#12277) This PR adds support for prepending sass code before the actual entry file. It's common for developers to import their sass mixins and variables once on their project config so they don't need to import them on every file that requires it. Frameworks like gatsby...
test/integration/scss-fixtures/basic-module-prepend-data/next.config.js
@@ -0,0 +1,7 @@ +module.exports = { + sassOptions: { + prependData: ` + $var: red; + `, + }, +}
true
Other
vercel
next.js
e66bcfa8384c258728cb0f3429310ebdced942ff.json
Add support for sass-loader prependData option (#12277) This PR adds support for prepending sass code before the actual entry file. It's common for developers to import their sass mixins and variables once on their project config so they don't need to import them on every file that requires it. Frameworks like gatsby...
test/integration/scss-fixtures/basic-module-prepend-data/pages/index.js
@@ -0,0 +1,9 @@ +import { redText } from './index.module.scss' + +export default function Home() { + return ( + <div id="verify-red" className={redText}> + This text should be red. + </div> + ) +}
true
Other
vercel
next.js
e66bcfa8384c258728cb0f3429310ebdced942ff.json
Add support for sass-loader prependData option (#12277) This PR adds support for prepending sass code before the actual entry file. It's common for developers to import their sass mixins and variables once on their project config so they don't need to import them on every file that requires it. Frameworks like gatsby...
test/integration/scss-fixtures/basic-module-prepend-data/pages/index.module.scss
@@ -0,0 +1,3 @@ +.redText { + color: $var; +}
true
Other
vercel
next.js
e66bcfa8384c258728cb0f3429310ebdced942ff.json
Add support for sass-loader prependData option (#12277) This PR adds support for prepending sass code before the actual entry file. It's common for developers to import their sass mixins and variables once on their project config so they don't need to import them on every file that requires it. Frameworks like gatsby...
test/integration/scss/test/index.test.js
@@ -106,6 +106,34 @@ describe('SCSS Support', () => { }) }) + describe('Basic Module Prepend Data Support', () => { + const appDir = join(fixturesDir, 'basic-module-prepend-data') + + beforeAll(async () => { + await remove(join(appDir, '.next')) + }) + + it('should compile successfully', asy...
true
Other
vercel
next.js
c67908c9a52c42326bef3d2388270539cad0ad18.json
Upgrade react-with-styles to version 4 (#13193) Currently failing because `withStyles` can't read the interface from context: ``` Unhandled Runtime Error TypeError: Cannot read property 'createLTR' of undefined webpack-internal:///./node_modules/react-with-styles/lib/withStyles.js (150:33) ``` Manually registering ...
examples/with-react-with-styles/package.json
@@ -11,8 +11,9 @@ "next": "latest", "react": "^16.7.0", "react-dom": "^16.7.0", - "react-with-styles": "^2.2.0", - "react-with-styles-interface-aphrodite": "^3.1.1" + "react-with-direction": "^1.3.1", + "react-with-styles": "^4.1.0", + "react-with-styles-interface-aphrodite": "^6.0.1" }...
true
Other
vercel
next.js
c67908c9a52c42326bef3d2388270539cad0ad18.json
Upgrade react-with-styles to version 4 (#13193) Currently failing because `withStyles` can't read the interface from context: ``` Unhandled Runtime Error TypeError: Cannot read property 'createLTR' of undefined webpack-internal:///./node_modules/react-with-styles/lib/withStyles.js (150:33) ``` Manually registering ...
examples/with-react-with-styles/pages/_app.js
@@ -0,0 +1,23 @@ +import React from 'react' +import { DIRECTIONS } from 'react-with-direction' +import AphroditeInterface from 'react-with-styles-interface-aphrodite' +import WithStylesContext from 'react-with-styles/lib/WithStylesContext' +import defaultTheme from '../defaultTheme' + +function MyApp(props) { + const ...
true
Other
vercel
next.js
c67908c9a52c42326bef3d2388270539cad0ad18.json
Upgrade react-with-styles to version 4 (#13193) Currently failing because `withStyles` can't read the interface from context: ``` Unhandled Runtime Error TypeError: Cannot read property 'createLTR' of undefined webpack-internal:///./node_modules/react-with-styles/lib/withStyles.js (150:33) ``` Manually registering ...
examples/with-react-with-styles/pages/index.js
@@ -1,5 +1,5 @@ import React from 'react' -import { css, withStyles } from '../withStyles' +import { css, withStyles } from 'react-with-styles' function Home({ styles }) { return (
true
Other
vercel
next.js
c67908c9a52c42326bef3d2388270539cad0ad18.json
Upgrade react-with-styles to version 4 (#13193) Currently failing because `withStyles` can't read the interface from context: ``` Unhandled Runtime Error TypeError: Cannot read property 'createLTR' of undefined webpack-internal:///./node_modules/react-with-styles/lib/withStyles.js (150:33) ``` Manually registering ...
examples/with-react-with-styles/withStyles.js
@@ -1,9 +0,0 @@ -import ThemedStyleSheet from 'react-with-styles/lib/ThemedStyleSheet' -import aphroditeInterface from 'react-with-styles-interface-aphrodite' -import { css, withStyles } from 'react-with-styles' -import MyDefaultTheme from './defaultTheme' - -ThemedStyleSheet.registerTheme(MyDefaultTheme) -ThemedStyleS...
true
Other
vercel
next.js
1a53f4500aaa5a211540e7aa86858521f34e1ec9.json
Update custom server docs (#13172)
docs/advanced-features/custom-server.md
@@ -39,9 +39,9 @@ app.prepare().then(() => { const { pathname, query } = parsedUrl if (pathname === '/a') { - app.render(req, res, '/b', query) - } else if (pathname === '/b') { app.render(req, res, '/a', query) + } else if (pathname === '/b') { + app.render(req, res, '/b', query) ...
false
Other
vercel
next.js
71d899f1289f79edf5f42a63cab4bedd7c38cb74.json
Add urql to the examples list (#13006) * Install UrQL dependencies - Created the examples folder `with-urql` - Installed the dependencies - Got a simple index.js page setup * Basic UrQL example - Connects to Pokemon GraphQL API * Loading Pokemon list + Pokemon page - Using `isomorphic-unfetch` because...
examples/with-urql/README.md
@@ -0,0 +1,42 @@ +# Next.js and urql + +Use [urql](https://github.com/FormidableLabs/urql) with Next.js using SSG. + +## Deploy your own + +Deploy the example using [Vercel](https://vercel.com/now): + +[![Deploy with Vercel](https://vercel.com/button)](https://vercel.com/import/project?template=https://github.com/zeit/...
true
Other
vercel
next.js
71d899f1289f79edf5f42a63cab4bedd7c38cb74.json
Add urql to the examples list (#13006) * Install UrQL dependencies - Created the examples folder `with-urql` - Installed the dependencies - Got a simple index.js page setup * Basic UrQL example - Connects to Pokemon GraphQL API * Loading Pokemon list + Pokemon page - Using `isomorphic-unfetch` because...
examples/with-urql/graphql/client.js
@@ -0,0 +1,5 @@ +import { createClient } from 'urql' + +export const client = createClient({ + url: 'https://graphql-pokemon.now.sh/', +})
true
Other
vercel
next.js
71d899f1289f79edf5f42a63cab4bedd7c38cb74.json
Add urql to the examples list (#13006) * Install UrQL dependencies - Created the examples folder `with-urql` - Installed the dependencies - Got a simple index.js page setup * Basic UrQL example - Connects to Pokemon GraphQL API * Loading Pokemon list + Pokemon page - Using `isomorphic-unfetch` because...
examples/with-urql/graphql/getPokemon.js
@@ -0,0 +1,17 @@ +import { client } from './client' +const pokemonQuery = ` + query firstTwentyPokemons($name: String!) { + pokemon(name: $name) { + name + image + } + } +` + +export const getPokemon = async (name) => { + const { + data: { pokemon }, + } = await client.query(pokemonQuery, { name ...
true
Other
vercel
next.js
71d899f1289f79edf5f42a63cab4bedd7c38cb74.json
Add urql to the examples list (#13006) * Install UrQL dependencies - Created the examples folder `with-urql` - Installed the dependencies - Got a simple index.js page setup * Basic UrQL example - Connects to Pokemon GraphQL API * Loading Pokemon list + Pokemon page - Using `isomorphic-unfetch` because...
examples/with-urql/graphql/getPokemons.js
@@ -0,0 +1,20 @@ +import { client } from './client' +const firstTwentyPokemonsQuery = ` + query firstTwentyPokemons { + pokemons(first: 20) { + image + name + } + } +` + +export const getPokemons = async () => { + const { + data: { pokemons }, + } = await client.query(firstTwentyPokemonsQuery).to...
true
Other
vercel
next.js
71d899f1289f79edf5f42a63cab4bedd7c38cb74.json
Add urql to the examples list (#13006) * Install UrQL dependencies - Created the examples folder `with-urql` - Installed the dependencies - Got a simple index.js page setup * Basic UrQL example - Connects to Pokemon GraphQL API * Loading Pokemon list + Pokemon page - Using `isomorphic-unfetch` because...
examples/with-urql/package.json
@@ -0,0 +1,17 @@ +{ + "name": "with-urql", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "graphql": "^15.0.0", + "isomorphic-unfetch": "^3.0.0", + "next": "latest", + "react": "^16.13.1", + "react-dom": "^16.13.1", + "urql": "^...
true
Other
vercel
next.js
71d899f1289f79edf5f42a63cab4bedd7c38cb74.json
Add urql to the examples list (#13006) * Install UrQL dependencies - Created the examples folder `with-urql` - Installed the dependencies - Got a simple index.js page setup * Basic UrQL example - Connects to Pokemon GraphQL API * Loading Pokemon list + Pokemon page - Using `isomorphic-unfetch` because...
examples/with-urql/pages/index.js
@@ -0,0 +1,28 @@ +import Link from 'next/link' +import { getPokemons } from '../graphql/getPokemons' + +export default function Home({ pokemons }) { + return ( + <ul> + {pokemons.map((pokemon) => ( + <li key={pokemon.name}> + <Link as={`/pokemon/${pokemon.name}`} href="/pokemon/[name]"> + ...
true
Other
vercel
next.js
71d899f1289f79edf5f42a63cab4bedd7c38cb74.json
Add urql to the examples list (#13006) * Install UrQL dependencies - Created the examples folder `with-urql` - Installed the dependencies - Got a simple index.js page setup * Basic UrQL example - Connects to Pokemon GraphQL API * Loading Pokemon list + Pokemon page - Using `isomorphic-unfetch` because...
examples/with-urql/pages/pokemon/[name].js
@@ -0,0 +1,33 @@ +import { getPokemon } from '../../graphql/getPokemon' +import { getPokemons } from '../../graphql/getPokemons' + +export default function Pokemon({ pokemon }) { + return ( + <div> + <h1>{pokemon.name}</h1> + <img src={pokemon.image} /> + </div> + ) +} + +export const getStaticPaths =...
true
Other
vercel
next.js
3f11daa9c0d2f438552a7e116c1458c62e5f2a3c.json
Use correct `chalk` import (#13235) This PR imports our bundled dependency instead of re-adding it to install-time. --- Closes #13166
packages/next/build/webpack/plugins/webpack-conformance-plugin/checks/granular-chunks-conformance.ts
@@ -1,13 +1,13 @@ -import chalk from 'chalk' -import { - IWebpackConformanceTest, - IConformanceTestResult, - IConformanceTestStatus, -} from '../TestInterface' +import chalk from 'next/dist/compiled/chalk' import { CONFORMANCE_ERROR_PREFIX, CONFORMANCE_WARNING_PREFIX, } from '../constants' +import { + ICon...
false
Other
vercel
next.js
44d74e399f70f04b16526a9466e0c8ddf72023fd.json
chore: Remove react redundant imports on examples (#13169) * Remove React redundant import on `analyze-bundles` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `api-routes-apollo-server-and-client-auth` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> ...
examples/analyze-bundles/pages/index.js
@@ -1,4 +1,3 @@ -import React from 'react' import Link from 'next/link' import faker from 'faker'
true
Other
vercel
next.js
44d74e399f70f04b16526a9466e0c8ddf72023fd.json
chore: Remove react redundant imports on examples (#13169) * Remove React redundant import on `analyze-bundles` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `api-routes-apollo-server-and-client-auth` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> ...
examples/api-routes-apollo-server-and-client-auth/apollo/client.js
@@ -1,4 +1,3 @@ -import React from 'react' import Head from 'next/head' import { ApolloProvider } from '@apollo/react-hooks' import { ApolloClient } from 'apollo-client'
true
Other
vercel
next.js
44d74e399f70f04b16526a9466e0c8ddf72023fd.json
chore: Remove react redundant imports on examples (#13169) * Remove React redundant import on `analyze-bundles` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `api-routes-apollo-server-and-client-auth` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> ...
examples/api-routes-apollo-server-and-client-auth/pages/signin.js
@@ -1,4 +1,4 @@ -import React from 'react' +import { useState } from 'react' import Link from 'next/link' import { withApollo } from '../apollo/client' import gql from 'graphql-tag' @@ -21,7 +21,7 @@ const SignInMutation = gql` function SignIn() { const client = useApolloClient() const [signIn] = useMutation(...
true
Other
vercel
next.js
44d74e399f70f04b16526a9466e0c8ddf72023fd.json
chore: Remove react redundant imports on examples (#13169) * Remove React redundant import on `analyze-bundles` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `api-routes-apollo-server-and-client-auth` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> ...
examples/api-routes-apollo-server-and-client-auth/pages/signout.js
@@ -1,4 +1,4 @@ -import React from 'react' +import { useEffect } from 'react' import { useMutation, useApolloClient } from '@apollo/react-hooks' import gql from 'graphql-tag' import { useRouter } from 'next/router' @@ -15,7 +15,7 @@ function SignOut() { const router = useRouter() const [signOut] = useMutation(...
true
Other
vercel
next.js
44d74e399f70f04b16526a9466e0c8ddf72023fd.json
chore: Remove react redundant imports on examples (#13169) * Remove React redundant import on `analyze-bundles` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `api-routes-apollo-server-and-client-auth` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> ...
examples/api-routes-apollo-server-and-client-auth/pages/signup.js
@@ -1,4 +1,4 @@ -import React from 'react' +import { useState } from 'react' import Link from 'next/link' import { withApollo } from '../apollo/client' import gql from 'graphql-tag' @@ -20,7 +20,7 @@ const SignUpMutation = gql` function SignUp() { const [signUp] = useMutation(SignUpMutation) - const [errorMsg...
true
Other
vercel
next.js
44d74e399f70f04b16526a9466e0c8ddf72023fd.json
chore: Remove react redundant imports on examples (#13169) * Remove React redundant import on `analyze-bundles` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `api-routes-apollo-server-and-client-auth` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> ...
examples/custom-server-actionhero/pages/index.js
@@ -1,4 +1,3 @@ -import React from 'react' import Link from 'next/link' export default function Home() {
true
Other
vercel
next.js
44d74e399f70f04b16526a9466e0c8ddf72023fd.json
chore: Remove react redundant imports on examples (#13169) * Remove React redundant import on `analyze-bundles` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `api-routes-apollo-server-and-client-auth` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> ...
examples/custom-server/pages/a.js
@@ -1,5 +1,3 @@ -import React from 'react' - export default function A() { return <div>a</div> }
true
Other
vercel
next.js
44d74e399f70f04b16526a9466e0c8ddf72023fd.json
chore: Remove react redundant imports on examples (#13169) * Remove React redundant import on `analyze-bundles` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `api-routes-apollo-server-and-client-auth` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> ...
examples/custom-server/pages/b.js
@@ -1,5 +1,3 @@ -import React from 'react' - export default function B() { return <div>b</div> }
true
Other
vercel
next.js
44d74e399f70f04b16526a9466e0c8ddf72023fd.json
chore: Remove react redundant imports on examples (#13169) * Remove React redundant import on `analyze-bundles` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> * Remove React redundant import on `api-routes-apollo-server-and-client-auth` example Co-authored-by: Marcus Silva <mvfsillva@gmail.com> ...
examples/custom-server/pages/index.js
@@ -1,4 +1,3 @@ -import React from 'react' import Link from 'next/link' export default function Home() {
true
Other
vercel
next.js
b91e570a334e62a6bd49fe58a7dfe447cf4a78e1.json
Move csp examples (#13221) Fixes #12042
examples/with-strict-csp-hash/README.md
@@ -1,46 +1 @@ -# Example app with strict CSP generating script hash - -This example features how you can set up a strict CSP for your pages whitelisting next's inline bootstrap script by hash. -In contrast to the example `with-strict-csp` based on nonces, this way doesn't require running a server to generate fresh non...
true
Other
vercel
next.js
b91e570a334e62a6bd49fe58a7dfe447cf4a78e1.json
Move csp examples (#13221) Fixes #12042
examples/with-strict-csp-hash/package.json
@@ -1,15 +0,0 @@ -{ - "name": "with-strict-csp-hash", - "version": "1.0.0", - "scripts": { - "dev": "next", - "build": "next build", - "start": "next start" - }, - "dependencies": { - "next": "latest", - "react": "^16.7.0", - "react-dom": "^16.7.0" - }, - "license": "ISC" -}
true
Other
vercel
next.js
b91e570a334e62a6bd49fe58a7dfe447cf4a78e1.json
Move csp examples (#13221) Fixes #12042
examples/with-strict-csp-hash/pages/_document.js
@@ -1,28 +0,0 @@ -import crypto from 'crypto' -import Document, { Head, Main, NextScript } from 'next/document' - -const cspHashOf = (text) => { - const hash = crypto.createHash('sha256') - hash.update(text) - return `'sha256-${hash.digest('base64')}'` -} - -export default class MyDocument extends Document { - rend...
true
Other
vercel
next.js
b91e570a334e62a6bd49fe58a7dfe447cf4a78e1.json
Move csp examples (#13221) Fixes #12042
examples/with-strict-csp-hash/pages/index.js
@@ -1,3 +0,0 @@ -export default function Home() { - return <div>Hello World</div> -}
true
Other
vercel
next.js
b91e570a334e62a6bd49fe58a7dfe447cf4a78e1.json
Move csp examples (#13221) Fixes #12042
examples/with-strict-csp/README.md
@@ -1,8 +1,15 @@ -# Strict CSP example +# Example app with strict CSP generating script hash -If you want to implement a CSP, the most effective way is to follow the [strict CSP](https://csp.withgoogle.com/docs/strict-csp.html) approach. For it to work, we need to generate a nonce on every request. +This example feat...
true
Other
vercel
next.js
b91e570a334e62a6bd49fe58a7dfe447cf4a78e1.json
Move csp examples (#13221) Fixes #12042
examples/with-strict-csp/csp.js
@@ -1,31 +0,0 @@ -const helmet = require('helmet') -const uuidv4 = require('uuid/v4') - -module.exports = function csp(app) { - // Create a nonce on every request and make it available to other middleware - app.use((req, res, next) => { - res.locals.nonce = Buffer.from(uuidv4()).toString('base64') - next() - }...
true
Other
vercel
next.js
b91e570a334e62a6bd49fe58a7dfe447cf4a78e1.json
Move csp examples (#13221) Fixes #12042
examples/with-strict-csp/package.json
@@ -1,17 +1,15 @@ { - "name": "with-strict-csp", + "name": "with-strict-csp-hash", "version": "1.0.0", "scripts": { - "dev": "node server.js", + "dev": "next", "build": "next build", - "start": "NODE_ENV=production node server.js" + "start": "next start" }, "dependencies": { - "expres...
true
Other
vercel
next.js
b91e570a334e62a6bd49fe58a7dfe447cf4a78e1.json
Move csp examples (#13221) Fixes #12042
examples/with-strict-csp/pages/_document.js
@@ -1,30 +1,26 @@ +import crypto from 'crypto' import Document, { Head, Main, NextScript } from 'next/document' -const inlineScript = (body, nonce) => ( - <script - type="text/javascript" - dangerouslySetInnerHTML={{ __html: body }} - nonce={nonce} - /> -) +const cspHashOf = (text) => { + const hash = cr...
true
Other
vercel
next.js
b91e570a334e62a6bd49fe58a7dfe447cf4a78e1.json
Move csp examples (#13221) Fixes #12042
examples/with-strict-csp/server.js
@@ -1,21 +0,0 @@ -const express = require('express') -const next = require('next') -const csp = require('./csp') - -const port = parseInt(process.env.PORT, 10) || 3000 -const dev = process.env.NODE_ENV !== 'production' -const app = next({ dev }) -const handle = app.getRequestHandler() - -app.prepare().then(() => { - c...
true
Other
vercel
next.js
c6535edc2736463dfc93b8543d7b8abd87e5ae39.json
Remove unnecessary loadGetInitialProps (#13159)
packages/next/client/index.js
@@ -488,25 +488,6 @@ const wrapApp = (App) => (props) => { } async function doRender({ App, Component, props, err }) { - // Usual getInitialProps fetching is handled in next/router - // this is for when ErrorComponent gets replaced by Component by HMR - if ( - !props && - Component && - Component !== Er...
false
Other
vercel
next.js
d257d44594369ea970dd01e47f65ee90cb18e7e2.json
Remove dead events (#13156)
packages/next/client/index.js
@@ -514,12 +514,6 @@ async function doRender({ App, Component, props, err }) { // lastAppProps has to be set before ReactDom.render to account for ReactDom throwing an error. lastAppProps = appProps - emitter.emit('before-reactdom-render', { - Component, - ErrorComponent, - appProps, - }) - const ...
true
Other
vercel
next.js
d257d44594369ea970dd01e47f65ee90cb18e7e2.json
Remove dead events (#13156)
packages/next/client/next-dev.js
@@ -43,28 +43,6 @@ initNext({ webpackHMR }) displayContent(() => { render(renderCtx) }) - - let lastScroll - - emitter.on('before-reactdom-render', ({ Component, ErrorComponent }) => { - // Remember scroll when ErrorComponent is being rendered to later restore it - if (!lastScroll && Co...
true
Other
vercel
next.js
74d7e3585c88e445f9b441265e87b2e431918eb7.json
Eliminate array destructuring assignment (#13151) While we're at it, we should fix this too. x-ref: #13144
packages/next/build/babel/plugins/next-ssg-transform.ts
@@ -212,6 +212,28 @@ export default function nextTransformSsg({ throw new Error('invariant') })() ) as NodePath<BabelTypes.Identifier> + if (isIdentifierReferenced(local)) { + state.refs.add(local) + ...
true
Other
vercel
next.js
74d7e3585c88e445f9b441265e87b2e431918eb7.json
Eliminate array destructuring assignment (#13151) While we're at it, we should fix this too. x-ref: #13144
test/unit/babel-plugin-next-ssg-transform.test.js
@@ -476,5 +476,27 @@ describe('babel plugin (next-ssg-transform)', () => { `"import other from'other';const{a,cat:bar}=other;export var __N_SSG=true;export default function Home(){return __jsx(\\"div\\",null);}"` ) }) + + it('destructuring assignment (array)', () => { + const output = babel...
true
Other
vercel
next.js
e28ce34ccb3b656eb24c9e8d555f6b18d386b71c.json
Fix the link for Custom Server documentation (#13137)
examples/custom-server-koa/README.md
@@ -1,6 +1,6 @@ # Custom Koa Server example -Most of the times the default Next server will be enough but sometimes you want to run your own server to customize routes or other kind of the app behavior. Next provides a [Custom server and routing](https://github.com/zeit/next.js#custom-server-and-routing) so you can ...
false
Other
vercel
next.js
993b78de0bab6024a8ac48ff6502e7e409b10710.json
chore: Remove some redundant imports (#13066) This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples - with-zeit-fetch - with-yarn-workspaces - with-why-did-your-render - with-video-js - with-universal-configuration-runtime - with-typestyle - with-three-js I...
examples/with-three-js/pages/_app.js
@@ -1,4 +1,3 @@ -import React from 'react' import './index.css' function MyApp({ Component, pageProps }) {
true
Other
vercel
next.js
993b78de0bab6024a8ac48ff6502e7e409b10710.json
chore: Remove some redundant imports (#13066) This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples - with-zeit-fetch - with-yarn-workspaces - with-why-did-your-render - with-video-js - with-universal-configuration-runtime - with-typestyle - with-three-js I...
examples/with-three-js/pages/birds.js
@@ -1,4 +1,4 @@ -import React, { useRef, useState, useEffect, Suspense } from 'react' +import { useRef, useState, useEffect, Suspense } from 'react' import * as THREE from 'three' import { Canvas, useFrame, useLoader } from 'react-three-fiber'
true
Other
vercel
next.js
993b78de0bab6024a8ac48ff6502e7e409b10710.json
chore: Remove some redundant imports (#13066) This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples - with-zeit-fetch - with-yarn-workspaces - with-why-did-your-render - with-video-js - with-universal-configuration-runtime - with-typestyle - with-three-js I...
examples/with-three-js/pages/boxes.js
@@ -1,4 +1,4 @@ -import React, { useRef, useState, Suspense } from 'react' +import { useRef, useState, Suspense } from 'react' import { Canvas, useFrame } from 'react-three-fiber' const Box = (props) => {
true
Other
vercel
next.js
993b78de0bab6024a8ac48ff6502e7e409b10710.json
chore: Remove some redundant imports (#13066) This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples - with-zeit-fetch - with-yarn-workspaces - with-why-did-your-render - with-video-js - with-universal-configuration-runtime - with-typestyle - with-three-js I...
examples/with-three-js/pages/index.js
@@ -1,4 +1,3 @@ -import React from 'react' import Link from 'next/link' const Index = () => {
true
Other
vercel
next.js
993b78de0bab6024a8ac48ff6502e7e409b10710.json
chore: Remove some redundant imports (#13066) This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples - with-zeit-fetch - with-yarn-workspaces - with-why-did-your-render - with-video-js - with-universal-configuration-runtime - with-typestyle - with-three-js I...
examples/with-typestyle/pages/index.js
@@ -1,4 +1,3 @@ -import React from 'react' import { style } from 'typestyle' const className = style({ color: 'red' })
true
Other
vercel
next.js
993b78de0bab6024a8ac48ff6502e7e409b10710.json
chore: Remove some redundant imports (#13066) This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples - with-zeit-fetch - with-yarn-workspaces - with-why-did-your-render - with-video-js - with-universal-configuration-runtime - with-typestyle - with-three-js I...
examples/with-universal-configuration-runtime/pages/index.js
@@ -1,4 +1,3 @@ -import React from 'react' import getConfig from 'next/config' const { publicRuntimeConfig } = getConfig()
true
Other
vercel
next.js
993b78de0bab6024a8ac48ff6502e7e409b10710.json
chore: Remove some redundant imports (#13066) This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples - with-zeit-fetch - with-yarn-workspaces - with-why-did-your-render - with-video-js - with-universal-configuration-runtime - with-typestyle - with-three-js I...
examples/with-videojs/components/Player.js
@@ -1,4 +1,4 @@ -import React, { Component } from 'react' +import { Component } from 'react' import videojs from 'video.js' import 'videojs-youtube'
true
Other
vercel
next.js
993b78de0bab6024a8ac48ff6502e7e409b10710.json
chore: Remove some redundant imports (#13066) This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples - with-zeit-fetch - with-yarn-workspaces - with-why-did-your-render - with-video-js - with-universal-configuration-runtime - with-typestyle - with-three-js I...
examples/with-videojs/pages/index.js
@@ -1,7 +1,7 @@ -import React from 'react' +import { Component } from 'react' import Player from '../components/Player' -export default class Index extends React.Component { +export default class Index extends Component { render() { const videoJsOptions = { techOrder: ['youtube'],
true
Other
vercel
next.js
993b78de0bab6024a8ac48ff6502e7e409b10710.json
chore: Remove some redundant imports (#13066) This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples - with-zeit-fetch - with-yarn-workspaces - with-why-did-your-render - with-video-js - with-universal-configuration-runtime - with-typestyle - with-three-js I...
examples/with-why-did-you-render/components/header.js
@@ -1,4 +1,4 @@ -import React, { useState, useEffect } from 'react' +import { useState, useEffect } from 'react' const Header = () => { const [objState, setObjState] = useState({ name: 'World' })
true
Other
vercel
next.js
993b78de0bab6024a8ac48ff6502e7e409b10710.json
chore: Remove some redundant imports (#13066) This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples - with-zeit-fetch - with-yarn-workspaces - with-why-did-your-render - with-video-js - with-universal-configuration-runtime - with-typestyle - with-three-js I...
examples/with-yarn-workspaces/packages/bar/index.js
@@ -1,5 +1,3 @@ -import React from 'react' - const Bar = () => <strong>bar</strong> export default Bar
true
Other
vercel
next.js
993b78de0bab6024a8ac48ff6502e7e409b10710.json
chore: Remove some redundant imports (#13066) This issue is related to [12694](https://github.com/zeit/next.js/issues/12964). I covered the following examples - with-zeit-fetch - with-yarn-workspaces - with-why-did-your-render - with-video-js - with-universal-configuration-runtime - with-typestyle - with-three-js I...
examples/with-zeit-fetch/pages/preact.js
@@ -1,4 +1,3 @@ -import React from 'react' import Link from 'next/link' import fetch from '../fetch'
true
Other
vercel
next.js
4ba2b78729c8ea8d843a8dc19c0f1bb06b24a0a4.json
Read process.env after loading .env files (#13087) Fixes #13067
packages/next/telemetry/storage.ts
@@ -26,8 +26,6 @@ const TELEMETRY_KEY_ID = `telemetry.anonymousId` // See the `oneWayHash` function. const TELEMETRY_KEY_SALT = `telemetry.salt` -const { NEXT_TELEMETRY_DISABLED, NEXT_TELEMETRY_DEBUG } = process.env - type TelemetryEvent = { eventName: string; payload: object } type EventContext = { anonymousI...
false
Other
vercel
next.js
49990f558d3a6c9d2f468cbfc61cbc01a1db92ca.json
Add support for debugging Next.js core (#13101) Note this is only for the Next.js core, will look at a configuration for the debugger for Next.js apps soon.
.vscode/launch.json
@@ -0,0 +1,43 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": "Launch app development", + "...
true
Other
vercel
next.js
49990f558d3a6c9d2f468cbfc61cbc01a1db92ca.json
Add support for debugging Next.js core (#13101) Note this is only for the Next.js core, will look at a configuration for the debugger for Next.js apps soon.
package.json
@@ -31,7 +31,8 @@ "publish-canary": "lerna version prerelease --preid canary --force-publish && release --pre", "publish-stable": "lerna version --force-publish", "lint-staged": "lint-staged", - "next": "node packages/next/dist/bin/next" + "next": "node packages/next/dist/bin/next", + "debug": "...
true
Other
vercel
next.js
49990f558d3a6c9d2f468cbfc61cbc01a1db92ca.json
Add support for debugging Next.js core (#13101) Note this is only for the Next.js core, will look at a configuration for the debugger for Next.js apps soon.
packages/next/taskfile-babel.js
@@ -1,7 +1,7 @@ // taskr babel plugin with Babel 7 support // https://github.com/lukeed/taskr/pull/305 -const extname = require('path').extname +const path = require('path') const transform = require('@babel/core').transform const babelClientOpts = { @@ -88,6 +88,10 @@ module.exports = function (task) { co...
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/components/alert.js
@@ -1,6 +1,6 @@ import Container from './container' import cn from 'classnames' -import { EXAMPLE_PATH } from '../lib/constants' +import { EXAMPLE_PATH } from '@/lib/constants' export default function Alert({ preview }) { return (
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/components/footer.js
@@ -1,5 +1,5 @@ import Container from './container' -import { EXAMPLE_PATH } from '../lib/constants' +import { EXAMPLE_PATH } from '@/lib/constants' export default function Footer() { return (
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/components/hero-post.js
@@ -1,6 +1,6 @@ -import Avatar from '../components/avatar' -import Date from '../components/date' -import CoverImage from '../components/cover-image' +import Avatar from './avatar' +import Date from './date' +import CoverImage from './cover-image' import Link from 'next/link' export default function HeroPost({
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/components/intro.js
@@ -1,4 +1,4 @@ -import { CMS_NAME, CMS_URL } from '../lib/constants' +import { CMS_NAME, CMS_URL } from '@/lib/constants' export default function Intro() { return (
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/components/layout.js
@@ -1,6 +1,6 @@ -import Alert from '../components/alert' -import Footer from '../components/footer' -import Meta from '../components/meta' +import Alert from './alert' +import Footer from './footer' +import Meta from './meta' export default function Layout({ preview, children }) { return (
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/components/meta.js
@@ -1,5 +1,5 @@ import Head from 'next/head' -import { CMS_NAME, HOME_OG_IMAGE_URL } from '../lib/constants' +import { CMS_NAME, HOME_OG_IMAGE_URL } from '@/lib/constants' export default function Meta() { return (
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/components/more-stories.js
@@ -1,4 +1,4 @@ -import PostPreview from '../components/post-preview' +import PostPreview from './post-preview' export default function MoreStories({ posts }) { return (
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/components/post-header.js
@@ -1,7 +1,7 @@ -import Avatar from '../components/avatar' -import Date from '../components/date' -import CoverImage from '../components/cover-image' -import PostTitle from '../components/post-title' +import Avatar from './avatar' +import Date from './date' +import CoverImage from './cover-image' +import PostTitle from...
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/components/post-preview.js
@@ -1,5 +1,5 @@ -import Avatar from '../components/avatar' -import Date from '../components/date' +import Avatar from './avatar' +import Date from './date' import CoverImage from './cover-image' import Link from 'next/link'
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/jsconfig.json
@@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "baseUrl": ".", + "paths": { + "@/components/*": ["components/*"], + "@/lib/*": ["lib/*"], + "@/styles/*": ["styles/*"] + } + } +}
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/next.config.js
@@ -1,8 +0,0 @@ -require('dotenv').config() - -module.exports = { - env: { - NEXT_EXAMPLE_CMS_DATOCMS_API_TOKEN: - process.env.NEXT_EXAMPLE_CMS_DATOCMS_API_TOKEN, - }, -}
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/package.json
@@ -8,18 +8,17 @@ }, "dependencies": { "classnames": "2.2.6", - "date-fns": "2.10.0", + "date-fns": "2.14.0", "next": "latest", - "react": "^16.13.0", - "react-datocms": "1.1.0", - "react-dom": "^16.13.0", - "remark": "11.0.2", - "remark-html": "10.0.0" + "react": "^16.13.1", + ...
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/pages/_app.js
@@ -1,4 +1,4 @@ -import '../styles/index.css' +import '@/styles/index.css' function MyApp({ Component, pageProps }) { return <Component {...pageProps} />
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/pages/api/preview.js
@@ -1,4 +1,4 @@ -import { getPreviewPostBySlug } from '../../lib/api' +import { getPreviewPostBySlug } from '@/lib/api' export default async function preview(req, res) { // Check the secret and next parameters
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/pages/index.js
@@ -1,11 +1,11 @@ -import Container from '../components/container' -import MoreStories from '../components/more-stories' -import HeroPost from '../components/hero-post' -import Intro from '../components/intro' -import Layout from '../components/layout' -import { getAllPostsForHome } from '../lib/api' +import Container ...
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/pages/posts/[slug].js
@@ -1,17 +1,17 @@ import { useRouter } from 'next/router' import ErrorPage from 'next/error' -import Container from '../../components/container' -import PostBody from '../../components/post-body' -import MoreStories from '../../components/more-stories' -import Header from '../../components/header' -import PostHeader ...
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/postcss.config.js
@@ -1,19 +1,18 @@ module.exports = { plugins: [ 'tailwindcss', - process.env.NODE_ENV === 'production' - ? [ - '@fullhuman/postcss-purgecss', - { - content: [ - './pages/**/*.{js,jsx,ts,tsx}', - './components/**/*.{js,jsx,ts,tsx}', - ], ...
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/styles/index.css
@@ -1,5 +1,3 @@ -/* purgecss start ignore */ @tailwind base; @tailwind components; -/* purgecss end ignore */ @tailwind utilities;
true
Other
vercel
next.js
58c7265ba01c0f7d2d35aa7ca2475566efc3e038.json
Update DatoCMS Example (#13008) 👋🏻 This PR updates the Datocms example: - [x] Next.js 9.4 absolute import and aliases support - [x] Next.js 9.4 native `.env` support - [x] Tailwind 1.4 native PurgeCSS support - [x] Chore: bump other dependencies, like React, Remark, and DateFNS I've tested this PR here: - 💻 ht...
examples/cms-datocms/tailwind.config.js
@@ -1,4 +1,5 @@ module.exports = { + purge: ['./components/**/*.js', './pages/**/*.js'], theme: { extend: { colors: {
true
Other
vercel
next.js
670b2c15cdb4ebbcd19c1e5dde85a527a6b93674.json
Add Kodiak Configuration (#13103)
.github/.kodiak.toml
@@ -0,0 +1,18 @@ +# .kodiak.toml +version = 1 + +[merge] +automerge_label = "ready to land" +require_automerge_label = false +method = "squash" +delete_branch_on_merge = true +optimistic_updates = true +prioritize_ready_to_merge = true +notify_on_conflict = false + +[merge.message] +title = "pull_request_title" +body =...
false
Other
vercel
next.js
683b2c66e6c540e75ab223b5f847656d67cbe235.json
Run migration script for GitHub Actions (#8305) * Run migration script for GitHub Actions * try to expose temporary token
.github/main.workflow
@@ -1,14 +0,0 @@ -workflow "Generate pull request stats" { - on = "pull_request" - resolves = ["PR Stats"] -} - -workflow "Generate release stats" { - on = "release" - resolves = ["PR Stats"] -} - -action "PR Stats" { - uses = "zeit/next-stats-action@master" - secrets = ["GITHUB_TOKEN", "PR_STATS_TEMP_TOKEN"] -}
true
Other
vercel
next.js
683b2c66e6c540e75ab223b5f847656d67cbe235.json
Run migration script for GitHub Actions (#8305) * Run migration script for GitHub Actions * try to expose temporary token
.github/workflows/pull_request.yml
@@ -0,0 +1,15 @@ +on: pull_request +name: Generate pull request stats +jobs: + pRStats: + name: PR Stats + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: PR Stats + uses: zeit/next-stats-action@master + with: + PR_STATS_TEMP_TOKEN: ${{ secrets.PR_STATS_TEMP_...
true
Other
vercel
next.js
683b2c66e6c540e75ab223b5f847656d67cbe235.json
Run migration script for GitHub Actions (#8305) * Run migration script for GitHub Actions * try to expose temporary token
.github/workflows/release.yml
@@ -0,0 +1,13 @@ +on: release +name: Generate release stats +jobs: + pRStats: + name: PR Stats + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@master + - name: PR Stats + uses: zeit/next-stats-action@master + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_STAT...
true
Other
vercel
next.js
1db69188ed9bc311005510c79273e8372ae894bf.json
Remove cache clearing from static-checker (#8290)
packages/next/build/static-checker.ts
@@ -7,18 +7,6 @@ export default function worker( try { const { serverBundle, runtimeEnvConfig } = options || ({} as any) const result = isPageStatic(serverBundle, runtimeEnvConfig) - - // clear require.cache to prevent running out of memory - // since the cache is persisted by default - Object.key...
false
Other
vercel
next.js
08b14e49b005223aeafcaa4de55d3185443b51db.json
Simplify mobx example (#8269)
examples/with-mobx/pages/_app.js
@@ -1,37 +1,35 @@ import App, { Container } from 'next/app' import React from 'react' -import { initializeStore } from '../store' +import { fetchInitialStoreState, Store } from '../store' import { Provider } from 'mobx-react' class MyMobxApp extends App { - static async getInitialProps(appContext) { - // Get ...
true
Other
vercel
next.js
08b14e49b005223aeafcaa4de55d3185443b51db.json
Simplify mobx example (#8269)
examples/with-mobx/store.js
@@ -4,14 +4,16 @@ import { useStaticRendering } from 'mobx-react' const isServer = typeof window === 'undefined' useStaticRendering(isServer) -class Store { +export class Store { @observable lastUpdate = 0 @observable light = false - constructor(isServer, initialData = {}) { + hydrate(serializedStore) { ...
true
Other
vercel
next.js
61d151ccd73bbf5afb4d55a08d70a580e9c8b33f.json
Handle backslashes in exportedFiles (#8277)
packages/next/build/index.ts
@@ -444,7 +444,9 @@ export default async function build(dir: string, conf = null): Promise<void> { } const exportedFiles = new Set( - await recursiveReadDir(exportOptions.outdir, /.*\.html$/) + (await recursiveReadDir(exportOptions.outdir, /.*\.html$/)).map(p => + p.replace(/\\/g, '/') + ...
false
Other
vercel
next.js
d4d5ad4ba521e1214069c642bb95e8300f0a86f0.json
Remove propertyFields from the client router (#8219) * Remove forEach over the components prop * Remove propertyFields
packages/next/client/router.ts
@@ -29,8 +29,7 @@ const singletonRouter: SingletonRouterBase = { } // Create public properties and methods of the router in the singletonRouter -const urlPropertyFields = ['pathname', 'route', 'query', 'asPath'] -const propertyFields = ['components'] +const urlPropertyFields = ['pathname', 'route', 'query', 'asPath...
false
Other
vercel
next.js
b31c29673019da75fa8beec097282c1446c8d197.json
Experimental: Serverless Trace target (#8246) * Experimental: Serverless Trace target The Serverless Trace target produces Serverless-handler wrapped entrypoints, but does not bundle all of `node_modules`. This behavior increases bundling performance to be more akin to `target: 'server'`. This mode is expected ...
package.json
@@ -81,6 +81,7 @@ "execa": "2.0.3", "express": "4.17.0", "faunadb": "2.6.1", + "firebase": "6.3.4", "fs-extra": "7.0.1", "get-port": "5.0.0", "isomorphic-unfetch": "3.0.0",
true
Other
vercel
next.js
b31c29673019da75fa8beec097282c1446c8d197.json
Experimental: Serverless Trace target (#8246) * Experimental: Serverless Trace target The Serverless Trace target produces Serverless-handler wrapped entrypoints, but does not bundle all of `node_modules`. This behavior increases bundling performance to be more akin to `target: 'server'`. This mode is expected ...
packages/next-server/server/config.ts
@@ -1,9 +1,10 @@ -import os from 'os' import findUp from 'find-up' +import os from 'os' + import { CONFIG_FILE } from '../lib/constants' import { execOnce } from '../lib/utils' -const targets = ['server', 'serverless'] +const targets = ['server', 'serverless', 'experimental-serverless-trace'] const defaultConfi...
true
Other
vercel
next.js
b31c29673019da75fa8beec097282c1446c8d197.json
Experimental: Serverless Trace target (#8246) * Experimental: Serverless Trace target The Serverless Trace target produces Serverless-handler wrapped entrypoints, but does not bundle all of `node_modules`. This behavior increases bundling performance to be more akin to `target: 'server'`. This mode is expected ...
packages/next-server/server/next-server.ts
@@ -1,13 +1,12 @@ +import compression from 'compression' import fs from 'fs' import { IncomingMessage, ServerResponse } from 'http' import { join, resolve, sep } from 'path' import { parse as parseQs, ParsedUrlQuery } from 'querystring' import { parse as parseUrl, UrlWithParsedQuery } from 'url' -import compressio...
true
Other
vercel
next.js
b31c29673019da75fa8beec097282c1446c8d197.json
Experimental: Serverless Trace target (#8246) * Experimental: Serverless Trace target The Serverless Trace target produces Serverless-handler wrapped entrypoints, but does not bundle all of `node_modules`. This behavior increases bundling performance to be more akin to `target: 'server'`. This mode is expected ...
packages/next/build/entries.ts
@@ -1,6 +1,8 @@ +import { isTargetLikeServerless } from 'next-server/dist/server/config' import { join } from 'path' import { stringify } from 'querystring' -import { PAGES_DIR_ALIAS, DOT_NEXT_ALIAS, API_ROUTE } from '../lib/constants' + +import { API_ROUTE, DOT_NEXT_ALIAS, PAGES_DIR_ALIAS } from '../lib/constants' ...
true
Other
vercel
next.js
b31c29673019da75fa8beec097282c1446c8d197.json
Experimental: Serverless Trace target (#8246) * Experimental: Serverless Trace target The Serverless Trace target produces Serverless-handler wrapped entrypoints, but does not bundle all of `node_modules`. This behavior increases bundling performance to be more akin to `target: 'server'`. This mode is expected ...
packages/next/build/index.ts
@@ -1,18 +1,25 @@ +import { Sema } from 'async-sema' import chalk from 'chalk' +import fs from 'fs' +import mkdirpOrig from 'mkdirp' import { - SERVER_DIRECTORY, - SERVERLESS_DIRECTORY, - PAGES_MANIFEST, CHUNK_GRAPH_MANIFEST, + PAGES_MANIFEST, PHASE_PRODUCTION_BUILD, + SERVER_DIRECTORY, + SERVERLESS_DIREC...
true
Other
vercel
next.js
b31c29673019da75fa8beec097282c1446c8d197.json
Experimental: Serverless Trace target (#8246) * Experimental: Serverless Trace target The Serverless Trace target produces Serverless-handler wrapped entrypoints, but does not bundle all of `node_modules`. This behavior increases bundling performance to be more akin to `target: 'server'`. This mode is expected ...
packages/next/build/webpack-config.ts
@@ -1,10 +1,10 @@ import ForkTsCheckerWebpackPlugin from 'fork-ts-checker-webpack-plugin' -import fs from 'fs' import { CLIENT_STATIC_FILES_RUNTIME_MAIN, CLIENT_STATIC_FILES_RUNTIME_WEBPACK, REACT_LOADABLE_MANIFEST, SERVER_DIRECTORY, + SERVERLESS_DIRECTORY, } from 'next-server/constants' import resolve...
true
Other
vercel
next.js
b31c29673019da75fa8beec097282c1446c8d197.json
Experimental: Serverless Trace target (#8246) * Experimental: Serverless Trace target The Serverless Trace target produces Serverless-handler wrapped entrypoints, but does not bundle all of `node_modules`. This behavior increases bundling performance to be more akin to `target: 'server'`. This mode is expected ...
packages/next/build/webpack/plugins/serverless-plugin.ts
@@ -54,18 +54,47 @@ function interceptFileWrites( export class ServerlessPlugin { private buildId: string private isServer: boolean + private isTrace: boolean + private isFlyingShuttle: boolean - constructor(buildId: string, { isServer = false } = {}) { + constructor( + buildId: string, + { + is...
true
Other
vercel
next.js
b31c29673019da75fa8beec097282c1446c8d197.json
Experimental: Serverless Trace target (#8246) * Experimental: Serverless Trace target The Serverless Trace target produces Serverless-handler wrapped entrypoints, but does not bundle all of `node_modules`. This behavior increases bundling performance to be more akin to `target: 'server'`. This mode is expected ...
packages/next/export/index.js
@@ -4,7 +4,9 @@ import { recursiveCopy } from '../lib/recursive-copy' import mkdirpModule from 'mkdirp' import { resolve, join } from 'path' import { existsSync, readFileSync } from 'fs' -import loadConfig from 'next-server/next-config' +import loadConfig, { + isTargetLikeServerless +} from 'next-server/dist/server...
true
Other
vercel
next.js
b31c29673019da75fa8beec097282c1446c8d197.json
Experimental: Serverless Trace target (#8246) * Experimental: Serverless Trace target The Serverless Trace target produces Serverless-handler wrapped entrypoints, but does not bundle all of `node_modules`. This behavior increases bundling performance to be more akin to `target: 'server'`. This mode is expected ...
test/integration/external-assets/next.config.js
@@ -0,0 +1,6 @@ +module.exports = { + target: 'experimental-serverless-trace', + onDemandEntries: { + maxInactiveAge: 1000 * 60 * 60 + } +}
true