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
d6facc7438df49b2266cbe0947e20e6d92643f2f.json
chore(blog-starter-typescript): update tailwindcss to v3 (#32579) Updates the [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindc...
examples/blog-starter-typescript/components/cover-image.tsx
@@ -12,8 +12,8 @@ const CoverImage = ({ title, src, slug }: Props) => { <img src={src} alt={`Cover Image for ${title}`} - className={cn('shadow-small', { - 'hover:shadow-medium transition-shadow duration-200': slug, + className={cn('shadow-sm', { + 'hover:shadow-lg transition-...
true
Other
vercel
next.js
d6facc7438df49b2266cbe0947e20e6d92643f2f.json
chore(blog-starter-typescript): update tailwindcss to v3 (#32579) Updates the [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindc...
examples/blog-starter-typescript/components/footer.tsx
@@ -3,10 +3,10 @@ import { EXAMPLE_PATH } from '../lib/constants' const Footer = () => { return ( - <footer className="bg-accent-1 border-t border-accent-2"> + <footer className="bg-neutral-50 border-t border-neutral-200"> <Container> <div className="py-28 flex flex-col lg:flex-row items-cen...
true
Other
vercel
next.js
d6facc7438df49b2266cbe0947e20e6d92643f2f.json
chore(blog-starter-typescript): update tailwindcss to v3 (#32579) Updates the [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindc...
examples/blog-starter-typescript/components/hero-post.tsx
@@ -28,7 +28,7 @@ const HeroPost = ({ </div> <div className="md:grid md:grid-cols-2 md:gap-x-16 lg:gap-x-8 mb-20 md:mb-28"> <div> - <h3 className="mb-4 text-4xl lg:text-6xl leading-tight"> + <h3 className="mb-4 text-4xl lg:text-5xl leading-tight"> <Link as={`/posts/...
true
Other
vercel
next.js
d6facc7438df49b2266cbe0947e20e6d92643f2f.json
chore(blog-starter-typescript): update tailwindcss to v3 (#32579) Updates the [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindc...
examples/blog-starter-typescript/components/intro.tsx
@@ -3,14 +3,14 @@ import { CMS_NAME } from '../lib/constants' const Intro = () => { return ( <section className="flex-col md:flex-row flex items-center md:justify-between mt-16 mb-16 md:mb-12"> - <h1 className="text-6xl md:text-8xl font-bold tracking-tighter leading-tight md:pr-8"> + <h1 className="t...
true
Other
vercel
next.js
d6facc7438df49b2266cbe0947e20e6d92643f2f.json
chore(blog-starter-typescript): update tailwindcss to v3 (#32579) Updates the [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindc...
examples/blog-starter-typescript/components/more-stories.tsx
@@ -8,7 +8,7 @@ type Props = { const MoreStories = ({ posts }: Props) => { return ( <section> - <h2 className="mb-8 text-6xl md:text-7xl font-bold tracking-tighter leading-tight"> + <h2 className="mb-8 text-5xl md:text-7xl font-bold tracking-tighter leading-tight"> More Stories </h2> ...
true
Other
vercel
next.js
d6facc7438df49b2266cbe0947e20e6d92643f2f.json
chore(blog-starter-typescript): update tailwindcss to v3 (#32579) Updates the [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindc...
examples/blog-starter-typescript/components/post-title.tsx
@@ -6,7 +6,7 @@ type Props = { const PostTitle = ({ children }: Props) => { return ( - <h1 className="text-6xl md:text-7xl lg:text-8xl font-bold tracking-tighter leading-tight md:leading-none mb-12 text-center md:text-left"> + <h1 className="text-5xl md:text-7xl lg:text-8xl font-bold tracking-tighter leadin...
true
Other
vercel
next.js
d6facc7438df49b2266cbe0947e20e6d92643f2f.json
chore(blog-starter-typescript): update tailwindcss to v3 (#32579) Updates the [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindc...
examples/blog-starter-typescript/components/section-separator.tsx
@@ -1,5 +1,5 @@ const SectionSeparator = () => { - return <hr className="border-accent-2 mt-28 mb-24" /> + return <hr className="border-neutral-200 mt-28 mb-24" /> } export default SectionSeparator
true
Other
vercel
next.js
d6facc7438df49b2266cbe0947e20e6d92643f2f.json
chore(blog-starter-typescript): update tailwindcss to v3 (#32579) Updates the [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindc...
examples/blog-starter-typescript/package.json
@@ -22,8 +22,8 @@ "@types/node": "^15.6.0", "@types/react": "^17.0.6", "@types/react-dom": "^17.0.5", - "autoprefixer": "^10.2.5", - "postcss": "^8.3.0", - "tailwindcss": "^2.1.2" + "autoprefixer": "10.4.0", + "postcss": "8.4.5", + "tailwindcss": "3.0.5" } }
true
Other
vercel
next.js
d6facc7438df49b2266cbe0947e20e6d92643f2f.json
chore(blog-starter-typescript): update tailwindcss to v3 (#32579) Updates the [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindc...
examples/blog-starter-typescript/styles/index.css
@@ -1,15 +1,3 @@ @tailwind base; - -/* Write your own custom base styles here */ - -/* Start purging... */ @tailwind components; -/* Stop purging. */ - -/* Write you own custom component styles here */ - -/* Start purging... */ @tailwind utilities; -/* Stop purging. */ - -/* Your own custom utilities */
true
Other
vercel
next.js
d6facc7438df49b2266cbe0947e20e6d92643f2f.json
chore(blog-starter-typescript): update tailwindcss to v3 (#32579) Updates the [blog-starter-typescript](https://github.com/vercel/next.js/tree/canary/examples/blog-starter-typescript) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindc...
examples/blog-starter-typescript/tailwind.config.js
@@ -1,33 +1,7 @@ module.exports = { - purge: ['./components/**/*.tsx', './pages/**/*.tsx'], + content: ['./components/**/*.tsx', './pages/**/*.tsx'], theme: { - extend: { - colors: { - 'accent-1': '#FAFAFA', - 'accent-2': '#EAEAEA', - 'accent-7': '#333', - success: '#0070f3', -...
true
Other
vercel
next.js
47cd07bb75cb8c50fda3680d0f13a796b0e5b687.json
fix(next-swc/styled-jsx): Fix interpolation in media query (#32490) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next-swc/crates/core/src/lib.rs
@@ -36,8 +36,8 @@ use std::cell::RefCell; use std::rc::Rc; use std::{path::PathBuf, sync::Arc}; use swc::config::ModuleConfig; -use swc_common::SourceFile; use swc_common::{self, chain, pass::Optional}; +use swc_common::{SourceFile, SourceMap}; use swc_ecmascript::ast::EsVersion; use swc_ecmascript::transforms::p...
true
Other
vercel
next.js
47cd07bb75cb8c50fda3680d0f13a796b0e5b687.json
fix(next-swc/styled-jsx): Fix interpolation in media query (#32490) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next-swc/crates/core/src/styled_jsx/mod.rs
@@ -2,6 +2,8 @@ use easy_error::{bail, Error}; use std::collections::hash_map::DefaultHasher; use std::hash::{Hash, Hasher}; use std::mem::take; +use std::sync::Arc; +use swc_common::SourceMap; use swc_common::{collections::AHashSet, Span, DUMMY_SP}; use swc_ecmascript::ast::*; use swc_ecmascript::minifier::{ @@ ...
true
Other
vercel
next.js
47cd07bb75cb8c50fda3680d0f13a796b0e5b687.json
fix(next-swc/styled-jsx): Fix interpolation in media query (#32490) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next-swc/crates/core/src/styled_jsx/transform_css.rs
@@ -1,6 +1,8 @@ use easy_error::{bail, Error}; use std::panic; +use std::sync::Arc; use swc_common::util::take::Take; +use swc_common::SourceMap; use swc_common::{source_map::Pos, BytePos, Span, SyntaxContext, DUMMY_SP}; use swc_css::ast::*; use swc_css::codegen::{ @@ -19,6 +21,7 @@ use tracing::{debug, trace}; ...
true
Other
vercel
next.js
47cd07bb75cb8c50fda3680d0f13a796b0e5b687.json
fix(next-swc/styled-jsx): Fix interpolation in media query (#32490) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next-swc/crates/core/tests/fixture.rs
@@ -14,7 +14,6 @@ use swc_ecma_transforms_testing::{test, test_fixture}; use swc_ecmascript::{ parser::{EsConfig, Syntax}, transforms::{react::jsx, resolver}, - visit::as_folder, }; use testing::fixture; @@ -99,26 +98,14 @@ fn styled_jsx_fixture(input: PathBuf) { let output = input.parent().unwra...
true
Other
vercel
next.js
47cd07bb75cb8c50fda3680d0f13a796b0e5b687.json
fix(next-swc/styled-jsx): Fix interpolation in media query (#32490) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next-swc/crates/core/tests/fixture/styled-jsx/issue-31562-interpolation-in-mdea/input.js
@@ -0,0 +1,30 @@ + + + +export default class { + render() { + return ( + <div> + <p>test</p> + <style jsx global>{` + html { + font-size: ${Typography.base.size.default}; + line-height: ${Typography.base.lineHeight}; + } + @...
true
Other
vercel
next.js
47cd07bb75cb8c50fda3680d0f13a796b0e5b687.json
fix(next-swc/styled-jsx): Fix interpolation in media query (#32490) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next-swc/crates/core/tests/fixture/styled-jsx/issue-31562-interpolation-in-mdea/output.js
@@ -0,0 +1,46 @@ +import _JSXStyle from "styled-jsx/style"; +export default class { + render() { + return <div className={_JSXStyle.dynamic([ + [ + "a876575397b32eda", + [ + Typography.base.size.default, + Typography.base.lineHeigh...
true
Other
vercel
next.js
47cd07bb75cb8c50fda3680d0f13a796b0e5b687.json
fix(next-swc/styled-jsx): Fix interpolation in media query (#32490) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next-swc/crates/core/tests/full.rs
@@ -69,7 +69,7 @@ fn test(input: &Path, minify: bool) { None, &handler, &options.swc, - |_| custom_before_pass(fm.clone(), &options), + |_| custom_before_pass(cm.clone(), fm.clone(), &options), |_| noop(), ) {...
true
Other
vercel
next.js
47cd07bb75cb8c50fda3680d0f13a796b0e5b687.json
fix(next-swc/styled-jsx): Fix interpolation in media query (#32490) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next-swc/crates/napi/src/transform.rs
@@ -30,9 +30,9 @@ use crate::{ complete_output, get_compiler, util::{deserialize_json, CtxtExt, MapErr}, }; -use next_swc::{custom_before_pass, TransformOptions}; use anyhow::{anyhow, bail, Context as _, Error}; use napi::{CallContext, Env, JsBoolean, JsBuffer, JsObject, JsString, JsUnknown, Status, Task};...
true
Other
vercel
next.js
47cd07bb75cb8c50fda3680d0f13a796b0e5b687.json
fix(next-swc/styled-jsx): Fix interpolation in media query (#32490) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next-swc/crates/wasm/src/lib.rs
@@ -47,7 +47,7 @@ pub fn transform_sync(s: &str, opts: JsValue) -> Result<JsValue, JsValue> { }, s.into(), ); - let before_pass = custom_before_pass(fm.clone(), &opts); + let before_pass = custom_before_pass(c.cm.clone(), fm.clone(), &opts); let out = c ...
true
Other
vercel
next.js
04fbc663f9b2637ad7b37da9d302f2240d1d2e68.json
Check stack property for page export exceptions (#32289) Co-authored-by: JJ Kasper <jj@jjsweb.site>
packages/next/export/worker.ts
@@ -503,7 +503,7 @@ export default async function exportPage({ } catch (error) { console.error( `\nError occurred prerendering page "${path}". Read more: https://nextjs.org/docs/messages/prerender-error\n` + - (isError(error) ? error.stack : error) + (isError(error) && error.stack...
true
Other
vercel
next.js
04fbc663f9b2637ad7b37da9d302f2240d1d2e68.json
Check stack property for page export exceptions (#32289) Co-authored-by: JJ Kasper <jj@jjsweb.site>
test/integration/handles-export-errors/pages/custom-error.js
@@ -0,0 +1,13 @@ +class CustomError { + constructor(message, data) { + this.message = message + this.data = data + } + toString() { + return this.message + } +} + +export default () => { + throw new CustomError('custom error message', {}) +}
true
Other
vercel
next.js
04fbc663f9b2637ad7b37da9d302f2240d1d2e68.json
Check stack property for page export exceptions (#32289) Co-authored-by: JJ Kasper <jj@jjsweb.site>
test/integration/handles-export-errors/test/index.test.js
@@ -21,5 +21,7 @@ describe('Handles Errors During Export', () => { expect(stderr).toContain('/page-13') expect(stderr).toContain('/blog/[slug]: /blog/first') expect(stderr).toContain('/blog/[slug]: /blog/second') + expect(stderr).toContain('/custom-error') + expect(stderr).toContain('custom error m...
true
Other
vercel
next.js
c87204eb7714ca3e8207fde93b0e4f65f12fa81e.json
Update 14-alpine to 16-alpine (#31777) ## Documentation / Examples - [x] Make sure the linting passes by running `yarn lint`
examples/with-docker/Dockerfile
@@ -1,20 +1,20 @@ # Install dependencies only when needed -FROM node:alpine AS deps +FROM node:16-alpine AS deps # Check https://github.com/nodejs/docker-node/tree/b4117f9333da4138b03a546ec926ef50a31506c3#nodealpine to understand why libc6-compat might be needed. RUN apk add --no-cache libc6-compat WORKDIR /app CO...
false
Other
vercel
next.js
67545bd654241d0d20e207e1a38c7967c42b736e.json
Add vitals and rsc to npm files (#32472)
packages/next/package.json
@@ -44,6 +44,10 @@ "jest.d.ts", "amp.js", "amp.d.ts", + "vitals.js", + "vitals.d.ts", + "rsc.js", + "rsc.d.ts", "index.d.ts", "types/index.d.ts", "types/global.d.ts",
false
Other
vercel
next.js
0ad4ad6dcd018973a04efa87174acb7d35d2cccc.json
Update react version to rc in react-18 doc (#32473) * Update react version to rc in react-18 doc * Apply suggestions from code review Co-authored-by: Steven <steven@ceriously.com> Co-authored-by: Lee Robinson <me@leerob.io>
docs/advanced-features/react-18.md
@@ -2,14 +2,14 @@ [React 18](https://reactjs.org/blog/2021/06/08/the-plan-for-react-18.html) adds new features including, Suspense, automatic batching of updates, APIs like `startTransition`, and a new streaming API for server rendering with support for `React.lazy`. -React 18 is still in beta. Read more about Rea...
false
Other
vercel
next.js
10d814d31ace05ac00946ab6396df5c57ca54f03.json
Fix dynamic routes with pages under index folder (#32440) Fixes incorrect generated manifest and generated directory for `index/[...dynamic]` pages Too much normalizing adding extra `index/` prefix to `index/[...dynamic]` routes which lead to the incorrected generated routes like `.next/server/pages/index/index/index...
packages/next/export/worker.ts
@@ -215,8 +215,10 @@ export default async function exportPage({ subFolders ? `${_path}${sep}index.html` : `${_path}.html` let htmlFilename = getHtmlFilename(filePath) - const pageExt = extname(page) - const pathExt = extname(path) + // dynamic routes can provide invalid extensions e.g. ...
true
Other
vercel
next.js
10d814d31ace05ac00946ab6396df5c57ca54f03.json
Fix dynamic routes with pages under index folder (#32440) Fixes incorrect generated manifest and generated directory for `index/[...dynamic]` pages Too much normalizing adding extra `index/` prefix to `index/[...dynamic]` routes which lead to the incorrected generated routes like `.next/server/pages/index/index/index...
packages/next/server/denormalize-page-path.ts
@@ -1,10 +1,12 @@ +import { isDynamicRoute } from '../shared/lib/router/utils' + export function normalizePathSep(path: string): string { return path.replace(/\\/g, '/') } export function denormalizePagePath(page: string) { page = normalizePathSep(page) - if (page.startsWith('/index/')) { + if (page.starts...
true
Other
vercel
next.js
10d814d31ace05ac00946ab6396df5c57ca54f03.json
Fix dynamic routes with pages under index folder (#32440) Fixes incorrect generated manifest and generated directory for `index/[...dynamic]` pages Too much normalizing adding extra `index/` prefix to `index/[...dynamic]` routes which lead to the incorrected generated routes like `.next/server/pages/index/index/index...
packages/next/server/normalize-page-path.ts
@@ -1,12 +1,13 @@ import { posix } from 'path' +import { isDynamicRoute } from '../shared/lib/router/utils' export { normalizePathSep, denormalizePagePath } from './denormalize-page-path' export function normalizePagePath(page: string): string { // If the page is `/` we need to append `/index`, otherwise the ...
true
Other
vercel
next.js
10d814d31ace05ac00946ab6396df5c57ca54f03.json
Fix dynamic routes with pages under index folder (#32440) Fixes incorrect generated manifest and generated directory for `index/[...dynamic]` pages Too much normalizing adding extra `index/` prefix to `index/[...dynamic]` routes which lead to the incorrected generated routes like `.next/server/pages/index/index/index...
packages/next/shared/lib/router/utils/get-route-from-asset-path.ts
@@ -1,4 +1,7 @@ // Translate a pages asset path (relative from a common prefix) back into its logical route + +import { isDynamicRoute } from './is-dynamic' + // "asset path" being its javascript file, data file, prerendered html,... export default function getRouteFromAssetPath( assetPath: string, @@ -7,7 +10,7 ...
true
Other
vercel
next.js
10d814d31ace05ac00946ab6396df5c57ca54f03.json
Fix dynamic routes with pages under index folder (#32440) Fixes incorrect generated manifest and generated directory for `index/[...dynamic]` pages Too much normalizing adding extra `index/` prefix to `index/[...dynamic]` routes which lead to the incorrected generated routes like `.next/server/pages/index/index/index...
test/integration/dynamic-routing/pages/index/[...slug].js
@@ -0,0 +1,3 @@ +export default function page() { + return 'index/[...slug]' +}
true
Other
vercel
next.js
10d814d31ace05ac00946ab6396df5c57ca54f03.json
Fix dynamic routes with pages under index folder (#32440) Fixes incorrect generated manifest and generated directory for `index/[...dynamic]` pages Too much normalizing adding extra `index/` prefix to `index/[...dynamic]` routes which lead to the incorrected generated routes like `.next/server/pages/index/index/index...
test/integration/dynamic-routing/test/index.test.js
@@ -27,7 +27,7 @@ let buildId const appDir = join(__dirname, '../') const buildIdPath = join(appDir, '.next/BUILD_ID') -function runTests(dev) { +function runTests({ dev, serverless }) { if (dev) { it('should not have error after pinging WebSocket', async () => { const browser = await webdriver(appPo...
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
packages/next/server/base-server.ts
@@ -91,10 +91,10 @@ import { parseNextUrl } from '../shared/lib/router/utils/parse-next-url' import isError from '../lib/is-error' import { getMiddlewareInfo } from './require' import { MIDDLEWARE_ROUTE } from '../lib/constants' -import { NextResponse } from './web/spec-extension/response' import { run } from './we...
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
packages/next/server/web/adapter.ts
@@ -1,8 +1,9 @@ import type { NextMiddleware, RequestData, FetchEventResult } from './types' +import type { RequestInit } from './spec-extension/request' import { DeprecationError } from './error' import { fromNodeHeaders } from './utils' import { NextFetchEvent } from './spec-extension/fetch-event' -import { NextR...
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
packages/next/server/web/next-url.ts
@@ -1,66 +1,78 @@ import type { PathLocale } from '../../shared/lib/i18n/normalize-locale-path' import type { DomainLocale, I18NConfig } from '../config-shared' import { getLocaleMetadata } from '../../shared/lib/i18n/get-locale-metadata' -import cookie from 'next/dist/compiled/cookie' import { replaceBasePath } fr...
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
packages/next/server/web/sandbox/sandbox.ts
@@ -18,6 +18,19 @@ export async function run(params: { runInContext(paramPath) } + const subreq = params.request.headers[`x-middleware-subrequest`] + const subrequests = typeof subreq === 'string' ? subreq.split(':') : [] + if (subrequests.includes(params.name)) { + return { + waitUntil: Promise.re...
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
packages/next/shared/lib/router/utils/relativize-url.ts
@@ -0,0 +1,13 @@ +/** + * Given a URL as a string and a base URL it will make the URL relative + * if the parsed protocol and host is the same as the one in the base + * URL. Otherwise it returns the same URL string. + */ +export function relativizeURL(url: string | string, base: string | URL) { + const baseURL = type...
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
test/integration/custom-server/server.js
@@ -1,3 +1,7 @@ +if (process.env.POLYFILL_FETCH) { + global.fetch = require('node-fetch').default +} + const http = require('http') const next = require('next')
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
test/integration/custom-server/test/index.test.js
@@ -195,4 +195,14 @@ describe('Custom Server', () => { } ) }) + + describe('with a custom fetch polyfill', () => { + beforeAll(() => startServer({ POLYFILL_FETCH: 'true' })) + afterAll(() => killApp(server)) + + it('should serve internal file from render', async () => { + const data = awai...
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
test/integration/middleware/core/pages/interface/[id]/_middleware.js
@@ -0,0 +1,7 @@ +import { NextResponse } from 'next/server' + +export function middleware() { + const response = NextResponse.next() + response.headers.set('x-dynamic-path', 'true') + return response +}
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
test/integration/middleware/core/pages/interface/_middleware.js
@@ -54,9 +54,7 @@ export async function middleware(request) { } if (url.pathname.endsWith('/root-subrequest')) { - return fetch( - `http://${request.headers.get('host')}/interface/root-subrequest` - ) + return fetch(url) } return new Response(null, {
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
test/integration/middleware/core/pages/responses/_middleware.js
@@ -57,11 +57,11 @@ export async function middleware(request, ev) { ev.waitUntil( (async () => { writer.write(encoder.encode('this is a streamed '.repeat(10))) - await sleep(2000) + await sleep(200) writer.write(encoder.encode('after 2 seconds '.repeat(10))) - await sl...
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
test/integration/middleware/core/test/index.test.js
@@ -447,6 +447,14 @@ function interfaceTests(locale = '') { const element = await browser.elementByCss('.title') expect(await element.text()).toEqual('Dynamic route') }) + + it(`${locale} allows subrequests without infinite loops`, async () => { + const res = await fetchViaHTTP( + context.appPort,...
true
Other
vercel
next.js
59f7676966570093f56ff35fb0d83eb97b394b7b.json
Fix running server with Polyfilled fetch (#32368) **Note**: This PR is applying again changes landed #31935 that were reverted from an investigation. This PR fixes #30398 By default Next will polyfill some fetch APIs (Request, Response, Header and fetch) only if fetch is not found in the global scope in certain entr...
test/unit/web-runtime/next-url.test.ts
@@ -1,74 +1,70 @@ /* eslint-env jest */ import { NextURL } from 'next/dist/server/web/next-url' -it('has the right shape', () => { - const parsed = new NextURL('/about?param1=value1') +// TODO Make NextURL extend URL +it.skip('has the right shape and prototype', () => { + const parsed = new NextURL('/about?param1...
true
Other
vercel
next.js
c658fd327648035e9c9c6ef9faa02e193d13dd44.json
chore(blog-starter): update tailwindcss to v3 (#32398) Updates the [blog-starter](https://github.com/vercel/next.js/tree/canary/examples/blog-starter) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindcss.com/docs/upgrade-guide). Than...
examples/blog-starter/README.md
@@ -61,4 +61,4 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut # Notes -This blog-starter uses [Tailwind CSS](https://tailwindcss.com). To control the generated stylesheet's filesize, this example uses Tailwind CSS' v2.0 [`purge` option](https://tailwindcss.com/docs/controlling-...
true
Other
vercel
next.js
c658fd327648035e9c9c6ef9faa02e193d13dd44.json
chore(blog-starter): update tailwindcss to v3 (#32398) Updates the [blog-starter](https://github.com/vercel/next.js/tree/canary/examples/blog-starter) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindcss.com/docs/upgrade-guide). Than...
examples/blog-starter/package.json
@@ -16,8 +16,8 @@ "remark-html": "13.0.1" }, "devDependencies": { - "autoprefixer": "^10.2.1", - "postcss": "^8.2.4", - "tailwindcss": "^2.0.2" + "autoprefixer": "^10.4.0", + "postcss": "^8.4.4", + "tailwindcss": "^3.0.1" } }
true
Other
vercel
next.js
c658fd327648035e9c9c6ef9faa02e193d13dd44.json
chore(blog-starter): update tailwindcss to v3 (#32398) Updates the [blog-starter](https://github.com/vercel/next.js/tree/canary/examples/blog-starter) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindcss.com/docs/upgrade-guide). Than...
examples/blog-starter/styles/index.css
@@ -1,15 +1,3 @@ @tailwind base; - -/* Write your own custom base styles here */ - -/* Start purging... */ @tailwind components; -/* Stop purging. */ - -/* Write you own custom component styles here */ - -/* Start purging... */ @tailwind utilities; -/* Stop purging. */ - -/* Your own custom utilities */
true
Other
vercel
next.js
c658fd327648035e9c9c6ef9faa02e193d13dd44.json
chore(blog-starter): update tailwindcss to v3 (#32398) Updates the [blog-starter](https://github.com/vercel/next.js/tree/canary/examples/blog-starter) example to use the new [tailwindcss v3](https://tailwindcss.com/blog/tailwindcss-v3) by following the [upgrade guide](https://tailwindcss.com/docs/upgrade-guide). Than...
examples/blog-starter/tailwind.config.js
@@ -1,5 +1,5 @@ module.exports = { - purge: ['./components/**/*.js', './pages/**/*.js'], + content: ['./components/**/*.js', './pages/**/*.js'], theme: { extend: { colors: {
true
Other
vercel
next.js
ca8fd316f1091f9af4564e4286ccdfdaaf43d336.json
Update docker image to leverage output traces (#32258) This updates our docker example to leverage the output traces and standalone build to reduce the resulting docker image quite a bit. docker image size before: `272MB` docker image size after: `121MB` node-14:alpine size (base image): `118MB` ## Documentation / ...
examples/with-docker/Dockerfile
@@ -25,10 +25,13 @@ RUN adduser -S nextjs -u 1001 # You only need to copy next.config.js if you are NOT using the default configuration # COPY --from=builder /app/next.config.js ./ COPY --from=builder /app/public ./public -COPY --from=builder --chown=nextjs:nodejs /app/.next ./.next -COPY --from=builder /app/node_mo...
true
Other
vercel
next.js
ca8fd316f1091f9af4564e4286ccdfdaaf43d336.json
Update docker image to leverage output traces (#32258) This updates our docker example to leverage the output traces and standalone build to reduce the resulting docker image quite a bit. docker image size before: `272MB` docker image size after: `121MB` node-14:alpine size (base image): `118MB` ## Documentation / ...
examples/with-docker/next.config.js
@@ -0,0 +1,5 @@ +module.exports = { + experimental: { + outputStandalone: true, + }, +}
true
Other
vercel
next.js
c21806e54fbb05bdd6f0b6f4bbc748fd9b02c330.json
fix unstable_useRefreshRoot typing (#32364) align with re-exports in entry file
packages/next/rsc.d.ts
@@ -1 +1 @@ -export * from './dist/client/rsc' +export { useRefreshRoot as unstable_useRefreshRoot } from './dist/client/rsc'
false
Other
vercel
next.js
55d8a14e8a0adfd2ae4e09113076ef33615564ba.json
Fix flakey next/link react streaming test (#32351) x-ref: https://github.com/vercel/next.js/runs/4477101349?check_suite_focus=true x-ref: https://github.com/vercel/next.js/runs/4475354509?check_suite_focus=true x-ref: https://github.com/vercel/next.js/runs/4474805941?check_suite_focus=true
test/integration/react-streaming-and-server-components/test/index.test.js
@@ -298,7 +298,12 @@ async function runBasicTests(context, env) { await browser.elementByCss('#next_id').click() await browser.elementByCss('#next_id').click() await check(() => browser.waitForElementByCss('#query').text(), /query:2/) - expect(await browser.eval('window.beforeNav')).toBe(1) + + if ...
false
Other
vercel
next.js
ce56b601665a972f91ec5e6bf7ebd918bba2dcc0.json
Add additional pageProps check (#15667) `pageProps` should always be defined to ensure everything is working as expected although to prevent a breaking change this adds an additional check before attempting to access `pageProps` before hydration. It also adds tests to prevent regressing on this Closes: https://github...
packages/next/client/index.js
@@ -57,6 +57,7 @@ if ( !( page === '/_error' && hydrateProps && + hydrateProps.pageProps && hydrateProps.pageProps.statusCode === '404' ) ) {
true
Other
vercel
next.js
ce56b601665a972f91ec5e6bf7ebd918bba2dcc0.json
Add additional pageProps check (#15667) `pageProps` should always be defined to ensure everything is working as expected although to prevent a breaking change this adds an additional check before attempting to access `pageProps` before hydration. It also adds tests to prevent regressing on this Closes: https://github...
test/integration/no-page-props/pages/_app.js
@@ -0,0 +1,24 @@ +function App({ Component, pageProps }) { + return <Component {...pageProps} /> +} + +if (typeof window !== 'undefined') { + window.uncaughtErrors = [] + window.addEventListener('error', (err) => { + window.uncaughtErrors.push(err) + }) + window.addEventListener('unhandledrejection', (err) => {...
true
Other
vercel
next.js
ce56b601665a972f91ec5e6bf7ebd918bba2dcc0.json
Add additional pageProps check (#15667) `pageProps` should always be defined to ensure everything is working as expected although to prevent a breaking change this adds an additional check before attempting to access `pageProps` before hydration. It also adds tests to prevent regressing on this Closes: https://github...
test/integration/no-page-props/pages/gsp.js
@@ -0,0 +1,11 @@ +export default function Gsp() { + return <p id="gsp">getStaticProps</p> +} + +export const getStaticProps = () => { + return { + props: { + hello: 'world', + }, + } +}
true
Other
vercel
next.js
ce56b601665a972f91ec5e6bf7ebd918bba2dcc0.json
Add additional pageProps check (#15667) `pageProps` should always be defined to ensure everything is working as expected although to prevent a breaking change this adds an additional check before attempting to access `pageProps` before hydration. It also adds tests to prevent regressing on this Closes: https://github...
test/integration/no-page-props/pages/gssp.js
@@ -0,0 +1,11 @@ +export default function Gssp() { + return <p id="gssp">getServerSideProps</p> +} + +export const getServerSideProps = () => { + return { + props: { + hello: 'world', + }, + } +}
true
Other
vercel
next.js
ce56b601665a972f91ec5e6bf7ebd918bba2dcc0.json
Add additional pageProps check (#15667) `pageProps` should always be defined to ensure everything is working as expected although to prevent a breaking change this adds an additional check before attempting to access `pageProps` before hydration. It also adds tests to prevent regressing on this Closes: https://github...
test/integration/no-page-props/pages/index.js
@@ -0,0 +1,21 @@ +import Link from 'next/link' + +export default function Index() { + return ( + <> + <p id="index">index</p> + <Link href="/gsp"> + <a id="to-gsp">to gsp</a> + </Link> + <br /> + <Link href="/gssp"> + <a id="to-gssp">to gssp</a> + </Link> + <br /> + ...
true
Other
vercel
next.js
ce56b601665a972f91ec5e6bf7ebd918bba2dcc0.json
Add additional pageProps check (#15667) `pageProps` should always be defined to ensure everything is working as expected although to prevent a breaking change this adds an additional check before attempting to access `pageProps` before hydration. It also adds tests to prevent regressing on this Closes: https://github...
test/integration/no-page-props/test/index.test.js
@@ -0,0 +1,104 @@ +/* eslint-env jest */ + +import { join } from 'path' +import webdriver from 'next-webdriver' +import { + nextBuild, + nextStart, + findPort, + killApp, + launchApp, +} from 'next-test-utils' + +jest.setTimeout(1000 * 60 * 1) +const appDir = join(__dirname, '..') +let app +let appPort + +const ru...
true
Other
vercel
next.js
59924967f1947a510884f2a65ade89c832c4f84e.json
remove broken server example (#15653) This removes the server 4 example which breaks all server code since the error will happen when the file is sourced.
examples/with-sentry/pages/index.js
@@ -41,14 +41,6 @@ const Index = () => ( Open in a new tab </a> </li> - <li> - There is a top-of-module Promise that rejects, but its result is not - awaited. Sentry should record Error('Server Test 4'). Note this will - also be recorded on the client s...
true
Other
vercel
next.js
59924967f1947a510884f2a65ade89c832c4f84e.json
remove broken server example (#15653) This removes the server 4 example which breaks all server code since the error will happen when the file is sourced.
examples/with-sentry/pages/server/test4.js
@@ -1,12 +0,0 @@ -const doAsyncWork = () => Promise.reject(new Error('Server Test 4')) -doAsyncWork() - -const Test4 = () => <h1>Server Test 4</h1> - -// Define getServerSideProps so that the page will be server rendered -// instead of statically generated -export async function getServerSideProps() { - return { props...
true
Other
vercel
next.js
3b4d460afd8bcb6437dca1456be2ad178722d9bb.json
Remove console log from release script (#15652)
release.js
@@ -56,7 +56,6 @@ const groupByLabels = async (commits, github) => { for (const commit of commits) { const pullRequest = await getCommitPullRequest(commit, github) - console.log({ pullRequest }) if (pullRequest) { const section = getSectionForPullRequest(pullRequest)
false
Other
vercel
next.js
571e2a7cff1e5b3ba3898fd8dd67ba29766dff67.json
Add note about statusCode config for redirects (#15615) This adds a note to our documentation about the `statusCode` config to match the note from the redirects documentation for [`vercel.json`](https://vercel.com/docs/configuration#project/redirects)
docs/api-reference/next.config.js/redirects.md
@@ -92,3 +92,5 @@ module.exports = { }, } ``` + +In some rare cases, you might need to assign a custom status code for older HTTP Clients to properly redirect. In these cases, you can use the `statusCode` property instead of the `permanent` property, but not both. Note: to ensure IE11 compatibility a `Refresh` hea...
false
Other
vercel
next.js
6eea915456b41414a95ef6ea06e08f757540747f.json
Add better typing for redirect (#15603)
packages/next/next-server/lib/utils.ts
@@ -226,7 +226,8 @@ export type NextApiResponse<T = any> = ServerResponse & { */ json: Send<T> status: (statusCode: number) => NextApiResponse<T> - redirect: (statusOrUrl: string | number, url?: string) => NextApiResponse<T> + redirect(url: string): NextApiResponse<T> + redirect(status: number, url: string...
true
Other
vercel
next.js
6eea915456b41414a95ef6ea06e08f757540747f.json
Add better typing for redirect (#15603)
packages/next/next-server/server/api-utils.ts
@@ -68,7 +68,8 @@ export async function apiResolver( apiRes.status = (statusCode) => sendStatusCode(apiRes, statusCode) apiRes.send = (data) => sendData(apiReq, apiRes, data) apiRes.json = (data) => sendJson(apiRes, data) - apiRes.redirect = (statusOrUrl, url) => redirect(apiRes, statusOrUrl, url) + ...
true
Other
vercel
next.js
3405fb9453a2cee05086f76dcaf4b912749ce539.json
fix typo in `eslint-plugin-next` code comments (#15583) (p.s. excited to use this package. thank you.)
packages/eslint-plugin-next/lib/utils/url.js
@@ -55,9 +55,9 @@ function parseUrlForPages(urlprefix, directory) { } /** - * Takes a url and does the following things. - * - replace `index.html` with `/` - * - Makes sure all URLs are have a trainiling `/` + * Takes a URL and does the following things. + * - Replaces `index.html` with `/` + * - Makes sure al...
false
Other
vercel
next.js
059741ea00feafc5b9da3e9fb3d9a2f8856507b0.json
Update stats-config for new polyfills location (#15584) This makes sure to not group the polyfills chunk in with the client bundles group now that it is output under chunks instead of runtime
test/.stats-app/stats-config.js
@@ -3,19 +3,19 @@ const clientGlobs = [ name: 'Client Bundles (main, webpack, commons)', globs: [ '.next/static/runtime/+(main|webpack)-!(*.module.js)', - '.next/static/chunks/!(*.module.js)', + '.next/static/chunks/!(polyfills-*|*.module.js)', ], }, { name: 'Client Bundles (m...
false
Other
vercel
next.js
c50843f66020a2bfa76bc5ccbe57bcbadb5565fb.json
Add release hook to format the changelog by labels (#14592) * Add release hook * Remove release.js exported config * Add skip flag to release CLI * Use full flag name * Upgrade release * Update yarn.lock Co-authored-by: Tim Neutkens <timneutkens@me.com>
package.json
@@ -29,7 +29,7 @@ "types": "lerna run types --stream", "typescript": "lerna run typescript", "prepublish": "lerna run prepublish", - "publish-canary": "lerna version prerelease --preid canary --force-publish && release --pre", + "publish-canary": "lerna version prerelease --preid canary --force-pub...
true
Other
vercel
next.js
c50843f66020a2bfa76bc5ccbe57bcbadb5565fb.json
Add release hook to format the changelog by labels (#14592) * Add release hook * Remove release.js exported config * Add skip flag to release CLI * Use full flag name * Upgrade release * Update yarn.lock Co-authored-by: Tim Neutkens <timneutkens@me.com>
release.js
@@ -0,0 +1,162 @@ +const fetch = require('node-fetch') + +// -------------------- +// Repo + +const owner = 'vercel' +const repo = 'next.js' + +// -------------------- +// Config + +// section -> label +const sectionLabelMap = { + 'Core Changes': 'type: next', + 'Documentation Changes': 'type: documentation', + 'Exa...
true
Other
vercel
next.js
c50843f66020a2bfa76bc5ccbe57bcbadb5565fb.json
Add release hook to format the changelog by labels (#14592) * Add release hook * Remove release.js exported config * Add skip flag to release CLI * Use full flag name * Upgrade release * Update yarn.lock Co-authored-by: Tim Neutkens <timneutkens@me.com>
yarn.lock
@@ -3311,15 +3311,6 @@ ajv-keywords@^3.1.0, ajv-keywords@^3.4.1: version "3.4.1" resolved "https://registry.yarnpkg.com/ajv-keywords/-/ajv-keywords-3.4.1.tgz#ef916e271c64ac12171fd8384eaae6b2345854da" -ajv@^5.1.0: - version "5.5.2" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-5.5.2.tgz#73b5eeca3fab653e3d...
true
Other
vercel
next.js
91242ca6d7d8227dff9d2eb7e9c3b8517f5b6fde.json
Ignore history state not created by next.js (#15379) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next/next-server/lib/router/router.ts
@@ -341,7 +341,11 @@ export default class Router implements BaseRouter { return } - const { url, as, options } = e.state + const { url, as, options, __N } = e.state + if (!__N) { + // this history state wasn't created by next.js so it can be ignored + return + } const { pathname...
true
Other
vercel
next.js
91242ca6d7d8227dff9d2eb7e9c3b8517f5b6fde.json
Ignore history state not created by next.js (#15379) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
test/integration/client-navigation/test/index.test.js
@@ -1104,6 +1104,66 @@ describe('Client Navigation', () => { }) }) + describe('foreign history manipulation', () => { + it('should ignore history state without options', async () => { + let browser + try { + browser = await webdriver(context.appPort, '/nav') + // push history objec...
true
Other
vercel
next.js
fdfc508a61bd1694892f0f123561d200177e8772.json
Add polyfill for process and Buffer in webpack 5 (#15499)
packages/next/build/webpack-config.ts
@@ -802,6 +802,14 @@ export default async function getBaseWebpackConfig( }, plugins: [ hasReactRefresh && new ReactRefreshWebpackPlugin(), + // Makes sure `Buffer` is polyfilled in client-side bundles (same behavior as webpack 4) + isWebpack5 && + !isServer && + new webpack.Prov...
true
Other
vercel
next.js
fdfc508a61bd1694892f0f123561d200177e8772.json
Add polyfill for process and Buffer in webpack 5 (#15499)
packages/next/package.json
@@ -82,6 +82,7 @@ "babel-plugin-transform-define": "2.0.0", "babel-plugin-transform-react-remove-prop-types": "0.4.24", "browserslist": "4.13.0", + "buffer": "5.6.0", "cacache": "13.0.1", "chokidar": "2.1.8", "css-loader": "3.5.3", @@ -95,6 +96,7 @@ "neo-async": "2.6.1", "pnp-...
true
Other
vercel
next.js
fdfc508a61bd1694892f0f123561d200177e8772.json
Add polyfill for process and Buffer in webpack 5 (#15499)
yarn.lock
@@ -4108,7 +4108,7 @@ browserify-zlib@^0.2.0: dependencies: pako "~1.0.5" -browserslist@4.13.0, browserslist@^1.3.6, browserslist@^1.5.2, browserslist@^1.7.6, browserslist@^4.0.0, browserslist@^4.11.1, browserslist@^4.13.0, browserslist@^4.3.6, browserslist@^4.6.4, browserslist@^4.8.3, browserslist@^4.8.5: +b...
true
Other
vercel
next.js
e73faa187bfe2bccabbb52f05ea5faf4ad3a85fe.json
Update revalidate examples for 9.5 (#15551)
examples/with-apollo-and-redux/pages/apollo.js
@@ -25,7 +25,7 @@ export async function getStaticProps() { props: { initialApolloState: apolloClient.cache.extract(), }, - unstable_revalidate: 1, + revalidate: 1, } }
true
Other
vercel
next.js
e73faa187bfe2bccabbb52f05ea5faf4ad3a85fe.json
Update revalidate examples for 9.5 (#15551)
examples/with-apollo-and-redux/pages/index.js
@@ -57,7 +57,7 @@ export async function getStaticProps() { initialReduxState: reduxStore.getState(), initialApolloState: apolloClient.cache.extract(), }, - unstable_revalidate: 1, + revalidate: 1, } }
true
Other
vercel
next.js
e73faa187bfe2bccabbb52f05ea5faf4ad3a85fe.json
Update revalidate examples for 9.5 (#15551)
examples/with-apollo-and-redux/pages/redux.js
@@ -39,7 +39,7 @@ export async function getStaticProps() { props: { initialReduxState: reduxStore.getState(), }, - unstable_revalidate: 1, + revalidate: 1, } }
true
Other
vercel
next.js
e73faa187bfe2bccabbb52f05ea5faf4ad3a85fe.json
Update revalidate examples for 9.5 (#15551)
examples/with-graphql-hooks/pages/index.js
@@ -25,6 +25,6 @@ export async function getStaticProps() { props: { initialGraphQLState: client.cache.getInitialState(), }, - unstable_revalidate: 1, + revalidate: 1, } }
true
Other
vercel
next.js
bf9b96bd81d62d8fe62487ef58509dd958d76bcb.json
Update Apollo example for 9.5 (#15546)
examples/with-apollo/pages/index.js
@@ -29,7 +29,7 @@ export async function getStaticProps() { props: { initialApolloState: apolloClient.cache.extract(), }, - unstable_revalidate: 1, + revalidate: 1, } }
false
Other
vercel
next.js
71bc0db92ad0f75e5f208d04ae36f6810f8f53c6.json
Combine sendPayload and sendHTML (#15475)
packages/next/build/entries.ts
@@ -83,6 +83,7 @@ export function createEntrypoints( buildId, assetPrefix: config.assetPrefix, generateEtags: config.generateEtags, + poweredByHeader: config.poweredByHeader, canonicalBase: config.canonicalBase, basePath: config.basePath, runtimeConfig: hasRuntimeConfig
true
Other
vercel
next.js
71bc0db92ad0f75e5f208d04ae36f6810f8f53c6.json
Combine sendPayload and sendHTML (#15475)
packages/next/build/webpack/loaders/next-serverless-loader.ts
@@ -22,6 +22,7 @@ export type ServerlessLoaderQuery = { buildId: string assetPrefix: string generateEtags: string + poweredByHeader: string canonicalBase: string basePath: string runtimeConfig: string @@ -43,6 +44,7 @@ const nextServerlessLoader: loader.Loader = function () { absoluteDocumentPat...
true
Other
vercel
next.js
71bc0db92ad0f75e5f208d04ae36f6810f8f53c6.json
Combine sendPayload and sendHTML (#15475)
packages/next/next-server/server/next-server.ts
@@ -52,7 +52,6 @@ import Router, { route, Route, } from './router' -import { sendHTML } from './send-html' import { sendPayload } from './send-payload' import { serveStatic } from './serve-static' import { IncrementalCache } from './incremental-cache' @@ -813,7 +812,10 @@ export default class Server { ht...
true
Other
vercel
next.js
71bc0db92ad0f75e5f208d04ae36f6810f8f53c6.json
Combine sendPayload and sendHTML (#15475)
packages/next/next-server/server/send-html.ts
@@ -1,37 +0,0 @@ -import { IncomingMessage, ServerResponse } from 'http' -import generateETag from 'next/dist/compiled/etag' -import fresh from 'next/dist/compiled/fresh' -import { isResSent } from '../lib/utils' - -export function sendHTML( - req: IncomingMessage, - res: ServerResponse, - html: string, - { - ge...
true
Other
vercel
next.js
71bc0db92ad0f75e5f208d04ae36f6810f8f53c6.json
Combine sendPayload and sendHTML (#15475)
packages/next/next-server/server/send-payload.ts
@@ -8,7 +8,10 @@ export function sendPayload( res: ServerResponse, payload: any, type: 'html' | 'json', - generateEtags: boolean, + { + generateEtags, + poweredByHeader, + }: { generateEtags: boolean; poweredByHeader: boolean }, options?: | { private: true } | { private: boolean; stateful...
true
Other
vercel
next.js
193ffe7616ed1e1578eea817d8808e9f556f6055.json
fix typo in custom-webpack-config docs (#15533)
docs/api-reference/next.config.js/custom-webpack-config.md
@@ -4,7 +4,7 @@ description: Extend the default webpack config added by Next.js. # Custom Webpack Config -Before continuing to add custom webpack configuration your application make sure Next.js doesn't already support your use-case: +Before continuing to add custom webpack configuration to your application make s...
false
Other
vercel
next.js
ac12c07ce55f5d1566be43b884818ec9387eabee.json
Fix peer dependency (#15511)
packages/react-dev-overlay/package.json
@@ -30,6 +30,6 @@ "peerDependencies": { "react": "^16.9.0", "react-dom": "^16.9.0", - "webpack": "^4|^5" + "webpack": "^4 || ^5" } }
false
Other
vercel
next.js
f98e38c9b634b85e6679e7b5f953a9d98074cfc3.json
Add static tweet link (#15493)
docs/basic-features/data-fetching.md
@@ -326,6 +326,13 @@ export default Post #### `fallback: true` +<details> + <summary><b>Examples</b></summary> + <ul> + <li><a href="https://static-tweet.now.sh">Static generation of a large number of pages</a></li> + </ul> +</details> + If `fallback` is `true`, then the behavior of `getStaticProps` changes...
false
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
package.json
@@ -112,8 +112,8 @@ "release": "6.0.1", "request-promise-core": "1.1.2", "rimraf": "2.6.3", - "selenium-standalone": "6.17.0", - "selenium-webdriver": "4.0.0-alpha.5", + "selenium-standalone": "6.18.0", + "selenium-webdriver": "4.0.0-alpha.7", "shell-quote": "1.7.2", "styled-compone...
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
run-tests.js
@@ -136,7 +136,7 @@ const TIMINGS_API = `https://next-timings.jjsweb.site/api/timings` { stdio: 'inherit', env: { - JEST_RETRY_TIMES: 2, + JEST_RETRY_TIMES: 0, ...process.env, ...(isAzure ? {
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/amphtml/pages/only-amp.js
@@ -1,7 +1,9 @@ export const config = { amp: true } -export default () => ( - <div> - <p id="only-amp">Only AMP for me...</p> - </div> -) +export default function Page() { + return ( + <div> + <p id="only-amp">Only AMP for me...</p> + </div> + ) +}
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/auto-export/pages/[post]/[cmnt].js
@@ -5,17 +5,17 @@ if (typeof window !== 'undefined') { const origWarn = window.console.warn const origError = window.console.error window.console.warn = function (...args) { - window.caughtWarns.push(1) + window.caughtWarns.push(args) origWarn(...args) } window.console.error = function (...arg...
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/auto-export/pages/[post]/index.js
@@ -1,6 +1,6 @@ import { useRouter } from 'next/router' -export default () => { +export default function Page() { const { query } = useRouter() return <p>post: {query.post}</p>
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/auto-export/test/index.test.js
@@ -81,9 +81,8 @@ describe('Auto Export', () => { it('should not show hydration warning from mismatching asPath', async () => { const browser = await webdriver(appPort, '/zeit/cmnt-1') - - const numCaught = await browser.eval(`window.caughtWarns.length`) - expect(numCaught).toBe(0) + const ...
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/build-indicator/pages/a.js
@@ -1 +1,3 @@ -export default () => <p>Hello from a</p> +export default function Page() { + return <p>Hello from a</p> +}
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/build-indicator/pages/b.js
@@ -1 +1,3 @@ -export default () => <p>Hello from b</p> +export default function Page() { + return <p>Hello from b</p> +}
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/build-indicator/pages/index.js
@@ -1,12 +1,14 @@ import Link from 'next/link' -export default () => ( - <> - <Link href="/a"> - <a id="to-a">Go to a</a> - </Link> - <Link href="/b"> - <a id="to-b">Go to b</a> - </Link> - </> -) +export default function Page() { + return ( + <> + <Link href="/a"> + <a id="to...
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/dynamic-optional-routing/test/index.test.js
@@ -10,14 +10,15 @@ import { nextBuild, nextStart, renderViaHTTP, - waitFor, + check, } from 'next-test-utils' import { join } from 'path' jest.setTimeout(1000 * 60 * 2) let app let appPort +let stderr const appDir = join(__dirname, '../') const DUMMY_PAGE = 'export default () => null' @@ -187,9...
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/error-in-error/test/index.test.js
@@ -31,7 +31,7 @@ describe('Handles an Error in _error', () => { it('Handles error during client transition', async () => { const browser = await webdriver(port, '/') - await browser.elementByCss('a').click() + await browser.waitForElementByCss('a').click() await waitFor(1000) const html = awa...
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/invalid-href/pages/third.js
@@ -3,7 +3,7 @@ import { useState } from 'react' const invalidLink = 'https://vercel.com/' -export default () => { +export default function Page() { const { query, ...router } = useRouter() const [isDone, setIsDone] = useState(false) const { method = 'push' } = query
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/invalid-href/test/index.test.js
@@ -30,24 +30,18 @@ jest.retryTimes(0) const showsError = async (pathname, regex, click = false, isWarn = false) => { const browser = await webdriver(appPort, pathname) try { + // wait for page to be built and navigated to + await browser.waitForElementByCss('#click-me') if (isWarn) { await bro...
true
Other
vercel
next.js
2f50f1f8c948b5766a783adfba5e05d129deb624.json
Stabilize more tests (#15470) jest retries seem to be masking test failures, like the `auto-export` one (and maybe others). I turned it off for now. The `auto-export` test fails when retries are turned off. the output of this test failure was a bit unhelpful so I also improved it. Many tests have anonymous page functi...
test/integration/query-with-encoding/test/index.test.js
@@ -1,12 +1,6 @@ /* eslint-env jest */ -import { - nextBuild, - nextServer, - startApp, - stopApp, - waitFor, -} from 'next-test-utils' +import { nextBuild, nextServer, startApp, stopApp } from 'next-test-utils' import webdriver from 'next-webdriver' import { join } from 'path' @@ -46,12 +40,11 @@ describe(...
true