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 | 1bb20b1930fb9d849c8e091847664cd1c6b91b40.json | Add socket.io example (#1766)
* Add socket.io example
* [update] stop handling events before unmount
* [update] add deploy to now button
* Fix linting problems
* Fix last missing linting problem | examples/with-socket.io/server.js | @@ -0,0 +1,34 @@
+const app = require('express')()
+const server = require('http').Server(app)
+const io = require('socket.io')(server)
+const next = require('next')
+
+const dev = process.env.NODE_ENV !== 'production'
+const nextApp = next({ dev })
+const nextHandler = nextApp.getRequestHandler()
+
+// fake DB
+const ... | true |
Other | vercel | next.js | 40290f85c356ba720e4415a2cf6e219d0eae0e87.json | Fix readme conflict (#2148) | readme.md | @@ -869,11 +869,7 @@ Then run `now` and enjoy!
Next.js can be deployed to other hosting solutions too. Please have a look at the ['Deployment'](https://github.com/zeit/next.js/wiki/Deployment) section of the wiki.
-<<<<<<< HEAD
-Note: we recommend putting `.next`, or your custom dist folder (you can set a custom f... | false |
Other | vercel | next.js | e1a9febe2863e340d29cc59e5e006c6adfa816c6.json | Get latest master into v3 (#2139)
* Merge branch 'master' into v3-beta
* Add send back to v3-beta. | package.json | @@ -82,20 +82,21 @@
"path-match": "1.2.4",
"pkg-up": "2.0.0",
"prop-types": "15.5.10",
- "recursive-copy": "^2.0.6",
"react-hot-loader": "3.0.0-beta.7",
+ "recursive-copy": "^2.0.6",
+ "send": "^0.15.3",
"source-map-support": "0.4.15",
"strip-ansi": "3.0.1",
"styled-jsx": "1.... | true |
Other | vercel | next.js | e1a9febe2863e340d29cc59e5e006c6adfa816c6.json | Get latest master into v3 (#2139)
* Merge branch 'master' into v3-beta
* Add send back to v3-beta. | readme.md | @@ -772,6 +772,11 @@ module.exports = {
### Customizing webpack config
+<p><details>
+ <summary><b>Examples</b></summary>
+ <ul><li><a href="./examples/with-webpack-bundle-analyzer">Custom webpack bundle analyzer</a></li></ul>
+</details></p>
+
In order to extend our usage of `webpack`, you can define a functio... | true |
Other | vercel | next.js | e1a9febe2863e340d29cc59e5e006c6adfa816c6.json | Get latest master into v3 (#2139)
* Merge branch 'master' into v3-beta
* Add send back to v3-beta. | test/integration/basic/test/rendering.js | @@ -33,7 +33,7 @@ export default function ({ app }, suiteName, render) {
const styleId = $('#blue-box').attr('data-jsx')
const style = $(`#__jsx-style-${styleId}`)
- expect(style.text()).toMatch(/color: blue/)
+ expect(style.text()).toMatch(/color:blue/)
})
test('renders properties... | true |
Other | vercel | next.js | e1a9febe2863e340d29cc59e5e006c6adfa816c6.json | Get latest master into v3 (#2139)
* Merge branch 'master' into v3-beta
* Add send back to v3-beta. | yarn.lock | @@ -815,9 +815,9 @@ babel-plugin-transform-strict-mode@^6.24.1:
babel-runtime "^6.22.0"
babel-types "^6.24.1"
-babel-preset-env@1.5.0:
- version "1.5.0"
- resolved "https://registry.yarnpkg.com/babel-preset-env/-/babel-preset-env-1.5.0.tgz#6e5452f7c8742afe3b9a917883ccf3f7a4f340c5"
+babel-preset-env@1.5.1:... | true |
Other | vercel | next.js | af7993683bb0cb210d01c21b54c14e22eeec8ab4.json | Add link to example for webpack-bundle-analyzer (#1130) (#2104) | readme.md | @@ -675,6 +675,11 @@ module.exports = {
### Customizing webpack config
+<p><details>
+ <summary><b>Examples</b></summary>
+ <ul><li><a href="./examples/with-webpack-bundle-analyzer">Custom webpack bundle analyzer</a></li></ul>
+</details></p>
+
In order to extend our usage of `webpack`, you can define a functio... | false |
Other | vercel | next.js | 43c447edd0c23db5a9acc477befa77a42826d1a3.json | Implement the fix. | server/index.js | @@ -1,4 +1,4 @@
-import { resolve, join } from 'path'
+import { resolve, join, sep } from 'path'
import { parse as parseUrl } from 'url'
import { parse as parseQs } from 'querystring'
import fs from 'fs'
@@ -295,6 +295,10 @@ export default class Server {
}
async serveStatic (req, res, path) {
+ if (!this.... | false |
Other | vercel | next.js | e6f36517633e6142e81957c5e0b64d4b50ae26d8.json | Fix broken link at readme (#2103)
Fixed broken readme link and make it short by removing unnecessary invitation. | readme.md | @@ -766,7 +766,7 @@ Then run `now` and enjoy!
Next.js can be deployed to other hosting solutions too. Please have a look at the ['Deployment'](https://github.com/zeit/next.js/wiki/Deployment) section of the wiki.
-Note: we recommend putting `.next`, or your custom dist folder (Please have a look at ['Custom Config... | false |
Other | vercel | next.js | 3a0fe4349c911e49f78c0fb9a424ce3fe4717e94.json | Fix escape issue (#2115)
For instance:
```css
.MuiGrid-gutter-xs-8-1393152966 > .MuiGrid-typeItem-3088349198 {
font-family: "Roboto", "Helvetica", "Arial", sans-serif;
}
``` | examples/with-material-ui-next/pages/_document.js | @@ -9,11 +9,7 @@ export default class MyDocument extends Document {
const styleContext = getDefaultContext()
return {
...page,
- styles: (
- <style id='jss-server-side' type='text/css'>
- {styleContext.styleManager.sheetsToString()}
- </style>
- )
+ styles: <style ... | false |
Other | vercel | next.js | 56cf8ad0a3d5b307d8027abcbf0449937e3d7149.json | Add ant design mobile example (#1793)
* add antd-mobile example
* update antd-mobile@1.1.2
remove unsupported page
add menu to trick page | examples/with-antd-mobile/.babelrc | @@ -0,0 +1,13 @@
+{
+ "presets": [
+ "next/babel"
+ ],
+ "plugins": [
+ [
+ "import",
+ {
+ "libraryName": "antd-mobile"
+ }
+ ]
+ ]
+} | true |
Other | vercel | next.js | 56cf8ad0a3d5b307d8027abcbf0449937e3d7149.json | Add ant design mobile example (#1793)
* add antd-mobile example
* update antd-mobile@1.1.2
remove unsupported page
add menu to trick page | examples/with-antd-mobile/README.md | @@ -0,0 +1,28 @@
+[](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-material-ui)
+# Ant Design Mobile example
+
+## How to use
+
+Download the example [or clone the repo](https://github.com/zeit/next.js):
+
+```bash
+curl ht... | true |
Other | vercel | next.js | 56cf8ad0a3d5b307d8027abcbf0449937e3d7149.json | Add ant design mobile example (#1793)
* add antd-mobile example
* update antd-mobile@1.1.2
remove unsupported page
add menu to trick page | examples/with-antd-mobile/components/Layout.js | @@ -0,0 +1,16 @@
+import React, { Component } from 'react'
+import { LocaleProvider } from 'antd-mobile'
+import enUS from 'antd-mobile/lib/locale-provider/en_US'
+
+export default class Layout extends Component {
+ render () {
+ const { language, children } = this.props
+ const locale = language.substr(0, 2) ==... | true |
Other | vercel | next.js | 56cf8ad0a3d5b307d8027abcbf0449937e3d7149.json | Add ant design mobile example (#1793)
* add antd-mobile example
* update antd-mobile@1.1.2
remove unsupported page
add menu to trick page | examples/with-antd-mobile/components/MenuBar.js | @@ -0,0 +1,44 @@
+import React, { Component } from 'react'
+import Router from 'next/router'
+import { TabBar, Icon } from 'antd-mobile'
+
+export default class MenuBar extends Component {
+ render () {
+ const {
+ pathname,
+ children
+ } = this.props
+
+ return (
+ <TabBar>
+ {tabBarDa... | true |
Other | vercel | next.js | 56cf8ad0a3d5b307d8027abcbf0449937e3d7149.json | Add ant design mobile example (#1793)
* add antd-mobile example
* update antd-mobile@1.1.2
remove unsupported page
add menu to trick page | examples/with-antd-mobile/next.config.js | @@ -0,0 +1,54 @@
+const path = require('path')
+const fs = require('fs')
+const requireHacker = require('require-hacker')
+
+function setupRequireHacker () {
+ requireHacker.resolver((filename, module) => {
+ if (filename.endsWith('/style/css')) {
+ return requireHacker.resolve(`${filename}.web.js`, module)
+ ... | true |
Other | vercel | next.js | 56cf8ad0a3d5b307d8027abcbf0449937e3d7149.json | Add ant design mobile example (#1793)
* add antd-mobile example
* update antd-mobile@1.1.2
remove unsupported page
add menu to trick page | examples/with-antd-mobile/package.json | @@ -0,0 +1,16 @@
+{
+ "dependencies": {
+ "antd-mobile": "^1.1.2",
+ "babel-plugin-import": "^1.1.1",
+ "next": "latest",
+ "react": "^15.5.4",
+ "react-dom": "^15.5.4",
+ "require-hacker": "^3.0.0",
+ "svg-sprite-loader": "~0.3.0"
+ },
+ "scripts": {
+ "dev": "next",
+ "build": "next buil... | true |
Other | vercel | next.js | 56cf8ad0a3d5b307d8027abcbf0449937e3d7149.json | Add ant design mobile example (#1793)
* add antd-mobile example
* update antd-mobile@1.1.2
remove unsupported page
add menu to trick page | examples/with-antd-mobile/pages/_document.js | @@ -0,0 +1,18 @@
+import Document, { Head, Main, NextScript } from 'next/document'
+
+export default class extends Document {
+ render () {
+ return (
+ <html>
+ <Head>
+ <script src='/static/hd.min.js' />
+ <link rel='stylesheet' type='text/css' href='//unpkg.com/antd-mobile/dist/antd... | true |
Other | vercel | next.js | 56cf8ad0a3d5b307d8027abcbf0449937e3d7149.json | Add ant design mobile example (#1793)
* add antd-mobile example
* update antd-mobile@1.1.2
remove unsupported page
add menu to trick page | examples/with-antd-mobile/pages/home.js | @@ -0,0 +1,54 @@
+import React, {Component} from 'react'
+import {
+ WhiteSpace, WingBlank,
+ NavBar, Icon, Pagination, Steps
+} from 'antd-mobile'
+import Layout from '../components/Layout'
+import MenuBar from '../components/MenuBar'
+
+export default class Home extends Component {
+ static getInitialProps ({ req ... | true |
Other | vercel | next.js | 56cf8ad0a3d5b307d8027abcbf0449937e3d7149.json | Add ant design mobile example (#1793)
* add antd-mobile example
* update antd-mobile@1.1.2
remove unsupported page
add menu to trick page | examples/with-antd-mobile/pages/index.js | @@ -0,0 +1,9 @@
+import { Component } from 'react'
+
+export default class Index extends Component {
+ static async getInitialProps ({ res }) {
+ res.setHeader('Location', '/home')
+ res.statusCode = 302
+ res.end()
+ }
+} | true |
Other | vercel | next.js | 56cf8ad0a3d5b307d8027abcbf0449937e3d7149.json | Add ant design mobile example (#1793)
* add antd-mobile example
* update antd-mobile@1.1.2
remove unsupported page
add menu to trick page | examples/with-antd-mobile/pages/trick.js | @@ -0,0 +1,122 @@
+import React, { Component } from 'react'
+import {
+ WhiteSpace,
+ List, Switch, Modal, Button, Menu
+} from 'antd-mobile'
+import Layout from '../components/Layout'
+import MenuBar from '../components/MenuBar'
+
+export default class Trick extends Component {
+ static getInitialProps ({ req }) {
... | true |
Other | vercel | next.js | 56cf8ad0a3d5b307d8027abcbf0449937e3d7149.json | Add ant design mobile example (#1793)
* add antd-mobile example
* update antd-mobile@1.1.2
remove unsupported page
add menu to trick page | examples/with-antd-mobile/static/hd.min.js | @@ -0,0 +1,2 @@
+!function(e){function t(a){if(i[a])return i[a].exports;var n=i[a]={exports:{},id:a,loaded:!1};return e[a].call(n.exports,n,n.exports,t),n.loaded=!0,n.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i=window;t["default"]=i... | true |
Other | vercel | next.js | bd96b690496c00a39db6e537534845498a2be008.json | Add ant design example (#1817)
* Add ant design example
* Reduce bundle size by importing modularized antd
* lock react version for warning | examples/with-ant-design/.babelrc | @@ -0,0 +1,10 @@
+{
+ "presets": [
+ "next/babel"
+ ],
+ "plugins": [
+ ["import", {
+ "libraryName": "antd"
+ }]
+ ]
+} | true |
Other | vercel | next.js | bd96b690496c00a39db6e537534845498a2be008.json | Add ant design example (#1817)
* Add ant design example
* Reduce bundle size by importing modularized antd
* lock react version for warning | examples/with-ant-design/README.md | @@ -0,0 +1,29 @@
+[](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-ant-design)
+
+# Ant Design example
+
+## How to use
+
+Download the example [or clone the repo](https://github.com/zeit/next.js):
+
+```bash
+curl https://... | true |
Other | vercel | next.js | bd96b690496c00a39db6e537534845498a2be008.json | Add ant design example (#1817)
* Add ant design example
* Reduce bundle size by importing modularized antd
* lock react version for warning | examples/with-ant-design/package.json | @@ -0,0 +1,18 @@
+{
+ "name": "with-ant-design",
+ "version": "1.0.0",
+ "scripts": {
+ "dev": "next",
+ "build": "next build",
+ "start": "next start"
+ },
+ "dependencies": {
+ "antd": "^2.9.3",
+ "babel-plugin-import": "^1.1.1",
+ "next": "latest",
+ "react": "~15.4.2",
+ "react-dom": "~... | true |
Other | vercel | next.js | bd96b690496c00a39db6e537534845498a2be008.json | Add ant design example (#1817)
* Add ant design example
* Reduce bundle size by importing modularized antd
* lock react version for warning | examples/with-ant-design/pages/index.js | @@ -0,0 +1,74 @@
+import Head from 'next/head'
+import { Form, Select, InputNumber, DatePicker, Switch, Slider, Button, LocaleProvider } from 'antd'
+import enUS from 'antd/lib/locale-provider/en_US'
+
+const FormItem = Form.Item
+const Option = Select.Option
+
+export default () => (
+ <LocaleProvider locale={enUS}>
... | true |
Other | vercel | next.js | c443635945bf88d0a7291f1fea285cdd00b158bc.json | feat(with-redux): add redux tools to example (#1994) | examples/with-redux/package.json | @@ -10,6 +10,7 @@
"next": "latest",
"next-redux-wrapper": "^1.0.0",
"react": "^15.4.2",
+ "redux-devtools-extension": "^2.13.2",
"react-dom": "^15.4.2",
"react-redux": "^5.0.1",
"redux": "^3.6.0", | true |
Other | vercel | next.js | c443635945bf88d0a7291f1fea285cdd00b158bc.json | feat(with-redux): add redux tools to example (#1994) | examples/with-redux/store.js | @@ -1,4 +1,5 @@
import { createStore, applyMiddleware } from 'redux'
+import { composeWithDevTools } from 'redux-devtools-extension'
import thunkMiddleware from 'redux-thunk'
const exampleInitialState = {
@@ -39,5 +40,5 @@ export const addCount = () => dispatch => {
}
export const initStore = (initialState = e... | true |
Other | vercel | next.js | 15e9573ded8448855591449a733a3e851def1a5b.json | feat: add an example with the next branch of Material-UI (#2036) | examples/with-material-ui-next/README.md | @@ -0,0 +1,29 @@
+[](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-material-ui-next)
+# Material-UI example
+
+## How to use
+
+Download the example [or clone the repo](https://github.com/zeit/next.js):
+
+```bash
+curl htt... | true |
Other | vercel | next.js | 15e9573ded8448855591449a733a3e851def1a5b.json | feat: add an example with the next branch of Material-UI (#2036) | examples/with-material-ui-next/components/App.js | @@ -0,0 +1,52 @@
+import React, { Component } from 'react'
+import PropTypes from 'prop-types'
+import { withStyles, createStyleSheet, MuiThemeProvider } from 'material-ui/styles'
+import { getDefaultContext } from '../styles/createDefaultContext'
+
+const styleSheet = createStyleSheet('App', theme => ({
+ '@global': ... | true |
Other | vercel | next.js | 15e9573ded8448855591449a733a3e851def1a5b.json | feat: add an example with the next branch of Material-UI (#2036) | examples/with-material-ui-next/package.json | @@ -0,0 +1,13 @@
+{
+ "dependencies": {
+ "material-ui": "next",
+ "next": "latest",
+ "react": "^15.5.4",
+ "react-dom": "^15.5.4"
+ },
+ "scripts": {
+ "dev": "next",
+ "build": "next build",
+ "start": "next start"
+ }
+} | true |
Other | vercel | next.js | 15e9573ded8448855591449a733a3e851def1a5b.json | feat: add an example with the next branch of Material-UI (#2036) | examples/with-material-ui-next/pages/_document.js | @@ -0,0 +1,49 @@
+import React from 'react'
+import Document, { Head, Main, NextScript } from 'next/document'
+import { getDefaultContext, setDefaultContext } from '../styles/createDefaultContext'
+
+export default class MyDocument extends Document {
+ static async getInitialProps (ctx) {
+ setDefaultContext()
+ ... | true |
Other | vercel | next.js | 15e9573ded8448855591449a733a3e851def1a5b.json | feat: add an example with the next branch of Material-UI (#2036) | examples/with-material-ui-next/pages/index.js | @@ -0,0 +1,64 @@
+import React, {Component} from 'react'
+import Button from 'material-ui/Button'
+import Dialog, {
+ DialogTitle,
+ DialogContent,
+ DialogContentText,
+ DialogActions
+} from 'material-ui/Dialog'
+import Typography from 'material-ui/Typography'
+import App from '../components/App'
+
+const styles ... | true |
Other | vercel | next.js | 15e9573ded8448855591449a733a3e851def1a5b.json | feat: add an example with the next branch of Material-UI (#2036) | examples/with-material-ui-next/styles/createDefaultContext.js | @@ -0,0 +1,38 @@
+import MuiThemeProvider from 'material-ui/styles/MuiThemeProvider'
+import createPalette from 'material-ui/styles/palette'
+import createMuiTheme from 'material-ui/styles/theme'
+import { purple, green } from 'material-ui/styles/colors'
+
+const createDefaultContext = () =>
+ MuiThemeProvider.createD... | true |
Other | vercel | next.js | 15e9573ded8448855591449a733a3e851def1a5b.json | feat: add an example with the next branch of Material-UI (#2036) | examples/with-material-ui/pages/index.js | @@ -27,7 +27,7 @@ const muiTheme = {
}
}
-class Main extends Component {
+class Index extends Component {
static getInitialProps ({ req }) {
// Ensures material-ui renders the correct css prefixes server-side
let userAgent
@@ -86,7 +86,7 @@ class Main extends Component {
<h2>example projec... | true |
Other | vercel | next.js | 0fdd379eee33ac9708a74cd994ba3fdfbffbdee0.json | Add reference to wiki for deploying to GitHub (#2035) | readme.md | @@ -917,7 +917,7 @@ Then you've a static version of your app in the “out" directory.
> You can also customize the output directory. For that run `next export -h` for the help.
-Now you can deploy that directory to any static hosting service.
+Now you can deploy that directory to any static hosting service. Note t... | false |
Other | vercel | next.js | 4c52ea1f70d3636887555b95c9c3c0999fbb102c.json | Add shallow support to Link (#2012) | lib/link.js | @@ -26,7 +26,8 @@ export default class Link extends Component {
return null
}
- ]).isRequired
+ ]).isRequired,
+ shallow: PropTypes.bool
}
componentWillReceiveProps (nextProps) {
@@ -40,6 +41,7 @@ export default class Link extends Component {
return
}
+ let { shallow ... | false |
Other | vercel | next.js | 58f3403587741c7ed2e25fc8bfa4faee825894c4.json | fix small typo (#2030)
Not much to say on this one, I tend to fix typos everywhere I see them... | readme.md | @@ -867,7 +867,7 @@ Note: we recommend putting `.next`, or your custom dist folder (Please have a lo
## Static HTML export
-This is a way to run your Next.js app as a standalone static app without any Node.js server. The export app supports almost every feature of Next.js including dyanmic urls, prefetching, prelo... | false |
Other | vercel | next.js | 9346c96b398727edc5681044b3b41d7e2d4f7fd3.json | Update react-hot-loader to 3.0.0-beta.7 (#2004) | package.json | @@ -80,7 +80,7 @@
"path-match": "1.2.4",
"pkg-up": "2.0.0",
"prop-types": "15.5.10",
- "react-hot-loader": "3.0.0-beta.6",
+ "react-hot-loader": "3.0.0-beta.7",
"send": "0.15.2",
"source-map-support": "0.4.15",
"strip-ansi": "3.0.1", | false |
Other | vercel | next.js | 1703ad302ca0dd4ae97d04fe593385c83c550fa5.json | remove old fly task related to `eval-script.js` (#1997) | flyfile.js | @@ -4,7 +4,6 @@ const isWindows = /^win/.test(process.platform)
export async function compile(fly) {
await fly.parallel(['bin', 'server', 'lib', 'client'])
- await fly.start('unrestrict')
}
export async function bin(fly, opts) {
@@ -27,14 +26,6 @@ export async function client(fly, opts) {
notify('Compiled... | false |
Other | vercel | next.js | bcb979fdf2459560dd84725db377c14c5b7319ce.json | Add some Appveyor customizations (#1985)
* Allow to test on Node.js v4
* Add appveyor.yml file
* Update appveyor badge to master branch. | appveyor.yml | @@ -1,6 +1,7 @@
-# Test against the latest version of this Node.js version
environment:
- nodejs_version: "6"
+ matrix:
+ - nodejs_version: "4"
+ - nodejs_version: "6"
# Install scripts. (runs after repo cloning)
install: | true |
Other | vercel | next.js | bcb979fdf2459560dd84725db377c14c5b7319ce.json | Add some Appveyor customizations (#1985)
* Allow to test on Node.js v4
* Add appveyor.yml file
* Update appveyor badge to master branch. | readme.md | @@ -1,6 +1,7 @@
<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://travis-ci.org/zeit/next.js)
+[
This fixes a missed bug introduced in #4510.
Because the regexp was `/-[^-]*/` and not `/-[^-]*$/`, a wrong part of the filename was being removed:
```
bad:
'foo-bar-0123456789abcdef-0123456789abcdef.js' -> 'foo-0123456789abcdef-0123456789abcdef.js'
good:
'foo... | server/utils.js | @@ -4,6 +4,10 @@ import { readdirSync, existsSync } from 'fs'
export const IS_BUNDLED_PAGE = /^bundles[/\\]pages.*\.js$/
export const MATCH_ROUTE_NAME = /^bundles[/\\]pages[/\\](.*)\.js$/
+export function getChunkNameFromFilename (filename) {
+ return filename.replace(/-[^-]*$/, '')
+}
+
export function getAvaila... | true |
Other | vercel | next.js | c74ad93e14e295c6a5fbabd504e7829fab30ccdd.json | Fix a mistake in chunk name generation (#4573)
This fixes a missed bug introduced in #4510.
Because the regexp was `/-[^-]*/` and not `/-[^-]*$/`, a wrong part of the filename was being removed:
```
bad:
'foo-bar-0123456789abcdef-0123456789abcdef.js' -> 'foo-0123456789abcdef-0123456789abcdef.js'
good:
'foo... | test/unit/server-utils.test.js | @@ -0,0 +1,17 @@
+/* global describe, it, expect */
+
+import { getChunkNameFromFilename } from '../../dist/server/utils'
+
+describe('Server utils', () => {
+ describe('getChunkNameFromFilename', () => {
+ it('should strip the hash from the filename', () => {
+ const filename = 'foo_bar_0123456789abcdef-01234... | true |
Other | vercel | next.js | 2af4ad8b1747924836b5706605bf4e219516c97c.json | Add dependencies of _app.js to commons (#4396)
Since `_app.js` is used on every page it makes sense to move it's dependencies to the `commons.js` so that if you require a dependency in `_app.js` and in one of your pages it is not included twice in your bundles.
This PR modifies the `CommonsChunkPlugin` to move eve... | server/build/webpack.js | @@ -193,6 +193,19 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer
return false
}
+ // Check if the module is used in the _app.js bundle
+ // Because _app.js is used on every page we don't want to
+ // duplicate them in other bundles... | false |
Other | vercel | next.js | 18676e08703a8d6c39049fe15996f3ede23323ae.json | Remove uglify options in preparation of webpack 4 (#4536) | server/build/webpack.js | @@ -107,16 +107,7 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer
...nodePathList // Support for NODE_PATH environment variable
],
alias: {
- next: nextDir,
- // React already does something similar to this.
- // But if the user has react-de... | false |
Other | vercel | next.js | 8082eddaeff82479831ceee0791c010cc8aa8919.json | Remove unused import (patch) (#4493) | examples/with-apollo/lib/with-apollo-client.js | @@ -1,7 +1,6 @@
import initApollo from './init-apollo'
import Head from 'next/head'
import { getDataFromTree } from 'react-apollo'
-import propTypes from 'prop-types'
export default (App) => {
return class Apollo extends React.Component {
@@ -63,4 +62,4 @@ export default (App) => {
return <App {...this.... | false |
Other | vercel | next.js | cd1a2fbd910fd2013640d38ea2c902a85e9768d8.json | Add check for added/deleted pages (#4497) | server/hot-reloader.js | @@ -190,9 +190,9 @@ export default class HotReloader {
changedPageRoutes.push(route)
}
- // This means `/_app` is most likely included in the list.
- // We filter it out because `/_app` will be re-rendered with the page
- if (changedPageRoutes.length > 1) {
+ // This me... | false |
Other | vercel | next.js | 669225263dfea787812c494759706f913e4c080a.json | Allow onClick on next/link component's child (#4474)
Allow `onClick` on `next/link` child. This should not be a breaking change, but it's a very useful feature. Real-life use cases include: analytics or closing menu on navigation, and other.
- [x] allow optional `onClick` on `next/link` component's child
- [x] cal... | lib/link.js | @@ -127,7 +127,14 @@ export default class Link extends Component {
// This will return the first child, if multiple are provided it will throw an error
const child = Children.only(children)
const props = {
- onClick: this.linkClicked
+ onClick: (e) => {
+ if (child.props && typeof child.... | true |
Other | vercel | next.js | 669225263dfea787812c494759706f913e4c080a.json | Allow onClick on next/link component's child (#4474)
Allow `onClick` on `next/link` child. This should not be a breaking change, but it's a very useful feature. Real-life use cases include: analytics or closing menu on navigation, and other.
- [x] allow optional `onClick` on `next/link` component's child
- [x] cal... | test/integration/basic/pages/nav/index.js | @@ -38,6 +38,7 @@ export default class extends Component {
<Link href='/nav/as-path' as='/as/path'><a id='as-path-link' style={linkStyle}>As Path</a></Link>
<Link href='/nav/as-path'><a id='as-path-link-no-as' style={linkStyle}>As Path (No as)</a></Link>
<Link href='/nav/as-path-using-router'... | true |
Other | vercel | next.js | 669225263dfea787812c494759706f913e4c080a.json | Allow onClick on next/link component's child (#4474)
Allow `onClick` on `next/link` child. This should not be a breaking change, but it's a very useful feature. Real-life use cases include: analytics or closing menu on navigation, and other.
- [x] allow optional `onClick` on `next/link` component's child
- [x] cal... | test/integration/basic/pages/nav/on-click.js | @@ -0,0 +1,27 @@
+import { Component } from 'react'
+import Link from 'next/link'
+
+let count = 0
+
+export default class OnClick extends Component {
+ static getInitialProps ({ res }) {
+ if (res) return { count: 0 }
+ count += 1
+
+ return { count }
+ }
+
+ render () {
+ return (
+ <div id='on-cl... | true |
Other | vercel | next.js | 669225263dfea787812c494759706f913e4c080a.json | Allow onClick on next/link component's child (#4474)
Allow `onClick` on `next/link` child. This should not be a breaking change, but it's a very useful feature. Real-life use cases include: analytics or closing menu on navigation, and other.
- [x] allow optional `onClick` on `next/link` component's child
- [x] cal... | test/integration/basic/test/client-navigation.js | @@ -159,6 +159,64 @@ export default (context, render) => {
})
})
+ describe('with onClick action', () => {
+ it('should reload the page and perform additional action', async () => {
+ const browser = await webdriver(context.appPort, '/nav/on-click')
+ const defaultCount = await brows... | true |
Other | vercel | next.js | dbd6f515a056588454f3a8bc620945eeab760e06.json | Fix dynamic import in non webpack env regression #3345 (#4208)
Just in case #3345 was a regression and nextjs should still support non webpack node envs for testing. | server/build/babel/plugins/handle-import.js | @@ -16,23 +16,33 @@ const TYPE_IMPORT = 'Import'
const buildImport = (args) => (template(`
(
- new (require('next/dynamic').SameLoopPromise)((resolve, reject) => {
- const weakId = require.resolveWeak(SOURCE)
- try {
- const weakModule = __webpack_require__(weakId)
- return resolve(weak... | false |
Other | vercel | next.js | 2c3e8d3201da61ce9c5238c9289058d68f45cf1a.json | Improve route prefetch docs: add client side imperative code (#4213)
I stumbled into this Issue https://github.com/zeit/next.js/issues/2868 and thought it should be mentioned properly in the documentation. | readme.md | @@ -720,6 +720,29 @@ export default ({ url }) =>
</div>
```
+The router instance should be only used inside the client side of your app though. In order to prevent any error regarding this subject, when rendering the Router on the server side, use the imperatively prefetch method in the `componentDidMount()` life... | false |
Other | vercel | next.js | a806c16713332349cffbbe0e0ab98399e26fe955.json | Clarify documentation regarding the static folder (#4340) | readme.md | @@ -118,7 +118,7 @@ So far, we get:
- Automatic transpilation and bundling (with webpack and babel)
- Hot code reloading
- Server rendering and indexing of `./pages`
-- Static file serving. `./static/` is mapped to `/static/`
+- Static file serving. `./static/` is mapped to `/static/` (given you [create a `./static/... | false |
Other | vercel | next.js | 4df7e48f94b70a02ca89bf8889f8c7e432c5ac48.json | Add title to default error page (#4383) | lib/error.js | @@ -22,6 +22,7 @@ export default class Error extends React.Component {
return <div style={styles.error}>
<Head>
<meta name='viewport' content='width=device-width, initial-scale=1.0' />
+ <title>{statusCode}: {title}</title>
</Head>
<div>
<style dangerouslySetInnerHTML=... | false |
Other | vercel | next.js | 7193f49eaf2737c42c54ff685892964d7bbe216b.json | Improve issue templates | .github/ISSUE_TEMPLATE/1.Bug_report.md | @@ -1,29 +1,33 @@
---
name: Bug report
about: Create a bug report for the Next.js core
-
---
-**Describe the bug**
+# Bug report
+
+## Describe the bug
+
A clear and concise description of what the bug is.
-**To Reproduce**
+## To Reproduce
+
Steps to reproduce the behavior, please provide cod... | true |
Other | vercel | next.js | 7193f49eaf2737c42c54ff685892964d7bbe216b.json | Improve issue templates | .github/ISSUE_TEMPLATE/10.Nextjs.org_showcase.md | @@ -4,6 +4,8 @@ about: Apply for your project to be added to nextjs.org
---
+# Request to be added to the showcase on nextjs.org
+
- Name of company:
- Url:
- Testimonial about Next.js (optional):
| true |
Other | vercel | next.js | 7193f49eaf2737c42c54ff685892964d7bbe216b.json | Improve issue templates | .github/ISSUE_TEMPLATE/2.Feature_request.md | @@ -1,17 +1,18 @@
---
name: Feature request
about: Create a feature request for the Next.js core
-
---
-**Is your feature request related to a problem? Please describe.**
+# Feature request
+
+## Is your feature request related to a problem? Please describe.
A clear and concise description of what you ... | true |
Other | vercel | next.js | 7193f49eaf2737c42c54ff685892964d7bbe216b.json | Improve issue templates | .github/ISSUE_TEMPLATE/3.Example_Bug_report.md | @@ -0,0 +1,34 @@
+---
+name: Bug report for examples
+about: Create a bug report for one of the Next.js examples
+---
+
+# Examples bug report
+
+## Example name
+Provide the example name
+
+## Describe the bug
+A clear and concise description of what the bug is.
+
+## To Reproduce
+Steps to reproduce the behavior, ple... | true |
Other | vercel | next.js | 7193f49eaf2737c42c54ff685892964d7bbe216b.json | Improve issue templates | .github/ISSUE_TEMPLATE/3.Question_about_next.md | @@ -1,7 +0,0 @@
----
-name: Question about Next.js
-about: If you have a question unrelated to the Next.js core or examples. Reach out to the community on https://spectrum.chat/next-js
-
----
-
-Questions should be posted on https://spectrum.chat/next-js | true |
Other | vercel | next.js | 7193f49eaf2737c42c54ff685892964d7bbe216b.json | Improve issue templates | .github/ISSUE_TEMPLATE/9.Question_about_next.md | @@ -0,0 +1,8 @@
+---
+name: Question about Next.js
+about: If you have a question related to Next.js or the examples. Reach out to the community on https://spectrum.chat/next-js
+---
+
+# Question about Next.js
+
+Questions should be posted on https://spectrum.chat/next-js | true |
Other | vercel | next.js | c461d46efd16d99db73a0841b2ab4651d8371f0f.json | Fix viewport issue in with-react-native-web | examples/with-react-native-web/pages/_document.js | @@ -34,6 +34,7 @@ export default class MyDocument extends Document {
<html style={{ height: '100%', width: '100%' }}>
<Head>
<title>react-native-web</title>
+ <meta name='viewport' content='width=device-width, initial-scale=1' />
</Head>
<body style={{ height: '100%... | false |
Other | vercel | next.js | f5402476cff90057e08da253e606cdabdcbce7a3.json | Add example with next-page-transitions (#4404) | examples/with-next-page-transitions/README.md | @@ -0,0 +1,45 @@
+[](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-next-page-transitions)
+
+# next-page-transitions example
+
+## How to use
+
+### Using `create-next-app`
+
+Execute [`create-next-app`](https://github.com/... | true |
Other | vercel | next.js | f5402476cff90057e08da253e606cdabdcbce7a3.json | Add example with next-page-transitions (#4404) | examples/with-next-page-transitions/components/Loader.js | @@ -0,0 +1,30 @@
+import React from 'react'
+
+const Loader = () => (
+ <div className='loader'>
+ <style jsx>{`
+ .loader {
+ border: 8px solid #f3f3f3; /* Light grey */
+ border-top: 8px solid #3498db; /* Blue */
+ border-radius: 50%;
+ width: 40px;
+ height: 40px;
+ ... | true |
Other | vercel | next.js | f5402476cff90057e08da253e606cdabdcbce7a3.json | Add example with next-page-transitions (#4404) | examples/with-next-page-transitions/package.json | @@ -0,0 +1,16 @@
+{
+ "name": "with-next-page-transitions",
+ "version": "1.0.0",
+ "scripts": {
+ "dev": "next",
+ "build": "next build",
+ "start": "next start"
+ },
+ "dependencies": {
+ "next": "latest",
+ "react": "^16.0.0",
+ "react-dom": "^16.0.0",
+ "next-page-transitions": "1.0.0-alph... | true |
Other | vercel | next.js | f5402476cff90057e08da253e606cdabdcbce7a3.json | Add example with next-page-transitions (#4404) | examples/with-next-page-transitions/pages/_app.js | @@ -0,0 +1,67 @@
+import React from 'react'
+import App, { Container } from 'next/app'
+import { PageTransition } from 'next-page-transitions'
+
+import Loader from '../components/Loader'
+
+const TIMEOUT = 400
+
+export default class MyApp extends App {
+ static async getInitialProps ({ Component, ctx }) {
+ let p... | true |
Other | vercel | next.js | f5402476cff90057e08da253e606cdabdcbce7a3.json | Add example with next-page-transitions (#4404) | examples/with-next-page-transitions/pages/_document.js | @@ -0,0 +1,37 @@
+import React from 'react'
+import Document, { Head, Main, NextScript } from 'next/document'
+
+export default class MyDocument extends Document {
+ static async getInitialProps (ctx) {
+ const initialProps = await Document.getInitialProps(ctx)
+ return { ...initialProps }
+ }
+
+ render () {
... | true |
Other | vercel | next.js | f5402476cff90057e08da253e606cdabdcbce7a3.json | Add example with next-page-transitions (#4404) | examples/with-next-page-transitions/pages/about.js | @@ -0,0 +1,51 @@
+import React from 'react'
+import PropTypes from 'prop-types'
+import Link from 'next/link'
+
+class About extends React.Component {
+ static pageTransitionDelayEnter = true
+
+ constructor (props) {
+ super(props)
+ this.state = {
+ loaded: false
+ }
+ }
+
+ componentDidMount () {
+... | true |
Other | vercel | next.js | f5402476cff90057e08da253e606cdabdcbce7a3.json | Add example with next-page-transitions (#4404) | examples/with-next-page-transitions/pages/index.js | @@ -0,0 +1,13 @@
+import React from 'react'
+import Link from 'next/link'
+
+const Index = () => (
+ <div className='container bg-primary page'>
+ <h1>Hello, world!</h1>
+ <Link href='/about'>
+ <a className='btn btn-light'>About us</a>
+ </Link>
+ </div>
+)
+
+export default Index | true |
Other | vercel | next.js | f6880954c19e537d7c78a1bb779bd1f3151dc59d.json | Improve files list order in package.json (#4399)
* This is minor refactoring.
* Apply alphabetical order to files list. | package.json | @@ -9,20 +9,20 @@
"homepage": "https://github.com/zeit/next.js",
"files": [
"dist",
+ "app.js",
+ "asset.js",
"babel.js",
"client.js",
- "link.js",
+ "config.js",
+ "constants.js",
"css.js",
- "head.js",
"document.js",
"dynamic.js",
- "prefetch.js",
- "router.... | false |
Other | vercel | next.js | 5558aa45f52379d16941aab363fd246ffb4ae567.json | README: fix a link | README.md | @@ -343,7 +343,7 @@ But in some cases, the size of React itself would far exceed the content of the
For this reason we want to promote a situation where users can share the cache for the basic runtime across internet properties. The application code continues to load from your server as usual.
-We are committed to... | false |
Other | vercel | next.js | d9ea4ce3123bd6a764de16f3245bc88d206c08df.json | readme: fix the instruction of running next | README.md | @@ -10,6 +10,16 @@ Install it:
$ npm install next --save
```
+and add a script to your package.json like this:
+
+```json
+{
+ "scripts": {
+ "start": "next"
+ }
+}
+```
+
After that, the file-system is the main API. Every `.js` file becomes a route that gets automatically processed and rendered.
Populate ... | false |
Other | vercel | next.js | 8e7f9973b2b133f31f10aae0505ff14a2514734a.json | Fix minor typo in README | Readme.md | @@ -30,7 +30,7 @@ So far, we get:
- Server rendering and indexing of `./pages`
- Static file serving. `./static/` is mapped to `/static/`
-To see how simple this is, check out the [sample app - nextagram](https://github.com/zeit/nextgram)
+To see how simple this is, check out the [sample app - nextgram](https://git... | false |
Other | vercel | next.js | 10105dce575b0fc660995a4154fe3fa821e3def1.json | package.json: add the repository field | package.json | @@ -80,5 +80,9 @@
},
"standard": {
"parser": "babel-eslint"
+ },
+ "repository": {
+ "type": "git",
+ "url": "https://github.com/zeit/next.js.git"
}
} | false |
Other | vercel | next.js | c063973ac0b2dd41b6f9d86016bdea8a4aee235e.json | package.json: add description and homepage fields | package.json | @@ -1,8 +1,9 @@
{
"name": "next",
"version": "0.9.9",
- "description": "",
+ "description": "Next.js is a minimalistic framework for server-rendered React applications",
"main": "./dist/lib/index.js",
+ "homepage": "https://github.com/zeit/next.js",
"license": "MIT",
"files": [
"dist" | false |
Other | vercel | next.js | 83400a8f38fe003f57184521346457353ae8f5b4.json | fix usage of next/css | Readme.md | @@ -50,7 +50,7 @@ We use [glamor](https://github.com/threepointone/glamor) to provide a great buil
```jsx
import React from 'react'
-import { style } from 'next/css'
+import style from 'next/css'
export default () => (
<div className={style}> | true |
Other | vercel | next.js | 83400a8f38fe003f57184521346457353ae8f5b4.json | fix usage of next/css | examples/basic-css/pages/index.js | @@ -1,5 +1,5 @@
import React from 'react'
-import { style } from 'next/css'
+import style from 'next/css'
export default () => (
<div className={styles}> | true |
Other | vercel | next.js | 83400a8f38fe003f57184521346457353ae8f5b4.json | fix usage of next/css | examples/nested-components/components/paragraph.js | @@ -1,5 +1,5 @@
import React from 'react'
-import { style } from 'next/css'
+import style from 'next/css'
export default ({ children }) => (
<p className={styles}>{children}</p> | true |
Other | vercel | next.js | 83400a8f38fe003f57184521346457353ae8f5b4.json | fix usage of next/css | examples/nested-components/components/post.js | @@ -1,5 +1,5 @@
import React from 'react'
-import { style } from 'next/css'
+import style from 'next/css'
export default ({ title, children }) => (
<div className={mainStyle}> | true |
Other | vercel | next.js | 83400a8f38fe003f57184521346457353ae8f5b4.json | fix usage of next/css | examples/nested-components/pages/index.js | @@ -1,7 +1,7 @@
import React from 'react'
import P from '../components/paragraph'
import Post from '../components/post'
-import { style } from 'next/css'
+import style from 'next/css'
export default () => (
<div className={styles.main}> | true |
Other | vercel | next.js | 83400a8f38fe003f57184521346457353ae8f5b4.json | fix usage of next/css | pages/_error-debug.js | @@ -1,7 +1,7 @@
import React from 'react'
import stripAnsi from 'strip-ansi'
import Head from 'next/head'
-import { style } from 'next/css'
+import style from 'next/css'
export default class ErrorDebug extends React.Component {
static getInitialProps ({ err }) { | true |
Other | vercel | next.js | 83400a8f38fe003f57184521346457353ae8f5b4.json | fix usage of next/css | pages/_error.js | @@ -1,5 +1,5 @@
import React from 'react'
-import { style, merge } from 'next/css'
+import style, { merge } from 'next/css'
export default class Error extends React.Component {
static getInitialProps ({ res, xhr }) { | true |
Other | vercel | next.js | 83400a8f38fe003f57184521346457353ae8f5b4.json | fix usage of next/css | test/fixtures/basic/pages/css.js | @@ -1,5 +1,5 @@
import React from 'react'
-import { style } from 'next/css'
+import style from 'next/css'
export default () => <div className={styles}>This is red</div>
| true |
Other | vercel | next.js | 414fa68295a6afeddee9bff18e21bdef8bfcfb67.json | add benchmark module | package.json | @@ -50,6 +50,7 @@
"devDependencies": {
"babel-eslint": "^7.0.0",
"babel-plugin-transform-remove-strict-mode": "0.0.2",
+ "benchmark": "2.1.1",
"gulp": "3.9.1",
"gulp-ava": "0.14.1",
"gulp-babel": "6.1.2", | false |
Other | vercel | next.js | e4bf0d4c909dcac601d540e38cfb445ec72ba0eb.json | Fix small punctuation issue (#11439) | docs/routing/dynamic-routes.md | @@ -11,7 +11,7 @@ description: Dynamic Routes are pages that allow you to add custom params to you
</ul>
</details>
-Defining routes by using predefined paths is not always enough for complex applications, in Next.js you can add brackets to a page (`[param]`) to create a dynamic route (a.k.a. url slugs, pretty ur... | false |
Other | vercel | next.js | fc946053fd45fdde18912060faae20aaee9f202a.json | Update emotion dependencies in with-emotion-11 (#11414) | examples/with-emotion-11/package.json | @@ -12,11 +12,11 @@
"author": "Thomas Greco",
"license": "ISC",
"dependencies": {
- "@emotion/cache": "11.0.0-next.10",
- "@emotion/css": "11.0.0-next.10",
- "@emotion/react": "11.0.0-next.10",
- "@emotion/server": "11.0.0-next.10",
- "@emotion/styled": "11.0.0-next.10",
+ "@emotion/cache": "... | false |
Other | vercel | next.js | 8fdc13afa4e11302c6db96582fad45ffe81a7fd1.json | Add support for comments in tsconfig.json (#11392)
Fixes #11390 | packages/next/build/webpack-config.ts | @@ -11,6 +11,7 @@ import {
PAGES_DIR_ALIAS,
} from '../lib/constants'
import { fileExists } from '../lib/file-exists'
+import { readFileSync } from 'fs'
import { resolveRequest } from '../lib/resolve-request'
import {
CLIENT_STATIC_FILES_RUNTIME_MAIN,
@@ -58,6 +59,12 @@ const escapePathVariables = (value: any... | true |
Other | vercel | next.js | 8fdc13afa4e11302c6db96582fad45ffe81a7fd1.json | Add support for comments in tsconfig.json (#11392)
Fixes #11390 | packages/next/package.json | @@ -108,7 +108,7 @@
"is-docker": "2.0.0",
"is-wsl": "2.1.1",
"jest-worker": "24.9.0",
- "json5": "2.1.1",
+ "json5": "2.1.2",
"jsonwebtoken": "8.5.1",
"launch-editor": "2.2.1",
"loader-utils": "2.0.0", | true |
Other | vercel | next.js | 8fdc13afa4e11302c6db96582fad45ffe81a7fd1.json | Add support for comments in tsconfig.json (#11392)
Fixes #11390 | test/integration/typescript-paths/tsconfig.json | @@ -1,3 +1,4 @@
+/* This is a single line comment to check if that works */
{
"compilerOptions": {
"baseUrl": ".",
@@ -10,6 +11,7 @@
"components/alias-to-d-ts.d.ts",
"components/alias-to-d-ts.tsx"
]
+ // This is a single line comment to check if that works
},
"esModuleIn... | true |
Other | vercel | next.js | 8fdc13afa4e11302c6db96582fad45ffe81a7fd1.json | Add support for comments in tsconfig.json (#11392)
Fixes #11390 | yarn.lock | @@ -4157,7 +4157,7 @@ browserify-zlib@^0.2.0:
dependencies:
pako "~1.0.5"
-browserslist@4.8.3, browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6, browserslist@^4.0.0, browserslist@^4.3.6, browserslist@^4.6.0, browserslist@^4.6.4, browserslist@^4.8.0, browserslist@^4.8.2, browserslist@^4.8.3:
+brow... | true |
Other | vercel | next.js | e7ea27645deacb77fb3f69a830adfadbf70f4b6a.json | Add support for comments in tsconfig.json
Fixes #11390 | packages/next/build/webpack-config.ts | @@ -11,6 +11,7 @@ import {
PAGES_DIR_ALIAS,
} from '../lib/constants'
import { fileExists } from '../lib/file-exists'
+import { readFileSync } from 'fs'
import { resolveRequest } from '../lib/resolve-request'
import {
CLIENT_STATIC_FILES_RUNTIME_MAIN,
@@ -58,6 +59,12 @@ const escapePathVariables = (value: any... | true |
Other | vercel | next.js | e7ea27645deacb77fb3f69a830adfadbf70f4b6a.json | Add support for comments in tsconfig.json
Fixes #11390 | packages/next/package.json | @@ -108,7 +108,7 @@
"is-docker": "2.0.0",
"is-wsl": "2.1.1",
"jest-worker": "24.9.0",
- "json5": "2.1.1",
+ "json5": "2.1.2",
"jsonwebtoken": "8.5.1",
"launch-editor": "2.2.1",
"loader-utils": "2.0.0", | true |
Other | vercel | next.js | e7ea27645deacb77fb3f69a830adfadbf70f4b6a.json | Add support for comments in tsconfig.json
Fixes #11390 | test/integration/typescript-paths/tsconfig.json | @@ -1,3 +1,4 @@
+/* This is a single line comment to check if that works */
{
"compilerOptions": {
"baseUrl": ".",
@@ -10,6 +11,7 @@
"components/alias-to-d-ts.d.ts",
"components/alias-to-d-ts.tsx"
]
+ // This is a single line comment to check if that works
},
"esModuleIn... | true |
Other | vercel | next.js | e7ea27645deacb77fb3f69a830adfadbf70f4b6a.json | Add support for comments in tsconfig.json
Fixes #11390 | yarn.lock | @@ -4157,7 +4157,7 @@ browserify-zlib@^0.2.0:
dependencies:
pako "~1.0.5"
-browserslist@4.8.3, browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6, browserslist@^4.0.0, browserslist@^4.3.6, browserslist@^4.6.0, browserslist@^4.6.4, browserslist@^4.8.0, browserslist@^4.8.2, browserslist@^4.8.3:
+brow... | true |
Other | vercel | next.js | d8155b22ffbd2e64ca1aca6a7a843481a4f1c913.json | Add initial support for new env handling (#10525)
* Add initial support for new env config file
* Fix serverless processEnv call when no env is provided
* Add missing await for test method
* Update env config to .env.json and add dotenv loading
* ncc dotenv package
* Update type
* Update with new dis... | errors/missing-env-value.md | @@ -0,0 +1,28 @@
+# Missing Env Value
+
+#### Why This Error Occurred
+
+One of your pages' config requested an env value that wasn't populated.
+
+```js
+// pages/index.js
+export const config = {
+ // this value isn't provided in `.env`
+ env: ['MISSING_KEY'],
+}
+```
+
+```
+// .env (notice no `MISSING_KEY` provid... | true |
Other | vercel | next.js | d8155b22ffbd2e64ca1aca6a7a843481a4f1c913.json | Add initial support for new env handling (#10525)
* Add initial support for new env config file
* Fix serverless processEnv call when no env is provided
* Add missing await for test method
* Update env config to .env.json and add dotenv loading
* ncc dotenv package
* Update type
* Update with new dis... | packages/create-next-app/templates/default/gitignore | @@ -17,9 +17,14 @@
# misc
.DS_Store
-.env*
# debug
npm-debug.log*
yarn-debug.log*
yarn-error.log*
+
+# local env files
+.env.local
+.env.development.local
+.env.test.local
+.env.production.local | true |
Other | vercel | next.js | d8155b22ffbd2e64ca1aca6a7a843481a4f1c913.json | Add initial support for new env handling (#10525)
* Add initial support for new env config file
* Fix serverless processEnv call when no env is provided
* Add missing await for test method
* Update env config to .env.json and add dotenv loading
* ncc dotenv package
* Update type
* Update with new dis... | packages/next/build/index.ts | @@ -71,6 +71,7 @@ import {
} from './utils'
import getBaseWebpackConfig from './webpack-config'
import { writeBuildId } from './write-build-id'
+import { loadEnvConfig } from '../lib/load-env-config'
const fsAccess = promisify(fs.access)
const fsUnlink = promisify(fs.unlink)
@@ -110,6 +111,9 @@ export default as... | true |
Other | vercel | next.js | d8155b22ffbd2e64ca1aca6a7a843481a4f1c913.json | Add initial support for new env handling (#10525)
* Add initial support for new env config file
* Fix serverless processEnv call when no env is provided
* Add missing await for test method
* Update env config to .env.json and add dotenv loading
* ncc dotenv package
* Update type
* Update with new dis... | packages/next/build/webpack-config.ts | @@ -707,6 +707,17 @@ export default async function getBaseWebpackConfig(
// This plugin makes sure `output.filename` is used for entry chunks
new ChunkNamesPlugin(),
new webpack.DefinePlugin({
+ ...(config.experimental.pageEnv
+ ? Object.keys(process.env).reduce(
+ (pre... | true |
Other | vercel | next.js | d8155b22ffbd2e64ca1aca6a7a843481a4f1c913.json | Add initial support for new env handling (#10525)
* Add initial support for new env config file
* Fix serverless processEnv call when no env is provided
* Add missing await for test method
* Update env config to .env.json and add dotenv loading
* ncc dotenv package
* Update type
* Update with new dis... | packages/next/build/webpack/loaders/next-serverless-loader.ts | @@ -181,6 +181,7 @@ const nextServerlessLoader: loader.Loader = function() {
Object.assign({}, parsedUrl.query, params ),
resolver,
${encodedPreviewProps},
+ process.env,
onError
)
} catch (err) {
@@ -257,6 +258,7 @@ const nextServerless... | true |
Other | vercel | next.js | d8155b22ffbd2e64ca1aca6a7a843481a4f1c913.json | Add initial support for new env handling (#10525)
* Add initial support for new env config file
* Fix serverless processEnv call when no env is provided
* Add missing await for test method
* Update env config to .env.json and add dotenv loading
* ncc dotenv package
* Update type
* Update with new dis... | packages/next/export/index.ts | @@ -35,6 +35,7 @@ import loadConfig, {
import { eventCliSession } from '../telemetry/events'
import { Telemetry } from '../telemetry/storage'
import { normalizePagePath } from '../next-server/server/normalize-page-path'
+import { loadEnvConfig } from '../lib/load-env-config'
const copyFile = promisify(copyFileOri... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.