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 | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | examples/with-apollo-and-redux-saga/components/PageCount.js | @@ -1,3 +1,4 @@
+/* eslint-disable */
import React, { Component } from 'react'
import { connect } from 'react-redux'
| true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | examples/with-fela/FelaProvider.js | @@ -1,3 +1,4 @@
+/* eslint-disable */
import { Component } from 'react'
import PropTypes from 'prop-types'
| true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | examples/with-redux-wrapper/components/AddCount.js | @@ -1,3 +1,4 @@
+/* eslint-disable */
import React, {Component} from 'react'
import { connect } from 'react-redux'
import { bindActionCreators } from 'redux' | true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | package.json | @@ -1,6 +1,6 @@
{
"name": "next",
- "version": "6.0.0-canary.2",
+ "version": "5.0.1-canary.17",
"description": "Minimalistic framework for server-rendered React applications",
"main": "./dist/server/next.js",
"license": "MIT",
@@ -52,22 +52,23 @@
"bin/*": "standard"
},
"dependencies": {
+ ... | true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | server/build/babel/find-config.js | @@ -1,16 +0,0 @@
-import { join } from 'path'
-import buildConfigChain from 'babel-core/lib/transformation/file/options/build-config-chain'
-
-export default function findBabelConfig (dir) {
- // We need to provide a location of a filename inside the `dir`.
- // For the name of the file, we could be provide anything.... | true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | server/build/babel/plugins/handle-import.js | @@ -1,7 +1,7 @@
// Based on https://github.com/airbnb/babel-plugin-dynamic-import-webpack
// We've added support for SSR with this version
-import template from 'babel-template'
-import syntax from 'babel-plugin-syntax-dynamic-import'
+import template from '@babel/template'
+import syntax from '@babel/plugin-syntax-d... | true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | server/build/babel/preset.js | @@ -25,34 +25,34 @@ function styledJsxOptions (opts) {
const envPlugins = {
'development': [
- require.resolve('babel-plugin-transform-react-jsx-source')
+ require('@babel/plugin-transform-react-jsx-source')
],
'production': [
- require.resolve('babel-plugin-transform-react-remove-prop-types')
+ ... | true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | server/build/webpack.js | @@ -5,13 +5,16 @@ import UglifyJSPlugin from 'uglifyjs-webpack-plugin'
import CaseSensitivePathPlugin from 'case-sensitive-paths-webpack-plugin'
import WriteFilePlugin from 'write-file-webpack-plugin'
import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin'
+import {loadPartialConfig, createConfigIte... | true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | server/document.js | @@ -1,3 +1,4 @@
+/* eslint-disable */
import React, { Component } from 'react'
import PropTypes from 'prop-types'
import htmlescape from 'htmlescape' | true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | test/integration/basic/pages/fragment-syntax.js | @@ -0,0 +1,4 @@
+/* eslint-disable */
+import React from 'react'
+
+export default () => <>My component!</>
\ No newline at end of file | true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | test/integration/basic/test/index.test.js | @@ -36,6 +36,7 @@ describe('Basic Features', () => {
renderViaHTTP(context.appPort, '/link'),
renderViaHTTP(context.appPort, '/stateful'),
renderViaHTTP(context.appPort, '/stateless'),
+ renderViaHTTP(context.appPort, '/fragment-syntax'),
renderViaHTTP(context.appPort, '/custom-extensio... | true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | test/integration/basic/test/rendering.js | @@ -15,6 +15,11 @@ export default function ({ app }, suiteName, render, fetch) {
expect(html.includes('My component!')).toBeTruthy()
})
+ test('renders with fragment syntax', async () => {
+ const html = await render('/fragment-syntax')
+ expect(html.includes('My component!')).toBeTruthy()
+ ... | true |
Other | vercel | next.js | 2d8c19a450b21df4e9f6ab8fe61c2272a0b9ac9f.json | Upgrade Babel 6 to Babel 7 (major) (#4050)
Upgrade Babel 6 to Babel 7 (major) | yarn.lock | @@ -2,12 +2,58 @@
# yarn lockfile v1
-"@babel/code-frame@7.0.0-beta.42", "@babel/code-frame@^7.0.0-beta.40":
+"@babel/code-frame@7.0.0-beta.42":
version "7.0.0-beta.42"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.0.0-beta.42.tgz#a9c83233fa7cd06b39dc77adbb908616ff4f1962"
depende... | true |
Other | vercel | next.js | 0b9b902a89e0afbd167226c71ad31677dbea914b.json | Get pages before entry function (#4089) | server/build/webpack.js | @@ -105,7 +105,15 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer
.split(process.platform === 'win32' ? ';' : ':')
.filter((p) => !!p)
- let totalPages
+ const pagesEntries = await getPages(dir, {dev, isServer, pageExtensions: config.pageExtensions.join('|')})
+ const t... | false |
Other | vercel | next.js | 7e67152232f30d7c7ef8b178e60a36f54f3d594e.json | clarify .next in .gitignore text (#4087) | readme.md | @@ -1241,7 +1241,7 @@ Next.js can be deployed to other hosting solutions too. Please have a look at th
Note: `NODE_ENV` is properly configured by the `next` subcommands, if absent, to maximize performance. if you’re using Next.js [programmatically](#custom-server-and-routing), it’s your responsibility to set `NODE_E... | false |
Other | vercel | next.js | 812db745f8bbd371977b0f33991d9eaec2455538.json | Use printAndExit with error (#4086) | bin/next-build | @@ -44,6 +44,5 @@ if (!existsSync(join(dir, 'pages'))) {
build(dir)
.catch((err) => {
- console.error(err)
- process.exit(1)
+ printAndExit(err)
}) | false |
Other | vercel | next.js | 56998a6193049b99cee84e2db0fb3356a59423fd.json | Remove mz-fs and glob-promise (#4026)
* Remove mz and add promisify util
* Remove glob-promise and promisify glob
* Use access instead of exists
* Use promisify for access | package.json | @@ -77,15 +77,13 @@
"fresh": "0.5.2",
"friendly-errors-webpack-plugin": "1.6.1",
"glob": "7.1.2",
- "glob-promise": "3.3.0",
"hoist-non-react-statics": "2.3.1",
"htmlescape": "1.1.1",
"http-errors": "1.6.2",
"http-status": "1.0.1",
"loader-utils": "1.1.0",
"minimist": "1.... | true |
Other | vercel | next.js | 56998a6193049b99cee84e2db0fb3356a59423fd.json | Remove mz-fs and glob-promise (#4026)
* Remove mz and add promisify util
* Remove glob-promise and promisify glob
* Use access instead of exists
* Use promisify for access | server/build/index.js | @@ -1,17 +1,21 @@
import { join } from 'path'
-import fs from 'mz/fs'
+import promisify from '../lib/promisify'
+import fs from 'fs'
import uuid from 'uuid'
import webpack from 'webpack'
import getConfig from '../config'
import {PHASE_PRODUCTION_BUILD} from '../../lib/constants'
import getBaseWebpackConfig from '... | true |
Other | vercel | next.js | 56998a6193049b99cee84e2db0fb3356a59423fd.json | Remove mz-fs and glob-promise (#4026)
* Remove mz and add promisify util
* Remove glob-promise and promisify glob
* Use access instead of exists
* Use promisify for access | server/build/plugins/unlink-file-plugin.js | @@ -1,7 +1,10 @@
import { join } from 'path'
-import { unlink } from 'mz/fs'
+import promisify from '../../lib/promisify'
+import fs from 'fs'
import { IS_BUNDLED_PAGE } from '../../utils'
+const unlink = promisify(fs.unlink)
+
export default class UnlinkFilePlugin {
constructor () {
this.prevAssets = {} | true |
Other | vercel | next.js | 56998a6193049b99cee84e2db0fb3356a59423fd.json | Remove mz-fs and glob-promise (#4026)
* Remove mz and add promisify util
* Remove glob-promise and promisify glob
* Use access instead of exists
* Use promisify for access | server/build/webpack/utils.js | @@ -1,5 +1,8 @@
import path from 'path'
-import glob from 'glob-promise'
+import promisify from '../../lib/promisify'
+import globModule from 'glob'
+
+const glob = promisify(globModule)
const nextPagesDir = path.join(__dirname, '..', '..', '..', 'pages')
| true |
Other | vercel | next.js | 56998a6193049b99cee84e2db0fb3356a59423fd.json | Remove mz-fs and glob-promise (#4026)
* Remove mz and add promisify util
* Remove glob-promise and promisify glob
* Use access instead of exists
* Use promisify for access | server/index.js | @@ -4,9 +4,9 @@ import { resolve, join, sep } from 'path'
import { parse as parseUrl } from 'url'
import { parse as parseQs } from 'querystring'
import fs from 'fs'
-import fsAsync from 'mz/fs'
import http, { STATUS_CODES } from 'http'
import updateNotifier from '@zeit/check-updates'
+import promisify from './lib/... | true |
Other | vercel | next.js | 56998a6193049b99cee84e2db0fb3356a59423fd.json | Remove mz-fs and glob-promise (#4026)
* Remove mz and add promisify util
* Remove glob-promise and promisify glob
* Use access instead of exists
* Use promisify for access | server/lib/promisify.js | @@ -0,0 +1,26 @@
+const kCustomPromisifyArgsSymbol = Symbol('customPromisifyArgs')
+module.exports = function promisify (original) {
+ // Names to create an object from in case the callback receives multiple
+ // arguments, e.g. ['stdout', 'stderr'] for child_process.exec.
+ const argumentNames = original[kCustomPro... | true |
Other | vercel | next.js | 56998a6193049b99cee84e2db0fb3356a59423fd.json | Remove mz-fs and glob-promise (#4026)
* Remove mz and add promisify util
* Remove glob-promise and promisify glob
* Use access instead of exists
* Use promisify for access | server/on-demand-entry-handler.js | @@ -3,7 +3,8 @@ import { EventEmitter } from 'events'
import { join } from 'path'
import { parse } from 'url'
import touch from 'touch'
-import glob from 'glob-promise'
+import promisify from './lib/promisify'
+import globModule from 'glob'
import {normalizePagePath, pageNotFoundError} from './require'
import {cre... | true |
Other | vercel | next.js | 3949c82bdfe268f841178979800aa8e71bbf412c.json | Add missing url prop (#4078)
This was causing react-apollo to crash on any SSR page that needed the page's query to make the GraphQL queries.
It's magically passed on the client, but we have to manually pass it to the composed component here | examples/with-apollo/lib/withData.js | @@ -32,9 +32,16 @@ export default ComposedComponent => {
// and extract the resulting data
const apollo = initApollo()
try {
+ // create the url prop which is passed to every page
+ const url = {
+ query: ctx.query,
+ asPath: ctx.asPath,
+ pathname: ctx.path... | false |
Other | vercel | next.js | c957c9d1a0843a52a1cbc4b04c65b5dcd99c964b.json | ADD user to docker-compose (#6085) | examples/with-firebase-hosting-and-docker/docker-compose.deploy.yml | @@ -1,6 +1,7 @@
version: '3.5'
services:
server:
+ user: 1000:1000
volumes:
- .:/app
command: sh -c "yarn --production=false && yarn clean && yarn deploy --project "$FB_PROJECTID"" | true |
Other | vercel | next.js | c957c9d1a0843a52a1cbc4b04c65b5dcd99c964b.json | ADD user to docker-compose (#6085) | examples/with-firebase-hosting-and-docker/docker-compose.dev.yml | @@ -1,6 +1,7 @@
version: '3.5'
services:
server:
+ user: 1000:1000
volumes:
- .:/app
command: sh -c "yarn --production=false && yarn dev" | true |
Other | vercel | next.js | c957c9d1a0843a52a1cbc4b04c65b5dcd99c964b.json | ADD user to docker-compose (#6085) | examples/with-firebase-hosting-and-docker/docker-compose.serve.yml | @@ -1,6 +1,7 @@
version: '3.5'
services:
server:
+ user: 1000:1000
volumes:
- .:/app
command: sh -c 'yarn --production=false && yarn clean && yarn build-app && yarn serve --project "$FB_PROJECTID"' | true |
Other | vercel | next.js | f960091997c604b7e26add78c683fa7cf9ea9104.json | Improve Serverless section in a minor way (#6081)
I just added a paragraph and some links to the serverless section. | packages/next/README.md | @@ -1593,23 +1593,26 @@ Note: we recommend putting `.next`, or your [custom dist folder](https://github.
<details>
<summary><b>Examples</b></summary>
<ul>
- <li><a href="https://github.com/zeit/now-examples/tree/master/nextjs">Now.sh</a></li>
+ <li><a href="https://github.com/zeit/now-examples/tree/master/... | false |
Other | vercel | next.js | bfbc23d71076c17fe083f8820cdc150afe2f241b.json | 📝️ README: Serverless Bullet Point (#6078)
Adds a Bullet Point under "Production deployment"
for the Table of Contens / Link Section.
Wanted to add this as a comment in #6070.
Great work as always! | packages/next/README.md | @@ -69,6 +69,7 @@
- [Starting the server on alternative hostname](#starting-the-server-on-alternative-hostname)
- [CDN support with Asset Prefix](#cdn-support-with-asset-prefix)
- [Production deployment](#production-deployment)
+ - [Serverless deployment](#serverless-deployment)
- [Static HTML export](#static-... | false |
Other | vercel | next.js | c46cd3c5bf919222ab946b5d366d60643ed8aa31.json | Add docs for Serverless target (#6070)
I need feedback on if this is clear enough for users. | packages/next/README.md | @@ -1587,6 +1587,66 @@ Note: `NODE_ENV` is properly configured by the `next` subcommands, if absent, to
Note: we recommend putting `.next`, or your [custom dist folder](https://github.com/zeit/next.js#custom-configuration), in `.gitignore` or `.npmignore`. Otherwise, use `files` or `now.files` to opt-into a whitelis... | false |
Other | vercel | next.js | aa474017d72279dd242f3986a33082a6e5f2a816.json | Add iOS 10 support for TerserPlugin (#6067)
Resolves #5630 | packages/next/build/webpack-config.js | @@ -124,7 +124,11 @@ function optimizationConfig ({ dev, isServer, totalPages, target }) {
// Terser is a better uglifier
config.minimizer = [
- new TerserPlugin(terserPluginConfig)
+ new TerserPlugin({...terserPluginConfig,
+ terserOptions: {
+ safari10: true
+ }
+ })
]
// Onl... | false |
Other | vercel | next.js | 4939583c657f09a3fe871ee00b3cbd70c6959a3e.json | Move @types to devDependencies | packages/next/package.json | @@ -48,9 +48,6 @@
"@babel/runtime": "7.1.2",
"@babel/runtime-corejs2": "7.1.2",
"@babel/template": "7.1.2",
- "@types/loader-utils": "1.1.3",
- "@types/node-fetch": "2.1.4",
- "@types/rimraf": "2.0.2",
"ansi-html": "0.0.7",
"arg": "3.0.0",
"async-sema": "^2.1.4",
@@ -99,6 +96,9 @@... | false |
Other | vercel | next.js | f9efe05d4b2a016e96b48596989ff4d8cbf1095a.json | Add new limit for size | test/integration/size-limit/test/index.test.js | @@ -66,6 +66,6 @@ describe('Production response size', () => {
console.log(`Response Sizes:\n${responseSizes.map(obj => ` ${obj.url}: ${obj.bytes} (bytes)`).join('\n')} \nOverall: ${responseSizeKilobytes} KB`)
// These numbers are without gzip compression!
- expect(responseSizeKilobytes).toBeLessThanOrEq... | false |
Other | vercel | next.js | 68ceef68e1177dc0d26177aafeca6e11370b66d9.json | Add multiple Editors example (#6031) | examples/with-slate/CustomKeygenEditor/index.js | @@ -0,0 +1,22 @@
+import React from 'react'
+import Plain from 'slate-plain-serializer'
+import { KeyUtils } from 'slate'
+import { Editor } from 'slate-react'
+
+class CustomKeygenEditor extends React.Component {
+ constructor (props) {
+ super(props)
+ let key = 0
+ const keygen = () => {
+ key += 1
+ ... | true |
Other | vercel | next.js | 68ceef68e1177dc0d26177aafeca6e11370b66d9.json | Add multiple Editors example (#6031) | examples/with-slate/pages/index.js | @@ -1,4 +1,5 @@
import React from 'react'
+import Link from 'next/link'
import Plain from 'slate-plain-serializer'
import { Editor } from 'slate-react'
import { KeyUtils } from 'slate'
@@ -21,11 +22,16 @@ class Index extends React.Component {
render () {
return (
- <Editor
- placeholder='Enter... | true |
Other | vercel | next.js | 68ceef68e1177dc0d26177aafeca6e11370b66d9.json | Add multiple Editors example (#6031) | examples/with-slate/pages/multiple.js | @@ -0,0 +1,25 @@
+import React from 'react'
+import Link from 'next/link'
+import CustomKeygenEditor from './CustomKeygenEditor'
+
+const content = {
+ 'first-editor': 'This example shows how to have multiple instances of the editor.',
+ 'second-editor': 'Without a custom key generator, you could not focus here.'
+}
... | true |
Other | vercel | next.js | 3299db97581cfe6c24aab10c17078608fa107b08.json | Remove router property from _app docs
It’s an inconsistent result, users should use ctx instead. At a later time we’ll normalize the properties passed into _app.js its getInitialprops to be consistent with pages. | packages/next/README.md | @@ -1052,7 +1052,7 @@ import React from 'react'
import App, { Container } from 'next/app'
export default class MyApp extends App {
- static async getInitialProps({ Component, router, ctx }) {
+ static async getInitialProps({ Component, ctx }) {
let pageProps = {}
if (Component.getInitialProps) { | false |
Other | vercel | next.js | 3c4e690d1f136a288f0a6f4b43300a9415d08daf.json | Add displayName to error page (#6029)
Fixes #6026 | packages/next/pages/_error.js | @@ -4,6 +4,8 @@ import HTTPStatus from 'http-status'
import Head from 'next-server/head'
export default class Error extends React.Component {
+ static displayName = 'ErrorPage'
+
static getInitialProps ({ res, err }) {
const statusCode = res ? res.statusCode : (err ? err.statusCode : null)
return { st... | false |
Other | vercel | next.js | eb24e6ffc61d53e3ad98134d8b1d45e2f8700acc.json | Add an example with graphql-react (#5984)
Adds an example with [`graphql-react`](https://github.com/jaydenseric/graphql-react), using [`next-graphql-react`](https://github.com/jaydenseric/next-graphql-react).
[`graphql-react`](https://github.com/jaydenseric/graphql-react) is a lightweight but powerful [GraphQL](htt... | examples/with-graphql-react/README.md | @@ -0,0 +1,38 @@
+# Next.js example with [`graphql-react`](https://github.com/jaydenseric/graphql-react)
+
+[`graphql-react`](https://github.com/jaydenseric/graphql-react) is a lightweight but powerful [GraphQL](https://graphql.org) client for React; the first [Relay](https://facebook.github.io/relay) and [Apollo](http... | true |
Other | vercel | next.js | eb24e6ffc61d53e3ad98134d8b1d45e2f8700acc.json | Add an example with graphql-react (#5984)
Adds an example with [`graphql-react`](https://github.com/jaydenseric/graphql-react), using [`next-graphql-react`](https://github.com/jaydenseric/next-graphql-react).
[`graphql-react`](https://github.com/jaydenseric/graphql-react) is a lightweight but powerful [GraphQL](htt... | examples/with-graphql-react/package.json | @@ -0,0 +1,18 @@
+{
+ "name": "next-graphql-react-example",
+ "private": true,
+ "license": "ISC",
+ "dependencies": {
+ "cross-fetch": "^3.0.0",
+ "graphql-react": "^6.0.0",
+ "next": "^7.0.0",
+ "next-graphql-react": "^1.0.1",
+ "react": "^16.6.0",
+ "react-dom": "^16.6.0"
+ },
+ "scripts": {
... | true |
Other | vercel | next.js | eb24e6ffc61d53e3ad98134d8b1d45e2f8700acc.json | Add an example with graphql-react (#5984)
Adds an example with [`graphql-react`](https://github.com/jaydenseric/graphql-react), using [`next-graphql-react`](https://github.com/jaydenseric/next-graphql-react).
[`graphql-react`](https://github.com/jaydenseric/graphql-react) is a lightweight but powerful [GraphQL](htt... | examples/with-graphql-react/pages/_app.js | @@ -0,0 +1,19 @@
+import 'cross-fetch/polyfill'
+import { Provider } from 'graphql-react'
+import { withGraphQL } from 'next-graphql-react'
+import App, { Container } from 'next/app'
+
+class CustomApp extends App {
+ render () {
+ const { Component, pageProps, graphql } = this.props
+ return (
+ <Container... | true |
Other | vercel | next.js | eb24e6ffc61d53e3ad98134d8b1d45e2f8700acc.json | Add an example with graphql-react (#5984)
Adds an example with [`graphql-react`](https://github.com/jaydenseric/graphql-react), using [`next-graphql-react`](https://github.com/jaydenseric/next-graphql-react).
[`graphql-react`](https://github.com/jaydenseric/graphql-react) is a lightweight but powerful [GraphQL](htt... | examples/with-graphql-react/pages/index.js | @@ -0,0 +1,31 @@
+import { Query } from 'graphql-react'
+
+export default () => (
+ <Query
+ loadOnMount
+ loadOnReset
+ fetchOptionsOverride={options => {
+ options.url = 'https://graphql-pokemon.now.sh'
+ }}
+ operation={{
+ query: /* GraphQL */ `
+ {
+ pokemon(name: "Pikachu... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/build/entries.ts | @@ -0,0 +1,67 @@
+import {join} from 'path'
+import {stringify} from 'querystring'
+import {PAGES_DIR_ALIAS, DOT_NEXT_ALIAS} from '../lib/constants'
+import {ServerlessLoaderQuery} from './webpack/loaders/next-serverless-loader'
+
+type PagesMapping = {
+ [page: string]: string
+}
+
+export function createPagesMapping... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/build/index.ts | @@ -9,8 +9,7 @@ import {isWriteable} from './is-writeable'
import {runCompiler, CompilerResult} from './compiler'
import globModule from 'glob'
import {promisify} from 'util'
-import {stringify} from 'querystring'
-import {ServerlessLoaderQuery} from './webpack/loaders/next-serverless-loader'
+import {createPagesMap... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/build/webpack-config.js | @@ -4,8 +4,6 @@ import resolve from 'resolve'
import CaseSensitivePathPlugin from 'case-sensitive-paths-webpack-plugin'
import FriendlyErrorsWebpackPlugin from 'friendly-errors-webpack-plugin'
import WebpackBar from 'webpackbar'
-import {getPages} from './webpack/utils'
-import PagesPlugin from './webpack/plugins/pa... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/build/webpack/loaders/hot-self-accept-loader.js | @@ -1,50 +0,0 @@
-import { relative } from 'path'
-import loaderUtils from 'loader-utils'
-
-module.exports = function (content, sourceMap) {
- this.cacheable()
-
- const options = loaderUtils.getOptions(this)
- if (!options.extensions) {
- throw new Error('extensions is not provided to hot-self-accept-loader. Pl... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/build/webpack/loaders/next-client-pages-loader.ts | @@ -0,0 +1,29 @@
+import {loader} from 'webpack'
+import loaderUtils from 'loader-utils'
+
+export type ClientPagesLoaderOptions = {
+ absolutePagePath: string,
+ page: string
+}
+
+const nextClientPagesLoader: loader.Loader = function () {
+ const {absolutePagePath, page}: any = loaderUtils.getOptions(this)
+ cons... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/build/webpack/loaders/noop-loader.js | @@ -0,0 +1 @@
+module.exports = (source) => source | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/build/webpack/plugins/pages-plugin.js | @@ -1,53 +0,0 @@
-import { ConcatSource } from 'webpack-sources'
-import {
- IS_BUNDLED_PAGE_REGEX,
- ROUTE_NAME_REGEX
-} from 'next-server/constants'
-
-export default class PagesPlugin {
- apply (compiler) {
- compiler.hooks.compilation.tap('PagesPlugin', (compilation) => {
- // This hook is triggered righ... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/build/webpack/utils.js | @@ -1,80 +0,0 @@
-import path from 'path'
-import promisify from '../../lib/promisify'
-import globModule from 'glob'
-import {CLIENT_STATIC_FILES_PATH} from 'next-server/constants'
-
-const glob = promisify(globModule)
-
-export async function getPages (dir, {nextPagesDir, dev, buildId, isServer, pageExtensions}) {
- ... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/client/webpack-hot-middleware-client.js | @@ -1,65 +1,5 @@
import 'event-source-polyfill'
import connect from './dev-error-overlay/hot-dev-client'
-import Router from 'next/router'
-
-const handlers = {
- reload (route) {
- // If the App component changes we have to reload the current route, this is handled by hot-self-accept-loader
- // So we just re... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/lib/constants.js | @@ -5,3 +5,8 @@ export const NEXT_PROJECT_ROOT_NODE_MODULES = join(NEXT_PROJECT_ROOT, 'node_modu
export const DEFAULT_PAGES_DIR = join(NEXT_PROJECT_ROOT_DIST, 'pages')
export const NEXT_PROJECT_ROOT_DIST_CLIENT = join(NEXT_PROJECT_ROOT_DIST, 'client')
export const NEXT_PROJECT_ROOT_DIST_SERVER = join(NEXT_PROJECT_RO... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/package.json | @@ -48,6 +48,7 @@
"@babel/runtime": "7.1.2",
"@babel/runtime-corejs2": "7.1.2",
"@babel/template": "7.1.2",
+ "@types/loader-utils": "1.1.3",
"@types/node-fetch": "2.1.4",
"@types/rimraf": "2.0.2",
"ansi-html": "0.0.7", | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/server/hot-reloader.js | @@ -1,4 +1,4 @@
-import { join, relative, sep, normalize } from 'path'
+import { join, normalize } from 'path'
import WebpackDevMiddleware from 'webpack-dev-middleware'
import WebpackHotMiddleware from 'webpack-hot-middleware'
import errorOverlayMiddleware from './lib/error-overlay-middleware'
@@ -7,8 +7,13 @@ impor... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | packages/next/server/on-demand-entry-handler.js | @@ -6,8 +6,8 @@ import promisify from '../lib/promisify'
import globModule from 'glob'
import {pageNotFoundError} from 'next-server/dist/server/require'
import {normalizePagePath} from 'next-server/dist/server/normalize-page-path'
-import {createEntry} from '../build/webpack/utils'
import { ROUTE_NAME_REGEX, IS_BUN... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | test/integration/basic/test/error-recovery.js | @@ -3,7 +3,7 @@ import webdriver from 'next-webdriver'
import { join } from 'path'
import { check, File, waitFor, getReactErrorOverlayContent, getBrowserBodyText } from 'next-test-utils'
-export default (context) => {
+export default (context, renderViaHTTP) => {
describe('Error Recovery', () => {
it('shoul... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | test/isolated/webpack-utils.test.js | @@ -1,90 +0,0 @@
-/* eslint-env jest */
-
-import {normalize, join} from 'path'
-import {getPageEntries, createEntry} from 'next/dist/build/webpack/utils'
-
-const buildId = 'development'
-
-describe('createEntry', () => {
- it('Should turn a path into a page entry', () => {
- const entry = createEntry('pages/index... | true |
Other | vercel | next.js | 9ffd23eeef56402b69a76d8b05ecb224e89b9983.json | Replace pages-plugin with loader (#5994)
* Remove unused argument
* Replace pages-plugin with loader
* Add loader-utils types
* Remove logs
* Bring back previous deposal behavior
* Remove console.log
* Remove webpack/utils as it’s no longer in use
* Remove hot-self-accept-loader
* Error Recover... | yarn.lock | @@ -1411,6 +1411,14 @@
"@types/minimatch" "*"
"@types/node" "*"
+"@types/loader-utils@1.1.3":
+ version "1.1.3"
+ resolved "https://registry.yarnpkg.com/@types/loader-utils/-/loader-utils-1.1.3.tgz#82b9163f2ead596c68a8c03e450fbd6e089df401"
+ integrity sha512-euKGFr2oCB3ASBwG39CYJMR3N9T0nanVqXdiH7Zu/Nqddt... | true |
Other | vercel | next.js | ba95f7541ce2d0377639dd24dd594d7b86da969d.json | Improve assets size (#5999)
It looks like :
```
Pages sizes after gzip:
┌ / (196 B)
├ /_app (11.5 kB)
├ /_error (4.44 kB)
├ /blog (196 B)
└ /blog/page (195 B)
```
(style inspired from now-cli : https://github.com/zeit/now-cli/blob/canary/src/util/output/builds.js)
I'll add dynamic chunks in a separat... | packages/next/build/webpack-config.js | @@ -312,7 +312,7 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer
!isServer && new PagesPlugin(),
isServer && new NextJsSsrImportPlugin(),
target !== 'serverless' && isServer && new NextJsSSRModuleCachePlugin({outputPath}),
- !isServer && !dev && new AssetsSiz... | true |
Other | vercel | next.js | ba95f7541ce2d0377639dd24dd594d7b86da969d.json | Improve assets size (#5999)
It looks like :
```
Pages sizes after gzip:
┌ / (196 B)
├ /_app (11.5 kB)
├ /_error (4.44 kB)
├ /blog (196 B)
└ /blog/page (195 B)
```
(style inspired from now-cli : https://github.com/zeit/now-cli/blob/canary/src/util/output/builds.js)
I'll add dynamic chunks in a separat... | packages/next/build/webpack/plugins/assets-size-plugin.ts | @@ -13,20 +13,17 @@ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLI
import { gzip as _gzip } from 'zlib'
import { relative as pathRelative } from 'path'
+import { Compiler } from 'webpack'
import promisify from '../../../lib/promisify'
-import {
- IS_BUNDLED_PAGE_REGEX,
- BUILD_M... | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/custom-server-polka/package.json | @@ -9,7 +9,7 @@
"dependencies": {
"next": "latest",
"polka": "0.5.1",
- "react": "16.2.0",
- "react-dom": "16.2.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
}
} | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-apollo/package.json | @@ -12,9 +12,9 @@
"isomorphic-unfetch": "^3.0.0",
"next": "latest",
"prop-types": "^15.6.2",
- "react": "^16.5.2",
+ "react": "^16.7.0",
"react-apollo": "^2.1.11",
- "react-dom": "^16.5.2"
+ "react-dom": "^16.7.0"
},
"author": "",
"license": "ISC" | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-cerebral/package.json | @@ -14,7 +14,7 @@
"@cerebral/react": "^2.1.0",
"cerebral": "^3.1.0",
"next": "latest",
- "react": "16.2.0",
- "react-dom": "16.2.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
}
} | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-custom-reverse-proxy/package.json | @@ -4,8 +4,8 @@
"dependencies": {
"express": "^4.15.3",
"next": "latest",
- "react": "16.2.0",
- "react-dom": "16.2.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
},
"devDependencies": {
"cross-env": "^5.0.1", | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-draft-js/package.json | @@ -11,7 +11,7 @@
"dependencies": {
"draft-js": "0.10.5",
"next": "5.0.0",
- "react": "16.2.0",
- "react-dom": "16.2.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
}
} | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-glamorous/package.json | @@ -10,8 +10,8 @@
"glamor": "^2.20.24",
"glamorous": "^4.11.0",
"next": "latest",
- "react": "16.2.0",
- "react-dom": "16.2.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
},
"license": "ISC"
} | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-hashed-statics/package.json | @@ -7,8 +7,8 @@
"dependencies": {
"babel-plugin-transform-assets": "^0.2.0",
"next": "latest",
- "react": "16.2.0",
- "react-dom": "16.2.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
},
"devDependencies": {
"file-loader": "2.0.0" | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-higher-order-component/package.json | @@ -10,8 +10,8 @@
"accepts": "1.3.4",
"lodash.flowright": "3.5.0",
"next": "latest",
- "react": "16.2.0",
- "react-dom": "16.2.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
},
"license": "ISC"
} | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-jest/package.json | @@ -3,8 +3,8 @@
"version": "1.0.0",
"dependencies": {
"next": "latest",
- "react": "^16.5.0",
- "react-dom": "^16.5.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
},
"devDependencies": {
"@babel/core": "^7.1.2", | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-next-css/package.json | @@ -10,7 +10,7 @@
"dependencies": {
"@zeit/next-css": "^1.0.1",
"next": "latest",
- "react": "16.4.2",
- "react-dom": "16.4.2"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
}
} | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-pkg/package.json | @@ -14,8 +14,8 @@
},
"dependencies": {
"next": "latest",
- "react": "16.2.0",
- "react-dom": "16.2.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
},
"devDependencies": {
"pkg": "^4.2.2" | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-styled-jsx-plugins/package.json | @@ -10,8 +10,8 @@
"lost": "8.2.0",
"next": "latest",
"postcss-nested": "2.1.2",
- "react": "16.0.0",
- "react-dom": "16.0.0",
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0",
"styled-jsx-plugin-postcss": "0.1.0"
},
"license": "ISC", | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-styled-jsx-scss/package.json | @@ -9,8 +9,8 @@
"dependencies": {
"next": "latest",
"node-sass": "4.5.3",
- "react": "16.0.0",
- "react-dom": "16.0.0",
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0",
"styled-jsx-plugin-sass": "0.2.0"
},
"license": "ISC" | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-universal-configuration-runtime/package.json | @@ -6,7 +6,7 @@
},
"dependencies": {
"next": "latest",
- "react": "16.2.0",
- "react-dom": "16.2.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
}
} | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-zones/blog/package.json | @@ -7,8 +7,8 @@
},
"dependencies": {
"next": "latest",
- "react": "^16.0.0",
- "react-dom": "^16.0.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
},
"license": "ISC"
} | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-zones/home/package.json | @@ -7,8 +7,8 @@
},
"dependencies": {
"next": "latest",
- "react": "^16.0.0",
- "react-dom": "^16.0.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
},
"license": "ISC"
} | true |
Other | vercel | next.js | 89a4cabbd6ac20e28f183d522eb705c338f3a796.json | Change React version of examples to latest (#5990)
I changed the version to the following files:
- [x] - examples/with-next-css/package.json
- [x] - examples/with-draft-js/package.json
- [x] - examples/custom-server-polka/package.json
- [x] - examples/with-cerebral/package.json
- [x] - examples/with-zones/packa... | examples/with-zones/package.json | @@ -13,8 +13,8 @@
"dependencies": {
"micro-proxy": "^1.0.0",
"next": "5.0.0-universal-alpha.15",
- "react": "16.2.0",
- "react-dom": "16.2.0"
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0"
},
"license": "ISC"
} | true |
Other | vercel | next.js | f40ed302df99f73a1059929041325e1d9d5e7f2f.json | add README in Chinese (#5046)
* add readme
* 修改中文文档,如中英文空格
* Update README-zh-CN.md
当前翻译版本为 7.0.0-canary.8
* anchor bugfix | README-zh-CN.md | @@ -0,0 +1,1792 @@
+<img width="112" alt="screen shot 2016-10-25 at 2 37 27 pm" src="https://cloud.githubusercontent.com/assets/13041/19686250/971bf7f8-9ac0-11e6-975c-188defd82df1.png">
+
+[](https://www.npmjs.com/package/next)
+[ | packages/next-server/server/render.tsx | @@ -179,7 +179,7 @@ export async function renderToHTML (req: IncomingMessage, res: ServerResponse, p
}
const docProps = await loadGetInitialProps(Document, { ...ctx, renderPage })
- // the response might be finshed on the getInitialProps call
+ // the response might be finished on the getInitialProps call
... | false |
Other | vercel | next.js | c4b9e079bf46b4331623657c50e421287502f36c.json | Add example of getInitialProps to with-reasonml (#5975)
The current reasonml needs an example of how to do getInitialProps. tmepple posted the only known way of doing it in [this comment](https://github.com/zeit/next.js/issues/4202#issuecomment-439175214). It is unlikely reasonml users are going to discover that co... | examples/with-reasonml/.bsb.lock | @@ -0,0 +1 @@
+16836
\ No newline at end of file | true |
Other | vercel | next.js | c4b9e079bf46b4331623657c50e421287502f36c.json | Add example of getInitialProps to with-reasonml (#5975)
The current reasonml needs an example of how to do getInitialProps. tmepple posted the only known way of doing it in [this comment](https://github.com/zeit/next.js/issues/4202#issuecomment-439175214). It is unlikely reasonml users are going to discover that co... | examples/with-reasonml/package.json | @@ -10,12 +10,13 @@
"dependencies": {
"babel-plugin-bucklescript": "^0.5.3",
"next": "latest",
- "react": "^16.4.2",
- "react-dom": "^16.4.2",
+ "react": "^16.7.0",
+ "react-dom": "^16.7.0",
"reason-react": "^0.5.3"
},
"devDependencies": {
- "bs-platform": "^4.0.5",
- "concurre... | true |
Other | vercel | next.js | c4b9e079bf46b4331623657c50e421287502f36c.json | Add example of getInitialProps to with-reasonml (#5975)
The current reasonml needs an example of how to do getInitialProps. tmepple posted the only known way of doing it in [this comment](https://github.com/zeit/next.js/issues/4202#issuecomment-439175214). It is unlikely reasonml users are going to discover that co... | examples/with-reasonml/pages/index.re | @@ -1,13 +1,44 @@
let component = ReasonReact.statelessComponent("Index");
-let make = (_children) => {
+let make = (~onServer, _children) => {
...component,
- render: (_self) =>
+ render: _self =>
<div>
<Header />
- <p> (ReasonReact.string("HOME PAGE is here!")) </p>
+ <p>
+ {Reaso... | true |
Other | vercel | next.js | 9a9e35891161d111f5de5d5adc4c3bad620db07e.json | Use result of getUrl() (#5973)
As getUrl() is already called and passed to initialization: https://github.com/zeit/next.js/blob/canary/packages/next/client/index.js#L46 | packages/next-server/lib/router/router.js | @@ -39,7 +39,7 @@ export default class Router {
if (typeof window !== 'undefined') {
// in order for `e.state` to work on the `onpopstate` event
// we have to register the initial route upon initialization
- this.changeState('replaceState', format({ pathname, query }), getURL())
+ this.chan... | false |
Other | vercel | next.js | 662dfd42716ae2c2a4043321f2552f0166a7c2be.json | Drop module.hot from production bundles (#5967) | packages/next/client/page-loader.js | @@ -14,7 +14,6 @@ function supportsPreload (list) {
}
const hasPreload = supportsPreload(document.createElement('link').relList)
-const webpackModule = module
export default class PageLoader {
constructor (buildId, assetPrefix) {
@@ -107,21 +106,24 @@ export default class PageLoader {
}
}
- /... | false |
Other | vercel | next.js | 18cb2c03df3044848d23d5ea8f5a4920b1d92b6a.json | Simplify default title (#5968) | packages/next/client/head-manager.js | @@ -1,6 +1,3 @@
-
-const DEFAULT_TITLE = ''
-
const DOMAttributeNames = {
acceptCharset: 'accept-charset',
className: 'class',
@@ -39,12 +36,10 @@ export default class HeadManager {
}
updateTitle (component) {
- let title
+ let title = ''
if (component) {
const { children } = component.... | false |
Other | vercel | next.js | b0cad3370d2a3f3184f57da99313ff6c93ccf768.json | Use less code to detect replace instead of push (#5969) | packages/next/client/link.js | @@ -83,11 +83,7 @@ class Link extends Component {
}
// replace state instead of push if prop is present
- const { replace } = this.props
- const changeMethod = replace ? 'replace' : 'push'
-
- // straight up redirect
- Router[changeMethod](href, as, { shallow: this.props.shallow })
+ Router[t... | false |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | package.json | @@ -33,7 +33,7 @@
"git add"
],
"*.ts": [
- "standard --parser typescript-eslint-parser --plugin typescript --fix",
+ "tslint -c tslint.json 'packages/**/*.ts'",
"git add"
],
"packages/**/bin/*": [
@@ -44,7 +44,7 @@
"standard": {
"parser": "babel-eslint",
"ignore"... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next-server/server/get-dynamic-import-bundles.ts | @@ -2,15 +2,15 @@ export type ManifestItem = {
id: number|string,
name: string,
file: string,
- publicPath: string
+ publicPath: string,
}
export type Manifest = {[moduleId: string]: ManifestItem[]}
type DynamicImportBundles = Set<ManifestItem>
// Based on https://github.com/jamiebuilds/react-loada... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next-server/server/get-page-files.ts | @@ -3,15 +3,16 @@ import { normalizePagePath } from './normalize-page-path'
export type BuildManifest = {
devFiles: string[],
pages: {
- [page: string]: string[]
- }
+ [page: string]: string[],
+ },
}
-export function getPageFiles (buildManifest: BuildManifest, page: string): string[] {
+export functi... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next-server/server/load-components.ts | @@ -2,19 +2,19 @@ import {join} from 'path'
import {CLIENT_STATIC_FILES_PATH, BUILD_MANIFEST, REACT_LOADABLE_MANIFEST, SERVER_DIRECTORY} from 'next-server/constants'
import {requirePage} from './require'
-function interopDefault (mod: any) {
+function interopDefault(mod: any) {
return mod.default || mod
}
-ex... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next-server/server/next-server.ts | @@ -21,7 +21,7 @@ type ServerConstructor = {
dir?: string,
staticMarkup?: boolean,
quiet?: boolean,
- conf?: NextConfig
+ conf?: NextConfig,
}
export default class Server {
@@ -35,11 +35,11 @@ export default class Server {
buildId: string,
generateEtags: boolean,
runtimeConfig?: {[key: str... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next-server/server/normalize-page-path.ts | @@ -1,5 +1,5 @@
import { posix } from 'path'
-export function normalizePagePath (page: string): string {
+export function normalizePagePath(page: string): string {
// If the page is `/` we need to append `/index`, otherwise the returned directory root will be bundles instead of pages
if (page === '/') {
pag... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next-server/server/require.ts | @@ -2,19 +2,20 @@ import {join} from 'path'
import {PAGES_MANIFEST, SERVER_DIRECTORY} from 'next-server/constants'
import { normalizePagePath } from './normalize-page-path'
-export function pageNotFoundError (page: string): Error {
+export function pageNotFoundError(page: string): Error {
const err: any = new Er... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next-server/server/router.ts | @@ -8,20 +8,20 @@ type Params = {[param: string]: string}
export type Route = {
match: (pathname: string|undefined) => false|Params,
- fn: (req: IncomingMessage, res: ServerResponse, params: Params, parsedUrl: UrlWithParsedQuery) => void
+ fn: (req: IncomingMessage, res: ServerResponse, params: Params, parsedUr... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next-server/server/send-html.ts | @@ -3,7 +3,7 @@ import generateETag from 'etag'
import fresh from 'fresh'
import { isResSent } from '../lib/utils'
-export function sendHTML (req: IncomingMessage, res: ServerResponse, html: string, { generateEtags }: {generateEtags: boolean}) {
+export function sendHTML(req: IncomingMessage, res: ServerResponse, h... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next-server/server/serve-static.ts | @@ -4,7 +4,7 @@ import send from 'send'
// since send doesn't support wasm yet
send.mime.define({ 'application/wasm': ['wasm'] })
-export function serveStatic (req: IncomingMessage, res: ServerResponse, path: string): Promise<void> {
+export function serveStatic(req: IncomingMessage, res: ServerResponse, path: stri... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next-server/server/utils.ts | @@ -2,10 +2,10 @@ import { BLOCKED_PAGES } from 'next-server/constants'
const internalPrefixes = [
/^\/_next\//,
- /^\/static\//
+ /^\/static\//,
]
-export function isInternalUrl (url: string): boolean {
+export function isInternalUrl(url: string): boolean {
for (const prefix of internalPrefixes) {
i... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next/bin/next-build.ts | @@ -9,7 +9,7 @@ const args = arg({
// Types
'--help': Boolean,
// Aliases
- '-h': '--help'
+ '-h': '--help',
})
if (args['--help']) {
@@ -45,6 +45,7 @@ if (!existsSync(join(dir, 'pages'))) {
build(dir)
.catch((err) => {
+ // tslint:disable-next-line
console.error('> Build error occurred')
... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next/bin/next-dev.ts | @@ -14,10 +14,11 @@ const args = arg({
// Aliases
'-h': '--help',
'-p': '--port',
- '-H': '--hostname'
+ '-H': '--hostname',
})
if (args['--help']) {
+ // tslint:disable-next-line
console.log(`
Description
Starts the application in development mode (hot-code reloading, error
@@ -56,25 +57... | true |
Other | vercel | next.js | 20fe65ce4119727a0f2b35a630b0cbc568ae3724.json | Implement tslint for core files (#5952)
Fixes #5845
Implement tslint for core files
**What is this?**
Implements tslint for both next and next-server, but keeps standardjs/eslint for the .js files that are still there, we're gradually migrating to Typescript.
**How does it work?**
Before every commit (pre-... | packages/next/bin/next-export.ts | @@ -16,10 +16,11 @@ const args = arg({
// Aliases
'-h': '--help',
'-s': '--silent',
- '-o': '--outdir'
+ '-o': '--outdir',
})
if (args['--help']) {
+ // tslint:disable-next-line
console.log(`
Description
Exports the application for production deployment
@@ -57,7 +58,7 @@ const options = {... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.