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
ed1d0241db210f484beb1cc5ee5bd191816f0048.json
Docs(router): Add type for url parameter (#31737) Update documentation to have proper type for the url parameter of router.push method. Also add link to Node.JS documentation for full explanation of the UrlObject properties.
docs/api-reference/next/router.md
@@ -70,8 +70,8 @@ Handles client-side transitions, this method is useful for cases where [`next/li router.push(url, as, options) ``` -- `url` - The URL to navigate to -- `as` - Optional decorator for the path that will be shown in the browser URL bar. Before Next.js 9.5.3 this was used for dynamic routes, check our...
false
Other
vercel
next.js
2e5218c7781ab98c636594e0f36a502425f88177.json
Fix hydration middleware effects (#31800) Whenever we trigger a route change in the client we check if there route we are navigating to is affected by a middleware. When this is the case we run a preflight and in case there is an effect that tells us that the middleware is responding with content we force a _refresh_....
packages/next/shared/lib/router/router.ts
@@ -1133,28 +1133,35 @@ export default class Router implements BaseRouter { resolvedAs = delLocale(delBasePath(resolvedAs), this.locale) - const effect = await this._preflightRequest({ - as, - cache: process.env.NODE_ENV === 'production', - pages, - pathname, - query, - }) + /...
true
Other
vercel
next.js
2e5218c7781ab98c636594e0f36a502425f88177.json
Fix hydration middleware effects (#31800) Whenever we trigger a route change in the client we check if there route we are navigating to is affected by a middleware. When this is the case we run a preflight and in case there is an effect that tells us that the middleware is responding with content we force a _refresh_....
test/integration/middleware/core/pages/interface/_middleware.js
@@ -53,6 +53,12 @@ export async function middleware(request) { } } + if (url.pathname.endsWith('/root-subrequest')) { + return fetch( + `http://${request.headers.get('host')}/interface/root-subrequest` + ) + } + return new Response(null, { headers: { 'req-url-basepath': request.nex...
true
Other
vercel
next.js
2e5218c7781ab98c636594e0f36a502425f88177.json
Fix hydration middleware effects (#31800) Whenever we trigger a route change in the client we check if there route we are navigating to is affected by a middleware. When this is the case we run a preflight and in case there is an effect that tells us that the middleware is responding with content we force a _refresh_....
test/integration/middleware/core/test/index.test.js
@@ -438,6 +438,15 @@ function interfaceTests(locale = '') { expect(res.headers.get('req-url-locale')).toBe(locale.slice(1)) } }) + + it(`${locale} renders correctly rewriting with a root subrequest`, async () => { + const browser = await webdriver( + context.appPort, + '/interface/root-subr...
true
Other
vercel
next.js
1bc9b1ac02ec771a5b36ddeb9b0a978eff81fd4a.json
Fix wasm loading (#31772) * Fix wasm loading * Remove consoles
.github/workflows/build_test_deploy.yml
@@ -570,7 +570,7 @@ jobs: if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }} with: profile: minimal - toolchain: nightly-2021-08-12 + toolchain: nightly-2021-11-15 - name: Cache cargo registry uses: actions/cache@v1 @@ -592,7 +592,7 @@...
true
Other
vercel
next.js
1bc9b1ac02ec771a5b36ddeb9b0a978eff81fd4a.json
Fix wasm loading (#31772) * Fix wasm loading * Remove consoles
.github/workflows/pull_request_stats.yml
@@ -32,7 +32,7 @@ jobs: if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }} with: profile: minimal - toolchain: nightly-2021-08-12 + toolchain: nightly-2021-11-15 - name: Cache cargo registry uses: actions/cache@v1 @@ -54,7 +54,7 @@ job...
true
Other
vercel
next.js
1bc9b1ac02ec771a5b36ddeb9b0a978eff81fd4a.json
Fix wasm loading (#31772) * Fix wasm loading * Remove consoles
packages/next-swc/Cargo.lock
@@ -171,6 +171,24 @@ dependencies = [ "generic-array", ] +[[package]] +name = "browserslist-rs" +version = "0.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "aa428c5a7369965603314e5fbfa5ae1755159bce2c35880d80ea84a866213b20" +dependencies = [ + "chrono", + "itertools", + "js-sys"...
true
Other
vercel
next.js
1bc9b1ac02ec771a5b36ddeb9b0a978eff81fd4a.json
Fix wasm loading (#31772) * Fix wasm loading * Remove consoles
packages/next-swc/crates/core/Cargo.toml
@@ -15,13 +15,13 @@ pathdiff = "0.2.0" serde = "1" serde_json = "1" styled_components = "0.2.0" -swc = "0.85.0" +swc = "0.87.0" swc_atoms = "0.2.7" swc_common = {version = "0.14.2", features = ["concurrent", "sourcemap"]} swc_css = "0.31.0" swc_ecma_loader = { version = "0.24.2", features = ["node", "lru"] } -sw...
true
Other
vercel
next.js
1bc9b1ac02ec771a5b36ddeb9b0a978eff81fd4a.json
Fix wasm loading (#31772) * Fix wasm loading * Remove consoles
packages/next-swc/crates/core/src/lib.rs
@@ -46,8 +46,8 @@ use swc_ecmascript::{ }; pub mod amp_attributes; -pub mod disallow_re_export_all_in_page; mod auto_cjs; +pub mod disallow_re_export_all_in_page; pub mod hook_optimizer; pub mod next_dynamic; pub mod next_ssg;
true
Other
vercel
next.js
1bc9b1ac02ec771a5b36ddeb9b0a978eff81fd4a.json
Fix wasm loading (#31772) * Fix wasm loading * Remove consoles
packages/next-swc/crates/core/tests/full.rs
@@ -30,7 +30,7 @@ fn test(input: &Path, minify: bool) { let options = TransformOptions { swc: swc::config::Options { swcrc: true, - is_module: true, + is_module: swc::config::IsModule::Bool(true), output_path: ...
true
Other
vercel
next.js
1bc9b1ac02ec771a5b36ddeb9b0a978eff81fd4a.json
Fix wasm loading (#31772) * Fix wasm loading * Remove consoles
packages/next-swc/crates/napi/Cargo.toml
@@ -16,12 +16,12 @@ once_cell = "1.8.0" serde = "1" serde_json = "1" next-swc = { version = "0.0.0", path = "../core" } -swc = "0.85.0" +swc = "0.87.0" swc_atoms = "0.2.7" swc_bundler = { version = "0.82.0", features = ["concurrent"] } swc_common = {version = "0.14.2", features = ["concurrent", "sourcemap"]} swc...
true
Other
vercel
next.js
1bc9b1ac02ec771a5b36ddeb9b0a978eff81fd4a.json
Fix wasm loading (#31772) * Fix wasm loading * Remove consoles
packages/next-swc/crates/wasm/Cargo.toml
@@ -16,9 +16,9 @@ path-clean = "0.1" serde = {version = "1", features = ["derive"]} serde_json = "1" next-swc = { version = "0.0.0", path = "../core" } -swc = "0.85.0" +swc = "0.87.0" swc_common = {version = "0.14.2", features = ["concurrent", "sourcemap"]} -swc_ecmascript = { version = "0.87.0", features = ["codeg...
true
Other
vercel
next.js
1bc9b1ac02ec771a5b36ddeb9b0a978eff81fd4a.json
Fix wasm loading (#31772) * Fix wasm loading * Remove consoles
packages/next-swc/rust-toolchain
@@ -1 +1 @@ -nightly-2021-08-12 \ No newline at end of file +nightly-2021-11-15 \ No newline at end of file
true
Other
vercel
next.js
1bc9b1ac02ec771a5b36ddeb9b0a978eff81fd4a.json
Fix wasm loading (#31772) * Fix wasm loading * Remove consoles
packages/next/build/swc/index.js
@@ -1,67 +1,110 @@ -const fs = require('fs') -const { platform, arch } = require('os') -const path = require('path') -const { platformArchTriples } = require('@napi-rs/triples') -const Log = require('../output/log') +import { platform, arch } from 'os' +import { platformArchTriples } from '@napi-rs/triples' +import Log...
true
Other
vercel
next.js
fccaa8e27ffc27d5f8b914f6faa0a82349722676.json
Fix initial compile timing incorrect measurment (#31733) Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next/build/output/index.ts
@@ -107,10 +107,7 @@ let serverWebWasLoading = false buildStore.subscribe((state) => { const { amp, client, server, serverWeb, trigger } = state - const { bootstrap: bootstrapping, appUrl } = consoleStore.getState() - if (bootstrapping && (client.loading || server.loading)) { - return - } + const { appUrl ...
true
Other
vercel
next.js
fccaa8e27ffc27d5f8b914f6faa0a82349722676.json
Fix initial compile timing incorrect measurment (#31733) Co-authored-by: Tobias Koppers <1365881+sokra@users.noreply.github.com> Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next/build/output/store.ts
@@ -56,17 +56,20 @@ store.subscribe((state) => { if (state.appUrl) { Log.ready(`started server on ${state.bindAddr}, url: ${state.appUrl}`) } - if (startTime === 0) startTime = Date.now() return } if (state.loading) { if (state.trigger) { - Log.wait(`compiling ${state.trigger}...
true
Other
vercel
next.js
226944d3d3a41a52cd5c6bbcec42b92fad731a49.json
Fix pwa demo (#31734) * Fix pwa demo * Revert unnecessary change
examples/progressive-web-app/package.json
@@ -7,7 +7,7 @@ }, "dependencies": { "next": "latest", - "next-pwa": "^3.1.0", + "next-pwa": "^5.4.1", "react": "^17.0.2", "react-dom": "^17.0.2" }
true
Other
vercel
next.js
226944d3d3a41a52cd5c6bbcec42b92fad731a49.json
Fix pwa demo (#31734) * Fix pwa demo * Revert unnecessary change
yarn.lock
@@ -19989,11 +19989,16 @@ webpack-bundle-analyzer@4.3.0: source-list-map "^2.0.0" source-map "~0.6.1" -"webpack-sources3@npm:webpack-sources@3.2.2", webpack-sources@^3.2.2: +"webpack-sources3@npm:webpack-sources@3.2.2": version "3.2.2" resolved "https://registry.yarnpkg.com/webpack-sources/-/webpack-s...
true
Other
vercel
next.js
4b538e9879540d28db4e3ded4fecf79823e2110c.json
Add error link when hydration error occurs (#31519) This adds an error document/link for hydration errors to help users debug these easier. While looking at adding this also noticed a typo in the dev-overlay which is fixed. <details> <summary>screenshot</summary> <img width="1109" alt="Screen Shot 2021-11-16 at 15...
errors/manifest.json
@@ -4,6 +4,10 @@ "title": "Messages", "heading": true, "routes": [ + { + "title": "react-hydration-error", + "path": "/errors/react-hydration-error.md" + }, { "title": "beta-middleware", "path": "/errors/beta-middleware.md"
true
Other
vercel
next.js
4b538e9879540d28db4e3ded4fecf79823e2110c.json
Add error link when hydration error occurs (#31519) This adds an error document/link for hydration errors to help users debug these easier. While looking at adding this also noticed a typo in the dev-overlay which is fixed. <details> <summary>screenshot</summary> <img width="1109" alt="Screen Shot 2021-11-16 at 15...
errors/react-hydration-error.md
@@ -0,0 +1,53 @@ +# React Hydration Error + +#### Why This Error Occurred + +While rendering your application, there was a difference between the React tree that was pre-rendered (SSR/SSG) and the React tree that rendered during the first render in the Browser. The first render is called Hydration which is a [feature o...
true
Other
vercel
next.js
4b538e9879540d28db4e3ded4fecf79823e2110c.json
Add error link when hydration error occurs (#31519) This adds an error document/link for hydration errors to help users debug these easier. While looking at adding this also noticed a typo in the dev-overlay which is fixed. <details> <summary>screenshot</summary> <img width="1109" alt="Screen Shot 2021-11-16 at 15...
packages/next/client/next-dev.js
@@ -26,6 +26,25 @@ const webpackHMR = initWebpackHMR() connectHMR({ assetPrefix: prefix, path: '/_next/webpack-hmr' }) +if (!window._nextSetupHydrationWarning) { + const origConsoleError = window.console.error + window.console.error = (...args) => { + const isHydrateError = args.some( + (arg) => + ...
true
Other
vercel
next.js
4b538e9879540d28db4e3ded4fecf79823e2110c.json
Add error link when hydration error occurs (#31519) This adds an error document/link for hydration errors to help users debug these easier. While looking at adding this also noticed a typo in the dev-overlay which is fixed. <details> <summary>screenshot</summary> <img width="1109" alt="Screen Shot 2021-11-16 at 15...
packages/react-dev-overlay/src/client.ts
@@ -80,7 +80,7 @@ function onBuildError(message: string) { } function onRefresh() { - Bus.emit({ type: Bus.TYPE_REFFRESH }) + Bus.emit({ type: Bus.TYPE_REFRESH }) } export { getNodeError } from './internal/helpers/nodeStackFrames'
true
Other
vercel
next.js
4b538e9879540d28db4e3ded4fecf79823e2110c.json
Add error link when hydration error occurs (#31519) This adds an error document/link for hydration errors to help users debug these easier. While looking at adding this also noticed a typo in the dev-overlay which is fixed. <details> <summary>screenshot</summary> <img width="1109" alt="Screen Shot 2021-11-16 at 15...
packages/react-dev-overlay/src/internal/ReactDevOverlay.tsx
@@ -22,7 +22,7 @@ function reducer(state: OverlayState, ev: Bus.BusEvent): OverlayState { case Bus.TYPE_BUILD_ERROR: { return { ...state, buildError: ev.message } } - case Bus.TYPE_REFFRESH: { + case Bus.TYPE_REFRESH: { return { ...state, buildError: null, errors: [] } } case Bus...
true
Other
vercel
next.js
4b538e9879540d28db4e3ded4fecf79823e2110c.json
Add error link when hydration error occurs (#31519) This adds an error document/link for hydration errors to help users debug these easier. While looking at adding this also noticed a typo in the dev-overlay which is fixed. <details> <summary>screenshot</summary> <img width="1109" alt="Screen Shot 2021-11-16 at 15...
packages/react-dev-overlay/src/internal/bus.ts
@@ -2,7 +2,7 @@ import { StackFrame } from 'stacktrace-parser' export const TYPE_BUILD_OK = 'build-ok' export const TYPE_BUILD_ERROR = 'build-error' -export const TYPE_REFFRESH = 'fast-refresh' +export const TYPE_REFRESH = 'fast-refresh' export const TYPE_UNHANDLED_ERROR = 'unhandled-error' export const TYPE_UNHA...
true
Other
vercel
next.js
4b538e9879540d28db4e3ded4fecf79823e2110c.json
Add error link when hydration error occurs (#31519) This adds an error document/link for hydration errors to help users debug these easier. While looking at adding this also noticed a typo in the dev-overlay which is fixed. <details> <summary>screenshot</summary> <img width="1109" alt="Screen Shot 2021-11-16 at 15...
test/integration/auto-export/pages/[post]/[cmnt].js
@@ -18,6 +18,11 @@ if (typeof window !== 'undefined') { export default function Page() { if (typeof window !== 'undefined') { window.pathnames.push(window.location.pathname) + + if (window.location.pathname.includes('hydrate-error')) { + return <p>hydration error</p> + } } + // eslint-disable-ne...
true
Other
vercel
next.js
4b538e9879540d28db4e3ded4fecf79823e2110c.json
Add error link when hydration error occurs (#31519) This adds an error document/link for hydration errors to help users debug these easier. While looking at adding this also noticed a typo in the dev-overlay which is fixed. <details> <summary>screenshot</summary> <img width="1109" alt="Screen Shot 2021-11-16 at 15...
test/integration/auto-export/test/index.test.js
@@ -86,5 +86,17 @@ describe('Auto Export', () => { const caughtWarns = await browser.eval(`window.caughtWarns`) expect(caughtWarns).toEqual([]) }) + + it('should include error link when hydration error does occur', async () => { + const browser = await webdriver(appPort, '/post-1/hydrate-erro...
true
Other
vercel
next.js
98227b273fbe7da12790571f70f2a334cb0c1c30.json
Fix typo in MDX guide (#31709) In this PR: - [x] Fixes a 1 character typo in the newly merged MDX guide
docs/advanced-features/using-mdx.md
@@ -97,7 +97,7 @@ author: 'Rich Haines' ### Layouts -To add a layout to your MDX page, create a new component and import it into the MDX page. Then you can wrap the MDx page with your layout component: +To add a layout to your MDX page, create a new component and import it into the MDX page. Then you can wrap the ...
false
Other
vercel
next.js
90eae2c00fd086e61aaa2a784deef83b344b6af9.json
Fix crash of lint rule no-document-import-in-page (#28148) Fixes #28030 Fixes #28169 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md`
packages/eslint-plugin-next/lib/rules/no-document-import-in-page.js
@@ -16,9 +16,11 @@ module.exports = { } const page = context.getFilename().split('pages')[1] + if (!page) { + return + } const { name, dir } = path.parse(page) if ( - !page || name.startsWith('_document') || (dir === '/_document...
true
Other
vercel
next.js
90eae2c00fd086e61aaa2a784deef83b344b6af9.json
Fix crash of lint rule no-document-import-in-page (#28148) Fixes #28030 Fixes #28169 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, see `contributing.md`
test/eslint-plugin-next/no-document-import-in-page.unit.test.js
@@ -86,6 +86,13 @@ ruleTester.run('no-document-import-in-page', rule, { `, filename: 'pages/_document/index.tsx', }, + { + code: `import Document from "next/document" + + export const Test = () => <p>Test</p> + `, + filename: 'components/test.js', + }, ], invalid: [ ...
true
Other
vercel
next.js
531342691dd09384779da668891b43ad2f051a63.json
Enable pure client suspense in blocking rendering (#28165) Do not fallback to loadable component when `reactRoot` is enabled but without `concurrentFeatures`. Thus we can enable pure client suspense: `fallback` is always rendered on server side, but client side can work with fully functional suspense. Closes #28117
packages/next/shared/lib/dynamic.tsx
@@ -122,7 +122,6 @@ export default function dynamic<P = {}>( `Disallowed suspense option usage with next/dynamic in blocking mode` ) } - suspenseOptions.suspense = false } if (suspenseOptions.suspense) { return loadableFn(suspenseOptions)
true
Other
vercel
next.js
531342691dd09384779da668891b43ad2f051a63.json
Enable pure client suspense in blocking rendering (#28165) Do not fallback to loadable component when `reactRoot` is enabled but without `concurrentFeatures`. Thus we can enable pure client suspense: `fallback` is always rendered on server side, but client side can work with fully functional suspense. Closes #28117
test/integration/react-18/app/pages/suspense/unwrapped.js
@@ -1,10 +1,19 @@ -import React from 'react' +import React, { Suspense } from 'react' import dynamic from 'next/dynamic' +// flag for testing +const wrapped = true + const Hello = dynamic(() => import('../../components/hello'), { suspense: true, }) export default function Unwrapped() { - return <Hello /> + ...
true
Other
vercel
next.js
531342691dd09384779da668891b43ad2f051a63.json
Enable pure client suspense in blocking rendering (#28165) Do not fallback to loadable component when `reactRoot` is enabled but without `concurrentFeatures`. Thus we can enable pure client suspense: `fallback` is always rendered on server side, but client side can work with fully functional suspense. Closes #28117
test/integration/react-18/test/blocking.js
@@ -20,8 +20,6 @@ export default (context, render) => { const $ = await get$('/suspense/thrown') const html = $('body').html() expect(html).toContain('loading') - expect( - JSON.parse($('#__NEXT_DATA__').text()).dynamicIds - ).not.toBeUndefined() + expect(JSON.parse($('#__NEXT_DATA__').text...
true
Other
vercel
next.js
531342691dd09384779da668891b43ad2f051a63.json
Enable pure client suspense in blocking rendering (#28165) Do not fallback to loadable component when `reactRoot` is enabled but without `concurrentFeatures`. Thus we can enable pure client suspense: `fallback` is always rendered on server side, but client side can work with fully functional suspense. Closes #28117
test/integration/react-18/test/index.test.js
@@ -23,9 +23,8 @@ const nodeArgs = ['-r', join(__dirname, 'require-hook.js')] const appDir = join(__dirname, '../app') const nextConfig = new File(join(appDir, 'next.config.js')) const dynamicHello = new File(join(appDir, 'components/dynamic-hello.js')) +const unwrappedPage = new File(join(appDir, 'pages/suspense/un...
true
Other
vercel
next.js
876cbbaf01cef39566e9a35e72e641f57a01f6e0.json
Replace CSS tag with JS import (#28143) Replaces `<link />` tag import with JS import to fix ESLint warning: https://nextjs.org/docs/messages/no-css-tags
examples/with-loading/pages/_app.js
@@ -1,8 +1,8 @@ import { useEffect } from 'react' import Link from 'next/link' -import Head from 'next/head' import { useRouter } from 'next/router' import NProgress from 'nprogress' +import '../public/nprogress.css' export default function App({ Component, pageProps }) { const router = useRouter() @@ -29,10 ...
false
Other
vercel
next.js
76cc01f6b5f7dd1f81a2394add9a7875fff243c1.json
Add support for Jaeger trace target (#28129) Adds support for Jaeger next to Zipkin as a trace target. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or R...
packages/next/telemetry/trace/report/index.ts
@@ -1,6 +1,7 @@ import { TARGET, SpanId } from '../shared' import reportToConsole from './to-console' import reportToZipkin from './to-zipkin' +import reportToJaeger from './to-jaeger' import reportToTelemetry from './to-telemetry' type Reporter = ( @@ -28,6 +29,8 @@ if (target === TARGET.CONSOLE) { report = ...
true
Other
vercel
next.js
76cc01f6b5f7dd1f81a2394add9a7875fff243c1.json
Add support for Jaeger trace target (#28129) Adds support for Jaeger next to Zipkin as a trace target. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or R...
packages/next/telemetry/trace/report/to-jaeger.ts
@@ -0,0 +1,90 @@ +import retry from 'next/dist/compiled/async-retry' +import { randomBytes } from 'crypto' +import fetch from 'node-fetch' +import * as Log from '../../../build/output/log' + +let traceId = process.env.TRACE_ID +let batch: ReturnType<typeof batcher> | undefined + +const localEndpoint = { + serviceName:...
true
Other
vercel
next.js
76cc01f6b5f7dd1f81a2394add9a7875fff243c1.json
Add support for Jaeger trace target (#28129) Adds support for Jaeger next to Zipkin as a trace target. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature request or R...
packages/next/telemetry/trace/shared.ts
@@ -3,6 +3,7 @@ export enum TARGET { CONSOLE = 'CONSOLE', ZIPKIN = 'ZIPKIN', + JAEGER = 'JAEGER', TELEMETRY = 'TELEMETRY', }
true
Other
vercel
next.js
97f9b64cf63d8950d97b94a66059324952e6814d.json
Add setup for m1 build (#28138) * Add setup for m1 build * Add workflow to cache key Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
.github/workflows/build_native.yml
@@ -50,7 +50,15 @@ jobs: uses: actions/cache@v2 with: path: packages/next/native/** - key: next-swc-nightly-2021-03-25-${{ matrix.target }}-${{ hashFiles('packages/next/build/swc/**') }} + key: next-swc-nightly-2021-03-25-${{ matrix.target }}-${{ hashFiles('.github/workflo...
true
Other
vercel
next.js
97f9b64cf63d8950d97b94a66059324952e6814d.json
Add setup for m1 build (#28138) * Add setup for m1 build * Add workflow to cache key Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
.github/workflows/build_test_deploy.yml
@@ -352,7 +352,15 @@ jobs: if: ${{ steps.docs-change.outputs.DOCS_CHANGE != 'docs only change' }} with: path: packages/next/native/next-swc.*.node - key: next-swc-nightly-2021-03-25-${{ matrix.target }}-${{ hashFiles('packages/next/build/swc/**') }} + key: next-swc-nightly...
true
Other
vercel
next.js
d5dc968134db912e9ae5e8bf9659c0af461c58dc.json
Improve React Strict Mode documentation. (#28139) The current text linked wasn't obvious. Plus, the best description of what Strict Mode is was at the bottom of the document.
docs/api-reference/next.config.js/react-strict-mode.md
@@ -6,7 +6,9 @@ description: The complete Next.js runtime is now Strict Mode-compliant, learn ho > **Suggested**: We strongly suggest you enable Strict Mode in your Next.js application to better prepare your application for the future of React. -The Next.js runtime is now Strict Mode-compliant. To opt-in to Strict...
false
Other
vercel
next.js
971b17f1e912b8ab69b9ac7cb83617875a2b3d86.json
Add ci script to check examples (#28009) * Add ci script to check examples * Install moreutils for `sponge` command. It's not very pretty, but I'm not sure how to replace sponge in a good way in the shell script * Prettier names in the workflow * Move "check-examples" into build_test_deploy workflow * S...
.github/workflows/build_test_deploy.yml
@@ -8,6 +8,16 @@ on: name: Build, test, and deploy jobs: + check-examples: + name: Check examples + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Install moreutils + run: sudo apt install moreutils + - name: Check examples + run: ./scripts/check-examp...
true
Other
vercel
next.js
971b17f1e912b8ab69b9ac7cb83617875a2b3d86.json
Add ci script to check examples (#28009) * Add ci script to check examples * Install moreutils for `sponge` command. It's not very pretty, but I'm not sure how to replace sponge in a good way in the shell script * Prettier names in the workflow * Move "check-examples" into build_test_deploy workflow * S...
examples/with-cypress/package.json
@@ -1,6 +1,4 @@ { - "name": "with-cypress", - "version": "0.1.0", "private": true, "scripts": { "dev": "next dev",
true
Other
vercel
next.js
971b17f1e912b8ab69b9ac7cb83617875a2b3d86.json
Add ci script to check examples (#28009) * Add ci script to check examples * Install moreutils for `sponge` command. It's not very pretty, but I'm not sure how to replace sponge in a good way in the shell script * Prettier names in the workflow * Move "check-examples" into build_test_deploy workflow * S...
examples/with-fauna/package.json
@@ -1,8 +1,5 @@ { "private": true, - "name": "with-fauna", - "version": "1.0.0", - "description": "Guestbook example with Next.js and Fauna.", "scripts": { "dev": "next", "build": "yarn setup && next build",
true
Other
vercel
next.js
971b17f1e912b8ab69b9ac7cb83617875a2b3d86.json
Add ci script to check examples (#28009) * Add ci script to check examples * Install moreutils for `sponge` command. It's not very pretty, but I'm not sure how to replace sponge in a good way in the shell script * Prettier names in the workflow * Move "check-examples" into build_test_deploy workflow * S...
examples/with-jotai/next-env.d.ts
@@ -1,3 +1,6 @@ /// <reference types="next" /> /// <reference types="next/types/global" /> /// <reference types="next/image-types/global" /> + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information.
true
Other
vercel
next.js
971b17f1e912b8ab69b9ac7cb83617875a2b3d86.json
Add ci script to check examples (#28009) * Add ci script to check examples * Install moreutils for `sponge` command. It's not very pretty, but I'm not sure how to replace sponge in a good way in the shell script * Prettier names in the workflow * Move "check-examples" into build_test_deploy workflow * S...
examples/with-jotai/package.json
@@ -1,5 +1,4 @@ { - "name": "with-jotai", "private": true, "scripts": { "dev": "next dev",
true
Other
vercel
next.js
971b17f1e912b8ab69b9ac7cb83617875a2b3d86.json
Add ci script to check examples (#28009) * Add ci script to check examples * Install moreutils for `sponge` command. It's not very pretty, but I'm not sure how to replace sponge in a good way in the shell script * Prettier names in the workflow * Move "check-examples" into build_test_deploy workflow * S...
scripts/check-examples.sh
@@ -3,7 +3,10 @@ for folder in examples/* ; do if [ -f "$folder/package.json" ]; then cp -n packages/create-next-app/templates/default/gitignore $folder/.gitignore; - cat $folder/package.json | jq 'del(.license) | .private = true' | sponge $folder/package.json + cat $folder/package.json | jq ' + .pr...
true
Other
vercel
next.js
d57d9a51737194a34c3e14822e59c361b4578ea8.json
Add a Styling Section to next/image component docs (#28055) ## Feature - [x] Documentation added ## Documentation / Examples - [x] Make sure the linting passes It seems that people currently struggle to style their image: https://twitter.com/achrlswrth/status/1425695122029744128, this clarifies that you can use ...
docs/api-reference/next/image.md
@@ -263,6 +263,14 @@ Other properties on the `<Image />` component will be passed to the underlying - `ref`. Use [`onLoadingComplete`](#onloadingcomplete) instead. - `decoding`. It is always `"async"`. +## Styling + +`next/image` wraps the `img` element with other `div` elements to maintain the aspect ratio of the ...
false
Other
vercel
next.js
500b3f6e150bd63cc27b6235018d755302ec8ace.json
Remove duplicate doctypes (#28089) * Remove duplicate doctypes * Fix lint * Add test for DOCTYPE * Fix lint
packages/next/server/render.tsx
@@ -315,15 +315,12 @@ function renderDocument( styles: docProps.styles, head: docProps.head, } - return ( - '<!DOCTYPE html>' + - ReactDOMServer.renderToStaticMarkup( - <AmpStateContext.Provider value={ampState}> - <HtmlContext.Provider value={htmlProps}> - <Document {...htmlPro...
true
Other
vercel
next.js
500b3f6e150bd63cc27b6235018d755302ec8ace.json
Remove duplicate doctypes (#28089) * Remove duplicate doctypes * Fix lint * Add test for DOCTYPE * Fix lint
test/integration/production/test/index.test.js
@@ -917,6 +917,11 @@ describe('Production Usage', () => { expect(missing).toBe(false) }) + it('should only have one DOCTYPE', async () => { + const html = await renderViaHTTP(appPort, '/') + expect(html).toMatch(/^<!DOCTYPE html><html/) + }) + if (global.browserName !== 'internet explorer') { ...
true
Other
vercel
next.js
daadfd347f1f66a725c7f85cf5dbf284010ec8a1.json
Handle blob urls in image component (#27975) This PR resurrects #23622 which has not been updated in a while. Makes the `Image` component handle `blob:` object urls. closes #23622 fixes #19291 credits: @sdn90 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have ...
packages/next/client/image.tsx
@@ -343,7 +343,7 @@ export default function Image({ let isLazy = !priority && (loading === 'lazy' || typeof loading === 'undefined') - if (src.startsWith('data:')) { + if (src.startsWith('data:') || src.startsWith('blob:')) { // https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs...
true
Other
vercel
next.js
daadfd347f1f66a725c7f85cf5dbf284010ec8a1.json
Handle blob urls in image component (#27975) This PR resurrects #23622 which has not been updated in a while. Makes the `Image` component handle `blob:` object urls. closes #23622 fixes #19291 credits: @sdn90 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have ...
test/integration/image-component/default/pages/blob.js
@@ -0,0 +1,26 @@ +import React, { useEffect, useState } from 'react' +import Image from 'next/image' + +const Page = () => { + const [src, setSrc] = useState() + + useEffect(() => { + fetch('/test.jpg') + .then((res) => { + return res.blob() + }) + .then((blob) => { + const url = URL.c...
true
Other
vercel
next.js
daadfd347f1f66a725c7f85cf5dbf284010ec8a1.json
Handle blob urls in image component (#27975) This PR resurrects #23622 which has not been updated in a while. Makes the `Image` component handle `blob:` object urls. closes #23622 fixes #19291 credits: @sdn90 ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have ...
test/integration/image-component/default/test/index.test.js
@@ -229,6 +229,26 @@ function runTests(mode) { } }) + it('should work with image with blob src', async () => { + let browser + try { + browser = await webdriver(appPort, '/blob') + + await check( + () => browser.eval(`document.getElementById("blob-image").src`), + /^blob:/ + ...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
packages/next/build/webpack-config.ts
@@ -769,9 +769,9 @@ export default async function getBaseWebpackConfig( if (isLocal) { // Makes sure dist/shared and dist/server are not bundled - // we need to process shared/lib/router/router so that - // the DefinePlugin can inject process.env values - const isNextExternal = /next[/\\]di...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
packages/next/export/index.ts
@@ -380,6 +380,7 @@ export default async function exportApp( disableOptimizedLoading: nextConfig.experimental.disableOptimizedLoading, // TODO: We should support dynamic HTML too requireStaticHTML: true, + concurrentFeatures: nextConfig.experimental.concurrentFeatures, } const { se...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
packages/next/shared/lib/dynamic.tsx
@@ -33,19 +33,24 @@ export type LoadableBaseOptions<P = {}> = LoadableGeneratedOptions & { ssr?: boolean } +export type LoadableSuspenseOptions<P = {}> = { + loader: Loader<P> + suspense?: boolean +} + export type LoadableOptions<P = {}> = LoadableBaseOptions<P> export type DynamicOptions<P = {}> = Loadable...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
packages/next/shared/lib/loadable.js
@@ -66,12 +66,16 @@ function createLoadableComponent(loadFn, options) { timeout: null, webpack: null, modules: null, + suspense: false, }, options ) - let subscription = null + if (opts.suspense) { + opts.lazy = React.lazy(opts.loader) + } + let subscription = null f...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/chunking/test/index.test.js
@@ -84,7 +84,6 @@ describe('Chunking', () => { it('should execute the build manifest', async () => { const html = await renderViaHTTP(appPort, '/') - console.log(html) const $ = cheerio.load(html) expect( Array.from($('script'))
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/components/bar.js
@@ -0,0 +1,24 @@ +import { Suspense } from 'react' +import dynamic from 'next/dynamic' +import { useCachedPromise } from './promise-cache' + +const Foo = dynamic(() => import('./foo'), { + suspense: true, +}) + +export default function Bar() { + useCachedPromise( + 'bar', + () => new Promise((resolve) => setTim...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/components/dynamic-hello.js
@@ -0,0 +1,18 @@ +import { Suspense } from 'react' +import dynamic from 'next/dynamic' + +let ssr +const suspense = false + +const Hello = dynamic(() => import('./hello'), { + ssr, + suspense, +}) + +export default function DynamicHello(props) { + return ( + <Suspense fallback={'loading'}> + <Hello {...props...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/components/foo.js
@@ -0,0 +1,3 @@ +export default function Foo() { + return 'foo' +}
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/components/hello.js
@@ -0,0 +1,13 @@ +import React from 'react' +import ReactDOM from 'react-dom' +import { useCachedPromise } from './promise-cache' + +export default function Hello({ name, thrown = false }) { + useCachedPromise( + name, + () => new Promise((resolve) => setTimeout(resolve, 200)), + thrown + ) + + return <p>he...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/components/promise-cache.js
@@ -0,0 +1,37 @@ +import React from 'react' + +const PromiseCacheContext = React.createContext(null) + +export const cache = new Map() +export const PromiseCacheProvider = PromiseCacheContext.Provider + +export function useCachedPromise(key, fn, thrown = false) { + const cache = React.useContext(PromiseCacheContext) +...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/next.config.js
@@ -1,4 +1,8 @@ module.exports = { + experimental: { + reactRoot: true, + // concurrentFeatures: true, + }, webpack(config) { const { alias } = config.resolve // FIXME: resolving react/jsx-runtime https://github.com/facebook/react/issues/20235
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/package.json
@@ -0,0 +1,12 @@ +{ + "scripts": { + "next": "node -r ../test/require-hook.js ../../../../packages/next/dist/bin/next", + "dev": "yarn next dev", + "build": "yarn next build", + "start": "yarn next start" + }, + "dependencies": { + "react": "*", + "react-dom": "*" + } +}
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/pages/_app.js
@@ -0,0 +1,13 @@ +import { PromiseCacheProvider } from '../components/promise-cache' + +const cache = new Map() + +function MyApp({ Component, pageProps }) { + return ( + <PromiseCacheProvider value={cache}> + <Component {...pageProps} /> + </PromiseCacheProvider> + ) +} + +export default MyApp
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/pages/index.js
@@ -0,0 +1,12 @@ +import ReactDOM from 'react-dom' + +export default function Index() { + if (typeof window !== 'undefined') { + window.didHydrate = true + } + return ( + <div> + <p id="react-dom-version">{ReactDOM.version}</p> + </div> + ) +}
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/pages/suspense/no-preload.js
@@ -0,0 +1,21 @@ +import { Suspense } from 'react' +import dynamic from 'next/dynamic' + +const Bar = dynamic(() => import('../../components/bar'), { + suspense: true, + // Explicitly declare loaded modules. + // For suspense cases, they'll be ignored. + // For loadable component cases, they'll be handled + loadab...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/pages/suspense/no-thrown.js
@@ -0,0 +1,5 @@ +import DynamicHello from '../../components/dynamic-hello' + +export default function NoThrown() { + return <DynamicHello name="no-thrown" thrown={false} /> +}
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/pages/suspense/thrown.js
@@ -0,0 +1,5 @@ +import DynamicHello from '../../components/dynamic-hello' + +export default function Thrown() { + return <DynamicHello name="thrown" thrown /> +}
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/app/pages/suspense/unwrapped.js
@@ -0,0 +1,10 @@ +import React from 'react' +import dynamic from 'next/dynamic' + +const Hello = dynamic(() => import('../../components/hello'), { + suspense: true, +}) + +export default function Unwrapped() { + return <Hello /> +}
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/prerelease/.gitignore
@@ -1 +0,0 @@ -!node_modules \ No newline at end of file
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/prerelease/node_modules/react-dom/package.json
@@ -1,4 +0,0 @@ -{ - "name": "react-dom", - "version": "18.0.0-alpha-c76e4dbbc-20210722" -}
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/prerelease/package.json
@@ -1,6 +0,0 @@ -{ - "dependencies": { - "react": "*", - "react-dom": "*" - } -}
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/prerelease/pages/bar.js
@@ -1,3 +0,0 @@ -export default function Bar() { - return <div>bar</div> -}
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/prerelease/pages/index.js
@@ -1,16 +0,0 @@ -import { Suspense } from 'react' -import Bar from './bar' - -export default function Index() { - if (typeof window !== 'undefined') { - window.didHydrate = true - } - return ( - <div> - <p>Hello</p> - <Suspense fallback={'loading...'}> - <Bar /> - </Suspense> - </div>...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/supported/pages/index.js
@@ -1,3 +0,0 @@ -export default function Index() { - return <p>Hello</p> -}
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/test/basics.js
@@ -0,0 +1,31 @@ +/* eslint-env jest */ + +import webdriver from 'next-webdriver' +import cheerio from 'cheerio' +import { fetchViaHTTP, renderViaHTTP } from 'next-test-utils' + +export default (context) => { + it('hydrates correctly for normal page', async () => { + const browser = await webdriver(context.appPort,...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/test/blocking.js
@@ -0,0 +1,27 @@ +/* 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) + } + + it('should render fallback on server side if suspense without preload', async () =>...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/test/concurrent.js
@@ -0,0 +1,47 @@ +/* eslint-env jest */ + +import webdriver from 'next-webdriver' +import cheerio from 'cheerio' +import { check } from 'next-test-utils' + +export default (context, render) => { + async function get$(path, query) { + const html = await render(path, query) + return cheerio.load(html) + } + + it...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/integration/react-18/test/index.test.js
@@ -2,22 +2,30 @@ import { join } from 'path' import fs from 'fs-extra' -import webdriver from 'next-webdriver' + import { + File, findPort, killApp, launchApp, nextBuild, nextStart, + renderViaHTTP, } from 'next-test-utils' +import blocking from './blocking' +import concurrent from './concurrent...
true
Other
vercel
next.js
d14da39fd62f3ad41b1b35d48eba2a6d162a1a46.json
Support suspense in next dynamic (#27611) ### Changes #### Feature * Adopt `React.lazy` into `next/dynamic`, enable it when `options.suspense` is `true` * Support `next/dynamic` with `suspense=true` in SSR and SSG #### Tests | Scenario | Case | Behavior | |:----:|:----:|:----:| | basics | react 17 or 18 by default...
test/unit/next-dynamic.test.js
@@ -6,7 +6,7 @@ import { act, render } from '@testing-library/react' import dynamic from 'next/dynamic' describe('next/dynamic', () => { - it('test link with unmount', () => { + it('test dynamic with jest', () => { const App = dynamic(() => import('./fixtures/stub-components/hello')) act(() => { ...
true
Other
vercel
next.js
c969b8172a0715d4782e58ff9a028622a238556c.json
Add support for dynamic HTML (#28085) Implements `renderToString` in terms of a new `renderToStream`. The former is used for legacy documents that generate the body HTML as part of `getInitialProps`. The latter will be used directly in #27794 when streaming dynamic HTML. Since we're exposing an actual streaming respo...
packages/next/server/render.tsx
@@ -63,7 +63,12 @@ import { Redirect, } from '../lib/load-custom-routes' import { DomainLocale } from './config' -import { RenderResult, resultFromChunks, resultToChunks } from './utils' +import { + Observer, + RenderResult, + resultFromChunks, + resultToChunks, +} from './utils' function noRouter() { co...
true
Other
vercel
next.js
c969b8172a0715d4782e58ff9a028622a238556c.json
Add support for dynamic HTML (#28085) Implements `renderToString` in terms of a new `renderToStream`. The former is used for legacy documents that generate the body HTML as part of `getInitialProps`. The latter will be used directly in #27794 when streaming dynamic HTML. Since we're exposing an actual streaming respo...
packages/next/server/utils.ts
@@ -16,12 +16,12 @@ export function cleanAmpPath(pathname: string): string { } export type Disposable = () => void -// TODO: Consider just using an actual Observable here -export type RenderResult = (observer: { - next(chunk: string): void +export type Observer<T> = { + next(chunk: T): void error(error: Error)...
true
Other
vercel
next.js
9d44771895e25704be5841b32103927edf6eea43.json
USe await correctly (#28053)
scripts/publish-native.js
@@ -15,7 +15,7 @@ const cwd = process.cwd() // Copy binaries to package folders, update version, and publish let nativePackagesDir = path.join(cwd, 'packages/next/build/swc/npm') - let platforms = await readdir(nativePackagesDir).filter( + let platforms = (await readdir(nativePackagesDir)).filter( ...
false
Other
vercel
next.js
367117e8576514de57c32e0d867db2f72c40b444.json
publish flow fixes (#28050) * Publish native packages publicly * Remove unnecessary await * Use --no-git-reset lerna option Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
scripts/publish-native.js
@@ -15,7 +15,7 @@ const cwd = process.cwd() // Copy binaries to package folders, update version, and publish let nativePackagesDir = path.join(cwd, 'packages/next/build/swc/npm') - let platforms = await (await readdir(nativePackagesDir)).filter( + let platforms = await readdir(nativePackagesDir).filte...
true
Other
vercel
next.js
367117e8576514de57c32e0d867db2f72c40b444.json
publish flow fixes (#28050) * Publish native packages publicly * Remove unnecessary await * Use --no-git-reset lerna option Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
scripts/publish-release.sh
@@ -15,7 +15,7 @@ fi if [[ $(git describe --exact-match 2> /dev/null || :) =~ -canary ]]; then echo "Publishing canary" - yarn run lerna publish from-git --npm-tag canary --yes + yarn run lerna publish from-git --npm-tag canary --no-git-reset --yes # Make sure to exit script with code 1 if publish failed ...
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/index.js
@@ -12,7 +12,7 @@ const path = require('path') const bindings = loadBinding( path.join(__dirname, '../../../native'), 'next-swc', - 'next-swc' + '@next/swc' ) async function transform(src, options) {
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/darwin-arm64/README.md
@@ -0,0 +1,3 @@ +# `@next/swc-darwin-arm64` + +This is the **aarch64-apple-darwin** binary for `@next/swc`
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/darwin-arm64/package.json
@@ -1,5 +1,5 @@ { - "name": "next-swc-darwin-arm64", + "name": "@next/swc-darwin-arm64", "version": "0.0.0", "os": [ "darwin"
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/darwin-x64/README.md
@@ -0,0 +1,3 @@ +# `@next/swc-darwin-x64` + +This is the **x86_64-apple-darwin** binary for `@next/swc`
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/darwin-x64/package.json
@@ -1,5 +1,5 @@ { - "name": "next-swc-darwin-x64", + "name": "@next/swc-darwin-x64", "version": "0.0.0", "os": [ "darwin"
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/linux-x64-gnu/README.md
@@ -0,0 +1,3 @@ +# `@next/swc-linux-x64-gnu` + +This is the **x86_64-unknown-linux-gnu** binary for `@next/swc`
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/linux-x64-gnu/package.json
@@ -1,5 +1,5 @@ { - "name": "next-swc-linux-x64-gnu", + "name": "@next/swc-linux-x64-gnu", "version": "0.0.0", "os": [ "linux"
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/next-swc-darwin-arm64/README.md
@@ -1,3 +0,0 @@ -# `next-swc-darwin-arm64` - -This is the **aarch64-apple-darwin** binary for `next-swc`
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/next-swc-darwin-x64/README.md
@@ -1,3 +0,0 @@ -# `next-swc-darwin-x64` - -This is the **x86_64-apple-darwin** binary for `next-swc`
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/next-swc-linux-x64-gnu/README.md
@@ -1,3 +0,0 @@ -# `next-swc-linux-x64-gnu` - -This is the **x86_64-unknown-linux-gnu** binary for `next-swc`
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/next-swc-win32-x64-msvc/README.md
@@ -1,3 +0,0 @@ -# `next-swc-win32-x64-msvc` - -This is the **x86_64-pc-windows-msvc** binary for `next-swc`
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/win32-x64-msvc/README.md
@@ -0,0 +1,3 @@ +# `@next/swc-win32-x64-msvc` + +This is the **x86_64-pc-windows-msvc** binary for `@next/swc`
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
packages/next/build/swc/npm/win32-x64-msvc/package.json
@@ -1,5 +1,5 @@ { - "name": "next-swc-win32-x64-msvc", + "name": "@next/swc-win32-x64-msvc", "version": "0.0.0", "os": [ "win32"
true
Other
vercel
next.js
ff5e44428401a5280ff4ae857de4b83955f996f0.json
Use @next scope for native packages (#28046)
scripts/publish-native.js
@@ -15,36 +15,33 @@ const cwd = process.cwd() // Copy binaries to package folders, update version, and publish let nativePackagesDir = path.join(cwd, 'packages/next/build/swc/npm') - let nativePackages = await readdir(nativePackagesDir) - for (let nativePackage of nativePackages) { - if (nativePa...
true