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
9347c8bdd010742c55dde14c7975afb8e8704cf2.json
Specify a different build directory for #1513 (#1599) * Update references to `.next` * Remove console logs and extraneous semi colons * Remove lint errors * Update references to .next and update docs * Update options from nested to flat with `distDir` * Add integration tests, and update `.gitignore` ...
test/integration/dist-dir/next.config.js
@@ -0,0 +1,7 @@ +module.exports = { + onDemandEntries: { + // Make sure entries are not getting disposed. + maxInactiveAge: 1000 * 60 * 60 + }, + distDir: 'dist' +}
true
Other
vercel
next.js
9347c8bdd010742c55dde14c7975afb8e8704cf2.json
Specify a different build directory for #1513 (#1599) * Update references to `.next` * Remove console logs and extraneous semi colons * Remove lint errors * Update references to .next and update docs * Update options from nested to flat with `distDir` * Add integration tests, and update `.gitignore` ...
test/integration/dist-dir/pages/index.js
@@ -0,0 +1,3 @@ +export default () => ( + <div>Hello World</div> +)
true
Other
vercel
next.js
9347c8bdd010742c55dde14c7975afb8e8704cf2.json
Specify a different build directory for #1513 (#1599) * Update references to `.next` * Remove console logs and extraneous semi colons * Remove lint errors * Update references to .next and update docs * Update options from nested to flat with `distDir` * Add integration tests, and update `.gitignore` ...
test/integration/dist-dir/test/index.test.js
@@ -0,0 +1,49 @@ +/* global jasmine, describe, it, expect, beforeAll, afterAll */ + +import { join } from 'path' +import { existsSync } from 'fs' +import { + nextServer, + nextBuild, + startApp, + stopApp, + renderViaHTTP +} from 'next-test-utils' + +const appDir = join(__dirname, '../') +let appPort +let server +...
true
Other
vercel
next.js
e46edc2460e1e28276001880e5253219605f1dc2.json
Load everything async.
client/index.js
@@ -34,30 +34,32 @@ if (window.__NEXT_LOADED_PAGES__) { delete window.__NEXT_LOADED_PAGES__ } -const ErrorComponent = pageLoader.loadPageSync('/_error') -let Component - -try { - Component = pageLoader.loadPageSync(pathname) -} catch (err) { - console.error(`${err.message}\n${err.stack}`) - Component = ErrorCo...
true
Other
vercel
next.js
e46edc2460e1e28276001880e5253219605f1dc2.json
Load everything async.
client/next-dev.js
@@ -1,14 +1,40 @@ -import evalScript from '../lib/eval-script' +import 'react-hot-loader/patch' import ReactReconciler from 'react-dom/lib/ReactReconciler' - -const { __NEXT_DATA__: { errorComponent } } = window -const ErrorComponent = evalScript(errorComponent).default - -require('react-hot-loader/patch') +import ini...
true
Other
vercel
next.js
e46edc2460e1e28276001880e5253219605f1dc2.json
Load everything async.
client/next.js
@@ -1,3 +1,6 @@ import next from './' next() + .catch((err) => { + console.error(`${err.message}\n${err.stack}`) + })
true
Other
vercel
next.js
e46edc2460e1e28276001880e5253219605f1dc2.json
Load everything async.
client/on-demand-entries-client.js
@@ -3,31 +3,33 @@ import Router from '../lib/router' import fetch from 'unfetch' -Router.ready(() => { - Router.router.events.on('routeChangeComplete', ping) -}) +export default () => { + Router.ready(() => { + Router.router.events.on('routeChangeComplete', ping) + }) -async function ping () { - try { - ...
true
Other
vercel
next.js
e46edc2460e1e28276001880e5253219605f1dc2.json
Load everything async.
client/webpack-hot-middleware-client.js
@@ -1,48 +1,50 @@ import webpackHotMiddlewareClient from 'webpack-hot-middleware/client?overlay=false&reload=true' import Router from '../lib/router' -const handlers = { - reload (route) { - if (route === '/_error') { - for (const r of Object.keys(Router.components)) { - const { err } = Router.compo...
true
Other
vercel
next.js
e46edc2460e1e28276001880e5253219605f1dc2.json
Load everything async.
server/document.js
@@ -103,8 +103,8 @@ export class NextScript extends Component { {staticMarkup ? null : <script dangerouslySetInnerHTML={{ __html: `__NEXT_DATA__ = ${htmlescape(__NEXT_DATA__)}; module={};` }} />} - <script type='text/javascript' src={`/_next/${buildId}/page${pathname}`} /> - <script typ...
true
Other
vercel
next.js
e46edc2460e1e28276001880e5253219605f1dc2.json
Load everything async.
server/hot-reloader.js
@@ -5,7 +5,6 @@ import onDemandEntryHandler from './on-demand-entry-handler' import isWindowsBash from 'is-windows-bash' import webpack from './build/webpack' import clean from './build/clean' -import readPage from './read-page' import getConfig from './config' export default class HotReloader { @@ -202,7 +201,6...
true
Other
vercel
next.js
e46edc2460e1e28276001880e5253219605f1dc2.json
Load everything async.
server/read-page.js
@@ -1,23 +0,0 @@ -import fs from 'mz/fs' -import resolve from './resolve' - -/** - * resolve a JSON page like `require.resolve`, - * and read and cache the file content - */ - -async function readPage (path) { - const f = await resolve(path) - if (cache.hasOwnProperty(f)) { - return cache[f] - } - - const source...
true
Other
vercel
next.js
f6f175db73ad60d413a05613f7536a9fa7a16e10.json
Remove some unwanted code.
server/render.js
@@ -4,7 +4,6 @@ import { renderToString, renderToStaticMarkup } from 'react-dom/server' import send from 'send' import requireModule from './require' import resolvePath from './resolve' -import readPage from './read-page' import { Router } from '../lib/router' import { loadGetInitialProps } from '../lib/utils' im...
false
Other
vercel
next.js
5aa02d0727ce817423ef4bf086229f6728847113.json
Remove the json-pages plugin.
server/build/plugins/json-pages-plugin.js
@@ -1,24 +0,0 @@ -export default class JsonPagesPlugin { - apply (compiler) { - compiler.plugin('after-compile', (compilation, callback) => { - const pages = Object - .keys(compilation.assets) - .filter((filename) => /^bundles[/\\]pages.*\.js$/.test(filename)) - - pages.forEach((pageName) =>...
true
Other
vercel
next.js
5aa02d0727ce817423ef4bf086229f6728847113.json
Remove the json-pages plugin.
server/build/plugins/pages-plugin.js
@@ -28,11 +28,8 @@ export default class PagesPlugin { window.NEXT_LOADED_PAGES.push(loadPage) } ` - // Replace the current asset - // TODO: We need to move "client-bundles" back to "bundles" once we remove - // all the JSON eval stuff - delete compilation.ass...
true
Other
vercel
next.js
5aa02d0727ce817423ef4bf086229f6728847113.json
Remove the json-pages plugin.
server/build/webpack.js
@@ -6,7 +6,6 @@ import WriteFilePlugin from 'write-file-webpack-plugin' import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin' import CaseSensitivePathPlugin from 'case-sensitive-paths-webpack-plugin' import UnlinkFilePlugin from './plugins/unlink-file-plugin' -import JsonPagesPlugin from './plugin...
true
Other
vercel
next.js
5aa02d0727ce817423ef4bf086229f6728847113.json
Remove the json-pages plugin.
server/index.js
@@ -122,7 +122,7 @@ export default class Server { return await renderScriptError(req, res, '/_error', error, customFields, this.renderOpts) } - const p = join(this.dir, '.next/client-bundles/pages/_error.js') + const p = join(this.dir, '.next/bundles/pages/_error.js') await ...
true
Other
vercel
next.js
5aa02d0727ce817423ef4bf086229f6728847113.json
Remove the json-pages plugin.
server/render.js
@@ -57,8 +57,8 @@ async function doRender (req, res, pathname, query, { errorComponent ] = await Promise.all([ loadGetInitialProps(Component, ctx), - readPage(join(dir, '.next', 'client-bundles', 'pages', page)), - readPage(join(dir, '.next', 'client-bundles', 'pages', '_error')) + readPage(join(d...
true
Other
vercel
next.js
5aa02d0727ce817423ef4bf086229f6728847113.json
Remove the json-pages plugin.
test/integration/ondemand/test/index.test.js
@@ -37,7 +37,7 @@ describe('On Demand Entries', () => { it('should dispose inactive pages', async () => { await renderViaHTTP(context.appPort, '/_next/-/pages/about') - const aboutPagePath = resolve(__dirname, '../.next/client-bundles/pages/about.js') + const aboutPagePath = resolve(__dirname, '../.next...
true
Other
vercel
next.js
12a7610d9ae9e0e2f95a1298bc7ad6ac2a18b457.json
Add example using glamorous 💄 (#1620) * Add example using glamorous 💄 * Fix linting errors * Fix FOUC with server rendering and rehydration * Camelcase CSS property names * Fix title in README * Fix typo in README
examples/with-glamorous/README.md
@@ -0,0 +1,30 @@ + +# Example app with [glamorous](https://github.com/kentcdodds/glamorous) + +## How to use + +Download the example [or clone the repo](https://github.com/zeit/next.js): + +```bash +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/with-glamorous +c...
true
Other
vercel
next.js
12a7610d9ae9e0e2f95a1298bc7ad6ac2a18b457.json
Add example using glamorous 💄 (#1620) * Add example using glamorous 💄 * Fix linting errors * Fix FOUC with server rendering and rehydration * Camelcase CSS property names * Fix title in README * Fix typo in README
examples/with-glamorous/package.json
@@ -0,0 +1,18 @@ +{ + "name": "with-glamorous", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "glamor": "^2.20.24", + "glamorous": "^1.0.0", + "next": "^2.0.1", + "react": "^15.4.2", + "react-dom": "^15.4.2"...
true
Other
vercel
next.js
12a7610d9ae9e0e2f95a1298bc7ad6ac2a18b457.json
Add example using glamorous 💄 (#1620) * Add example using glamorous 💄 * Fix linting errors * Fix FOUC with server rendering and rehydration * Camelcase CSS property names * Fix title in README * Fix typo in README
examples/with-glamorous/pages/_document.js
@@ -0,0 +1,33 @@ +import Document, { Head, Main, NextScript } from 'next/document' +import { renderStatic } from 'glamor/server' + +export default class MyDocument extends Document { + static async getInitialProps ({ renderPage }) { + const page = renderPage() + const styles = renderStatic(() => page.html) + ...
true
Other
vercel
next.js
12a7610d9ae9e0e2f95a1298bc7ad6ac2a18b457.json
Add example using glamorous 💄 (#1620) * Add example using glamorous 💄 * Fix linting errors * Fix FOUC with server rendering and rehydration * Camelcase CSS property names * Fix title in README * Fix typo in README
examples/with-glamorous/pages/index.js
@@ -0,0 +1,66 @@ +import React from 'react' +import { rehydrate, css } from 'glamor' +import glamorous from 'glamorous' + +// Adds server generated styles to glamor cache. +// Has to run before any `style()` calls +// '__NEXT_DATA__.ids' is set in '_document.js' +if (typeof window !== 'undefined') { + rehydrate(window...
true
Other
vercel
next.js
897ff6c010014d3a2d270a2b2aba109125ce39ae.json
fix typo in with-universal-configuration example (#1628)
examples/with-universal-configuration/README.md
@@ -6,8 +6,8 @@ Download the example [or clone the repo](https://github.com/zeit/next.js): ```bash -curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/basic-css -cd basic-css +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js...
false
Other
vercel
next.js
76bfc38a095a65600793b7c6bbfa97f7145cc328.json
Remove all the inline code.
client/index.js
@@ -35,7 +35,15 @@ if (window.NEXT_LOADED_PAGES) { } const ErrorComponent = pageLoader.loadPageSync('/_error') -const Component = pageLoader.loadPageSync(pathname) || ErrorComponent +let Component + +try { + Component = pageLoader.loadPageSync(pathname) +} catch (err) { + console.error(`${err.message}\n${err.stac...
true
Other
vercel
next.js
76bfc38a095a65600793b7c6bbfa97f7145cc328.json
Remove all the inline code.
server/document.js
@@ -95,25 +95,16 @@ export class NextScript extends Component { return this.getChunkScript('app.js', { async: true }) } - getMainComponents () { - const { component, errorComponent } = this.context._documentProps - - return ( - <div> - <script dangerouslySetInnerHTML={{ __html: component }}...
true
Other
vercel
next.js
76bfc38a095a65600793b7c6bbfa97f7145cc328.json
Remove all the inline code.
server/index.js
@@ -114,6 +114,18 @@ export default class Server { await this.serveStatic(req, res, p) }, + '/_next/:buildId/page/_error': async (req, res, params) => { + if (!this.handleBuildId(params.buildId, res)) { + const error = new Error('INVALID_BUILD_ID') + const customFields = ...
true
Other
vercel
next.js
76bfc38a095a65600793b7c6bbfa97f7145cc328.json
Remove all the inline code.
server/render.js
@@ -131,10 +131,19 @@ export async function renderScriptError (req, res, page, error, customFields, op if (error.code === 'ENOENT') { res.setHeader('Content-Type', 'text/javascript') res.end(` - var error = new Error('Page not exists: ${page}') - error.pageNotFound = true - error.statusCode ...
true
Other
vercel
next.js
8c19286a4d354d4a59664ccebab719357be1850a.json
Add glob dependency (glob-promise peer). (#1624)
package.json
@@ -65,6 +65,7 @@ "cross-spawn": "5.1.0", "del": "2.2.2", "friendly-errors-webpack-plugin": "1.5.0", + "glob": "^7.1.1", "glob-promise": "3.1.0", "htmlescape": "1.1.1", "http-status": "1.0.1",
true
Other
vercel
next.js
8c19286a4d354d4a59664ccebab719357be1850a.json
Add glob dependency (glob-promise peer). (#1624)
yarn.lock
@@ -235,7 +235,7 @@ async@2.0.1: dependencies: lodash "^4.8.0" -async@^1.4.0, async@^1.4.2: +async@^1.4.0: version "1.5.2" resolved "https://registry.npmjs.org/async/-/async-1.5.2.tgz#ec6a61ae56480c0c3cb241c95618e20892f9672a" @@ -2788,27 +2788,21 @@ istanbul-api@^1.1.0-alpha.1: mkdirp "^0.5.1" ...
true
Other
vercel
next.js
57e3a67f628719487317db8564a9c71742f936de.json
Fix unit tests.
test/unit/router.test.js
@@ -1,52 +1,53 @@ /* global describe, it, expect */ import Router from '../../dist/lib/router/router' +class PageLoader { + constructor (options = {}) { + this.options = options + this.loaded = {} + } + + loadPage (route) { + this.loaded[route] = true + + if (this.options.delay) { + return new P...
false
Other
vercel
next.js
a1f11a4660f4f3f8b1ac09da9175390f23a168ad.json
Fix production tests.
test/integration/production/pages/about.js
@@ -0,0 +1,3 @@ +export default () => ( + <div className='about-page'>About Page</div> +)
true
Other
vercel
next.js
a1f11a4660f4f3f8b1ac09da9175390f23a168ad.json
Fix production tests.
test/integration/production/pages/index.js
@@ -1,3 +1,8 @@ +import Link from 'next/link' + export default () => ( - <div>Hello World</div> + <div> + <Link href='/about'><a>About Page</a></Link> + <p>Hello World</p> + </div> )
true
Other
vercel
next.js
a1f11a4660f4f3f8b1ac09da9175390f23a168ad.json
Fix production tests.
test/integration/production/test/index.test.js
@@ -1,6 +1,5 @@ /* global jasmine, describe, it, expect, beforeAll, afterAll */ -import fetch from 'node-fetch' import { join } from 'path' import { nextServer, @@ -9,6 +8,7 @@ import { stopApp, renderViaHTTP } from 'next-test-utils' +import webdriver from 'next-webdriver' const appDir = join(__dirnam...
true
Other
vercel
next.js
03209d88fd014293e59dc40c9ebda5ae7b21ec6e.json
Fix some issues related to rendering.
client/index.js
@@ -31,13 +31,13 @@ const { location } = window -window.NEXT_PAGE_LOADER = new PageLoader(buildId) - +const pageLoader = window.NEXT_PAGE_LOADER = new PageLoader(buildId) const Component = evalScript(component).default const ErrorComponent = evalScript(errorComponent).default let lastAppProps export const r...
true
Other
vercel
next.js
03209d88fd014293e59dc40c9ebda5ae7b21ec6e.json
Fix some issues related to rendering.
lib/router/router.js
@@ -1,5 +1,3 @@ -/* global NEXT_PAGE_LOADER */ - import { parse, format } from 'url' import mitt from 'mitt' import shallowEquals from '../shallow-equals' @@ -10,7 +8,7 @@ import { _notifyBuildIdMismatch } from './' const webpackModule = module export default class Router { - constructor (pathname, query, as, {...
true
Other
vercel
next.js
03209d88fd014293e59dc40c9ebda5ae7b21ec6e.json
Fix some issues related to rendering.
server/build/plugins/pages-plugin.js
@@ -12,7 +12,7 @@ export default class PagesPlugin { pages.forEach((chunk) => { const page = compilation.assets[chunk.name] const pageName = matchRouteName.exec(chunk.name)[1] - const routeName = `/${pageName.replace(/index$/, '')}` + const routeName = `/${pageName.replace(/[/\\]i...
true
Other
vercel
next.js
e3d68ff401fc21f99757bde29355c577dab2847d.json
Fix a typo and remove unwanted code.
server/index.js
@@ -6,8 +6,6 @@ import http, { STATUS_CODES } from 'http' import { renderToHTML, renderErrorToHTML, - renderJSON, - renderErrorJSON, sendHTML, serveStatic, renderScript, @@ -124,16 +122,20 @@ export default class Server { const error = new Error('INVALID_BUILD_ID') const customFi...
true
Other
vercel
next.js
e3d68ff401fc21f99757bde29355c577dab2847d.json
Fix a typo and remove unwanted code.
server/render.js
@@ -112,30 +112,14 @@ async function doRender (req, res, pathname, query, { return '<!DOCTYPE html>' + renderToStaticMarkup(doc) } -export async function renderJSON (req, res, page, { dir = process.cwd(), hotReloader } = {}) { - await ensurePage(page, { dir, hotReloader }) - const pagePath = await resolvePath(j...
true
Other
vercel
next.js
893884302507e01b1a44b3bedf06103cb142de51.json
Call ensurePage only in the dev mode.
server/index.js
@@ -131,7 +131,9 @@ export default class Server { const paths = params.path || [''] const pathname = `/${paths.join('/')}` - await this.hotReloader.ensurePage(pathname) + if (this.dev) { + await this.hotReloader.ensurePage(pathname) + } if (!this.handleBuildI...
false
Other
vercel
next.js
892da7eb73e23a6eff2f58ddcf99062555250acd.json
chore(package): update glamor to version 2.20.18 (#551)
package.json
@@ -53,7 +53,7 @@ "cross-spawn": "5.0.1", "del": "2.2.2", "friendly-errors-webpack-plugin": "1.1.2", - "glamor": "2.20.17", + "glamor": "2.20.18", "glob-promise": "3.1.0", "htmlescape": "1.1.1", "is-windows-bash": "1.0.3",
false
Other
vercel
next.js
b0eb0ea353a3b1a87bd7ac83c1abd139c8687fd3.json
fix install script of .travis.yml
.travis.yml
@@ -7,5 +7,8 @@ cache: yarn: true directories: - node_modules -install: yarn --ignore-engines +install: + - curl -o- -L https://yarnpkg.com/install.sh | bash + - export PATH=$HOME/.yarn/bin:$PATH + - yarn --ignore-engines after_script: npm run coveralls
false
Other
vercel
next.js
4fdfaa5ada83d2c1ccd2527c9d7d3aea6967ac32.json
chore(package): update glamor to version 2.20.17 (#548)
package.json
@@ -53,7 +53,7 @@ "cross-spawn": "5.0.1", "del": "2.2.2", "friendly-errors-webpack-plugin": "1.1.2", - "glamor": "2.20.15", + "glamor": "2.20.17", "glob-promise": "3.1.0", "htmlescape": "1.1.1", "is-windows-bash": "1.0.3",
false
Other
vercel
next.js
242758e3eeeccf10360042b78cff246a370b1117.json
fix navigation failure (#546)
lib/link.js
@@ -14,7 +14,7 @@ export default class Link extends Component { return } - const { href, as } = this.props + const { href, as = href } = this.props if (!isLocal(href)) { // ignore click if it's outside our scope @@ -23,17 +23,14 @@ export default class Link extends Component { e...
true
Other
vercel
next.js
242758e3eeeccf10360042b78cff246a370b1117.json
fix navigation failure (#546)
lib/router/router.js
@@ -29,9 +29,10 @@ export default class Router { onPopState (e) { this.abortComponentLoad() - let { route } = e.state || {} - const { pathname, query } = parse(route || window.location.href, true) - if (!route) route = toRoute(pathname) + const as = getURL() + const { url = as } = e.state || {}...
true
Other
vercel
next.js
815f17989befcb1875131fb91d4e2b82e2356561.json
fix config path (#537)
server/index.js
@@ -25,7 +25,7 @@ export default class Server { this.router = new Router() this.hotReloader = dev ? new HotReloader(this.dir, { quiet }) : null this.http = null - this.config = getConfig(dir) + this.config = getConfig(this.dir) this.defineRoutes() }
false
Other
vercel
next.js
65e7ab02276acab90cffc13f7e4d764cc3e08cad.json
chore(package): update glamor to version 2.20.15 (#542)
package.json
@@ -54,7 +54,7 @@ "cross-spawn": "5.0.1", "del": "2.2.2", "friendly-errors-webpack-plugin": "1.1.2", - "glamor": "2.20.14", + "glamor": "2.20.15", "glob-promise": "3.1.0", "htmlescape": "1.1.1", "is-windows-bash": "1.0.3",
false
Other
vercel
next.js
1ba315fcc17a59de975b446ffdf20c92d6e00477.json
Add a preact example. (#543) * Add preact example. * Update .babelrc
examples/using-preact/.babelrc
@@ -0,0 +1,6 @@ +{ + "presets": [ + "es2015", + "react" + ] +}
true
Other
vercel
next.js
1ba315fcc17a59de975b446ffdf20c92d6e00477.json
Add a preact example. (#543) * Add preact example. * Update .babelrc
examples/using-preact/README.md
@@ -0,0 +1,33 @@ + +# Hello World example + +## 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/using-preact +cd using-preact +``` + +Install it and run: + +``...
true
Other
vercel
next.js
1ba315fcc17a59de975b446ffdf20c92d6e00477.json
Add a preact example. (#543) * Add preact example. * Update .babelrc
examples/using-preact/next.config.js
@@ -0,0 +1,9 @@ +module.exports = { + webpack: function (config) { + config.resolve.alias = { + 'react': 'preact-compat', + 'react-dom': 'preact-compat' + } + return config + } +}
true
Other
vercel
next.js
1ba315fcc17a59de975b446ffdf20c92d6e00477.json
Add a preact example. (#543) * Add preact example. * Update .babelrc
examples/using-preact/package.json
@@ -0,0 +1,20 @@ +{ + "name": "hello-world", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "next": "^2.0.0-beta", + "preact": "^7.1.0", + "preact-compat": "^3.9.4" + }, + "author": "", + "license": "ISC", + "d...
true
Other
vercel
next.js
1ba315fcc17a59de975b446ffdf20c92d6e00477.json
Add a preact example. (#543) * Add preact example. * Update .babelrc
examples/using-preact/pages/about.js
@@ -0,0 +1,5 @@ +import React from 'react' + +export default () => ( + <div>About us</div> +)
true
Other
vercel
next.js
1ba315fcc17a59de975b446ffdf20c92d6e00477.json
Add a preact example. (#543) * Add preact example. * Update .babelrc
examples/using-preact/pages/index.js
@@ -0,0 +1,6 @@ +import React from 'react' +import Link from 'next/link' + +export default () => ( + <div>Hello World. <Link href='/about'>About</Link></div> +)
true
Other
vercel
next.js
9c7da4ead98cb0dc296b74eb669bd2883dfbd0e0.json
chore(package): update glamor to version 2.20.14 (#539)
package.json
@@ -54,7 +54,7 @@ "cross-spawn": "5.0.1", "del": "2.2.2", "friendly-errors-webpack-plugin": "1.1.2", - "glamor": "2.20.13", + "glamor": "2.20.14", "glob-promise": "3.1.0", "htmlescape": "1.1.1", "is-windows-bash": "1.0.3",
false
Other
vercel
next.js
9e69ba7b49612fd38e5b321f44803a4d8bcecd55.json
chore(package): update glamor to version 2.20.13 (#535)
package.json
@@ -54,7 +54,7 @@ "cross-spawn": "5.0.1", "del": "2.2.2", "friendly-errors-webpack-plugin": "1.1.2", - "glamor": "2.20.12", + "glamor": "2.20.13", "glob-promise": "3.1.0", "htmlescape": "1.1.1", "is-windows-bash": "1.0.3",
false
Other
vercel
next.js
ad0f0a4d79e313fcadecccff021cb6c3b38b0d2f.json
watch-page-plugin: prevent null access (#523)
server/build/plugins/watch-pages-plugin.js
@@ -3,7 +3,7 @@ import { resolve, relative, join, extname } from 'path' export default class WatchPagesPlugin { constructor (dir) { this.dir = resolve(dir, 'pages') - this.prevFileDependencies = null + this.prevFileDependencies = [] } apply (compiler) {
false
Other
vercel
next.js
157d9aebf79158f9c12f72b7206a00db0271dea5.json
Remove strict-mode from the eval-script. (#520) * Remove strict-mode from the eval-script. * Use exact version for babel-plugin-transform-remove-strict-mode * Use babelrc=false
gulpfile.js
@@ -15,7 +15,8 @@ gulp.task('compile', [ 'compile-bin', 'compile-lib', 'compile-server', - 'compile-client' + 'compile-client', + 'remove-strict-mode' ]) gulp.task('compile-bin', () => { @@ -50,6 +51,16 @@ gulp.task('compile-client', () => { .pipe(notify('Compiled client files')) }) +gulp.task('re...
true
Other
vercel
next.js
157d9aebf79158f9c12f72b7206a00db0271dea5.json
Remove strict-mode from the eval-script. (#520) * Remove strict-mode from the eval-script. * Use exact version for babel-plugin-transform-remove-strict-mode * Use babelrc=false
package.json
@@ -79,6 +79,7 @@ }, "devDependencies": { "babel-eslint": "7.1.1", + "babel-plugin-transform-remove-strict-mode": "0.0.2", "babel-preset-env": "1.1.4", "benchmark": "2.1.3", "coveralls": "2.11.15",
true
Other
vercel
next.js
355dbf8fdd1812d75ee6b9f0e360f403cb5802ec.json
Fix SSR Cache Example (#510)
examples/ssr-caching/README.md
@@ -14,7 +14,7 @@ Install it and run: ```bash npm install -npm run dev +npm start ``` Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download))
true
Other
vercel
next.js
355dbf8fdd1812d75ee6b9f0e360f403cb5802ec.json
Fix SSR Cache Example (#510)
examples/ssr-caching/server.js
@@ -21,7 +21,7 @@ app.prepare() }) server.get('/blog/:id', (req, res) => { - const queryParams = { id: req.paradms.id } + const queryParams = { id: req.params.id } renderAndCache(req, res, '/blog', queryParams) })
true
Other
vercel
next.js
af2d78c042e02fe79b52e68a6c313655c359787a.json
router: register initial route (#508)
lib/router/router.js
@@ -1,4 +1,4 @@ -import { parse } from 'url' +import { parse, format } from 'url' import evalScript from '../eval-script' import shallowEquals from '../shallow-equals' @@ -18,6 +18,10 @@ export default class Router { this.onPopState = this.onPopState.bind(this) if (typeof window !== 'undefined') { + ...
false
Other
vercel
next.js
87e136501ff8efed4003face1178106e5d41269d.json
chore(package): update benchmark to version 2.1.3 (#509)
package.json
@@ -80,7 +80,7 @@ "devDependencies": { "babel-eslint": "7.1.1", "babel-preset-env": "1.1.4", - "benchmark": "2.1.2", + "benchmark": "2.1.3", "coveralls": "2.11.15", "gulp": "3.9.1", "gulp-babel": "6.1.2",
false
Other
vercel
next.js
fb3612a941931837a976b8443b03512ae992a49d.json
Add SSR caching example to the README. (#503)
README.md
@@ -311,6 +311,7 @@ export default ({ url }) => ( <li><a href="./examples/custom-server">Basic custom server</a></li> <li><a href="./examples/custom-server-express">Express integration</a></li> <li><a href="./examples/parameterized-routing">Parameterized routing</a></li> + <li><a href="./examples/ssr-...
false
Other
vercel
next.js
74d4d22f841ef1e1d0ebcf0067f9f84b1146011b.json
router: fix route value on popstate (#490)
lib/router/router.js
@@ -25,8 +25,9 @@ export default class Router { onPopState (e) { this.abortComponentLoad() - const { pathname, query } = parse(window.location.href, true) - const route = (e.state || {}).route || toRoute(pathname) + let { route } = e.state || {} + const { pathname, query } = parse(route || window....
false
Other
vercel
next.js
b9bee247871f943e7cbb83f42fe3dfb318a11665.json
Add an example with SSR caching. (#497) * Add an example with SSR caching. * Update server.js * Update README.md * Use app.renderError to display errors in SSR example.
examples/ssr-caching/README.md
@@ -0,0 +1,31 @@ + +# Example app where it caches SSR'ed pages in the memory + +## 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/ssr-caching +cd ssr-caching ...
true
Other
vercel
next.js
b9bee247871f943e7cbb83f42fe3dfb318a11665.json
Add an example with SSR caching. (#497) * Add an example with SSR caching. * Update server.js * Update README.md * Use app.renderError to display errors in SSR example.
examples/ssr-caching/package.json
@@ -0,0 +1,10 @@ +{ + "scripts": { + "start": "node server.js" + }, + "dependencies": { + "express": "^4.14.0", + "lru-cache": "^4.0.2", + "next": "^2.0.0-beta" + } +}
true
Other
vercel
next.js
b9bee247871f943e7cbb83f42fe3dfb318a11665.json
Add an example with SSR caching. (#497) * Add an example with SSR caching. * Update server.js * Update README.md * Use app.renderError to display errors in SSR example.
examples/ssr-caching/pages/blog.js
@@ -0,0 +1,17 @@ +import React from 'react' + +export default class extends React.Component { + static getInitialProps ({ query: { id } }) { + return { id } + } + + render () { + return <div> + <h1>My {this.props.id} blog post</h1> + <p> + Lorem ipsum dolor sit amet, consectetur adipiscing eli...
true
Other
vercel
next.js
b9bee247871f943e7cbb83f42fe3dfb318a11665.json
Add an example with SSR caching. (#497) * Add an example with SSR caching. * Update server.js * Update README.md * Use app.renderError to display errors in SSR example.
examples/ssr-caching/pages/index.js
@@ -0,0 +1,9 @@ +import Link from 'next/link' + +export default () => ( + <ul> + <li><Link href='/blog?id=first' as='/blog/first'><a>My first blog post</a></Link></li> + <li><Link href='/blog?id=second' as='/blog/second'><a>My second blog post</a></Link></li> + <li><Link href='/blog?id=last' as='/blog/last'><...
true
Other
vercel
next.js
b9bee247871f943e7cbb83f42fe3dfb318a11665.json
Add an example with SSR caching. (#497) * Add an example with SSR caching. * Update server.js * Update README.md * Use app.renderError to display errors in SSR example.
examples/ssr-caching/server.js
@@ -0,0 +1,58 @@ +const express = require('express') +const next = require('next') +const LRUCache = require('lru-cache') + +const app = next({ dir: '.', dev: true }) +const handle = app.getRequestHandler() + +// This is where we cache our rendered HTML pages +const ssrCache = new LRUCache({ + max: 100, + maxAge: 100...
true
Other
vercel
next.js
01da6f47614041cac56587078bfc19d7cc28c238.json
Add styletron example (#486) * add styletron example * example: fix link * example: improve README * Added styletron example reference to readme and merge with master
README.md
@@ -93,6 +93,14 @@ export default () => ( #### CSS-in-JS +<p><details> + <summary><b>Examples</b></summary> + <ul> + <li><a href="./examples/with-styled-components">Styled components</a></li> + <li><a href="./examples/with-styletron">Styletron</a></li> + </ul> +</details></p> + It's possible to use any existi...
true
Other
vercel
next.js
01da6f47614041cac56587078bfc19d7cc28c238.json
Add styletron example (#486) * add styletron example * example: fix link * example: improve README * Added styletron example reference to readme and merge with master
examples/with-styletron/README.md
@@ -0,0 +1,30 @@ + +# Example app with styletron + +## 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-styletron +cd with-styletron +``` + +Install it and...
true
Other
vercel
next.js
01da6f47614041cac56587078bfc19d7cc28c238.json
Add styletron example (#486) * add styletron example * example: fix link * example: improve README * Added styletron example reference to readme and merge with master
examples/with-styletron/layout.js
@@ -0,0 +1,8 @@ +import { StyletronProvider } from 'styletron-react' +import getStyletron from './styletron' + +export default ({ children }) => ( + <StyletronProvider styletron={getStyletron()}> + {children} + </StyletronProvider> +)
true
Other
vercel
next.js
01da6f47614041cac56587078bfc19d7cc28c238.json
Add styletron example (#486) * add styletron example * example: fix link * example: improve README * Added styletron example reference to readme and merge with master
examples/with-styletron/next.config.js
@@ -0,0 +1,7 @@ +module.exports = { + webpack: function (config) { + config.externals = config.externals || {} + config.externals['styletron-server'] = 'styletron-server' + return config + } +}
true
Other
vercel
next.js
01da6f47614041cac56587078bfc19d7cc28c238.json
Add styletron example (#486) * add styletron example * example: fix link * example: improve README * Added styletron example reference to readme and merge with master
examples/with-styletron/package.json
@@ -0,0 +1,15 @@ +{ + "name": "with-styletron", + "version": "1.0.0", + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start" + }, + "dependencies": { + "next": "^2.0.0-beta", + "styletron-client": "^2.2.0", + "styletron-react": "^2.2.1", + "styletron-server": "^2.2.0"...
true
Other
vercel
next.js
01da6f47614041cac56587078bfc19d7cc28c238.json
Add styletron example (#486) * add styletron example * example: fix link * example: improve README * Added styletron example reference to readme and merge with master
examples/with-styletron/pages/_document.js
@@ -0,0 +1,26 @@ +import Document, { Head, Main, NextScript } from 'next/document' +import { flush } from '../styletron' + +export default class MyDocument extends Document { + static getInitialProps ({ renderPage }) { + const page = renderPage() + const styletron = flush() + const css = styletron ? styletron...
true
Other
vercel
next.js
01da6f47614041cac56587078bfc19d7cc28c238.json
Add styletron example (#486) * add styletron example * example: fix link * example: improve README * Added styletron example reference to readme and merge with master
examples/with-styletron/pages/index.js
@@ -0,0 +1,13 @@ +import { styled } from 'styletron-react' +import Page from '../layout' + +const Title = styled('div', { + color: 'red', + fontSize: '50px' +}) + +export default () => ( + <Page> + <Title>My page</Title> + </Page> +)
true
Other
vercel
next.js
01da6f47614041cac56587078bfc19d7cc28c238.json
Add styletron example (#486) * add styletron example * example: fix link * example: improve README * Added styletron example reference to readme and merge with master
examples/with-styletron/styletron.js
@@ -0,0 +1,23 @@ + +const isServer = typeof window === 'undefined' + +let styletron + +export default function getStyletron () { + if (isServer) { + const Styletron = require('styletron-server') + styletron = new Styletron() + } else if (!styletron) { + const Styletron = require('styletron-client') + cons...
true
Other
vercel
next.js
414a22d38eeee5ffee941a85b4257537d668aab4.json
examples: fix README titles
examples/nested-components/README.md
@@ -1,5 +1,5 @@ -# Redux example +# Example app using nested components ## How to use
true
Other
vercel
next.js
414a22d38eeee5ffee941a85b4257537d668aab4.json
examples: fix README titles
examples/with-styled-components/README.md
@@ -1,5 +1,5 @@ -# Redux example +# Example app with styled-components ## How to use
true
Other
vercel
next.js
aa7fccbbc4768a7971ad265f67a2f885e9c2a317.json
Fix incorrect babal alias for next/router. (#480)
server/build/babel/preset.js
@@ -25,7 +25,7 @@ module.exports = { 'next/css': require.resolve('../../../lib/css'), 'next/head': require.resolve('../../../lib/head'), 'next/document': require.resolve('../../../server/document'), - 'next/router': require.resolve('../../../server/router'), + 'next/ro...
false
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/basic-css/README.md
@@ -13,7 +13,7 @@ cd basic-css or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/basic-css ```
true
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/custom-server-express/README.md
@@ -13,7 +13,7 @@ cd custom-server-express or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/custom-server-express ```
true
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/custom-server/README.md
@@ -13,7 +13,7 @@ cd custom-server or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/custom-server ```
true
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/head-elements/README.md
@@ -13,7 +13,7 @@ cd head-elements or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/head-elements ```
true
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/hello-world/README.md
@@ -13,7 +13,7 @@ cd hello-world or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/hello-world ```
true
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/nested-components/README.md
@@ -13,7 +13,7 @@ cd nested-components or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/nested-components ```
true
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/parameterized-routing/README.md
@@ -13,7 +13,7 @@ cd parametrized-routing or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/parametrized-routing ```
true
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/shared-modules/README.md
@@ -12,7 +12,7 @@ cd shared-modules or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/shared-modules ```
true
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/using-router/README.md
@@ -12,7 +12,7 @@ cd using-router or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/using-router ```
true
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/with-prefetching/README.md
@@ -12,7 +12,7 @@ cd with-prefetching or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/with-prefetching ```
true
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/with-redux/README.md
@@ -13,7 +13,7 @@ cd with-redux or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/with-redux ```
true
Other
vercel
next.js
cae706d7b76f8e13e47854df54c0cf5161f8dc86.json
examples: use HTTPS URL
examples/with-styled-components/README.md
@@ -13,7 +13,7 @@ cd with-styled-components or clone the repo: ```bash -git clone git@github.com:zeit/next.js.git --depth=1 +git clone https://github.com/zeit/next.js.git --depth=1 cd next.js/examples/with-styled-components ```
true
Other
vercel
next.js
aa630279e672c882e3c74acd1cd7e56c63536722.json
examples: simplify download instruction
examples/basic-css/README.md
@@ -6,8 +6,8 @@ Download the example: ```bash -curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz next.js-master/examples/basic-css -cd next.js-master/examples/basic-css +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/basic-css +cd basic-cs...
true
Other
vercel
next.js
aa630279e672c882e3c74acd1cd7e56c63536722.json
examples: simplify download instruction
examples/custom-server-express/README.md
@@ -6,8 +6,8 @@ Download the example: ```bash -curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz next.js-master/examples/custom-server-express -cd next.js-master/examples/custom-server-express +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/example...
true
Other
vercel
next.js
aa630279e672c882e3c74acd1cd7e56c63536722.json
examples: simplify download instruction
examples/custom-server/README.md
@@ -6,8 +6,8 @@ Download the example: ```bash -curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz next.js-master/examples/custom-server -cd next.js-master/examples/custom-server +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/custom-server ...
true
Other
vercel
next.js
aa630279e672c882e3c74acd1cd7e56c63536722.json
examples: simplify download instruction
examples/head-elements/README.md
@@ -6,8 +6,8 @@ Download the example: ```bash -curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz next.js-master/examples/head-elements -cd next.js-master/examples/head-elements +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/head-elements ...
true
Other
vercel
next.js
aa630279e672c882e3c74acd1cd7e56c63536722.json
examples: simplify download instruction
examples/hello-world/README.md
@@ -6,8 +6,8 @@ Download the example: ```bash -curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz next.js-master/examples/hello-world -cd next.js-master/examples/hello-world +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/hello-world +cd he...
true
Other
vercel
next.js
aa630279e672c882e3c74acd1cd7e56c63536722.json
examples: simplify download instruction
examples/nested-components/README.md
@@ -6,8 +6,8 @@ Download the example: ```bash -curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz next.js-master/examples/nested-components -cd next.js-master/examples/nested-components +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/nested...
true
Other
vercel
next.js
aa630279e672c882e3c74acd1cd7e56c63536722.json
examples: simplify download instruction
examples/parameterized-routing/README.md
@@ -6,8 +6,8 @@ Download the example: ```bash -curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz next.js-master/examples/parametrized-routing -cd next.js-master/examples/parametrized-routing +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/...
true
Other
vercel
next.js
aa630279e672c882e3c74acd1cd7e56c63536722.json
examples: simplify download instruction
examples/shared-modules/README.md
@@ -5,8 +5,8 @@ Download the example: ```bash -curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz next.js-master/examples/shared-modules -cd next.js-master/examples/shared-modules +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/shared-modul...
true
Other
vercel
next.js
aa630279e672c882e3c74acd1cd7e56c63536722.json
examples: simplify download instruction
examples/using-router/README.md
@@ -5,8 +5,8 @@ Download the example: ```bash -curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz next.js-master/examples/using-router -cd next.js-master/examples/using-router +curl https://codeload.github.com/zeit/next.js/tar.gz/master | tar -xz --strip=2 next.js-master/examples/using-router +cd...
true