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
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-strict-csp/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-strict-csp) - # Strict CSP example ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-style-sheet/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-style-sheet) - # Using the style-sheet CSS in JS library and extract CSS to file. ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-styled-components/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-styled-components) - # Example app with styled-components ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-styled-jsx-plugins/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-styled-jsx-plugins) - # With styled-jsx plugins ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-styled-jsx-scss/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-styled-jsx-scss) - # With styled-jsx SASS / SCSS ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-styletron/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-styletron) - # Example app with styletron ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-sw-precache/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-sw-precache) - # sw-precache example ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-tailwindcss/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-tailwindcss) - # Tailwind CSS example This is an example of how you can include a global stylesheet in a next.js webapp.
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-ts-node/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-ts-node) - # Custom server with fully TypeScript + ts-node example (without babel and tsc), require next js 7+ ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-typescript-styled-components/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-typescript-styled-components) - # TypeScript & Styled Components Next.js example This is a really simple project that show the usage of Next.js with Type...
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-typescript/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-typescript) - # TypeScript Next.js example This is a really simple project that show the usage of Next.js with TypeScript.
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-typestyle/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-typestyle) - # Example app with typestyle ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-typings-for-css-modules/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-typings-for-css-modules) - # Typings for CSS Modules example ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-universal-configuration-build-time/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-universal-configuration-build-time) - # With universal configuration ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-universal-configuration-runtime/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-universal-configuration-runtime) - # With universal runtime configuration ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-unstated/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/canary/examples/with-unstated) - # Unstated example ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-url-object-routing/README.md
@@ -1,4 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-url-object-routing) # URL object routing ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-videojs/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-videojs) - # video.js example ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-webassembly/readme.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-webassembly) - # WebAssembly example ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-webpack-bundle-size-analyzer/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-webpack-bundle-size-analyzer) - # Webpack Bundle Size Analyzer ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-yarn-workspaces/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-yarn-workspaces) - # Yarn workspaces example ## How to use
true
Other
vercel
next.js
3fa04620e78bb6ff9ee2368076b004a9a59bfd25.json
Remove Deploy To Now buttons (#7126) * Remove Deploy To Now buttons * Remove remaining buttons
examples/with-zones/README.md
@@ -1,5 +1,3 @@ -[![Deploy to now](https://deploy.now.sh/static/button.svg)](https://deploy.now.sh/?repo=https://github.com/zeit/next.js/tree/master/examples/with-zones) - # Using multiple zones ## How to use
true
Other
vercel
next.js
a320dc10f63964519cb04765946a2c552bb5e2d7.json
Add AMP label to AMP only pages in build tree (#7123)
packages/next/build/index.ts
@@ -222,7 +222,16 @@ export default async function build(dir: string, conf = null): Promise<void> { console.log(chalk.green('Compiled successfully.\n')) } - printTreeView(Object.keys(mappedPages)) + let ampPages = new Set() + + if (Array.isArray(configs[0].plugins)) { + configs[0].plugins.some((plugin: ...
true
Other
vercel
next.js
a320dc10f63964519cb04765946a2c552bb5e2d7.json
Add AMP label to AMP only pages in build tree (#7123)
packages/next/build/utils.ts
@@ -19,7 +19,7 @@ export function collectPages( ) } -export function printTreeView(list: string[]) { +export function printTreeView(list: string[], ampPages: Set<string>) { list .sort((a, b) => (a > b ? 1 : -1)) .forEach((item, i) => { @@ -31,7 +31,7 @@ export function printTreeView(list: string[]) {...
true
Other
vercel
next.js
a320dc10f63964519cb04765946a2c552bb5e2d7.json
Add AMP label to AMP only pages in build tree (#7123)
packages/next/build/webpack/plugins/next-drop-client-page-plugin.ts
@@ -1,13 +1,20 @@ import { Compiler, Plugin } from 'webpack' +import { extname } from 'path' // Prevents outputting client pages when they are not needed export class DropClientPage implements Plugin { + ampPages = new Set(); + apply(compiler: Compiler) { compiler.hooks.emit.tap('DropClientPage', compilat...
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/build/webpack/loaders/next-minify-loader.ts
@@ -8,7 +8,7 @@ const nextMiniferLoader: loader.Loader = function(source) { const options = loaderUtils.getOptions(this) || {} const { error, code } = minify({ file: 'noop', - input: source, + input: source as string, terserOptions: { ...options.terserOptions, sourceMap: false }, })
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/build/webpack/plugins/build-manifest-plugin.ts
@@ -1,3 +1,4 @@ +import { Compiler } from 'webpack' import { RawSource } from 'webpack-sources' import { BUILD_MANIFEST, @@ -9,19 +10,19 @@ import { // This plugin creates a build-manifest.json for all assets that are being output // It has a mapping of "entry" filename to real filename. Because the real filenam...
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/build/webpack/plugins/chunk-names-plugin.ts
@@ -1,14 +1,15 @@ +import { Compiler } from 'webpack' // This plugin mirrors webpack 3 `filename` and `chunkfilename` behavior // This fixes https://github.com/webpack/webpack/issues/6598 // This plugin is based on https://github.com/researchgate/webpack/commit/2f28947fa0c63ccbb18f39c0098bd791a2c37090 export defaul...
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/build/webpack/plugins/nextjs-ssr-import.ts
@@ -1,11 +1,12 @@ import { join, resolve, relative, dirname } from 'path' +import { Compiler } from 'webpack' // This plugin modifies the require-ensure code generated by Webpack // to work with Next.js SSR export default class NextJsSsrImportPlugin { - apply (compiler) { - compiler.hooks.compilation.tap('Nex...
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/build/webpack/plugins/nextjs-ssr-module-cache.ts
@@ -16,10 +16,12 @@ const SSR_MODULE_CACHE_FILENAME = 'ssr-module-cache.js' // Do note that this module is only geared towards the `node` compilation target. // For the client side compilation we use `runtimeChunk: 'single'` export default class NextJsSsrImportPlugin { - constructor (options) { + private options: ...
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/build/webpack/plugins/react-loadable-plugin.ts
@@ -22,21 +22,22 @@ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWAR // Modified to strip out unneeded results for Next's specific use case import url from 'url' +import { Compiler, compilation } from 'webpack' -function buildManifest (compiler, compilation) { +function buildManifest (compiler: Compi...
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/build/webpack/plugins/terser-webpack-plugin/src/index.d.ts
@@ -0,0 +1,14 @@ +export class TerserPlugin { + readonly cpus: any + readonly distDir: any + readonly options: any + + constructor(options?: any) + + static isSourceMap(input: any): any + static buildSourceMap(inputSourceMap: any): any + static buildError(err: any, file: any, sourceMap: any, requestShortener?: a...
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/build/webpack/plugins/terser-webpack-plugin/src/minify.ts
@@ -1,7 +1,7 @@ /* eslint-disable arrow-body-style */ -import { minify as terser } from 'terser'; +import { minify as terser, MinifyOptions } from 'terser'; const buildTerserOptions = ({ ecma, @@ -18,7 +18,7 @@ const buildTerserOptions = ({ keep_fnames, /* eslint-enable camelcase */ safari10, -} = {...
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/client/dev-error-overlay/format-webpack-messages.d.ts
@@ -0,0 +1 @@ +export default function formatWebpackMessages(json: any): any;
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/export/index.d.ts
@@ -0,0 +1 @@ +export default function(dir: string, options: any, configuration?: any): Promise<void>
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/package.json
@@ -29,8 +29,9 @@ "scripts": { "build": "taskr", "release": "taskr release", - "prepublish": "npm run release", - "typescript": "tsc --noEmit" + "prepublish": "npm run release && npm run types", + "typescript": "tsc --noEmit --declaration", + "types": "tsc --declaration --emitDeclarationOnly...
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/server/lib/start-server.ts
@@ -1,7 +1,7 @@ import http from 'http' import next from '../next' -export default async function start (serverOptions, port, hostname) { +export default async function start(serverOptions: any, port?: number, hostname?: string) { const app = next(serverOptions) const srv = http.createServer(app.getRequestHan...
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/server/lib/utils.ts
@@ -1,5 +1,6 @@ -export function printAndExit (message, code = 1) { +export function printAndExit(message: string, code = 1) { if (code === 0) { + // tslint:disable-next-line no-console console.log(message) } else { console.error(message)
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/server/next.d.ts
@@ -0,0 +1 @@ +export default function(options: any): any
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/server/next.js
@@ -1,5 +1,5 @@ // This file is used for when users run `require('next')` -module.exports = (options) => { +module.exports = options => { if (options.dev) { const Server = require('./next-dev-server').default return new Server(options)
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/tsconfig.json
@@ -1,8 +1,6 @@ { "compilerOptions": { "strict": true, - "allowJs": true, - "noEmit": true, "module": "esnext", "target": "ES2017", "esModuleInterop": true,
true
Other
vercel
next.js
254b23eb0723eee0511e61b2b1cc9d698c512ab7.json
Add declaration files to /dist (#7118)
packages/next/types/index.d.ts
@@ -57,6 +57,16 @@ declare module 'next/dist/compiled/resolve/index.js' { export = resolve; } +declare module 'next/dist/compiled/text-table' { + function textTable(rows: Array<Array<{}>>, opts?: { + hsep?: string, + align?: Array<'l' | 'r' | 'c' | '.'>, + stringLength?(str: string): number + }): strin...
true
Other
vercel
next.js
c79558328efec8bf6f4a469f302498c58f655ea0.json
Add Typescript compilation (#7110)
packages/next-server/server/config.js
@@ -14,7 +14,7 @@ const defaultConfig = { useFileSystemPublicRoutes: true, generateBuildId: () => null, generateEtags: true, - pageExtensions: ['jsx', 'js'], + pageExtensions: ['tsx', 'ts', 'jsx', 'js'], target: 'server', poweredByHeader: true, onDemandEntries: {
true
Other
vercel
next.js
c79558328efec8bf6f4a469f302498c58f655ea0.json
Add Typescript compilation (#7110)
packages/next/build/babel/preset.ts
@@ -44,7 +44,8 @@ type NextBabelPresetOptions = { type BabelPreset = { presets?: PluginItem[] | null, - plugins?: PluginItem[] | null + plugins?: PluginItem[] | null, + overrides?: any[] } // Taken from https://github.com/babel/babel/commit/d60c5e1736543a6eac4b549553e107a9ba967051#diff-b4beead8ad9195361b45...
true
Other
vercel
next.js
c79558328efec8bf6f4a469f302498c58f655ea0.json
Add Typescript compilation (#7110)
packages/next/build/webpack-config.ts
@@ -236,12 +236,12 @@ export default async function getBaseWebpackConfig (dir: string, {dev = false, d } }, config.experimental.ampBindInitData && !isServer && { - test: /\.(js|mjs|jsx)$/, + test: /\.(tsx|ts|js|mjs|jsx)$/, include: [path.join(dir, 'data')], ...
true
Other
vercel
next.js
c79558328efec8bf6f4a469f302498c58f655ea0.json
Add Typescript compilation (#7110)
packages/next/package.json
@@ -39,6 +39,7 @@ ] }, "dependencies": { + "@babel/preset-typescript": "7.3.3", "@babel/core": "7.1.2", "@babel/plugin-proposal-class-properties": "7.1.0", "@babel/plugin-proposal-object-rest-spread": "7.0.0", @@ -90,7 +91,6 @@ }, "devDependencies": { "@babel/parser": "7.2.0", - ...
true
Other
vercel
next.js
c79558328efec8bf6f4a469f302498c58f655ea0.json
Add Typescript compilation (#7110)
test/integration/basic/pages/typescript/hello.tsx
@@ -0,0 +1,5 @@ +import React from 'react' + +export default function Hello(): JSX.Element { + return <div>Hello World</div> +}
true
Other
vercel
next.js
c79558328efec8bf6f4a469f302498c58f655ea0.json
Add Typescript compilation (#7110)
test/integration/basic/test/hmr.js
@@ -81,6 +81,42 @@ export default (context, renderViaHTTP) => { } }) + it('should detect the changes to typescript pages and display it', async () => { + let browser + try { + browser = await webdriver(context.appPort, '/typescript/hello') + await check( + ...
true
Other
vercel
next.js
c79558328efec8bf6f4a469f302498c58f655ea0.json
Add Typescript compilation (#7110)
test/integration/basic/test/index.test.js
@@ -13,6 +13,7 @@ import hmr from './hmr' import errorRecovery from './error-recovery' import dynamic from './dynamic' import processEnv from './process-env' +import typescript from './typescript' const context = {} jasmine.DEFAULT_TIMEOUT_INTERVAL = 1000 * 60 * 5 @@ -37,5 +38,6 @@ describe('Basic Features', () ...
true
Other
vercel
next.js
c79558328efec8bf6f4a469f302498c58f655ea0.json
Add Typescript compilation (#7110)
test/integration/basic/test/typescript.js
@@ -0,0 +1,17 @@ +/* eslint-env jest */ +import cheerio from 'cheerio' + +export default (context, render) => { + async function get$ (path, query) { + const html = await render(path, query) + return cheerio.load(html) + } + describe('Typescript', () => { + describe('default behavior', () => { + it('sh...
true
Other
vercel
next.js
baabfbd777e075d0774555cd84e688a78f1615e9.json
fix: add repository to next-server package.json (#7105)
packages/next-server/package.json
@@ -3,6 +3,7 @@ "version": "8.1.1-canary.1", "main": "./index.js", "license": "MIT", + "repository": "zeit/next.js", "files": [ "dist", "index.js",
false
Other
vercel
next.js
d2b0db811c0a9b6d0616f80148e7f9fe0d0b4818.json
Rewrote .circleci/config.yml to 2.1 schema (#7103)
.circleci/config.yml
@@ -1,91 +1,141 @@ -version: 2 -jobs: - build: +version: 2.1 + +######################### +# Aliases +######################### + +aliases: + - &store_test_results + store_test_results: + path: ~/repo/test_results.xml + - &persist_to_workspace + persist_to_workspace: + root: ~/repo + paths: ['.'...
false
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
packages/next-server/lib/head.tsx
@@ -127,7 +127,7 @@ function reduceComponents(headElements: Array<React.ReactElement<any>>, props: W const Effect = withSideEffect<WithIsAmp>(); -function Head({ children }: { children: React.ReactNode }) { +export default function Head({ children }: { children: React.ReactNode }) { return ( <AmpModeContex...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
packages/next-server/lib/router/router.ts
@@ -3,7 +3,7 @@ import { ComponentType } from 'react'; import { parse } from 'url'; import mitt, {MittEmitter} from '../mitt'; -import { formatWithValidation, getURL, loadGetInitialProps } from '../utils'; +import { formatWithValidation, getURL, loadGetInitialProps, IContext, IAppContext } from '../utils'; functi...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
packages/next-server/lib/utils.js
@@ -1,70 +0,0 @@ -import { format } from 'url' - -export function execOnce (fn) { - let used = false - return (...args) => { - if (!used) { - used = true - fn.apply(this, args) - } - } -} - -export function getLocationOrigin () { - const { protocol, hostname, port } = window.location - return `${pr...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
packages/next-server/lib/utils.ts
@@ -0,0 +1,164 @@ +import { format, UrlObject, URLFormatOptions } from 'url' +import { ServerResponse, IncomingMessage } from 'http'; +import { ComponentType } from 'react' +import { ParsedUrlQuery } from 'querystring' +import { ManifestItem } from '../server/get-dynamic-import-bundles' +import { IRouterInterface } fro...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
packages/next-server/server/render.tsx
@@ -2,14 +2,14 @@ import { IncomingMessage, ServerResponse } from 'http' import { ParsedUrlQuery } from 'querystring' import React from 'react' import { renderToString, renderToStaticMarkup } from 'react-dom/server' -import {IRouterInterface} from '../lib/router/router' -import mitt, {MittEmitter} from '../lib/mitt'...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
packages/next/package.json
@@ -90,6 +90,7 @@ "react-dom": "^16.6.0" }, "devDependencies": { + "@types/styled-jsx": "2.2.8", "@babel/parser": "7.2.0", "@taskr/clear": "1.1.0", "@taskr/esnext": "1.1.0",
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
packages/next/pages/_app.tsx
@@ -1,31 +1,37 @@ -import React, { Component } from 'react' +import React from 'react' import PropTypes from 'prop-types' -import { execOnce, loadGetInitialProps } from 'next-server/dist/lib/utils' -import { makePublicRouterInstance } from 'next/router' +import { execOnce, loadGetInitialProps, NextComponentType, ICont...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
packages/next/pages/_document.tsx
@@ -2,31 +2,41 @@ import PropTypes from 'prop-types' import React, { Component } from 'react' import { cleanAmpPath } from 'next-server/dist/server/utils' +import { IDocumentContext, IDocumentInitialProps, IDocumentProps } from 'next-server/dist/lib/utils' import { htmlEscapeJsonString } from '../server/htmlescape'...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
packages/next/pages/_error.tsx
@@ -1,23 +1,28 @@ import React from 'react' import Head from 'next-server/head' +import { IContext } from 'next-server/dist/lib/utils' -const statusCodes = { +const statusCodes: { [code: number]: string } = { 400: 'Bad Request', 404: 'This page could not be found', 500: 'Internal Server Error', - 501: 'No...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
packages/next/types/amp-react.d.ts
@@ -0,0 +1,14 @@ +import React from 'react' +/** + * Types for AMP in React are not available, here we add only the types required for the core + */ +declare module 'react' { + interface HtmlHTMLAttributes<T> extends React.HTMLAttributes<T> { + amp?: string; + } + + // nonce in <link /> is allowed + interface Li...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
packages/next/types/index.d.ts
@@ -2,13 +2,19 @@ declare module '@babel/plugin-transform-modules-commonjs'; declare module 'next-server/next-config'; declare module 'next-server/constants'; declare module 'webpack/lib/GraphHelpers'; -declare module 'unfetch' +declare module 'unfetch'; +declare module 'styled-jsx/server'; declare module 'next/r...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
test/unit/loadGetInitialProps.test.js
@@ -11,9 +11,9 @@ describe('loadGetInitialProps', () => { return expect(rejectPromise).rejects.toEqual(error) }) - it('should resolve to an object if getInitialProps is missing', async () => { + it('should resolve to null if getInitialProps is missing', async () => { const result = await loadGetInitial...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
tslint.json
@@ -10,14 +10,16 @@ "object-literal-sort-keys": false, "variable-name": false, "max-line-length": false, + "max-classes-per-file": false, "interface-over-type-literal": false, "no-shadowed-variable": false, "no-var-requires": false, "semicolon": false, "quotemark": false, ...
true
Other
vercel
next.js
29f71bfcbac3202e339673a5d30acad7633940b6.json
Add more TypeScript types (#7054) * Moved server/lib/utils.js to Typescript * moved _app.js to Typescript * Moved _error.js to Typescript * Added argument for custom props in _app and _error * Moved _document.js to Typescript * updated one test * Updated types and added a validation for _document pro...
yarn.lock
@@ -1694,6 +1694,13 @@ resolved "https://registry.yarnpkg.com/@types/strip-ansi/-/strip-ansi-3.0.0.tgz#9b63d453a6b54aa849182207711a08be8eea48ae" integrity sha1-m2PUU6a1SqhJGCIHcRoIvo7qSK4= +"@types/styled-jsx@2.2.8": + version "2.2.8" + resolved "https://registry.yarnpkg.com/@types/styled-jsx/-/styled-jsx-2.2...
true
Other
vercel
next.js
ba09c5948e08cef44e4d96c30ebdb690c0d6803b.json
Set buildId to a fixed value during debug build (#6886) * Set buildId to a fixed value during debug build * __debug => debug
packages/next/build/index.ts
@@ -63,11 +63,17 @@ export default async function build( ) } + const debug = + process.env.__NEXT_BUILDER_EXPERIMENTAL_DEBUG === 'true' || + process.env.__NEXT_BUILDER_EXPERIMENTAL_DEBUG === '1' + console.log('Creating an optimized production build ...') console.log() const config = loadConf...
true
Other
vercel
next.js
ba09c5948e08cef44e4d96c30ebdb690c0d6803b.json
Set buildId to a fixed value during debug build (#6886) * Set buildId to a fixed value during debug build * __debug => debug
packages/next/build/webpack-config.ts
@@ -18,7 +18,7 @@ import { ChunkGraphPlugin } from './webpack/plugins/chunk-graph-plugin' import { WebpackEntrypoints } from './entries' type ExcludesFalse = <T>(x: T | false) => x is T -export default function getBaseWebpackConfig (dir: string, {dev = false, __debug = false, isServer = false, buildId, config, targ...
true
Other
vercel
next.js
a361a6a4a2b2e97d9adf47d4c4144885f24a78cd.json
Fix serverless options (#6884)
packages/next/build/entries.ts
@@ -42,7 +42,8 @@ export function createEntrypoints(pages: PagesMapping, target: 'server'|'serverl absoluteErrorPath: pages['/_error'], distDir: DOT_NEXT_ALIAS, assetPrefix: config.assetPrefix, - generateEtags: config.generateEtags + generateEtags: config.generateEtags, + ampBindInitData: config...
true
Other
vercel
next.js
a361a6a4a2b2e97d9adf47d4c4144885f24a78cd.json
Fix serverless options (#6884)
packages/next/build/webpack/loaders/next-serverless-loader.ts
@@ -11,6 +11,7 @@ export type ServerlessLoaderQuery = { absoluteDocumentPath: string, absoluteErrorPath: string, assetPrefix: string, + ampBindInitData: boolean, generateEtags: string } @@ -20,6 +21,7 @@ const nextServerlessLoader: loader.Loader = function () { absolutePagePath, page, ass...
true
Other
vercel
next.js
7e5e414bcb4f128880501dd84d6a86708d7c8b5e.json
Add RouterContext in production mode (#6883)
packages/next/client/index.js
@@ -204,9 +204,13 @@ async function doRender ({ App, Component, props, err }) { renderReactElement(( <ErrorBoundary fn={(error) => renderError({ App, err: error }).catch(err => console.error('Error rendering page: ', err))}> <Suspense fallback={<div>Loading...</div>}> - <HeadManagerContext...
false
Other
vercel
next.js
b38446717ad2df240d6efe576678402b0b842626.json
Allow only values that can be serialized to key (#6881) @ijjk
packages/next/lib/data.ts
@@ -2,28 +2,44 @@ import {useContext} from 'react' import { DataManagerContext } from 'next-server/dist/lib/data-manager-context' import { RouterContext } from 'next-server/dist/lib/router-context' import fetch from 'unfetch' +import {stringify} from 'querystring' -export function createHook(fetcher: (...args: any...
false
Other
vercel
next.js
49fd5990a183efa70fa2b174c1c4209a5e1ed4e7.json
Update Sentry to v5 and add @sentry/integrations (#6873) Hi everyone :) I just updated Sentry to v5 and added @sentry/integrations due to breaking changes :) I also fix the documentation. npm commands were in yarn section.
examples/with-sentry/README.md
@@ -24,15 +24,12 @@ Install it and run: ```bash npm install npm run dev -# or -yarn -yarn dev ``` **yarn** ```bash -npm install -npm run dev +yarn +yarn dev ``` Deploy it to the cloud with [now](https://zeit.co/now) ([download](https://zeit.co/download))
true
Other
vercel
next.js
49fd5990a183efa70fa2b174c1c4209a5e1ed4e7.json
Update Sentry to v5 and add @sentry/integrations (#6873) Hi everyone :) I just updated Sentry to v5 and added @sentry/integrations due to breaking changes :) I also fix the documentation. npm commands were in yarn section.
examples/with-sentry/package.json
@@ -7,8 +7,9 @@ "start": "SENTRY_DSN=abc123 NODE_ENV=production node server.js" }, "dependencies": { - "@sentry/browser": "^4.6.1", - "@sentry/node": "^4.6.1", + "@sentry/browser": "^5.0.3", + "@sentry/node": "^5.0.3", + "@sentry/integrations": "^5.0.3", "@zeit/next-source-maps": "0.0.4-c...
true
Other
vercel
next.js
49fd5990a183efa70fa2b174c1c4209a5e1ed4e7.json
Update Sentry to v5 and add @sentry/integrations (#6873) Hi everyone :) I just updated Sentry to v5 and added @sentry/integrations due to breaking changes :) I also fix the documentation. npm commands were in yarn section.
examples/with-sentry/utils/sentry.js
@@ -1,6 +1,7 @@ // NOTE: This require will be replaced with `@sentry/browser` when // process.browser === true thanks to the webpack config in next.config.js const Sentry = require('@sentry/node') +const SentryIntegrations = require('@sentry/integrations') const Cookie = require('js-cookie') module.exports = (re...
true
Other
vercel
next.js
c120d6b9fbc160114f8f707ddcf62adf8e4b63b6.json
Fastify example dep update (#6714) This merge request updates `fastify` package from v1 to v2 and adds the `cross-env` package so `NODE_ENV=` can work on Windows as well as OSX/Linux. Also adds example build output to GITIGNORE Worth mentioning that pressing `a` will bring up a page that says `b` and vice-versa, bu...
examples/custom-server-fastify/package.json
@@ -2,14 +2,17 @@ "name": "custom-server-fastify", "version": "1.0.0", "scripts": { - "dev": "node server.js", + "dev": "node ./server.js", "build": "next build", - "start": "NODE_ENV=production node server.js" + "start": "cross-env NODE_ENV=production node ./server.js" }, "dependencies"...
true
Other
vercel
next.js
c120d6b9fbc160114f8f707ddcf62adf8e4b63b6.json
Fastify example dep update (#6714) This merge request updates `fastify` package from v1 to v2 and adds the `cross-env` package so `NODE_ENV=` can work on Windows as well as OSX/Linux. Also adds example build output to GITIGNORE Worth mentioning that pressing `a` will bring up a page that says `b` and vice-versa, bu...
examples/with-mobx-state-tree-typescript/stores/store.ts
@@ -1,6 +1,6 @@ import { applySnapshot, Instance, SnapshotIn, SnapshotOut, types } from "mobx-state-tree"; -let store:IStore = null as any; +let store: IStore = null as any; const Store = types .model({ @@ -35,10 +35,10 @@ export type IStoreSnapshotOut = SnapshotOut<typeof Store>; export const initializeSto...
true
Other
vercel
next.js
b509841f5e0bc1b48f150c265f3fd93af97ebfe0.json
Add useRouter hook (#6869) This introduces the `useRouter` hook alternative to `withRouter`
packages/next/client/router.js
@@ -1,5 +1,7 @@ /* global window */ +import React from 'react' import _Router from 'next-server/dist/lib/router/router' +import { RouterContext } from 'next-server/dist/lib/router-context' const SingletonRouter = { router: null, // holds the actual router instance @@ -75,6 +77,10 @@ export default SingletonRout...
false
Other
vercel
next.js
d653216208657edac80cd4b1f960f5f06949b342.json
Add an experimental debug mode to builds (#6870) * Add a debug mode to webpack configuration * Undo debug change for dist dir
packages/next/build/index.ts
@@ -123,6 +123,9 @@ export default async function build( ) const configs = await Promise.all([ getBaseWebpackConfig(dir, { + __debug: + process.env.__NEXT_BUILDER_EXPERIMENTAL_DEBUG === 'true' || + process.env.__NEXT_BUILDER_EXPERIMENTAL_DEBUG === '1', buildId, isServer: fals...
true
Other
vercel
next.js
d653216208657edac80cd4b1f960f5f06949b342.json
Add an experimental debug mode to builds (#6870) * Add a debug mode to webpack configuration * Undo debug change for dist dir
packages/next/build/webpack-config.ts
@@ -18,7 +18,7 @@ import { ChunkGraphPlugin } from './webpack/plugins/chunk-graph-plugin' import { WebpackEntrypoints } from './entries' type ExcludesFalse = <T>(x: T | false) => x is T -export default function getBaseWebpackConfig (dir: string, {dev = false, isServer = false, buildId, config, target = 'server', en...
true
Other
vercel
next.js
a63a493346f3a93d354595bc4494fedb7df995b7.json
Refine selective page building (#6866)
packages/next-server/server/config.js
@@ -30,8 +30,7 @@ const defaultConfig = { ), ampBindInitData: false, exportTrailingSlash: true, - profiling: false, - sharedRuntime: false + profiling: false } }
true
Other
vercel
next.js
a63a493346f3a93d354595bc4494fedb7df995b7.json
Refine selective page building (#6866)
packages/next/build/index.ts
@@ -1,8 +1,5 @@ -import { - join as pathJoin, - relative as pathRelative, - isAbsolute as pathIsAbsolute, -} from 'path' +import path from 'path' +import fs from 'fs' import nanoid from 'next/dist/compiled/nanoid/index.js' import loadConfig from 'next-server/next-config' import { PHASE_PRODUCTION_BUILD } from 'ne...
true
Other
vercel
next.js
a63a493346f3a93d354595bc4494fedb7df995b7.json
Refine selective page building (#6866)
packages/next/build/webpack-config.ts
@@ -18,7 +18,7 @@ import { ChunkGraphPlugin } from './webpack/plugins/chunk-graph-plugin' import { WebpackEntrypoints } from './entries' type ExcludesFalse = <T>(x: T | false) => x is T -export default function getBaseWebpackConfig (dir: string, {dev = false, isServer = false, buildId, config, target = 'server', en...
true
Other
vercel
next.js
aac50e4501f60f11914c0ae5f35f7718aaf56883.json
Add error message for AMP bind syntax (#6865) * Add error message for AMP bind syntax * Fix custom AMP scripts getting dropped * Add data.js to package.json to include it in releases
errors/amp-bind-jsx-alt.md
@@ -0,0 +1,14 @@ +# AMP Bind JSX Error + +#### Why This Error Occurred + +Somewhere you used `[prop]='something'` syntax which is not allowed in JSX. + +#### Possible Ways to Fix It + +Instead you can use `data-amp-bind-prop='something'` which is a valid AMP alternative + +### Useful Links + +- [AMP HTML Specification]...
true
Other
vercel
next.js
aac50e4501f60f11914c0ae5f35f7718aaf56883.json
Add error message for AMP bind syntax (#6865) * Add error message for AMP bind syntax * Fix custom AMP scripts getting dropped * Add data.js to package.json to include it in releases
packages/next-server/server/render.tsx
@@ -287,21 +287,27 @@ export async function renderToHTML( ? renderToStaticMarkup : renderToString + const renderPageError = (): {html: string, head: any} | void => { + if (ctx.err && ErrorDebug) { + return render(renderElementToString, <ErrorDebug error={ctx.err} />) + } + + if (dev && (props...
true
Other
vercel
next.js
aac50e4501f60f11914c0ae5f35f7718aaf56883.json
Add error message for AMP bind syntax (#6865) * Add error message for AMP bind syntax * Fix custom AMP scripts getting dropped * Add data.js to package.json to include it in releases
packages/next/build/output/store.ts
@@ -2,6 +2,7 @@ import chalk from 'chalk' import createStore from 'next/dist/compiled/unistore' import readline from 'readline' import { onExit } from './exit' +import stripAnsi from 'strip-ansi' export type OutputState = | { bootstrap: true; appUrl: string | null } @@ -39,10 +40,22 @@ store.subscribe(state =>...
true
Other
vercel
next.js
aac50e4501f60f11914c0ae5f35f7718aaf56883.json
Add error message for AMP bind syntax (#6865) * Add error message for AMP bind syntax * Fix custom AMP scripts getting dropped * Add data.js to package.json to include it in releases
packages/next/package.json
@@ -14,6 +14,7 @@ "client.js", "config.js", "constants.js", + "data.js", "document.js", "dynamic.js", "error.js",
true
Other
vercel
next.js
aac50e4501f60f11914c0ae5f35f7718aaf56883.json
Add error message for AMP bind syntax (#6865) * Add error message for AMP bind syntax * Fix custom AMP scripts getting dropped * Add data.js to package.json to include it in releases
packages/next/pages/_document.js
@@ -187,7 +187,7 @@ export class Head extends Component { badProp = 'name="viewport"' } else if (type === 'link' && props.rel === 'canonical') { badProp = 'rel="canonical"' - } else if (type === 'script') { + } else if (type === 'script' && !(props.src && props.src.indexOf('ampproject...
true
Other
vercel
next.js
aac50e4501f60f11914c0ae5f35f7718aaf56883.json
Add error message for AMP bind syntax (#6865) * Add error message for AMP bind syntax * Fix custom AMP scripts getting dropped * Add data.js to package.json to include it in releases
test/integration/amphtml/pages/amp-script.amp.js
@@ -0,0 +1,25 @@ +import Head from 'next/head' + +const date = new Date().toJSON() + +export default () => ( + <> + <Head> + <script + async + key='amp-timeago' + custom-element='amp-timeago' + src='https://cdn.ampproject.org/v0/amp-timeago-0.1.js' + /> + </Head> + + <amp...
true
Other
vercel
next.js
aac50e4501f60f11914c0ae5f35f7718aaf56883.json
Add error message for AMP bind syntax (#6865) * Add error message for AMP bind syntax * Fix custom AMP scripts getting dropped * Add data.js to package.json to include it in releases
test/integration/amphtml/test/index.test.js
@@ -99,6 +99,11 @@ describe('AMP Usage', () => { expect(html).not.toMatch(/console\.log("I'm not either :p")'/) }) + it('should not drop custom amp scripts', async () => { + const html = await renderViaHTTP(appPort, '/amp-script?amp=1') + await validateAMP(html) + }) + it('should opti...
true
Other
vercel
next.js
4201fb957d9b0d8a03e33d7e801952e6d48a5e5c.json
Emit manifest of all page files (#6853) * Get all modules included in build * Add tests * Get all modules contained per entry chunk * Sort files * Add specialized page entry to manifest * Split manifest into pages and chunks key * Update test * Use relative paths to build directory * Update tes...
packages/next-server/lib/constants.js
@@ -5,6 +5,7 @@ export const PHASE_DEVELOPMENT_SERVER = 'phase-development-server' export const PAGES_MANIFEST = 'pages-manifest.json' export const BUILD_MANIFEST = 'build-manifest.json' export const REACT_LOADABLE_MANIFEST = 'react-loadable-manifest.json' +export const CHUNK_GRAPH_MANIFEST = 'compilation-modules.js...
true
Other
vercel
next.js
4201fb957d9b0d8a03e33d7e801952e6d48a5e5c.json
Emit manifest of all page files (#6853) * Get all modules included in build * Add tests * Get all modules contained per entry chunk * Sort files * Add specialized page entry to manifest * Split manifest into pages and chunks key * Update test * Use relative paths to build directory * Update tes...
packages/next/build/webpack-config.ts
@@ -7,13 +7,14 @@ import PagesManifestPlugin from './webpack/plugins/pages-manifest-plugin' import BuildManifestPlugin from './webpack/plugins/build-manifest-plugin' import ChunkNamesPlugin from './webpack/plugins/chunk-names-plugin' import { ReactLoadablePlugin } from './webpack/plugins/react-loadable-plugin' -impo...
true
Other
vercel
next.js
4201fb957d9b0d8a03e33d7e801952e6d48a5e5c.json
Emit manifest of all page files (#6853) * Get all modules included in build * Add tests * Get all modules contained per entry chunk * Sort files * Add specialized page entry to manifest * Split manifest into pages and chunks key * Update test * Use relative paths to build directory * Update tes...
packages/next/build/webpack/plugins/chunk-graph-plugin.ts
@@ -0,0 +1,144 @@ +import { Compiler, Plugin } from 'webpack' +import path from 'path' +import { EOL } from 'os' +import { parse } from 'querystring' +import { CLIENT_STATIC_FILES_RUNTIME_MAIN } from 'next-server/constants' + +function getFiles(dir: string, modules: any[]): string[] { + if (!(modules && modules.length...
true
Other
vercel
next.js
4201fb957d9b0d8a03e33d7e801952e6d48a5e5c.json
Emit manifest of all page files (#6853) * Get all modules included in build * Add tests * Get all modules contained per entry chunk * Sort files * Add specialized page entry to manifest * Split manifest into pages and chunks key * Update test * Use relative paths to build directory * Update tes...
test/integration/dist-dir/test/index.test.js
@@ -1,8 +1,8 @@ /* eslint-env jest */ /* global jasmine */ -import { join } from 'path' -import { existsSync } from 'fs' -import { BUILD_ID_FILE } from 'next-server/constants' +import { join, resolve, relative } from 'path' +import { existsSync, readFileSync } from 'fs' +import { BUILD_ID_FILE, CHUNK_GRAPH_MANIFEST }...
true
Other
vercel
next.js
035890f9cd71f5e22e70018d80576ec537f7115d.json
Fix adblock comment (#6859)
packages/next/build/generate-build-id.ts
@@ -2,7 +2,7 @@ export async function generateBuildId (generate: () => string|null, fallback: () let buildId = await generate() // If there's no buildId defined we'll fall back if (buildId === null) { - // We also create a new buildId if it starts with `ad` to avoid false + // We also create a new build...
false
Other
vercel
next.js
8cd7bd1b94c64d1787a275469fc6786d3a059801.json
Fix wrong anchors and add missing link (#6845) self explanatory
packages/next/README.md
@@ -48,10 +48,11 @@ - [Disabling file-system routing](#disabling-file-system-routing) - [Dynamic assetPrefix](#dynamic-assetprefix) - [Dynamic Import](#dynamic-import) - - [1. Basic Usage (Also does SSR)](#1-basic-usage-also-does-ssr) - - [2. With Custom Loading Component](#2-with-custom-loading-comp...
false
Other
vercel
next.js
71680fb59f62d5a2d20ebd321b5abe85337d8687.json
Fix typo in workflow (#6838) Changed release workflow from `resolve` to `resolves`
.github/main.workflow
@@ -5,7 +5,7 @@ workflow "Generate pull request stats" { workflow "Generate release stats" { on = "release" - resolve = ["PR Stats"] + resolves = ["PR Stats"] } action "PR Stats" {
false
Other
vercel
next.js
f6439aef3df482aa9fd975944cdc401f124dc351.json
Add workflow to generate stats for release (#6836) This adds triggering the PR Stats GitHub Action for a canary release. It compares the latest canary release with the last stable release and posts it as a comment to the commit.
.github/main.workflow
@@ -3,6 +3,11 @@ workflow "Generate pull request stats" { resolves = ["PR Stats"] } +workflow "Generate release stats" { + on = "release" + resolve = ["PR Stats"] +} + action "PR Stats" { uses = "zeit/next-stats-action@master" secrets = ["GITHUB_TOKEN"]
false
Other
vercel
next.js
26a4eb827c384288a4185bdbe14233c025c96dbd.json
Add dropping of custom scripts in AMP mode (#6830) Drops user `<script>` tags and shows a warning in AMP mode. Right now they are only dropped in production mode and left in dev mode so the validator shows its warning since it looks like conflicting props log messages are being cleared causing them to not show. Cl...
packages/next/pages/_document.js
@@ -186,6 +186,12 @@ export class Head extends Component { badProp = 'name="viewport"' } else if (type === 'link' && props.rel === 'canonical') { badProp = 'rel="canonical"' + } else if (type === 'script') { + badProp = '<script' + Object.keys(props).forEach(prop => { + ...
true
Other
vercel
next.js
26a4eb827c384288a4185bdbe14233c025c96dbd.json
Add dropping of custom scripts in AMP mode (#6830) Drops user `<script>` tags and shows a warning in AMP mode. Right now they are only dropped in production mode and left in dev mode so the validator shows its warning since it looks like conflicting props log messages are being cleared causing them to not show. Cl...
test/integration/amphtml/pages/custom-scripts.js
@@ -0,0 +1,13 @@ +import Head from 'next/head' + +export default () => ( + <div> + <Head> + <script src='/im-not-allowed.js' type='text/javascript' /> + <script dangerouslySetInnerHTML={{ + __html: `console.log("I'm not either :p")` + }} /> + </Head> + <p>We only allow AMP scripts now</p...
true