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
19c635175ba7556a222bd46f9a68bfb3beeeb7cd.json
Make Client request BUILD_ID from the Server (#6891) * Generate two versions of pages * Add code VSCode deleted * Add dynamicBuildId option to __NEXT_DATA__ * Reduce amount of diff * Make getPageFile code easier to read * Minimize diff * minimize diff * Fix default value for dynamicBuildId * Fi...
packages/next/server/hot-reloader.js
@@ -170,7 +170,7 @@ export default class HotReloader { ]) const pages = createPagesMapping(pagePaths.filter(i => i !== null), this.config.pageExtensions) - const entrypoints = createEntrypoints(pages, 'server', this.buildId, this.config) + const entrypoints = createEntrypoints(pages, 'server', this.bu...
true
Other
vercel
next.js
19c635175ba7556a222bd46f9a68bfb3beeeb7cd.json
Make Client request BUILD_ID from the Server (#6891) * Generate two versions of pages * Add code VSCode deleted * Add dynamicBuildId option to __NEXT_DATA__ * Reduce amount of diff * Make getPageFile code easier to read * Minimize diff * minimize diff * Fix default value for dynamicBuildId * Fi...
test/integration/serverless-on-demand-pages/next.config.js
@@ -0,0 +1,8 @@ +module.exports = { + target: 'serverless', + onDemandEntries: { + // Make sure entries are not getting disposed. + maxInactiveAge: 1000 * 60 * 60 + }, + lambdas: true +}
true
Other
vercel
next.js
19c635175ba7556a222bd46f9a68bfb3beeeb7cd.json
Make Client request BUILD_ID from the Server (#6891) * Generate two versions of pages * Add code VSCode deleted * Add dynamicBuildId option to __NEXT_DATA__ * Reduce amount of diff * Make getPageFile code easier to read * Minimize diff * minimize diff * Fix default value for dynamicBuildId * Fi...
test/integration/serverless-on-demand-pages/pages/abc.js
@@ -0,0 +1 @@ +export default () => <div>test</div>
true
Other
vercel
next.js
19c635175ba7556a222bd46f9a68bfb3beeeb7cd.json
Make Client request BUILD_ID from the Server (#6891) * Generate two versions of pages * Add code VSCode deleted * Add dynamicBuildId option to __NEXT_DATA__ * Reduce amount of diff * Make getPageFile code easier to read * Minimize diff * minimize diff * Fix default value for dynamicBuildId * Fi...
test/integration/serverless-on-demand-pages/pages/fetch.js
@@ -0,0 +1,29 @@ +import fetch from 'isomorphic-unfetch' +import React from 'react' + +export default class extends React.Component { + static async getInitialProps () { + try { + const res = await fetch('') + const text = await res.text() + console.log(text) + return { text } + } catch (err)...
true
Other
vercel
next.js
19c635175ba7556a222bd46f9a68bfb3beeeb7cd.json
Make Client request BUILD_ID from the Server (#6891) * Generate two versions of pages * Add code VSCode deleted * Add dynamicBuildId option to __NEXT_DATA__ * Reduce amount of diff * Make getPageFile code easier to read * Minimize diff * minimize diff * Fix default value for dynamicBuildId * Fi...
test/integration/serverless-on-demand-pages/pages/index.js
@@ -0,0 +1,11 @@ +import Link from 'next/link' +export default () => { + return ( + <div> + Hello World + <Link href='/fetch'> + <a id='fetchlink'>fetch page</a> + </Link> + </div> + ) +}
true
Other
vercel
next.js
19c635175ba7556a222bd46f9a68bfb3beeeb7cd.json
Make Client request BUILD_ID from the Server (#6891) * Generate two versions of pages * Add code VSCode deleted * Add dynamicBuildId option to __NEXT_DATA__ * Reduce amount of diff * Make getPageFile code easier to read * Minimize diff * minimize diff * Fix default value for dynamicBuildId * Fi...
test/integration/serverless-on-demand-pages/run-server.js
@@ -0,0 +1,2 @@ +const start = require('./server') +start(3000).then(() => console.log('http://localhost:3000'))
true
Other
vercel
next.js
19c635175ba7556a222bd46f9a68bfb3beeeb7cd.json
Make Client request BUILD_ID from the Server (#6891) * Generate two versions of pages * Add code VSCode deleted * Add dynamicBuildId option to __NEXT_DATA__ * Reduce amount of diff * Make getPageFile code easier to read * Minimize diff * minimize diff * Fix default value for dynamicBuildId * Fi...
test/integration/serverless-on-demand-pages/server.js
@@ -0,0 +1,29 @@ +const express = require('express') +const http = require('http') +const path = require('path') + +module.exports = function start (port = 0) { + return new Promise((resolve, reject) => { + const app = express() + const nextStaticDir = path.join(__dirname, '.next', 'static') + app.use('/_next...
true
Other
vercel
next.js
19c635175ba7556a222bd46f9a68bfb3beeeb7cd.json
Make Client request BUILD_ID from the Server (#6891) * Generate two versions of pages * Add code VSCode deleted * Add dynamicBuildId option to __NEXT_DATA__ * Reduce amount of diff * Make getPageFile code easier to read * Minimize diff * minimize diff * Fix default value for dynamicBuildId * Fi...
test/integration/serverless-on-demand-pages/test/index.test.js
@@ -0,0 +1,61 @@ +/* eslint-env jest */ +/* global jasmine, test */ +import webdriver from 'next-webdriver' +import { join } from 'path' +import { existsSync } from 'fs' +import { nextBuild, stopApp, renderViaHTTP } from 'next-test-utils' +import startServer from '../server' +import fetch from 'node-fetch' + +const app...
true
Other
vercel
next.js
19c635175ba7556a222bd46f9a68bfb3beeeb7cd.json
Make Client request BUILD_ID from the Server (#6891) * Generate two versions of pages * Add code VSCode deleted * Add dynamicBuildId option to __NEXT_DATA__ * Reduce amount of diff * Make getPageFile code easier to read * Minimize diff * minimize diff * Fix default value for dynamicBuildId * Fi...
yarn.lock
@@ -8626,10 +8626,10 @@ nan@^2.9.2: resolved "https://registry.yarnpkg.com/nan/-/nan-2.12.1.tgz#7b1aa193e9aa86057e3c7bbd0ac448e770925552" integrity sha512-JY7V6lRkStKcKTvHO5NVSQRv+RV+FIL5pvDoLiAtSL9pKlC5x9PKQcZDsq7m4FO4d57mkhC6Z+QhAh3Jdk5JFw== -nanoid@1.2.1: - version "1.2.1" - resolved "https://registry.yarn...
true
Other
vercel
next.js
9995f5d5183b39de7d055b5872671b7c700e113f.json
Add checking of react versions (#6892) * Add checking of react versions to make sure it meets the minimum set in peerDependencies * Simplify react check * Update error wording Co-Authored-By: timneutkens <tim@timneutkens.nl> * Add err.sh * Update test-production circleci job name * Add react error m...
.circleci/config.yml
@@ -31,15 +31,15 @@ jobs: JEST_JUNIT_CLASSNAME: '{filepath}' - store_test_results: path: ~/repo/reports - test-production: + test-ie11: docker: - image: circleci/node:8-browsers working_directory: ~/repo steps: - attach_workspace: at: . - r...
true
Other
vercel
next.js
9995f5d5183b39de7d055b5872671b7c700e113f.json
Add checking of react versions (#6892) * Add checking of react versions to make sure it meets the minimum set in peerDependencies * Simplify react check * Update error wording Co-Authored-By: timneutkens <tim@timneutkens.nl> * Add err.sh * Update test-production circleci job name * Add react error m...
errors/invalid-react-version.md
@@ -0,0 +1,9 @@ +# Invalid React Version + +#### Why This Error Occurred + +You tried running `next` in a project with an incompatible react version. Next.js uses certain react features that when are unavailable show this error since it can't work without them. + +#### Possible Ways to Fix It + +Run `npm i react@latest...
true
Other
vercel
next.js
9995f5d5183b39de7d055b5872671b7c700e113f.json
Add checking of react versions (#6892) * Add checking of react versions to make sure it meets the minimum set in peerDependencies * Simplify react check * Update error wording Co-Authored-By: timneutkens <tim@timneutkens.nl> * Add err.sh * Update test-production circleci job name * Add react error m...
packages/next/bin/next.ts
@@ -11,6 +11,12 @@ import arg from 'next/dist/compiled/arg/index.js' } }) +const React = require('react') + +if (typeof React.Suspense === 'undefined') { + throw new Error(`The version of React you are using is lower than the minimum required version needed for Next.js. Please upgrade "react" and "react-dom": "n...
true
Other
vercel
next.js
9995f5d5183b39de7d055b5872671b7c700e113f.json
Add checking of react versions (#6892) * Add checking of react versions to make sure it meets the minimum set in peerDependencies * Simplify react check * Update error wording Co-Authored-By: timneutkens <tim@timneutkens.nl> * Add err.sh * Update test-production circleci job name * Add react error m...
packages/next/server/next-dev-server.js
@@ -7,6 +7,12 @@ import ErrorDebug from './error-debug' import AmpHtmlValidator from 'amphtml-validator' import { ampValidation } from '../build/output/index' +const React = require('react') + +if (typeof React.Suspense === 'undefined') { + throw new Error(`The version of React you are using is lower than the mini...
true
Other
vercel
next.js
9995f5d5183b39de7d055b5872671b7c700e113f.json
Add checking of react versions (#6892) * Add checking of react versions to make sure it meets the minimum set in peerDependencies * Simplify react check * Update error wording Co-Authored-By: timneutkens <tim@timneutkens.nl> * Add err.sh * Update test-production circleci job name * Add react error m...
test/unit/handles-incorrect-react.test.js
@@ -0,0 +1,15 @@ +/* eslint-env jest */ +import path from 'path' + +jest.mock('react', () => ({ + Suspense: undefined +})) + +const nextDir = path.dirname(require.resolve('next/package')) +const nextBin = path.join(nextDir, 'dist/bin/next') + +describe('Handles Incorrect React Version', () => { + it('should throw an ...
true
Other
vercel
next.js
8e51c78ed5ca6e87c8c8192299d21f8ca0a8e626.json
Add test for AMP in serverless mode (#6894) * Add amp request header and check for amp query in serverless mode * Add serverless test for an AMP page * Update to handle querystring weirdness * Update serverless test config
packages/next-server/server/next-server.ts
@@ -266,19 +266,13 @@ export default class Server { return this.handleRequest(req, res, parsedUrl) } - const isDataRequest = ENDING_IN_JSON_REGEX.test(pathname) - - if (isDataRequest) { - pathname = pathname.replace(ENDING_IN_JSON_REGEX, '') - } - if (isBlockedPage(pathname)) { r...
true
Other
vercel
next.js
8e51c78ed5ca6e87c8c8192299d21f8ca0a8e626.json
Add test for AMP in serverless mode (#6894) * Add amp request header and check for amp query in serverless mode * Add serverless test for an AMP page * Update to handle querystring weirdness * Update serverless test config
packages/next/build/entries.ts
@@ -43,6 +43,7 @@ export function createEntrypoints(pages: PagesMapping, target: 'server'|'serverl distDir: DOT_NEXT_ALIAS, assetPrefix: config.assetPrefix, generateEtags: config.generateEtags, + ampEnabled: config.experimental.amp, ampBindInitData: config.experimental.ampBindInitData }
true
Other
vercel
next.js
8e51c78ed5ca6e87c8c8192299d21f8ca0a8e626.json
Add test for AMP in serverless mode (#6894) * Add amp request header and check for amp query in serverless mode * Add serverless test for an AMP page * Update to handle querystring weirdness * Update serverless test config
packages/next/build/webpack/loaders/next-serverless-loader.ts
@@ -11,7 +11,8 @@ export type ServerlessLoaderQuery = { absoluteDocumentPath: string, absoluteErrorPath: string, assetPrefix: string, - ampBindInitData: boolean, + ampEnabled: boolean | string, + ampBindInitData: boolean | string, generateEtags: string } @@ -21,6 +22,7 @@ const nextServerlessLoader: l...
true
Other
vercel
next.js
8e51c78ed5ca6e87c8c8192299d21f8ca0a8e626.json
Add test for AMP in serverless mode (#6894) * Add amp request header and check for amp query in serverless mode * Add serverless test for an AMP page * Update to handle querystring weirdness * Update serverless test config
packages/next/lib/data.ts
@@ -33,7 +33,11 @@ export function createHook(fetcher: (...args: Args[]) => Promise<any>, options: // @ts-ignore webpack optimization if (process.browser) { - const res = fetch(router.route === '/' ? 'index.json' : router.route + '.json?' + stringify(router.query)).then((res: any) => res.json()).then((...
true
Other
vercel
next.js
8e51c78ed5ca6e87c8c8192299d21f8ca0a8e626.json
Add test for AMP in serverless mode (#6894) * Add amp request header and check for amp query in serverless mode * Add serverless test for an AMP page * Update to handle querystring weirdness * Update serverless test config
test/integration/data/test/index.test.js
@@ -6,6 +6,7 @@ import { killApp, findPort, launchApp, + fetchViaHTTP, renderViaHTTP } from 'next-test-utils' @@ -21,8 +22,13 @@ describe('AMP Bind Initial Data', () => { }) afterAll(() => killApp(server)) - it('responds with json with .json extension on page', async () => { - const data = a...
true
Other
vercel
next.js
8e51c78ed5ca6e87c8c8192299d21f8ca0a8e626.json
Add test for AMP in serverless mode (#6894) * Add amp request header and check for amp query in serverless mode * Add serverless test for an AMP page * Update to handle querystring weirdness * Update serverless test config
test/integration/serverless/next.config.js
@@ -4,5 +4,8 @@ module.exports = { // Make sure entries are not getting disposed. maxInactiveAge: 1000 * 60 * 60 }, + experimental: { + amp: true + }, lambdas: true }
true
Other
vercel
next.js
8e51c78ed5ca6e87c8c8192299d21f8ca0a8e626.json
Add test for AMP in serverless mode (#6894) * Add amp request header and check for amp query in serverless mode * Add serverless test for an AMP page * Update to handle querystring weirdness * Update serverless test config
test/integration/serverless/pages/some.amp.js
@@ -0,0 +1 @@ +export default () => `Hi Im an AMP page!`
true
Other
vercel
next.js
8e51c78ed5ca6e87c8c8192299d21f8ca0a8e626.json
Add test for AMP in serverless mode (#6894) * Add amp request header and check for amp query in serverless mode * Add serverless test for an AMP page * Update to handle querystring weirdness * Update serverless test config
test/integration/serverless/server.js
@@ -22,6 +22,9 @@ module.exports = function start (port = 0) { app.get('/dynamic-two', (req, res) => { require('./.next/serverless/pages/dynamic-two.js').render(req, res) }) + app.get('/amp', (req, res) => { + require('./.next/serverless/pages/some.amp.js').render(req, res) + }) app.get...
true
Other
vercel
next.js
8e51c78ed5ca6e87c8c8192299d21f8ca0a8e626.json
Add test for AMP in serverless mode (#6894) * Add amp request header and check for amp query in serverless mode * Add serverless test for an AMP page * Update to handle querystring weirdness * Update serverless test config
test/integration/serverless/test/index.test.js
@@ -44,6 +44,12 @@ describe('Serverless', () => { expect(html).toMatch(/This page could not be found/) }) + it('should render an AMP page', async () => { + const html = await renderViaHTTP(appPort, '/amp') + expect(html).toMatch(/Hi Im an AMP page/) + expect(html).toMatch(/ampproject\.org/) + }) + ...
true
Other
vercel
next.js
7f096d0f46c2a02b574e7d829dd7b416695e8d27.json
Add check for data in serverless-loader (#6893)
packages/next/build/webpack/loaders/next-serverless-loader.ts
@@ -50,11 +50,17 @@ const nextServerlessLoader: loader.Loader = function () { ampBindInitData: ${Boolean(ampBindInitData)} } const parsedUrl = parse(req.url, true) + const isDataRequest = ( + options.ampBindInitData && + parsedUrl.pathname.endsWith('.json') + ) try ...
false
Other
vercel
next.js
a235551487f8df6e0f8e236d5a61fd1a982c3e3c.json
Remove old issue template
.github/issue_template.md
@@ -1,45 +0,0 @@ -<!--- Provide a general summary of the issue in the Title above --> - -<!-- -⚠️ IMPORTANT ⚠️ -If you have a question about Next.js please ask it on Spectrum https://spectrum.chat/next-js -or join our Slack community at https://zeit.chat and ask it in the `#next` channel ---> - -<!-- - Thank you ver...
false
Other
vercel
next.js
f88aa60bec7b2054487aade4ae92dfca0ec835d7.json
Add issue templates
.github/ISSUE_TEMPLATE/Bug_report.md
@@ -0,0 +1,29 @@ +--- +name: Bug report +about: Create a bug report for the Next.js core + +--- + +**Describe the bug** +A clear and concise description of what the bug is. + +**To Reproduce** +Steps to reproduce the behavior, please provide code snippets or a repository: +1. Go to '...' +2. Click on '....'...
true
Other
vercel
next.js
f88aa60bec7b2054487aade4ae92dfca0ec835d7.json
Add issue templates
.github/ISSUE_TEMPLATE/Custom.md
@@ -0,0 +1,9 @@ +--- +name: Request to be added to the showcase on nextjs.org +about: Apply for your project to be added to nextjs.org + +--- + +- Name of company: +- Url: +- Testimonial about Next.js (optional):
true
Other
vercel
next.js
f88aa60bec7b2054487aade4ae92dfca0ec835d7.json
Add issue templates
.github/ISSUE_TEMPLATE/Feature_request.md
@@ -0,0 +1,17 @@ +--- +name: Feature request +about: Create a feature request for the Next.js core + +--- + +**Is your feature request related to a problem? Please describe.** +A clear and concise description of what you want and what your use case is. + +**Describe the solution you'd like** +A clear and conc...
true
Other
vercel
next.js
b2047de51a4b5f2906830447ec425ce3721864b8.json
Update package.json in with-docker example (#4359) * Added name, version, license keys.
examples/with-docker/package.json
@@ -1,4 +1,6 @@ { + "name": "with-docker", + "version": "1.0.0", "scripts": { "dev": "next", "build": "next build", @@ -8,5 +10,6 @@ "next": "latest", "react": "16.2.0", "react-dom": "16.2.0" - } + }, + "license": "ISC" }
false
Other
vercel
next.js
126507cc1c7c9ab87e9cc826a74840bc63af2eca.json
Add Example of Redux Wrapper with Immutable.js (#4327) * Add immutable redux example * Updated readme * Fix linting errors
examples/with-immutable-redux-wrapper/README.md
@@ -0,0 +1,76 @@ +[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-immutable-redux-wrapper) + +# Immutable Redux Example + +> This example and documentation is based on the [with-redux](https://github.com/zeit/next.js/tree/...
true
Other
vercel
next.js
126507cc1c7c9ab87e9cc826a74840bc63af2eca.json
Add Example of Redux Wrapper with Immutable.js (#4327) * Add immutable redux example * Updated readme * Fix linting errors
examples/with-immutable-redux-wrapper/components/AddCount.js
@@ -0,0 +1,36 @@ +/* eslint-disable */ +import React, {Component} from 'react' +import { connect } from 'react-redux' +import { bindActionCreators } from 'redux' +import { addCount } from '../store' + +class AddCount extends Component { + add = () => { + this.props.addCount() + } + + render () { + const { coun...
true
Other
vercel
next.js
126507cc1c7c9ab87e9cc826a74840bc63af2eca.json
Add Example of Redux Wrapper with Immutable.js (#4327) * Add immutable redux example * Updated readme * Fix linting errors
examples/with-immutable-redux-wrapper/components/Clock.js
@@ -0,0 +1,24 @@ +export default ({ lastUpdate, light }) => { + return ( + <div className={light ? 'light' : ''}> + {format(new Date(lastUpdate))} + <style jsx>{` + div { + padding: 15px; + display: inline-block; + color: #82FA58; + font: 50px menlo, monaco, mono...
true
Other
vercel
next.js
126507cc1c7c9ab87e9cc826a74840bc63af2eca.json
Add Example of Redux Wrapper with Immutable.js (#4327) * Add immutable redux example * Updated readme * Fix linting errors
examples/with-immutable-redux-wrapper/components/Page.js
@@ -0,0 +1,20 @@ +import Link from 'next/link' +import { connect } from 'react-redux' +import Clock from './Clock' +import AddCount from './AddCount' + +export default connect(state => ({ + lastUpdate: state.get('lastUpdate'), + light: state.get('light') +}))(({ title, linkTo, lastUpdate, light }) => { + return ( + ...
true
Other
vercel
next.js
126507cc1c7c9ab87e9cc826a74840bc63af2eca.json
Add Example of Redux Wrapper with Immutable.js (#4327) * Add immutable redux example * Updated readme * Fix linting errors
examples/with-immutable-redux-wrapper/package.json
@@ -0,0 +1,21 @@ +{ + "name": "with-redux-wrapper", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "immutable": "4.0.0-rc.9", + "next": "^6.0.0", + "next-redux-wrapper": "2.0.0-beta.6", + "react": "^16.3.2", + ...
true
Other
vercel
next.js
126507cc1c7c9ab87e9cc826a74840bc63af2eca.json
Add Example of Redux Wrapper with Immutable.js (#4327) * Add immutable redux example * Updated readme * Fix linting errors
examples/with-immutable-redux-wrapper/pages/_app.js
@@ -0,0 +1,32 @@ +import React from 'react' +import { Provider } from 'react-redux' +import App, { Container } from 'next/app' +import withRedux from 'next-redux-wrapper' +import { makeStore } from '../store' +import { fromJS } from 'immutable' + +class MyApp extends App { + static async getInitialProps ({ Component, ...
true
Other
vercel
next.js
126507cc1c7c9ab87e9cc826a74840bc63af2eca.json
Add Example of Redux Wrapper with Immutable.js (#4327) * Add immutable redux example * Updated readme * Fix linting errors
examples/with-immutable-redux-wrapper/pages/index.js
@@ -0,0 +1,37 @@ +import React from 'react' +import { bindActionCreators } from 'redux' +import { startClock, addCount, serverRenderClock } from '../store' +import Page from '../components/Page' +import { connect } from 'react-redux' + +class Counter extends React.Component { + static getInitialProps ({ store, isServe...
true
Other
vercel
next.js
126507cc1c7c9ab87e9cc826a74840bc63af2eca.json
Add Example of Redux Wrapper with Immutable.js (#4327) * Add immutable redux example * Updated readme * Fix linting errors
examples/with-immutable-redux-wrapper/pages/other.js
@@ -0,0 +1,36 @@ +import React from 'react' +import { bindActionCreators } from 'redux' +import { startClock, addCount, serverRenderClock } from '../store' +import Page from '../components/Page' +import { connect } from 'react-redux' + +class Counter extends React.Component { + static getInitialProps ({ store, isServe...
true
Other
vercel
next.js
126507cc1c7c9ab87e9cc826a74840bc63af2eca.json
Add Example of Redux Wrapper with Immutable.js (#4327) * Add immutable redux example * Updated readme * Fix linting errors
examples/with-immutable-redux-wrapper/store.js
@@ -0,0 +1,50 @@ +import { createStore, applyMiddleware } from 'redux' +import { composeWithDevTools } from 'redux-devtools-extension' +import thunkMiddleware from 'redux-thunk' +import { fromJS } from 'immutable' + +const exampleInitialState = fromJS({ + lastUpdate: 0, + light: false, + count: 0 +}) + +export const...
true
Other
vercel
next.js
6b04b5535433fc651920536b870787c3f53f28f6.json
Fix typo in next-with-apollo-auth test docs (#4328)
examples/with-apollo-auth/test/shared-apollo.js
@@ -10,7 +10,7 @@ const test = require('ava') * reset the state, leaving all the logged in user data there :( * - So, we have to have a shared module. BUT; next's code splitting means the * bundle for each page will include its own copy of the module, _unless it's - * inlcuded in every page_. + * included...
false
Other
vercel
next.js
76f5e979b319a947e3f677f08041f2a7bdf18521.json
Support _app approach for upgraded Redux Wrapper (#4207) * Support _app approach for upgraded Redux Wrapper * Updated according to discussion * Package.json versions
examples/with-redux-wrapper/.npmrc
@@ -0,0 +1,2 @@ +package-lock=false +save-exact=true \ No newline at end of file
true
Other
vercel
next.js
76f5e979b319a947e3f677f08041f2a7bdf18521.json
Support _app approach for upgraded Redux Wrapper (#4207) * Support _app approach for upgraded Redux Wrapper * Updated according to discussion * Package.json versions
examples/with-redux-wrapper/package.json
@@ -1,20 +1,20 @@ { "name": "with-redux-wrapper", - "version": "1.0.0", + "version": "2.0.0", "scripts": { "dev": "next", "build": "next build", "start": "next start" }, "dependencies": { "next": "latest", - "next-redux-wrapper": "^1.0.0", - "react": "^16.0.0", - "redux-devto...
true
Other
vercel
next.js
76f5e979b319a947e3f677f08041f2a7bdf18521.json
Support _app approach for upgraded Redux Wrapper (#4207) * Support _app approach for upgraded Redux Wrapper * Updated according to discussion * Package.json versions
examples/with-redux-wrapper/pages/_app.js
@@ -0,0 +1,22 @@ +import React from 'react' +import {Provider} from 'react-redux' +import App, {Container} from 'next/app' +import withRedux from 'next-redux-wrapper' +import {initStore} from '../store' + +export default withRedux(initStore)(class MyApp extends App { + static async getInitialProps ({Component, ctx}) {...
true
Other
vercel
next.js
76f5e979b319a947e3f677f08041f2a7bdf18521.json
Support _app approach for upgraded Redux Wrapper (#4207) * Support _app approach for upgraded Redux Wrapper * Updated according to discussion * Package.json versions
examples/with-redux-wrapper/pages/index.js
@@ -1,7 +1,7 @@ import React from 'react' import { bindActionCreators } from 'redux' -import { initStore, startClock, addCount, serverRenderClock } from '../store' -import withRedux from 'next-redux-wrapper' +import { startClock, addCount, serverRenderClock } from '../store' +import { connect } from 'react-redux' im...
true
Other
vercel
next.js
76f5e979b319a947e3f677f08041f2a7bdf18521.json
Support _app approach for upgraded Redux Wrapper (#4207) * Support _app approach for upgraded Redux Wrapper * Updated according to discussion * Package.json versions
examples/with-redux-wrapper/pages/other.js
@@ -1,7 +1,7 @@ import React from 'react' import { bindActionCreators } from 'redux' -import { initStore, startClock, addCount, serverRenderClock } from '../store' -import withRedux from 'next-redux-wrapper' +import { startClock, addCount, serverRenderClock } from '../store' +import { connect } from 'react-redux' im...
true
Other
vercel
next.js
4b95725e096b126408a83295d9132a06885c6034.json
fix(with-pkg): update pkg config for next.js (#4307) * fix(with-pkg): update pkg config for next.js * update docs
examples/with-pkg/README.md
@@ -21,14 +21,18 @@ curl https://codeload.github.com/zeit/next.js/tar.gz/canary | tar -xz --strip=2 cd with-pkg ``` -Install it and run: +Install it and run pkg: ```bash npm install -npm run dev -# or -yarn -yarn dev +yarn run build +yarn run dist +``` + +Execute the binary file: + +```bash +PORT=4000 ./dist/wi...
true
Other
vercel
next.js
4b95725e096b126408a83295d9132a06885c6034.json
fix(with-pkg): update pkg config for next.js (#4307) * fix(with-pkg): update pkg config for next.js * update docs
examples/with-pkg/package.json
@@ -1,7 +1,7 @@ { "name": "with-pkg", "version": "1.0.0", - "main": "index.js", + "bin": "index.js", "author": "Sergio Daniel Xalambrí <sergiodxa@gmail.com>", "license": "MIT", "scripts": { @@ -10,7 +10,7 @@ "prestart": "npm run build", "start": "NODE_ENV=production node server.js", "pr...
true
Other
vercel
next.js
4b95725e096b126408a83295d9132a06885c6034.json
fix(with-pkg): update pkg config for next.js (#4307) * fix(with-pkg): update pkg config for next.js * update docs
examples/with-pkg/server.js
@@ -4,7 +4,7 @@ const next = require('next') const port = parseInt(process.env.PORT, 10) || 3000 const dev = process.env.NODE_ENV !== 'production' -const app = next({ dev }) +const app = next({ dev, dir: __dirname }) const handle = app.getRequestHandler() app.prepare()
true
Other
vercel
next.js
596bd21e338305f16f3484b264dd1e217f3d9b7a.json
Add eslint parser to avoid errors in IDE. (#4297)
examples/with-flow/.eslintrc.json
@@ -0,0 +1,3 @@ +{ + "parser": "babel-eslint" +}
false
Other
vercel
next.js
4881cd346b8155314c02a6996538fb48d324111d.json
Update Cache-Control for render errors (#4111) When running some tests, I noticed that Akamai was still caching the response for render errors for some reason. Honestly, I would've thought that `no-store, must-revalidate` would be enough to prevent the CDN from caching it. That being said, MDN's documentation o...
server/render.js
@@ -139,7 +139,7 @@ async function doRender (req, res, pathname, query, { export async function renderScriptError (req, res, page, error) { // Asks CDNs and others to not to cache the errored page - res.setHeader('Cache-Control', 'no-store, must-revalidate') + res.setHeader('Cache-Control', 'no-cache, no-store,...
false
Other
vercel
next.js
738376c8124cba5130e95c41e2439708fd208b47.json
Add docker example (#4261) * Add docker example * fix lint
examples/with-docker/.dockerignore
@@ -0,0 +1,3 @@ +.next/ +node_modules/ +Dockerfile
true
Other
vercel
next.js
738376c8124cba5130e95c41e2439708fd208b47.json
Add docker example (#4261) * Add docker example * fix lint
examples/with-docker/Dockerfile
@@ -0,0 +1,10 @@ +FROM mhart/alpine-node + +WORKDIR /app +COPY . . + +RUN yarn install +RUN yarn build + +EXPOSE 3000 +CMD ["yarn", "start"]
true
Other
vercel
next.js
738376c8124cba5130e95c41e2439708fd208b47.json
Add docker example (#4261) * Add docker example * fix lint
examples/with-docker/Dockerfile.multistage
@@ -0,0 +1,14 @@ +# Do the npm install or yarn install in the full image +FROM mhart/alpine-node AS builder +WORKDIR /app +COPY package.json . +RUN yarn install +COPY . . +RUN yarn build + +# And then copy over node_modules, etc from that stage to the smaller base image +FROM mhart/alpine-node:base +WORKDIR /app +COPY ...
true
Other
vercel
next.js
738376c8124cba5130e95c41e2439708fd208b47.json
Add docker example (#4261) * Add docker example * fix lint
examples/with-docker/README.md
@@ -0,0 +1,58 @@ +[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-docker&env=API_URL&docker=true) + +# With Docker + +## How to use + +### Using `create-next-app` + +Execute [`create-next-app`](https://github.com/segmentio...
true
Other
vercel
next.js
738376c8124cba5130e95c41e2439708fd208b47.json
Add docker example (#4261) * Add docker example * fix lint
examples/with-docker/next.config.js
@@ -0,0 +1,9 @@ +// next.config.js +module.exports = { + serverRuntimeConfig: { // Will only be available on the server side + mySecret: 'secret' + }, + publicRuntimeConfig: { // Will be available on both server and client + API_URL: process.env.API_URL + } +}
true
Other
vercel
next.js
738376c8124cba5130e95c41e2439708fd208b47.json
Add docker example (#4261) * Add docker example * fix lint
examples/with-docker/package.json
@@ -0,0 +1,12 @@ +{ + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "next": "latest", + "react": "16.2.0", + "react-dom": "16.2.0" + } +}
true
Other
vercel
next.js
738376c8124cba5130e95c41e2439708fd208b47.json
Add docker example (#4261) * Add docker example * fix lint
examples/with-docker/pages/index.js
@@ -0,0 +1,18 @@ +import React from 'react' +import getConfig from 'next/config' +const { publicRuntimeConfig } = getConfig() + +const { API_URL } = publicRuntimeConfig + +export default class extends React.Component { + static async getInitialProps () { + // fetch(`${API_URL}/some-path`) + return {} + } + + r...
true
Other
vercel
next.js
08965008c6258413ac64f08f99de06d597db7784.json
Prevent now-env from running in production (#4259)
examples/with-now-env/next.config.js
@@ -2,7 +2,9 @@ const webpack = require('webpack') /** * After the next require you can use process.env to get your secrets */ -require('now-env') +if (process.env.NODE_ENV !== 'production') { + require('now-env') +} console.log({ SECRET: process.env.SECRET,
false
Other
vercel
next.js
62f9736ca3cd1774ddcb03d79735e6806348ff23.json
Add basic export example
examples/basic-export/.gitignore
@@ -0,0 +1 @@ +out
true
Other
vercel
next.js
62f9736ca3cd1774ddcb03d79735e6806348ff23.json
Add basic export example
examples/basic-export/README.md
@@ -0,0 +1,46 @@ +[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/basic-export) + +# Basic export example + +## How to use + +### Using `create-next-app` + +Execute [`create-next-app`](https://github.com/segmentio/create-next-a...
true
Other
vercel
next.js
62f9736ca3cd1774ddcb03d79735e6806348ff23.json
Add basic export example
examples/basic-export/package.json
@@ -0,0 +1,16 @@ +{ + "name": "hello-world", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start", + "export": "next export" + }, + "dependencies": { + "next": "latest", + "react": "^16.0.0", + "react-dom": "^16.0.0" + }, + "license": "ISC" +...
true
Other
vercel
next.js
62f9736ca3cd1774ddcb03d79735e6806348ff23.json
Add basic export example
examples/basic-export/pages/about.js
@@ -0,0 +1,3 @@ +export default () => ( + <div>About us</div> +)
true
Other
vercel
next.js
62f9736ca3cd1774ddcb03d79735e6806348ff23.json
Add basic export example
examples/basic-export/pages/about2.js
@@ -0,0 +1,3 @@ +export default () => ( + <div>About 2</div> +)
true
Other
vercel
next.js
62f9736ca3cd1774ddcb03d79735e6806348ff23.json
Add basic export example
examples/basic-export/pages/day/index.js
@@ -0,0 +1,3 @@ +export default () => ( + <div>Hello Day</div> +)
true
Other
vercel
next.js
62f9736ca3cd1774ddcb03d79735e6806348ff23.json
Add basic export example
examples/basic-export/pages/index.js
@@ -0,0 +1,4 @@ +import Link from 'next/link' +export default () => ( + <div>Hello World. <Link href='/about'><a>About</a></Link></div> +)
true
Other
vercel
next.js
121f6c2801c3f20be0c66c9e209f5d57044f4839.json
docs: add missing fat arrow (#4245)
readme.md
@@ -1128,7 +1128,7 @@ Phases can be imported from `next/constants`: ```js const {PHASE_DEVELOPMENT_SERVER} = require('next/constants') -module.exports = (phase, {defaultConfig}){ +module.exports = (phase, {defaultConfig}) => { if(phase === PHASE_DEVELOPMENT_SERVER) { return { /* development only conf...
false
Other
vercel
next.js
f378448b79937431a3ee3399d49e7f7b8a96159c.json
with-reasonml: use default exports (#4217)
examples/with-reasonml/package.json
@@ -2,9 +2,9 @@ "name": "with-reasonml", "version": "1.0.0", "scripts": { - "dev": "concurrently \"bsb -clean-world -make-world -w\" \"next -w\"", - "build": "bsb -clean-world -make-world && next build", - "start": "bsb -clean-world -make-world && next start -w" + "dev": "bsb -clean-world -make-wor...
true
Other
vercel
next.js
f378448b79937431a3ee3399d49e7f7b8a96159c.json
with-reasonml: use default exports (#4217)
examples/with-reasonml/pages/about.js
@@ -1,4 +0,0 @@ -import { jsComponent as About } from './About.re' -import React from 'react' - -export default () => <About />
true
Other
vercel
next.js
f378448b79937431a3ee3399d49e7f7b8a96159c.json
with-reasonml: use default exports (#4217)
examples/with-reasonml/pages/about.re
@@ -10,4 +10,4 @@ let make = (_children) => { </div> }; -let jsComponent = ReasonReact.wrapReasonForJs(~component, (_jsProps) => make([||])); \ No newline at end of file +let default = ReasonReact.wrapReasonForJs(~component, (_jsProps) => make([||]));
true
Other
vercel
next.js
f378448b79937431a3ee3399d49e7f7b8a96159c.json
with-reasonml: use default exports (#4217)
examples/with-reasonml/pages/index.js
@@ -1,3 +0,0 @@ -import { jsComponent as Index } from './Index.re' - -export default () => <Index />
true
Other
vercel
next.js
f378448b79937431a3ee3399d49e7f7b8a96159c.json
with-reasonml: use default exports (#4217)
examples/with-reasonml/pages/index.re
@@ -10,4 +10,4 @@ let make = (_children) => { </div> }; -let jsComponent = ReasonReact.wrapReasonForJs(~component, (_jsProps) => make([||])); \ No newline at end of file +let default = ReasonReact.wrapReasonForJs(~component, (_jsProps) => make([||]));
true
Other
vercel
next.js
e1babdfe9d599584a9e8b79681b4ff48e077bb0d.json
Render styled-jsx in _document example (#1287)
examples/with-cxs/pages/_document.js
@@ -4,7 +4,7 @@ import cxs from 'cxs' export default class MyDocument extends Document { static async getInitialProps ({ renderPage }) { const page = renderPage() - let style = cxs.getCss() + const style = cxs.getCss() return { ...page, style } }
true
Other
vercel
next.js
e1babdfe9d599584a9e8b79681b4ff48e077bb0d.json
Render styled-jsx in _document example (#1287)
examples/with-styled-components/pages/_document.js
@@ -4,16 +4,15 @@ import styleSheet from 'styled-components/lib/models/StyleSheet' export default class MyDocument extends Document { static async getInitialProps ({ renderPage }) { const page = renderPage() - const style = styleSheet.rules().map(rule => rule.cssText).join('\n') - return { ...page, style...
true
Other
vercel
next.js
e1babdfe9d599584a9e8b79681b4ff48e077bb0d.json
Render styled-jsx in _document example (#1287)
readme.md
@@ -473,11 +473,13 @@ Pages in `Next.js` skip the definition of the surrounding document's markup. For ```jsx // ./pages/_document.js import Document, { Head, Main, NextScript } from 'next/document' +import flush from 'styled-jsx/server' export default class MyDocument extends Document { - static async getInitia...
true
Other
vercel
next.js
4620cd8cd683b084480a793e54375c9be3d0b200.json
Ignore .next from hot reload watcher (#1307) * Move on-demand-entries-ping to _next namespace * Ignore .next from watching
server/hot-reloader.js
@@ -128,7 +128,8 @@ export default class HotReloader { const ignored = [ /(^|[/\\])\../, // .dotfiles - /node_modules/ + /node_modules/, + /\.next/ ] const windowsSettings = isWindowsBash() ? { lazy: false,
false
Other
vercel
next.js
01fa65d4a22c80205770e1d505d06ae07da25054.json
Unregister old serviceworker code (#1304) Bring back https://github.com/zeit/next.js/commit/1b9e8771ec569def1773040b68f404c2cbc9484e with a check for the prefetch serviceworker + if it is supported by the browser
lib/router/router.js
@@ -7,6 +7,24 @@ import { loadGetInitialProps, getLocationOrigin } from '../utils' import { _notifyBuildIdMismatch } from './' import fetch from 'unfetch' +if (typeof window !== 'undefined' && typeof navigator.serviceWorker !== 'undefined') { + navigator.serviceWorker.getRegistrations() + .then(registrations =>...
false
Other
vercel
next.js
f8f90955c5da6914033a021738a04446f7aeaf81.json
Add prefetch to propTypes + flow typings (#1295)
examples/with-flow/types/next.js.flow
@@ -17,7 +17,7 @@ declare module "next/head" { } declare module "next/link" { - declare module.exports: Class<React$Component<void, {href: string}, any>>; + declare module.exports: Class<React$Component<void, {href: string, prefetch?: bool}, any>>; } declare module "next/error" {
true
Other
vercel
next.js
f8f90955c5da6914033a021738a04446f7aeaf81.json
Add prefetch to propTypes + flow typings (#1295)
lib/link.js
@@ -10,6 +10,7 @@ export default class Link extends Component { } static propTypes = { + prefetch: PropTypes.bool, children: PropTypes.oneOfType([ PropTypes.element, (props, propName) => {
true
Other
vercel
next.js
756a32aefd36c23c3b96227cdff58507cde21133.json
Remove unfetch because of production build errors. (#1288) See https://github.com/zeit/next.js/pull/1278#issuecomment-282528628
lib/router/router.js
@@ -10,7 +10,7 @@ import { _notifyBuildIdMismatch } from './' // Add "fetch" polyfill for older browsers if (typeof window !== 'undefined') { - require('unfetch/polyfill') + require('whatwg-fetch') } export default class Router extends EventEmitter {
true
Other
vercel
next.js
756a32aefd36c23c3b96227cdff58507cde21133.json
Remove unfetch because of production build errors. (#1288) See https://github.com/zeit/next.js/pull/1278#issuecomment-282528628
package.json
@@ -79,12 +79,12 @@ "source-map-support": "0.4.11", "strip-ansi": "3.0.1", "styled-jsx": "0.5.7", - "unfetch": "2.0.1", "url": "0.11.0", "uuid": "3.0.1", "webpack": "2.2.1", "webpack-dev-middleware": "1.10.1", "webpack-hot-middleware": "2.17.1", + "whatwg-fetch": "2.0.2", ...
true
Other
vercel
next.js
756a32aefd36c23c3b96227cdff58507cde21133.json
Remove unfetch because of production build errors. (#1288) See https://github.com/zeit/next.js/pull/1278#issuecomment-282528628
yarn.lock
@@ -71,10 +71,6 @@ ansi-escapes@^1.1.0, ansi-escapes@^1.4.0: version "1.4.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-1.4.0.tgz#d3a8a83b319aa67793662b13e761c7911422306e" -ansi-html@0.0.6: - version "0.0.6" - resolved "https://registry.yarnpkg.com/ansi-html/-/ansi-html-0.0.6.tgz#bda8e...
true
Other
vercel
next.js
8a6c57de006e2af58d52bb8646b9b4a433f7f797.json
Add better documentation around url.parse (#1281)
readme.md
@@ -429,6 +429,8 @@ const handle = app.getRequestHandler() app.prepare().then(() => { createServer((req, res) => { + // Be sure to pass `true` as the second argument to `url.parse`. + // This tells it to parse the query portion of the URL. const parsedUrl = parse(req.url, true) const { pathname, q...
false
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/.babelrc
@@ -0,0 +1,19 @@ +{ + "presets": [ + "next/babel" + ], + "env": { + "development": { + "plugins": [ + "react-intl" + ] + }, + "production": { + "plugins": [ + ["react-intl", { + "messagesDir": "lang/.messages/" + }] + ] + } + } +}
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/.gitignore
@@ -0,0 +1 @@ +lang/.messages/
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/README.md
@@ -0,0 +1,51 @@ +# Example app with [React Intl][] + +## How to use + +Download the example [or clone the repo](https://github.com/zeit/next.js.git): + +```bash +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/with-react-intl +cd with-react-intl +``` + +Install i...
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/components/Layout.js
@@ -0,0 +1,27 @@ +import React from 'react' +import {defineMessages, injectIntl} from 'react-intl' +import Head from 'next/head' +import Nav from './Nav' + +const messages = defineMessages({ + title: { + id: 'title', + defaultMessage: 'React Intl Next.js Example' + } +}) + +export default injectIntl(({intl, tit...
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/components/Nav.js
@@ -0,0 +1,28 @@ +import React from 'react' +import {FormattedMessage} from 'react-intl' +import Link from 'next/link' + +export default () => ( + <nav> + <li> + <Link href='/'> + <a><FormattedMessage id='nav.home' defaultMessage='Home' /></a> + </Link> + </li> + <li> + <Link href='/abou...
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/components/PageWithIntl.js
@@ -0,0 +1,44 @@ +import React, {Component} from 'react' +import {IntlProvider, addLocaleData, injectIntl} from 'react-intl' + +// Register React Intl's locale data for the user's locale in the browser. This +// locale data was added to the page by `pages/_document.js`. This only happens +// once, on initial page load ...
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/lang/en.json
@@ -0,0 +1,7 @@ +{ + "title": "React Intl Next.js Example", + "nav.home": "Home", + "nav.about": "About", + "description": "An example app integrating React Intl with Next.js", + "greeting": "Hello, World!" +} \ No newline at end of file
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/lang/fr.json
@@ -0,0 +1,7 @@ +{ + "title": "React Intl Next.js Exemple", + "nav.home": "Accueil", + "nav.about": "À propos de nous", + "description": "Un exemple d'application intégrant React Intl avec Next.js", + "greeting": "Bonjour le monde!" +}
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/package.json
@@ -0,0 +1,21 @@ +{ + "name": "with-react-intl", + "version": "1.0.0", + "scripts": { + "dev": "node server.js", + "build": "next build && node ./scripts/default-lang", + "start": "NODE_ENV=production node server.js" + }, + "dependencies": { + "accepts": "^1.3.3", + "babel-plugin-react-intl": "^2.3....
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/pages/_document.js
@@ -0,0 +1,31 @@ +import Document, {Head, Main, NextScript} from 'next/document' + +// The document (which is SSR-only) needs to be customized to expose the locale +// data for the user's locale for React Intl to work in the browser. +export default class IntlDocument extends Document { + static async getInitialProps ...
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/pages/about.js
@@ -0,0 +1,25 @@ +import React, {Component} from 'react' +import {FormattedRelative} from 'react-intl' +import pageWithIntl from '../components/PageWithIntl' +import Layout from '../components/Layout' + +class About extends Component { + static async getInitialProps ({req}) { + return {someDate: Date.now()} + } + ...
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/pages/index.js
@@ -0,0 +1,26 @@ +import React from 'react' +import {FormattedMessage, FormattedNumber, defineMessages} from 'react-intl' +import Head from 'next/head' +import pageWithIntl from '../components/PageWithIntl' +import Layout from '../components/Layout' + +const {description} = defineMessages({ + description: { + id: '...
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/scripts/default-lang.js
@@ -0,0 +1,19 @@ +const {readFileSync, writeFileSync} = require('fs') +const {resolve} = require('path') +const glob = require('glob') + +const defaultMessages = glob.sync('./lang/.messages/**/*.json') + .map((filename) => readFileSync(filename, 'utf8')) + .map((file) => JSON.parse(file)) + .reduce((messages, descri...
true
Other
vercel
next.js
e24db68f8b7e755fa61594492199bb8f95f8d1ed.json
Add example app with React Intl (#1055) * Add example app with React Intl Fixes #1022 * Update examples/with-react-intl/package.json to be consistent
examples/with-react-intl/server.js
@@ -0,0 +1,53 @@ +// Polyfill Node with `Intl` that has data for all locales. +// See: https://formatjs.io/guides/runtime-environments/#server +const IntlPolyfill = require('intl') +Intl.NumberFormat = IntlPolyfill.NumberFormat +Intl.DateTimeFormat = IntlPolyfill.DateTimeFormat + +const {readFileSync} = require('fs') +...
true
Other
vercel
next.js
e3bf20cbcf43ff3a062afc1c70e983e75e041895.json
Fix relative module aliases for Windows (#1249) * Fix relative module aliases for Windows * Update regular expressions to use `path.sep` instead of `[\\/]` * Make the minimal changes possible.
server/build/root-module-relative-path.js
@@ -5,7 +5,9 @@ // This function returns paths relative to the top-level 'node_modules' // directory found in the path. If none is found, returns the complete path. -const RELATIVE_START = 'node_modules/' +import { sep } from 'path' + +const RELATIVE_START = `node_modules${sep}` // Pass in the module's `require`...
false
Other
vercel
next.js
63e3262f2fe9fe61c28d50fef77ca0d8ed16d16e.json
Add message for missing peerDependencies (#1187) * Add message for missing peerDependencies * Remove exit * Use console.warn
bin/next
@@ -5,6 +5,17 @@ import { spawn } from 'cross-spawn' import { watchFile } from 'fs' import pkg from '../../package.json' +if (pkg.peerDependencies) { + Object.keys(pkg.peerDependencies).forEach(dependency => { + try { + // When 'npm link' is used it checks the clone location. Not the project. + requir...
false
Other
vercel
next.js
fb496b7c9a2123ffd8b6f69b48a53ca044d42730.json
Run tests in Travis. (#1247) * Run tests in Travis. * Update deps and config. * Update jest config. * Disable a test temp. * Increase the timeout.
.travis.yml
@@ -18,6 +18,4 @@ before_install: - export DISPLAY=:99.0 - sh -e /etc/init.d/xvfb start - sleep 3 -script: - - echo "No need to use npm test since it's done in the install section via 'npm prepublish'" after_script: npm run coveralls
true
Other
vercel
next.js
fb496b7c9a2123ffd8b6f69b48a53ca044d42730.json
Run tests in Travis. (#1247) * Run tests in Travis. * Update deps and config. * Update jest config. * Disable a test temp. * Increase the timeout.
package.json
@@ -67,7 +67,7 @@ "http-status": "1.0.1", "is-windows-bash": "1.0.3", "json-loader": "0.5.4", - "loader-utils": "1.0.1", + "loader-utils": "1.0.2", "minimist": "1.2.0", "mkdirp-then": "1.2.0", "mv": "2.1.1", @@ -119,7 +119,7 @@ }, "jest": { "testEnvironment": "node", - ...
true
Other
vercel
next.js
fb496b7c9a2123ffd8b6f69b48a53ca044d42730.json
Run tests in Travis. (#1247) * Run tests in Travis. * Update deps and config. * Update jest config. * Disable a test temp. * Increase the timeout.
server/build/loaders/emit-file-loader.js
@@ -3,7 +3,7 @@ import loaderUtils from 'loader-utils' module.exports = function (content, sourceMap) { this.cacheable() - const query = loaderUtils.parseQuery(this.query) + const query = loaderUtils.getOptions(this) const name = query.name || '[hash].[ext]' const context = query.context || this.options.c...
true