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 | e8aa78204aafe4b1cb97226d670b4474d536a683.json | Improve glamor example (#4893)
Changes:
- Use css prop on the element to style it
- Add webpack + babelrc configuration to remove otherwise needed import boilerplate [according to glamor docs](https://github.com/threepointone/glamor/blob/master/docs/createElement.md)
Rationale: The killer feature of glamor that m... | examples/with-glamor/next.config.js | @@ -0,0 +1,16 @@
+const webpack = require('webpack')
+
+module.exports = {
+ webpack: (config, { buildId, dev, isServer, defaultLoaders }) => {
+ const { plugins } = config
+ return {
+ ...config,
+ plugins: [
+ ...(plugins || []),
+ new webpack.ProvidePlugin({
+ Glamor: 'glamor/... | true |
Other | vercel | next.js | e8aa78204aafe4b1cb97226d670b4474d536a683.json | Improve glamor example (#4893)
Changes:
- Use css prop on the element to style it
- Add webpack + babelrc configuration to remove otherwise needed import boilerplate [according to glamor docs](https://github.com/threepointone/glamor/blob/master/docs/createElement.md)
Rationale: The killer feature of glamor that m... | examples/with-glamor/package.json | @@ -7,6 +7,7 @@
"start": "next start"
},
"dependencies": {
+ "babel-plugin-transform-react-jsx": "^6.24.1",
"glamor": "^2.20.24",
"next": "latest",
"react": "^16.0.0", | true |
Other | vercel | next.js | e8aa78204aafe4b1cb97226d670b4474d536a683.json | Improve glamor example (#4893)
Changes:
- Use css prop on the element to style it
- Add webpack + babelrc configuration to remove otherwise needed import boilerplate [according to glamor docs](https://github.com/threepointone/glamor/blob/master/docs/createElement.md)
Rationale: The killer feature of glamor that m... | examples/with-glamor/pages/index.js | @@ -1,5 +1,5 @@
import React from 'react'
-import { style, rehydrate } from 'glamor'
+import { rehydrate } from 'glamor'
// Adds server generated styles to glamor cache.
// Has to run before any `style()` calls
@@ -8,11 +8,4 @@ if (typeof window !== 'undefined') {
rehydrate(window.__NEXT_DATA__.ids)
}
-expor... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | build/webpack.js | @@ -41,7 +41,7 @@ function externalsConfig (dir, isServer) {
}
// Webpack itself has to be compiled because it doesn't always use module relative paths
- if (res.match(/node_modules[/\\]webpack/)) {
+ if (res.match(/node_modules[/\\]webpack/) || res.match(/node_modules[/\\]css-loader/)) {
... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | build/webpack/plugins/build-manifest-plugin.js | @@ -8,7 +8,7 @@ export default class BuildManifestPlugin {
apply (compiler: any) {
compiler.hooks.emit.tapAsync('NextJsBuildManifest', (compilation, callback) => {
const {chunks} = compilation
- const assetMap = {pages: {}, css: []}
+ const assetMap = {pages: {}}
const mainJsChunk = ch... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | build/webpack/plugins/nextjs-ssr-module-cache.js | @@ -1,6 +1,7 @@
import webpack from 'webpack'
import { RawSource } from 'webpack-sources'
import { join, relative, dirname } from 'path'
+import {IS_BUNDLED_PAGE_REGEX} from '../../../lib/constants'
const SSR_MODULE_CACHE_FILENAME = 'ssr-module-cache.js'
@@ -31,7 +32,14 @@ export default class NextJsSsrImportPl... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | package.json | @@ -99,7 +99,7 @@
"unfetch": "3.0.0",
"url": "0.11.0",
"uuid": "3.1.0",
- "webpack": "4.16.1",
+ "webpack": "4.16.3",
"webpack-dev-middleware": "3.1.3",
"webpack-hot-middleware": "2.22.2",
"webpack-sources": "1.1.0",
@@ -112,7 +112,8 @@
"@taskr/clear": "1.1.0",
"@taskr/esne... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | server/document.js | @@ -49,15 +49,41 @@ export class Head extends Component {
return null
}
- return files.map((file) => (
- <link
+ return files.map((file) => {
+ // Only render .js files here
+ if(!/\.js$/.exec(file)) {
+ return null
+ }
+
+ return <link
key={file}
... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | test/integration/config/components/hello-webpack-css.css | @@ -1,3 +1,3 @@
.helloWorld {
- color: red;
+ font-size: 100px;
} | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | test/integration/config/components/hello-webpack-css.js | @@ -1,3 +1,4 @@
import css from './hello-webpack-css.css'
+import sass from './hello-webpack-sass.scss'
import framework from 'css-framework/framework.css'
-export default () => <div className={`${css.helloWorld} ${framework.frameworkClass}`}>Hello World</div>
+export default () => <div className={`hello-world ${css.... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | test/integration/config/components/hello-webpack-sass.scss | @@ -0,0 +1,5 @@
+$color: yellow;
+
+.helloWorldSass {
+ color: $color;
+} | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | test/integration/config/next.config.js | @@ -1,7 +1,8 @@
-// const withCSS = require('@zeit/next-css')
+const withCSS = require('@zeit/next-css')
+const withSass = require('@zeit/next-sass')
const webpack = require('webpack')
-// module.exports = withCSS({
-module.exports = {
+const path = require('path')
+module.exports = withCSS(withSass({
onDemandEntri... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | test/integration/config/node_modules/css-framework/framework.css | @@ -1,3 +1,3 @@
.frameworkClass {
- font-size: 100px;
+ background: blue
}
\ No newline at end of file | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | test/integration/config/test/client.js | @@ -2,6 +2,8 @@
import webdriver from 'next-webdriver'
import { waitFor } from 'next-test-utils'
+import { readFileSync, writeFileSync } from 'fs'
+import { join } from 'path'
export default (context, render) => {
describe('Configuration', () => {
@@ -17,5 +19,81 @@ export default (context, render) => {
... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | test/integration/config/test/index.test.js | @@ -24,8 +24,8 @@ describe('Configuration', () => {
// pre-build all pages at the start
await Promise.all([
renderViaHTTP(context.appPort, '/next-config'),
- renderViaHTTP(context.appPort, '/build-id')
- // renderViaHTTP(context.appPort, '/webpack-css')
+ renderViaHTTP(context.appPort, '... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | test/integration/config/test/rendering.js | @@ -9,15 +9,15 @@ export default function ({ app }, suiteName, render, fetch) {
}
describe(suiteName, () => {
- // test('renders css imports', async () => {
- // const $ = await get$('/webpack-css')
- // expect($('._46QtCORzC4BWRnIseSbG-').text() === 'Hello World')
- // })
+ test('renders css... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | test/integration/production/test/index.test.js | @@ -15,7 +15,7 @@ import webdriver from 'next-webdriver'
import fetch from 'node-fetch'
import dynamicImportTests from '../../basic/test/dynamic'
import security from './security'
-import {BUILD_MANIFEST, REACT_LOADABLE_MANIFEST, CLIENT_STATIC_FILES_RUNTIME_MAIN} from 'next/constants'
+import {BUILD_MANIFEST, REACT_... | true |
Other | vercel | next.js | 183866a96db9a6bcf23c653ecc42de017d1cb519.json | Add support for rendering .css chunks (#4861)
Depends on https://github.com/zeit/next-plugins/pull/228
Failing tests are expected as `@zeit/next-css` has to be updated/released first.
This implements rendering of `.css` chunks. Effectively removing the custom document requirement when adding next-css/sass/less/s... | yarn.lock | @@ -900,16 +900,34 @@
"@webassemblyjs/wast-parser" "1.5.13"
long "^3.2.0"
-"@zeit/next-css@0.0.7":
- version "0.0.7"
- resolved "https://registry.yarnpkg.com/@zeit/next-css/-/next-css-0.0.7.tgz#8eb0c3829d757854921488e4e1e1a5c086f3fad8"
+"@webpack-contrib/schema-utils@^1.0.0-beta.0":
+ version "1.0.0-beta... | true |
Other | vercel | next.js | fc05c9c27307fd6910f7d87b8c65b085751ce190.json | Update readme with alternative hostname option (#4829)
Tackles the issue in #4025. | readme.md | @@ -63,6 +63,7 @@ Next.js is a minimalistic framework for server-rendered React applications.
- [Customizing webpack config](#customizing-webpack-config)
- [Customizing babel config](#customizing-babel-config)
- [Exposing configuration to the server / client side](#exposing-configuration-to-the-server--client-... | false |
Other | vercel | next.js | 6415d5f4ee157a2de4a15e69a565ec1bdf693392.json | Upgrade fastify in custom-server-fastify (#4801) | examples/custom-server-fastify/package.json | @@ -7,7 +7,7 @@
"start": "NODE_ENV=production node server.js"
},
"dependencies": {
- "fastify": "^0.29.2",
+ "fastify": "1.8.0",
"next": "latest",
"react": "^16.0.0",
"react-dom": "^16.0.0" | false |
Other | vercel | next.js | e463c2a1bb9f483ddb3658ca99b386f1ee100014.json | Remove outdated note from with-jest example (#5820) | examples/with-jest/README.md | @@ -46,5 +46,3 @@ yarn test
This example features:
* An app with jest tests
-
-> A very important part of this example is the `.babelrc` file which configures the `test` environment to use `babel-preset-env` and configures it to transpile modules to `commonjs`). [Learn more](https://github.com/zeit/next.js/issues/2... | false |
Other | vercel | next.js | 29ed67b02071cbf7f3ddd1806a206e850eaebc8b.json | Add test for generateBuildId (#5816)
* Add docs for returning `null` from generateBuildId
* Add test for setting custom buildid
* Fix linting | package.json | @@ -20,9 +20,9 @@
},
"pre-commit": "lint-staged",
"lint-staged": {
- "*.js": "standard --fix",
- "*.ts": "standard --parser typescript-eslint-parser --plugin typescript --fix",
- "packages/**/bin/*": "standard"
+ "*.js": ["standard --fix", "git add"],
+ "*.ts": ["standard --parser typescript-esl... | true |
Other | vercel | next.js | 29ed67b02071cbf7f3ddd1806a206e850eaebc8b.json | Add test for generateBuildId (#5816)
* Add docs for returning `null` from generateBuildId
* Add test for setting custom buildid
* Fix linting | packages/next/README.md | @@ -1206,8 +1206,6 @@ Or use a function:
```js
module.exports = (phase, {defaultConfig}) => {
- //
- // https://github.com/zeit/
return {
/* config options here */
}
@@ -1296,6 +1294,21 @@ module.exports = {
}
```
+To fall back to the default of generating a unique id return `null` from the functio... | true |
Other | vercel | next.js | 29ed67b02071cbf7f3ddd1806a206e850eaebc8b.json | Add test for generateBuildId (#5816)
* Add docs for returning `null` from generateBuildId
* Add test for setting custom buildid
* Fix linting | test/integration/production-config/next.config.js | @@ -19,5 +19,8 @@ module.exports = withCSS(withSass({
}
return config
+ },
+ async generateBuildId () {
+ return 'custom-buildid'
}
})) | true |
Other | vercel | next.js | 29ed67b02071cbf7f3ddd1806a206e850eaebc8b.json | Add test for generateBuildId (#5816)
* Add docs for returning `null` from generateBuildId
* Add test for setting custom buildid
* Fix linting | test/integration/production-config/test/index.test.js | @@ -11,6 +11,7 @@ import webdriver from 'next-webdriver'
jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5
+let appPort
let server
describe('Production Config Usage', () => {
@@ -23,6 +24,7 @@ describe('Production Config Usage', () => {
quiet: true
})
server = await startApp(app)
+ appPort =... | true |
Other | vercel | next.js | d11a3aa34e0c51dfe4f954189db28ab7646fb0b9.json | Add tests for isomorphic-unfetch bundling issue (#5805)
* Add tests for isomorphic-unfetch bundling issue
* Remove unneeded extra option
* Remove isomorphic-fetch | package.json | @@ -54,6 +54,7 @@
"fkill": "5.1.0",
"flatten": "1.0.2",
"get-port": "3.2.0",
+ "isomorphic-unfetch": "3.0.0",
"jest-cli": "23.6.0",
"jest-junit": "^5.0.0",
"lerna": "^3.4.0", | true |
Other | vercel | next.js | d11a3aa34e0c51dfe4f954189db28ab7646fb0b9.json | Add tests for isomorphic-unfetch bundling issue (#5805)
* Add tests for isomorphic-unfetch bundling issue
* Remove unneeded extra option
* Remove isomorphic-fetch | packages/next/build/webpack-config.js | @@ -213,7 +213,8 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer
],
alias: {
next: NEXT_PROJECT_ROOT
- }
+ },
+ mainFields: [!isServer && 'browser', !isServer && 'module', 'main'].filter(Boolean)
}
const webpackMode = dev ? 'development' : 'production... | true |
Other | vercel | next.js | d11a3aa34e0c51dfe4f954189db28ab7646fb0b9.json | Add tests for isomorphic-unfetch bundling issue (#5805)
* Add tests for isomorphic-unfetch bundling issue
* Remove unneeded extra option
* Remove isomorphic-fetch | test/integration/lambdas/pages/fetch.js | @@ -0,0 +1,29 @@
+import fetch from 'isomorphic-unfetch'
+import React from 'react'
+
+export default class extends React.Component {
+ static async getInitialProps () {
+ try {
+ const res = await fetch('')
+ const text = await res.text()
+ console.log(text)
+ return {text}
+ } catch (err) {... | true |
Other | vercel | next.js | d11a3aa34e0c51dfe4f954189db28ab7646fb0b9.json | Add tests for isomorphic-unfetch bundling issue (#5805)
* Add tests for isomorphic-unfetch bundling issue
* Remove unneeded extra option
* Remove isomorphic-fetch | test/integration/lambdas/pages/index.js | @@ -1 +1,9 @@
-export default () => 'Hello World'
+import Link from 'next/link'
+export default () => {
+ return <div>
+ Hello World
+ <Link href='/fetch'>
+ <a id='fetchlink'>fetch page</a>
+ </Link>
+ </div>
+} | true |
Other | vercel | next.js | d11a3aa34e0c51dfe4f954189db28ab7646fb0b9.json | Add tests for isomorphic-unfetch bundling issue (#5805)
* Add tests for isomorphic-unfetch bundling issue
* Remove unneeded extra option
* Remove isomorphic-fetch | test/integration/lambdas/test/index.test.js | @@ -8,6 +8,8 @@ import {
stopApp,
renderViaHTTP
} from 'next-test-utils'
+import webdriver from 'next-webdriver'
+import fetch from 'node-fetch'
const appDir = join(__dirname, '../')
let appPort
@@ -35,4 +37,26 @@ describe('Lambdas', () => {
const html = await renderViaHTTP(appPort, '/')
expect(htm... | true |
Other | vercel | next.js | 2d31404d0782ba809b39a49e4c45797ef1adde12.json | Add license to the root directory | license.md | @@ -0,0 +1,21 @@
+The MIT License (MIT)
+
+Copyright (c) 2016-present Zeit, Inc.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+t... | false |
Other | vercel | next.js | a9cf735f503dd2f0abc3844491adb81bf44ccead.json | Convert babel plugins to typescript (#5789)
Slowly moving files over 💯 | packages/next/build/babel/plugins/next-to-next-server.ts | @@ -1,8 +1,11 @@
+import {PluginObj} from '@babel/core'
+import {NodePath} from '@babel/traverse'
+import {ImportDeclaration} from '@babel/types'
// Rewrite imports using next/<something> to next-server/<something>
-export default function ({ types: t, template }) {
+export default function NextToNextServer (): Plugin... | true |
Other | vercel | next.js | a9cf735f503dd2f0abc3844491adb81bf44ccead.json | Convert babel plugins to typescript (#5789)
Slowly moving files over 💯 | packages/next/build/babel/plugins/react-loadable-plugin.ts | @@ -23,10 +23,14 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWAR
// Modified to put `webpack` and `modules` under `loadableGenerated` to be backwards compatible with next/dynamic which has a `modules` key
// Modified to support `dynamic(import('something'))` and `dynamic(import('something'), options)... | true |
Other | vercel | next.js | a9cf735f503dd2f0abc3844491adb81bf44ccead.json | Convert babel plugins to typescript (#5789)
Slowly moving files over 💯 | packages/next/build/babel/preset.js | @@ -1,63 +0,0 @@
-const env = process.env.NODE_ENV
-const isProduction = env === 'production'
-const isDevelopment = env === 'development'
-const isTest = env === 'test'
-
-// Resolve styled-jsx plugins
-function styledJsxOptions (opts) {
- if (!opts) {
- return {}
- }
-
- if (!Array.isArray(opts.plugins)) {
- ... | true |
Other | vercel | next.js | a9cf735f503dd2f0abc3844491adb81bf44ccead.json | Convert babel plugins to typescript (#5789)
Slowly moving files over 💯 | packages/next/build/babel/preset.ts | @@ -0,0 +1,84 @@
+import {PluginItem} from '@babel/core'
+const env = process.env.NODE_ENV
+const isProduction = env === 'production'
+const isDevelopment = env === 'development'
+const isTest = env === 'test'
+
+type StyledJsxPlugin = [string, any] | string
+type StyledJsxBabelOptions = {
+ plugins?: StyledJsxPlugin[... | true |
Other | vercel | next.js | a9cf735f503dd2f0abc3844491adb81bf44ccead.json | Convert babel plugins to typescript (#5789)
Slowly moving files over 💯 | packages/next/build/generate-build-id.ts | @@ -0,0 +1,13 @@
+export async function generateBuildId (generate: () => string|null, fallback: () => string): Promise<string> {
+ let buildId = await generate()
+ // If there's no buildId defined we'll fall back
+ if (buildId === null) {
+ buildId = fallback()
+ }
+
+ if (typeof buildId !== 'string') {
+ th... | true |
Other | vercel | next.js | a9cf735f503dd2f0abc3844491adb81bf44ccead.json | Convert babel plugins to typescript (#5789)
Slowly moving files over 💯 | packages/next/build/index.js | @@ -6,24 +6,11 @@ import nanoid from 'nanoid'
import loadConfig from 'next-server/next-config'
import { PHASE_PRODUCTION_BUILD, BUILD_ID_FILE } from 'next-server/constants'
import getBaseWebpackConfig from './webpack'
+import {generateBuildId} from './generate-build-id'
const access = promisify(fs.access)
const ... | true |
Other | vercel | next.js | a9cf735f503dd2f0abc3844491adb81bf44ccead.json | Convert babel plugins to typescript (#5789)
Slowly moving files over 💯 | packages/next/package.json | @@ -94,6 +94,12 @@
"@taskr/clear": "1.1.0",
"@taskr/esnext": "1.1.0",
"@taskr/watch": "1.1.0",
+ "@types/babel__core": "7.0.4",
+ "@types/babel__traverse": "7.0.3",
+ "@types/nanoid": "1.2.0",
+ "@types/babel-types": "7.0.4",
+ "@types/babel__generator": "7.0.1",
+ "@types/babel__templa... | true |
Other | vercel | next.js | a9cf735f503dd2f0abc3844491adb81bf44ccead.json | Convert babel plugins to typescript (#5789)
Slowly moving files over 💯 | packages/next/tsconfig.json | @@ -5,6 +5,17 @@
"module": "esnext",
"target": "ES2017",
"esModuleInterop": true,
- "jsx": "react"
+ "jsx": "react",
+ "strictNullChecks": true,
+ "noImplicitAny": true,
+ "baseUrl": "../..",
+ "paths": {
+ "@babel/types": [
+ "babel-types/index.d.ts",
+ "@types/babel... | true |
Other | vercel | next.js | 633dd87b189f4bec720626d3f12369871e84c33b.json | Handle 404 thrown from send (#5779) | packages/next-server/server/next-server.js | @@ -231,7 +231,7 @@ export default class Server {
try {
return await serveStatic(req, res, path)
} catch (err) {
- if (err.code === 'ENOENT') {
+ if (err.code === 'ENOENT' || err.statusCode === 404) {
this.render404(req, res)
} else {
throw err | true |
Other | vercel | next.js | 633dd87b189f4bec720626d3f12369871e84c33b.json | Handle 404 thrown from send (#5779) | test/integration/production/test/index.test.js | @@ -61,6 +61,12 @@ describe('Production Usage', () => {
expect(res.status).toBe(404)
})
+ it('should render 404 for dotfiles in /static', async () => {
+ const url = `http://localhost:${appPort}/static/.env`
+ const res = await fetch(url)
+ expect(res.status).toBe(404)
+ })
+
it(... | true |
Other | vercel | next.js | 55e89e759a1a81a2815cbcc53359197dbcb41779.json | Fix polyfill for ie11 (#5763)
* Fix polyfill for ie11
* Use esmodules only when using webpack | packages/next/build/babel/preset.js | @@ -51,8 +51,10 @@ module.exports = (context, opts = {}) => ({
[require('@babel/plugin-proposal-class-properties'), opts['class-properties'] || {}],
require('@babel/plugin-proposal-object-rest-spread'),
[require('@babel/plugin-transform-runtime'), {
- helpers: false,
+ corejs: 2,
+ helpers... | false |
Other | vercel | next.js | 4594b7cb07baefd16c87626aa198bfef171d62e8.json | Remove secret from 'publicRuntimeConfig' example (#5759) | packages/next/README.md | @@ -1444,11 +1444,11 @@ The `next/config` module gives your app access to runtime configuration stored i
// next.config.js
module.exports = {
serverRuntimeConfig: { // Will only be available on the server side
- mySecret: 'secret'
+ mySecret: 'secret',
+ secondSecret: process.env.SECOND_SECRET // Pass thr... | false |
Other | vercel | next.js | 08e3396574cd39ea94aab10ac9b07272cd7b669a.json | Fix graphql issue with lambdas flag (#5755)
Fixes https://spectrum.chat/?t=604f6aa6-23f2-4358-8b0b-14e5810178dc | packages/next/build/webpack.js | @@ -206,7 +206,7 @@ export default async function getBaseWebpackConfig (dir, {dev = false, isServer
const resolveConfig = {
// Disable .mjs for node_modules bundling
- extensions: ['.wasm', !lambdas && '.mjs', '.js', '.jsx', '.json'].filter(Boolean),
+ extensions: ['.wasm', '.mjs', '.js', '.jsx', '.json... | false |
Other | vercel | next.js | 48d3ae2dd6a326814914cc01f87f263d3afad38c.json | Remove unused vars and fix typo. (#5752)
- Removed unused "render" and "appPort" var from tests
- Fix typo on "occured" to "occurred" | examples/with-apollo-auth/components/RegisterBox.js | @@ -47,7 +47,7 @@ const RegisterBox = ({ client }) => {
name.value = email.value = password.value = ''
}}>
- {error && <p>Issue occured while registering :(</p>}
+ {error && <p>Issue occurred while registering :(</p>}
<input name='name' placeholder='Name' ref={node => ... | true |
Other | vercel | next.js | 48d3ae2dd6a326814914cc01f87f263d3afad38c.json | Remove unused vars and fix typo. (#5752)
- Removed unused "render" and "appPort" var from tests
- Fix typo on "occured" to "occurred" | test/integration/basic/pages/error-in-the-browser-global-scope.js | @@ -1,5 +1,5 @@
if (typeof window !== 'undefined') {
- throw new Error('An Expected error occured')
+ throw new Error('An Expected error occurred')
}
export default () => <div /> | true |
Other | vercel | next.js | 48d3ae2dd6a326814914cc01f87f263d3afad38c.json | Remove unused vars and fix typo. (#5752)
- Removed unused "render" and "appPort" var from tests
- Fix typo on "occured" to "occurred" | test/integration/basic/pages/error-inside-browser-page.js | @@ -2,7 +2,7 @@ import React from 'react'
export default class ErrorInRenderPage extends React.Component {
render () {
if (typeof window !== 'undefined') {
- throw new Error('An Expected error occured')
+ throw new Error('An Expected error occurred')
}
return <div />
} | true |
Other | vercel | next.js | 48d3ae2dd6a326814914cc01f87f263d3afad38c.json | Remove unused vars and fix typo. (#5752)
- Removed unused "render" and "appPort" var from tests
- Fix typo on "occured" to "occurred" | test/integration/basic/test/client-navigation.js | @@ -3,7 +3,7 @@
import webdriver from 'next-webdriver'
import {waitFor, getReactErrorOverlayContent} from 'next-test-utils'
-export default (context, render) => {
+export default (context) => {
describe('Client Navigation', () => {
describe('with <Link/>', () => {
it('should navigate the page', async... | true |
Other | vercel | next.js | 48d3ae2dd6a326814914cc01f87f263d3afad38c.json | Remove unused vars and fix typo. (#5752)
- Removed unused "render" and "appPort" var from tests
- Fix typo on "occured" to "occurred" | 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, render) => {
+export default (context) => {
describe('Error Recovery', () => {
it('should recov... | true |
Other | vercel | next.js | 48d3ae2dd6a326814914cc01f87f263d3afad38c.json | Remove unused vars and fix typo. (#5752)
- Removed unused "render" and "appPort" var from tests
- Fix typo on "occured" to "occurred" | test/integration/basic/test/process-env.js | @@ -1,7 +1,7 @@
/* eslint-env jest */
import webdriver from 'next-webdriver'
-export default (context, render) => {
+export default (context) => {
describe('process.env', () => {
it('should set process.env.NODE_ENV in development', async () => {
const browser = await webdriver(context.appPort, '/proc... | true |
Other | vercel | next.js | 48d3ae2dd6a326814914cc01f87f263d3afad38c.json | Remove unused vars and fix typo. (#5752)
- Removed unused "render" and "appPort" var from tests
- Fix typo on "occured" to "occurred" | test/integration/basic/test/rendering.js | @@ -4,7 +4,7 @@ import cheerio from 'cheerio'
import {BUILD_MANIFEST, REACT_LOADABLE_MANIFEST} from 'next-server/constants'
import { join } from 'path'
-export default function ({ app }, suiteName, render, fetch, appPort) {
+export default function ({ app }, suiteName, render, fetch) {
async function get$ (path,... | true |
Other | vercel | next.js | 48d3ae2dd6a326814914cc01f87f263d3afad38c.json | Remove unused vars and fix typo. (#5752)
- Removed unused "render" and "appPort" var from tests
- Fix typo on "occured" to "occurred" | test/integration/production/pages/error-in-browser-render-status-code.js | @@ -2,7 +2,7 @@ import React from 'react'
export default class ErrorInRenderPage extends React.Component {
render () {
if (typeof window !== 'undefined') {
- const error = new Error('An Expected error occured')
+ const error = new Error('An Expected error occurred')
// This will be extracted b... | true |
Other | vercel | next.js | cad19c808c55ac3e0cacb58591548f5b1c40108b.json | Use <link rel=“prefetch”> for prefetching (#5737)
* Use <link rel=“prefetch”> for prefetching
Fixes #5734
* Fix unit tests for router
* Add test for prefetch
* Rename test
* Check all logs for message | packages/next-server/lib/p-queue.js | @@ -1,83 +0,0 @@
-// based on https://github.com/sindresorhus/p-queue (MIT)
-// modified for browser support
-
-class Queue {
- constructor () {
- this._queue = []
- }
- enqueue (run) {
- this._queue.push(run)
- }
- dequeue () {
- return this._queue.shift()
- }
- get size () {
- return this._queue.le... | true |
Other | vercel | next.js | cad19c808c55ac3e0cacb58591548f5b1c40108b.json | Use <link rel=“prefetch”> for prefetching (#5737)
* Use <link rel=“prefetch”> for prefetching
Fixes #5734
* Fix unit tests for router
* Add test for prefetch
* Rename test
* Check all logs for message | packages/next-server/lib/router/router.js | @@ -3,7 +3,6 @@
import { parse, format } from 'url'
import EventEmitter from '../EventEmitter'
import shallowEquals from '../shallow-equals'
-import PQueue from '../p-queue'
import { loadGetInitialProps, getURL } from '../utils'
import { _rewriteUrlForNextExport } from './'
@@ -30,7 +29,6 @@ export default class... | true |
Other | vercel | next.js | cad19c808c55ac3e0cacb58591548f5b1c40108b.json | Use <link rel=“prefetch”> for prefetching (#5737)
* Use <link rel=“prefetch”> for prefetching
Fixes #5734
* Fix unit tests for router
* Add test for prefetch
* Rename test
* Check all logs for message | packages/next/lib/page-loader.js | @@ -1,6 +1,19 @@
-/* global window, document */
+/* global document */
import EventEmitter from 'next-server/dist/lib/EventEmitter'
+// smaller version of https://gist.github.com/igrigorik/a02f2359f3bc50ca7a9c
+function listSupports (list, token) {
+ if (!list || !list.supports) {
+ return false
+ }
+ try {
+ ... | true |
Other | vercel | next.js | cad19c808c55ac3e0cacb58591548f5b1c40108b.json | Use <link rel=“prefetch”> for prefetching (#5737)
* Use <link rel=“prefetch”> for prefetching
Fixes #5734
* Fix unit tests for router
* Add test for prefetch
* Rename test
* Check all logs for message | packages/next/package.json | @@ -50,7 +50,7 @@
"autodll-webpack-plugin": "0.4.2",
"babel-core": "7.0.0-bridge.0",
"babel-loader": "8.0.2",
- "babel-plugin-react-require": "3.0.1",
+ "babel-plugin-react-require": "3.0.0",
"babel-plugin-transform-react-remove-prop-types": "0.4.15",
"case-sensitive-paths-webpack-plugin"... | true |
Other | vercel | next.js | cad19c808c55ac3e0cacb58591548f5b1c40108b.json | Use <link rel=“prefetch”> for prefetching (#5737)
* Use <link rel=“prefetch”> for prefetching
Fixes #5734
* Fix unit tests for router
* Add test for prefetch
* Rename test
* Check all logs for message | test/integration/production/pages/prefetch.js | @@ -0,0 +1,28 @@
+import Link from 'next/link'
+
+export default () => {
+ return <div>
+ <ul>
+ <li>
+ <Link href='/' prefetch>
+ <a>index</a>
+ </Link>
+ </li>
+ <li>
+ <Link href='/process-env' prefetch>
+ <a>process env</a>
+ </Link>
+ </li>
+ ... | true |
Other | vercel | next.js | cad19c808c55ac3e0cacb58591548f5b1c40108b.json | Use <link rel=“prefetch”> for prefetching (#5737)
* Use <link rel=“prefetch”> for prefetching
Fixes #5734
* Fix unit tests for router
* Add test for prefetch
* Rename test
* Check all logs for message | test/integration/production/test/index.test.js | @@ -210,6 +210,21 @@ describe('Production Usage', () => {
browser.close()
})
+ it('should add prefetch tags when Link prefetch prop is used', async () => {
+ const browser = await webdriver(appPort, '/prefetch')
+ const elements = await browser.elementsByCss('link[rel=prefetch]')
+ expec... | true |
Other | vercel | next.js | cad19c808c55ac3e0cacb58591548f5b1c40108b.json | Use <link rel=“prefetch”> for prefetching (#5737)
* Use <link rel=“prefetch”> for prefetching
Fixes #5734
* Fix unit tests for router
* Add test for prefetch
* Rename test
* Check all logs for message | test/unit/router.test.js | @@ -5,6 +5,7 @@ class PageLoader {
constructor (options = {}) {
this.options = options
this.loaded = {}
+ this.prefetched = {}
}
loadPage (route) {
@@ -14,6 +15,10 @@ class PageLoader {
return new Promise((resolve) => setTimeout(resolve, this.options.delay))
}
}
+
+ prefetch (rou... | true |
Other | vercel | next.js | 7076727d3e7d12b633aae1073f935e514f042a7f.json | Fix location of production server file (#5731)
(At least with my set up, mac osx, node 10.13.0, yarn 1.12.1)
Couldn't get the server to start with `npm start`, this appears to fix that | examples/custom-server-typescript/package.json | @@ -2,7 +2,7 @@
"scripts": {
"dev": "nodemon server/index.ts",
"build": "next build && tsc --project tsconfig.server.json",
- "start": "NODE_ENV=production node .next/production-server/server/index.js"
+ "start": "NODE_ENV=production node .next/production-server/index.js"
},
"dependencies": {
... | false |
Other | vercel | next.js | 9b2782a6d0c21f780465eaf6861da52df2fc36f1.json | Add engines to next and next-server (#5724) | packages/next-server/package.json | @@ -53,5 +53,8 @@
"@taskr/clear": "1.1.0",
"@taskr/watch": "1.1.0",
"taskr": "1.1.0"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
}
} | true |
Other | vercel | next.js | 9b2782a6d0c21f780465eaf6861da52df2fc36f1.json | Add engines to next and next-server (#5724) | packages/next/package.json | @@ -92,5 +92,8 @@
"@taskr/esnext": "1.1.0",
"@taskr/watch": "1.1.0",
"taskr": "1.1.0"
+ },
+ "engines": {
+ "node": ">= 8.0.0"
}
} | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | package.json | @@ -34,6 +34,7 @@
},
"devDependencies": {
"@babel/plugin-proposal-object-rest-spread": "7.0.0",
+ "@babel/preset-flow": "7.0.0",
"@babel/preset-react": "7.0.0",
"@zeit/next-css": "1.0.2-canary.2",
"@zeit/next-sass": "1.0.2-canary.2",
@@ -50,7 +51,6 @@
"express": "4.16.3",
"fkill":... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next-server/babel.config.js | @@ -1,8 +1,7 @@
module.exports = {
'presets': [
'@babel/preset-env',
- '@babel/preset-react',
- '@babel/preset-flow'
+ '@babel/preset-react'
],
'plugins': [
'@babel/plugin-proposal-object-rest-spread', | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next-server/lib/dynamic.js | @@ -1,40 +1,9 @@
-// @flow
-import type {ElementType} from 'react'
-
import React from 'react'
import Loadable from './loadable'
-type ImportedComponent = Promise<null|ElementType>
-
-type ComponentMapping = {[componentName: string]: ImportedComponent}
-
-type NextDynamicOptions = {
- loader?: ComponentMapping | (... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next-server/lib/error-debug.js | @@ -1,11 +1,10 @@
-// @flow
import React from 'react'
import ansiHTML from 'ansi-html'
import Head from 'next-server/head'
// This component is rendered through dev-error-overlay on the client side.
// On the server side it's rendered directly
-export default function ErrorDebug ({error, info}: any) {
+export de... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next-server/server/config.js | @@ -1,25 +1,7 @@
-// @flow
import findUp from 'find-up'
import {CONFIG_FILE} from 'next-server/constants'
-type WebpackConfig = *
-
-type WebpackDevMiddlewareConfig = *
-
-export type NextConfig = {|
- webpack: null | (webpackConfig: WebpackConfig, {dir: string, dev: boolean, isServer: boolean, buildId: string, co... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/babel.config.js | @@ -1,8 +1,7 @@
module.exports = {
'presets': [
'@babel/preset-env',
- '@babel/preset-react',
- '@babel/preset-flow'
+ '@babel/preset-react'
],
'plugins': [
'@babel/plugin-syntax-dynamic-import', | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/build/webpack.js | @@ -1,5 +1,3 @@
-// @flow
-import type {NextConfig} from '../server/config'
import path from 'path'
import webpack from 'webpack'
import resolve from 'resolve'
@@ -129,7 +127,7 @@ function optimizationConfig ({dir, dev, isServer, totalPages, lambdas}) {
}
}
- const config: any = {
+ const config = {
... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/build/webpack/loaders/hot-self-accept-loader.js | @@ -1,16 +1,10 @@
-// @flow
import { relative } from 'path'
import loaderUtils from 'loader-utils'
-type Options = {|
- extensions: RegExp,
- include: Array<string>
-|}
-
-module.exports = function (content: string, sourceMap: any) {
+module.exports = function (content, sourceMap) {
this.cacheable()
- const... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/build/webpack/plugins/build-manifest-plugin.js | @@ -1,11 +1,10 @@
-// @flow
import { RawSource } from 'webpack-sources'
import {BUILD_MANIFEST, ROUTE_NAME_REGEX, IS_BUNDLED_PAGE_REGEX, CLIENT_STATIC_FILES_RUNTIME_MAIN} from 'next-server/constants'
// This plugin creates a build-manifest.json for all assets that are being output
// It has a mapping of "entry" f... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/build/webpack/plugins/nextjs-require-cache-hot-reloader.js | @@ -1,16 +1,13 @@
-// @flow
-
-function deleteCache (path: string) {
+function deleteCache (path) {
delete require.cache[path]
}
// This plugin flushes require.cache after emitting the files. Providing 'hot reloading' of server files.
export default class NextJsRequireCacheHotReloader {
- prevAssets: null | {[... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/build/webpack/plugins/pages-manifest-plugin.js | @@ -1,12 +1,11 @@
-// @flow
import { RawSource } from 'webpack-sources'
import {PAGES_MANIFEST, ROUTE_NAME_REGEX} from 'next-server/constants'
// This plugin creates a pages-manifest.json from page entrypoints.
// This is used for mapping paths like `/` to `.next/server/static/<buildid>/pages/index.js` when doing... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/build/webpack/plugins/pages-plugin.js | @@ -1,12 +1,11 @@
-// @flow
import { ConcatSource } from 'webpack-sources'
import {
IS_BUNDLED_PAGE_REGEX,
ROUTE_NAME_REGEX
} from 'next-server/constants'
export default class PagesPlugin {
- apply (compiler: any) {
+ apply (compiler) {
compiler.hooks.compilation.tap('PagesPlugin', (compilation) => {... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/build/webpack/plugins/unlink-file-plugin.js | @@ -1,4 +1,3 @@
-// @flow
import { join } from 'path'
import promisify from '../../../lib/promisify'
import fs from 'fs'
@@ -8,12 +7,11 @@ const unlink = promisify(fs.unlink)
// Makes sure removed pages are removed from `.next` in development
export default class UnlinkFilePlugin {
- prevAssets: any
construc... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/client/error-boundary.js | @@ -1,17 +1,7 @@
-// @flow
-import * as React from 'react'
+import React from 'react'
-type ComponentDidCatchInfo = {
- componentStack: string
-}
-
-type Props = {|
- onError: (error: Error, info: ComponentDidCatchInfo) => void,
- children: React.ComponentType<*>
-|}
-
-class ErrorBoundary extends React.Component<... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/client/source-map-support.js | @@ -1,7 +1,6 @@
-// @flow
const filenameRE = /\(([^)]+\.js):(\d+):(\d+)\)$/
-export function rewriteStacktrace (e: any, distDir: string): void {
+export function rewriteStacktrace (e, distDir) {
if (!e || typeof e.stack !== 'string') {
return
}
@@ -15,7 +14,7 @@ export function rewriteStacktrace (e: any, ... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/flow-typed/npm/autodll-webpack-plugin_vx.x.x.js | @@ -1,277 +0,0 @@
-// flow-typed signature: 6efcfad8e6dad5d1ef55854d4f6d2272
-// flow-typed version: <<STUB>>/autodll-webpack-plugin_v0.4.2/flow_v0.73.0
-
-/**
- * This is an autogenerated libdef stub for:
- *
- * 'autodll-webpack-plugin'
- *
- * Fill this stub out by replacing all the `any` types.
- *
- * Once fille... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/flow-typed/npm/glob_vx.x.x.js | @@ -1,46 +0,0 @@
-// flow-typed signature: 6d6b4e28b1ef5b7419a59c32761d27f5
-// flow-typed version: <<STUB>>/glob_v7.1.2/flow_v0.73.0
-
-/**
- * This is an autogenerated libdef stub for:
- *
- * 'glob'
- *
- * Fill this stub out by replacing all the `any` types.
- *
- * Once filled out, we encourage you to share your... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/flow-typed/npm/loader-utils_vx.x.x.js | @@ -1,102 +0,0 @@
-// flow-typed signature: fbec9bc08efb50bade7bd6c2bab84e41
-// flow-typed version: <<STUB>>/loader-utils_v1.1.0/flow_v0.73.0
-
-/**
- * This is an autogenerated libdef stub for:
- *
- * 'loader-utils'
- *
- * Fill this stub out by replacing all the `any` types.
- *
- * Once filled out, we encourage ... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/flow-typed/npm/react-lifecycles-compat_vx.x.x.js | @@ -1,53 +0,0 @@
-// flow-typed signature: 729d832efcac0a21ab881042caf78e1e
-// flow-typed version: <<STUB>>/react-lifecycles-compat_v3.0.4/flow_v0.73.0
-
-/**
- * This is an autogenerated libdef stub for:
- *
- * 'react-lifecycles-compat'
- *
- * Fill this stub out by replacing all the `any` types.
- *
- * Once fill... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/flow-typed/npm/source-map_vx.x.x.js | @@ -1,123 +0,0 @@
-// flow-typed signature: 4307ae4d07743816402f6fe06ed629ad
-// flow-typed version: <<STUB>>/source-map_v0.5.7/flow_v0.73.0
-
-/**
- * This is an autogenerated libdef stub for:
- *
- * 'source-map'
- *
- * Fill this stub out by replacing all the `any` types.
- *
- * Once filled out, we encourage you ... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/flow-typed/npm/terser-webpack-plugin_vx.x.x.js | @@ -1,60 +0,0 @@
-// flow-typed signature: 7f0a5671a6d757d5e9f880e207a37572
-// flow-typed version: <<STUB>>/terser-webpack-plugin_v1.0.2/flow_v0.73.0
-
-/**
- * This is an autogenerated libdef stub for:
- *
- * 'terser-webpack-plugin'
- *
- * Fill this stub out by replacing all the `any` types.
- *
- * Once filled o... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/flow-typed/npm/uglifyjs-webpack-plugin_vx.x.x.js | @@ -1,67 +0,0 @@
-// flow-typed signature: e7e7f59f1cdd9c963584b4620763fec3
-// flow-typed version: <<STUB>>/uglifyjs-webpack-plugin_v1.1.6/flow_v0.73.0
-
-/**
- * This is an autogenerated libdef stub for:
- *
- * 'uglifyjs-webpack-plugin'
- *
- * Fill this stub out by replacing all the `any` types.
- *
- * Once fill... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/flow-typed/npm/unfetch_vx.x.x.js | @@ -1,60 +0,0 @@
-// flow-typed signature: a652d8adeb137f15eeb79e87d8238710
-// flow-typed version: <<STUB>>/unfetch_v3.0.0/flow_v0.73.0
-
-/**
- * This is an autogenerated libdef stub for:
- *
- * 'unfetch'
- *
- * Fill this stub out by replacing all the `any` types.
- *
- * Once filled out, we encourage you to shar... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/flow-typed/npm/webpack-sources_vx.x.x.js | @@ -1,102 +0,0 @@
-// flow-typed signature: d41ce38862b325831cb20e57893195bc
-// flow-typed version: <<STUB>>/webpack-sources_v1.1.0/flow_v0.73.0
-
-/**
- * This is an autogenerated libdef stub for:
- *
- * 'webpack-sources'
- *
- * Fill this stub out by replacing all the `any` types.
- *
- * Once filled out, we enco... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/flow-typed/npm/webpack_vx.x.x.js | @@ -1,1957 +0,0 @@
-// flow-typed signature: 2093c91d0ee2e656d5a5b090b4d7f59c
-// flow-typed version: <<STUB>>/webpack_v3.10.0/flow_v0.73.0
-
-/**
- * This is an autogenerated libdef stub for:
- *
- * 'webpack'
- *
- * Fill this stub out by replacing all the `any` types.
- *
- * Once filled out, we encourage you to s... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/flow-typed/npm/webpackbar_vx.x.x.js | @@ -1,60 +0,0 @@
-// flow-typed signature: 83ca23a55b5361dc350877279882bf56
-// flow-typed version: <<STUB>>/webpackbar_v2.6.1/flow_v0.73.0
-
-/**
- * This is an autogenerated libdef stub for:
- *
- * 'webpackbar'
- *
- * Fill this stub out by replacing all the `any` types.
- *
- * Once filled out, we encourage you t... | true |
Other | vercel | next.js | c2eaf26ea948704f2abbaaa5fcb77a63fd5691bc.json | Remove flow types (#5704)
* Remove flow-typed
* Remove flow types
* Remove the last types
* Bring back taskr dependency
* Revert "Bring back taskr dependency"
This reverts commit 38cb95d7274d63fe63c6ac3c95ca358a28c17895.
* Bring back preset-flow as it’s used for tests
* Revert "Revert "Bring back ... | packages/next/package.json | @@ -28,7 +28,6 @@
"scripts": {
"build": "taskr",
"release": "taskr release",
- "flow": "flow check",
"prepublish": "npm run release"
},
"taskr": {
@@ -89,7 +88,6 @@
"react-dom": "^16.0.0"
},
"devDependencies": {
- "@babel/preset-flow": "7.0.0",
"@taskr/clear": "1.1.0",
... | true |
Other | vercel | next.js | f177be9e0540822763ae9baa2a425cd4c9187a28.json | Fix bug report with-portals example #5694 (#5714)
I'm trying to contribute on resolving issues,
hope this help.
Fixes #5694 | examples/with-portals/components/Portal.js | @@ -4,6 +4,7 @@ import ReactDOM from 'react-dom'
export class Portal extends React.Component {
componentDidMount () {
this.element = document.querySelector(this.props.selector)
+ this.forceUpdate()
}
render () { | false |
Other | vercel | next.js | c870d03aa028d2b653f1ac70d5c71ba5c3dd05a7.json | update package dependencies for tests (#5676) | package.json | @@ -35,9 +35,9 @@
"devDependencies": {
"@babel/plugin-proposal-object-rest-spread": "7.0.0",
"@babel/preset-react": "7.0.0",
- "@zeit/next-css": "0.2.1-canary.1",
- "@zeit/next-sass": "0.2.1-canary.1",
- "@zeit/next-typescript": "1.1.0",
+ "@zeit/next-css": "1.0.2-canary.2",
+ "@zeit/next-sa... | false |
Other | vercel | next.js | b5e3aac1ecc5d417fff3c4de7ad766e735451cfb.json | Fix POST and PUT on api routes (#7319)
* Fix POST and PUT
* Fix condition for request and test | packages/next-server/server/router.ts | @@ -1,14 +1,19 @@
-import {IncomingMessage, ServerResponse} from 'http'
-import {UrlWithParsedQuery} from 'url'
+import { IncomingMessage, ServerResponse } from 'http'
+import { UrlWithParsedQuery } from 'url'
import pathMatch from './lib/path-match'
export const route = pathMatch()
-type Params = {[param: string... | true |
Other | vercel | next.js | b5e3aac1ecc5d417fff3c4de7ad766e735451cfb.json | Fix POST and PUT on api routes (#7319)
* Fix POST and PUT
* Fix condition for request and test | test/integration/api-support/pages/api/posts/index.js | @@ -1,6 +1,14 @@
+import url from 'url'
+
export default (req, res) => {
res.writeHead(200, { 'Content-Type': 'application/json' })
- const json = JSON.stringify([{ title: 'Cool Post!' }])
- res.end(json)
+ if (req.method === 'POST') {
+ const { query } = url.parse(req.url, true)
+ const json = JSON.stri... | true |
Other | vercel | next.js | b5e3aac1ecc5d417fff3c4de7ad766e735451cfb.json | Fix POST and PUT on api routes (#7319)
* Fix POST and PUT
* Fix condition for request and test | test/integration/api-support/test/index.test.js | @@ -22,33 +22,50 @@ describe('API support', () => {
afterAll(() => killApp(server))
it('API request to undefined path', async () => {
- const { status } = await fetchViaHTTP(appPort, '/api/unexisting', null, {
- Accept: 'application/json'
- })
+ const { status } = await fetchViaHTTP(appPort, '/api... | true |
Other | vercel | next.js | b5e3aac1ecc5d417fff3c4de7ad766e735451cfb.json | Fix POST and PUT on api routes (#7319)
* Fix POST and PUT
* Fix condition for request and test | test/integration/production/test/index.test.js | @@ -91,15 +91,6 @@ describe('Production Usage', () => {
expect(res.status).toBe(404)
})
- it('should render 501 if the HTTP method is not GET or HEAD', async () => {
- const url = `http://localhost:${appPort}/_next/abcdef`
- const methods = ['POST', 'PUT', 'DELETE']
- for (const method o... | true |
Other | vercel | next.js | 36abf81518b3e5ceb8bda90391c21da4cc51215c.json | Update readme to use @next/mdx (#7291)
* Update readme to use @next/mdx | packages/next/README.md | @@ -1482,7 +1482,7 @@ This is development-only feature. If you want to cache SSR pages in production,
#### Configuring extensions looked for when resolving pages in `pages`
-Aimed at modules like [`@zeit/next-mdx`](https://github.com/zeit/next-plugins/tree/master/packages/next-mdx), that add support for pages endi... | false |
Other | vercel | next.js | 0eab07b7e82b03db685cf784c42340069d330b2f.json | Add automatic TypeScript setup (#7125)
* replace fkill with tree-kill | package.json | @@ -81,7 +81,6 @@
"eslint": "5.4.0",
"eslint-plugin-typescript": "0.14.0",
"express": "4.16.3",
- "fkill": "5.1.0",
"fs-extra": "7.0.1",
"get-port": "3.2.0",
"isomorphic-unfetch": "3.0.0",
@@ -102,6 +101,7 @@
"rimraf": "2.6.2",
"standard": "12.0.1",
"taskr": "1.1.0",
+ ... | true |
Other | vercel | next.js | 0eab07b7e82b03db685cf784c42340069d330b2f.json | Add automatic TypeScript setup (#7125)
* replace fkill with tree-kill | packages/next/build/index.ts | @@ -9,6 +9,7 @@ import path from 'path'
import formatWebpackMessages from '../client/dev-error-overlay/format-webpack-messages'
import { recursiveDelete } from '../lib/recursive-delete'
+import { verifyTypeScriptSetup } from '../lib/verifyTypeScriptSetup'
import { CompilerResult, runCompiler } from './compiler'
i... | true |
Other | vercel | next.js | 0eab07b7e82b03db685cf784c42340069d330b2f.json | Add automatic TypeScript setup (#7125)
* replace fkill with tree-kill | packages/next/build/webpack-config.ts | @@ -100,8 +100,14 @@ export default async function getBaseWebpackConfig(
}
: undefined
+ let typeScriptPath
+ try {
+ typeScriptPath = resolve.sync('typescript', { basedir: dir })
+ } catch (_) {}
const tsConfigPath = path.join(dir, 'tsconfig.json')
- const useTypeScript = await fileExists(tsCon... | true |
Other | vercel | next.js | 0eab07b7e82b03db685cf784c42340069d330b2f.json | Add automatic TypeScript setup (#7125)
* replace fkill with tree-kill | packages/next/lib/recursive-readdir.ts | @@ -13,15 +13,17 @@ const stat = promisify(fs.stat)
* @param {string=dir`} rootDir Used to replace the initial path, only the relative path is left, it's faster than path.relative.
* @returns Promise array holding all relative paths
*/
-export async function recursiveReadDir(dir: string, filter: RegExp, arr: str... | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.