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
7a8c58fedd7c9aea5d8792ed2b30b9b05d8a8348.json
chore: Update swc_core to `v0.38.22` (#41477)
packages/next-swc/crates/styled_components/Cargo.toml
@@ -21,7 +21,7 @@ swc_core = { features = [ "ecma_ast", "ecma_utils", "ecma_visit" -], version = "0.38.4" } +], version = "0.38.22" } [dev-dependencies] serde_json = "1" @@ -30,4 +30,4 @@ swc_core = { features = [ "ecma_parser", "ecma_transforms", "testing_transform" -], version = "0.38.4" } +], v...
true
Other
vercel
next.js
7a8c58fedd7c9aea5d8792ed2b30b9b05d8a8348.json
chore: Update swc_core to `v0.38.22` (#41477)
packages/next-swc/crates/styled_jsx/Cargo.toml
@@ -24,10 +24,10 @@ swc_core = { features = [ "ecma_minifier", "ecma_utils", "ecma_visit" -], version = "0.38.4" } +], version = "0.38.22" } [dev-dependencies] testing = "0.31.8" swc_core = { features = [ "testing_transform" -], version = "0.38.4" } +], version = "0.38.22" }
true
Other
vercel
next.js
7a8c58fedd7c9aea5d8792ed2b30b9b05d8a8348.json
chore: Update swc_core to `v0.38.22` (#41477)
packages/next-swc/crates/wasm/Cargo.toml
@@ -45,7 +45,7 @@ swc_core = { features = [ "ecma_parser_typescript", "ecma_utils", "ecma_visit" -], version = "0.38.4" } +], version = "0.38.22" } # Workaround a bug
true
Other
vercel
next.js
df35cf32d4ec454ad8cbe62ebc7c6ad164479a1b.json
Update docs with minimum node version 14.x (#41482) - Follow up to https://github.com/vercel/next.js/pull/41150
docs/getting-started.md
@@ -14,7 +14,7 @@ If you have questions about anything related to Next.js, you're always welcome t #### System Requirements -- [Node.js 12.22.0](https://nodejs.org/) or later +- [Node.js 14.0.0](https://nodejs.org/) or newer - MacOS, Windows (including WSL), and Linux are supported ## Automatic Setup
true
Other
vercel
next.js
df35cf32d4ec454ad8cbe62ebc7c6ad164479a1b.json
Update docs with minimum node version 14.x (#41482) - Follow up to https://github.com/vercel/next.js/pull/41150
docs/upgrading.md
@@ -6,6 +6,8 @@ description: Learn how to upgrade Next.js. ## Upgrading from 12 to 13 +The minimum Node.js version has been bumped from 12.22.0 to 14.0.0, since 12.x has reached end-of-life. + The `next/image` import was renamed to `next/legacy/image`. The `next/future/image` import was renamed to `next/image`. ...
true
Other
vercel
next.js
7be2ef0fcf920fccd28f05effa8075dcbdc8896d.json
Ignore serverComponentChanges in pages (#41464) Slightly different version of #41020 where it does not end up being an unknown event. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Feature - [ ] Implements...
packages/next/client/dev/error-overlay/hot-dev-client.js
@@ -260,6 +260,10 @@ function processMessage(e) { ) return handleSuccess() } + case 'serverComponentChanges': { + // Server component changes don't apply to `pages`. + return + } default: { if (customHmrEventHandler) { customHmrEventHandler(obj)
false
Other
vercel
next.js
7c2fd345105073b1d56be1c369e96fa00e34ccc6.json
fix(app-render): make css and font respect assetPrefix (#41455) Add missing `assetPrefix` for link tags (`@next/font` and CSS). The PR also merges multiple duplicated `renderOpt.assetPrefix || ''`.
packages/next/server/app-render.tsx
@@ -872,6 +872,8 @@ export async function renderToHTMLOrFlight( ComponentMod.pages ) + const assetPrefix = renderOpts.assetPrefix || '' + /** * Use the provided loader tree to create the React Component tree. */ @@ -1105,7 +1107,7 @@ export async function renderToHTMLOrFlight( ...
false
Other
vercel
next.js
482e3fbffa282131f4b718877810a640a08b10e1.json
Change useSearchParams to URLSearchParams (#40978) Similar to #40872 `useSearchParams` now returns a `URLSearchParams` instance instead of a plain object. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Featu...
packages/next/client/components/app-router.tsx
@@ -147,12 +147,11 @@ function Router({ typeof window === 'undefined' ? 'http://n' : window.location.href ) - // Convert searchParams to a plain object to match server-side. - const searchParamsObj: { [key: string]: string } = {} - url.searchParams.forEach((value, key) => { - searchParamsObj...
true
Other
vercel
next.js
482e3fbffa282131f4b718877810a640a08b10e1.json
Change useSearchParams to URLSearchParams (#40978) Similar to #40872 `useSearchParams` now returns a `URLSearchParams` instance instead of a plain object. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Featu...
packages/next/client/components/hooks-client-context.ts
@@ -1,9 +1,6 @@ import { createContext } from 'react' -import type { NextParsedUrlQuery } from '../../server/request-meta' -export const SearchParamsContext = createContext<NextParsedUrlQuery>( - null as any -) +export const SearchParamsContext = createContext<URLSearchParams>(null as any) export const PathnameCon...
true
Other
vercel
next.js
482e3fbffa282131f4b718877810a640a08b10e1.json
Change useSearchParams to URLSearchParams (#40978) Similar to #40872 `useSearchParams` now returns a `URLSearchParams` instance instead of a plain object. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Featu...
packages/next/client/components/navigation.ts
@@ -1,6 +1,6 @@ // useLayoutSegments() // Only the segments for the current place. ['children', 'dashboard', 'children', 'integrations'] -> /dashboard/integrations (/dashboard/layout.js would get ['children', 'dashboard', 'children', 'integrations']) -import { useContext } from 'react' +import { useContext, useMemo ...
true
Other
vercel
next.js
482e3fbffa282131f4b718877810a640a08b10e1.json
Change useSearchParams to URLSearchParams (#40978) Similar to #40872 `useSearchParams` now returns a `URLSearchParams` instance instead of a plain object. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have a helpful link attached, see `contributing.md` ## Featu...
test/e2e/app-dir/app/app/hooks/use-search-params/page.js
@@ -9,10 +9,10 @@ export default function Page() { <> <h1 id="params" - data-param-first={params.first ?? 'N/A'} - data-param-second={params.second ?? 'N/A'} - data-param-third={params.third ?? 'N/A'} - data-param-not-real={params.notReal ?? 'N/A'} + data-param-fi...
true
Other
vercel
next.js
59eefb2abaa04b2ea7e46924ce2c05fbd3630002.json
chore: Update swc_core to `v0.38.4` (#41401) This PR updates swc crates to https://github.com/swc-project/swc/commit/3ff55caa38e5b193652aa3a203da10fbbfe34511 This PR applies various improvements, and more importantly https://github.com/swc-project/swc/pull/6142
packages/next-swc/Cargo.lock
@@ -165,9 +165,9 @@ dependencies = [ [[package]] name = "binding_macros" -version = "0.20.7" +version = "0.20.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6926cc6c93d6d87ea1d81a87860997cd09f3125030711a237af2dd2952558b87" +checksum = "eab1d6bd87bf67f9852300862e3c8cb13be773bd4d4f...
true
Other
vercel
next.js
59eefb2abaa04b2ea7e46924ce2c05fbd3630002.json
chore: Update swc_core to `v0.38.4` (#41401) This PR updates swc crates to https://github.com/swc-project/swc/commit/3ff55caa38e5b193652aa3a203da10fbbfe34511 This PR applies various improvements, and more importantly https://github.com/swc-project/swc/pull/6142
packages/next-swc/crates/core/Cargo.toml
@@ -42,9 +42,9 @@ swc_core = { features = [ "ecma_parser_typescript", "cached", "base" -], version = "0.32.8" } +], version = "0.38.4" } [dev-dependencies] -swc_core = { features = ["testing_transform"], version = "0.32.8" } -testing = "0.31.5" +swc_core = { features = ["testing_transform"], version = "0.38...
true
Other
vercel
next.js
59eefb2abaa04b2ea7e46924ce2c05fbd3630002.json
chore: Update swc_core to `v0.38.4` (#41401) This PR updates swc crates to https://github.com/swc-project/swc/commit/3ff55caa38e5b193652aa3a203da10fbbfe34511 This PR applies various improvements, and more importantly https://github.com/swc-project/swc/pull/6142
packages/next-swc/crates/emotion/Cargo.toml
@@ -19,9 +19,9 @@ regex = "1.5" serde = "1" sourcemap = "6.0.1" tracing = { version = "0.1.32", features = ["release_max_level_info"] } -swc_core = { features = ["common", "ecma_ast","ecma_codegen", "ecma_utils", "ecma_visit", "trace_macro"], version = "0.32.8" } +swc_core = { features = ["common", "ecma_ast","ecma_...
true
Other
vercel
next.js
59eefb2abaa04b2ea7e46924ce2c05fbd3630002.json
chore: Update swc_core to `v0.38.4` (#41401) This PR updates swc crates to https://github.com/swc-project/swc/commit/3ff55caa38e5b193652aa3a203da10fbbfe34511 This PR applies various improvements, and more importantly https://github.com/swc-project/swc/pull/6142
packages/next-swc/crates/modularize_imports/Cargo.toml
@@ -15,8 +15,8 @@ handlebars = "4.2.1" once_cell = "1.13.0" regex = "1.5" serde = "1" -swc_core = { features = ["cached", "ecma_ast", "ecma_visit"], version = "0.32.8" } +swc_core = { features = ["cached", "ecma_ast", "ecma_visit"], version = "0.38.4" } [dev-dependencies] -swc_core = { features = ["testing_transf...
true
Other
vercel
next.js
59eefb2abaa04b2ea7e46924ce2c05fbd3630002.json
chore: Update swc_core to `v0.38.4` (#41401) This PR updates swc crates to https://github.com/swc-project/swc/commit/3ff55caa38e5b193652aa3a203da10fbbfe34511 This PR applies various improvements, and more importantly https://github.com/swc-project/swc/pull/6142
packages/next-swc/crates/napi/Cargo.toml
@@ -50,7 +50,7 @@ swc_core = { features = [ "ecma_transforms_typescript", "ecma_utils", "ecma_visit", -], version = "0.32.8" } +], version = "0.38.4" } tracing = { version = "0.1.32", features = ["release_max_level_info"] } tracing-futures = "0.2.5" tracing-subscriber = "0.3.9" @@ -71,4 +71,4 @@ _sentry_rus...
true
Other
vercel
next.js
59eefb2abaa04b2ea7e46924ce2c05fbd3630002.json
chore: Update swc_core to `v0.38.4` (#41401) This PR updates swc crates to https://github.com/swc-project/swc/commit/3ff55caa38e5b193652aa3a203da10fbbfe34511 This PR applies various improvements, and more importantly https://github.com/swc-project/swc/pull/6142
packages/next-swc/crates/styled_components/Cargo.toml
@@ -21,13 +21,13 @@ swc_core = { features = [ "ecma_ast", "ecma_utils", "ecma_visit" -], version = "0.32.8" } +], version = "0.38.4" } [dev-dependencies] serde_json = "1" -testing = "0.31.5" +testing = "0.31.8" swc_core = { features = [ "ecma_parser", "ecma_transforms", "testing_transform" -], ve...
true
Other
vercel
next.js
59eefb2abaa04b2ea7e46924ce2c05fbd3630002.json
chore: Update swc_core to `v0.38.4` (#41401) This PR updates swc crates to https://github.com/swc-project/swc/commit/3ff55caa38e5b193652aa3a203da10fbbfe34511 This PR applies various improvements, and more importantly https://github.com/swc-project/swc/pull/6142
packages/next-swc/crates/styled_jsx/Cargo.toml
@@ -24,10 +24,10 @@ swc_core = { features = [ "ecma_minifier", "ecma_utils", "ecma_visit" -], version = "0.32.8" } +], version = "0.38.4" } [dev-dependencies] -testing = "0.31.5" +testing = "0.31.8" swc_core = { features = [ "testing_transform" -], version = "0.32.8" } +], version = "0.38.4" }
true
Other
vercel
next.js
59eefb2abaa04b2ea7e46924ce2c05fbd3630002.json
chore: Update swc_core to `v0.38.4` (#41401) This PR updates swc crates to https://github.com/swc-project/swc/commit/3ff55caa38e5b193652aa3a203da10fbbfe34511 This PR applies various improvements, and more importantly https://github.com/swc-project/swc/pull/6142
packages/next-swc/crates/styled_jsx/src/transform_css.rs
@@ -15,7 +15,10 @@ use swc_core::{ writer::basic::{BasicCssWriter, BasicCssWriterConfig}, CodeGenerator, CodegenConfig, Emit, }, - parser::{parse_str, parse_tokens, parser::ParserConfig}, + parser::{ + parse_str, parse_tokens, + parser::{input::Toke...
true
Other
vercel
next.js
59eefb2abaa04b2ea7e46924ce2c05fbd3630002.json
chore: Update swc_core to `v0.38.4` (#41401) This PR updates swc crates to https://github.com/swc-project/swc/commit/3ff55caa38e5b193652aa3a203da10fbbfe34511 This PR applies various improvements, and more importantly https://github.com/swc-project/swc/pull/6142
packages/next-swc/crates/wasm/Cargo.toml
@@ -45,7 +45,7 @@ swc_core = { features = [ "ecma_parser_typescript", "ecma_utils", "ecma_visit" -], version = "0.32.8" } +], version = "0.38.4" } # Workaround a bug
true
Other
vercel
next.js
afbb56363b9090f1e8d47b2946b1453936d33b14.json
Fix trace when initial file is also child (#30048) * Fix trace when initial file is also child * update page count test
packages/next/build/webpack/plugins/next-trace-entrypoints-plugin.ts
@@ -327,7 +327,11 @@ export class TraceEntryPointsPlugin implements webpack.Plugin { for (const file of fileList!) { const reason = reasons!.get(file) - if (!reason || reason.type === 'initial' || !reason.parents) { + if ( + !rea...
true
Other
vercel
next.js
afbb56363b9090f1e8d47b2946b1453936d33b14.json
Fix trace when initial file is also child (#30048) * Fix trace when initial file is also child * update page count test
test/integration/production/pages/client-error.js
@@ -0,0 +1,13 @@ +import Link from 'next/link' +import Error from 'next/error' + +export default function Page(props) { + return ( + <> + <Error title="something went wrong (on purpose)" /> + <Link href="/"> + <a>to home</a> + </Link> + </> + ) +}
true
Other
vercel
next.js
afbb56363b9090f1e8d47b2946b1453936d33b14.json
Fix trace when initial file is also child (#30048) * Fix trace when initial file is also child * update page count test
test/integration/production/test/index.test.js
@@ -58,7 +58,7 @@ describe('Production Usage', () => { }) it('should contain generated page count in output', async () => { - const pageCount = 39 + const pageCount = 40 expect(output).toContain(`Generating static pages (0/${pageCount})`) expect(output).toContain( `Generating static pages...
true
Other
vercel
next.js
4bbe2651af41ed2ff7ebd8bbc1c3204fa2f9c00b.json
Update documentation to fix github cache key (#29983) `?` is any optional character, it isn't the same as the `?` in regex which will match the preceding character 0 or more times. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `c...
errors/no-cache.md
@@ -82,7 +82,7 @@ uses: actions/cache@v2 with: path: ${{ github.workspace }}/.next/cache # Generate a new cache whenever packages or source files change. - key: ${{ runner.os }}-nextjs-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('**.[jt]sx?') }} + key: ${{ runner.os }}-nextjs-${{ hashFiles('**/packa...
false
Other
vercel
next.js
1a0c1e8a5b47e49602e058a0d3e254fa885a61c4.json
Fix `next/image` when parent is `<p>` (#30041) - Fixes #29717 - Fixes #21433 - Closes #21475
docs/api-reference/next/image.md
@@ -16,7 +16,7 @@ description: Enable Image Optimization with the built-in Image component. | Version | Changes | | --------- | ------------------------------------------------------------------------------------------------...
true
Other
vercel
next.js
1a0c1e8a5b47e49602e058a0d3e254fa885a61c4.json
Fix `next/image` when parent is `<p>` (#30041) - Fixes #29717 - Fixes #21433 - Closes #21475
docs/basic-features/image-optimization.md
@@ -151,7 +151,7 @@ The image component has several different [layout modes](/docs/api-reference/nex **Target the image with className, not based on DOM structure** -Regardless of the layout mode used, the Image component will have a consistent DOM structure of one `<img>` tag wrapped by exactly one `<div>`. For s...
true
Other
vercel
next.js
1a0c1e8a5b47e49602e058a0d3e254fa885a61c4.json
Fix `next/image` when parent is `<p>` (#30041) - Fixes #29717 - Fixes #21433 - Closes #21475
packages/next/client/image.tsx
@@ -458,8 +458,8 @@ export default function Image({ }) const isVisible = !isLazy || isIntersected - let wrapperStyle: JSX.IntrinsicElements['div']['style'] | undefined - let sizerStyle: JSX.IntrinsicElements['div']['style'] | undefined + let wrapperStyle: JSX.IntrinsicElements['span']['style'] | undefined + ...
true
Other
vercel
next.js
1a0c1e8a5b47e49602e058a0d3e254fa885a61c4.json
Fix `next/image` when parent is `<p>` (#30041) - Fixes #29717 - Fixes #21433 - Closes #21475
test/integration/image-component/default/pages/inside-paragraph.js
@@ -0,0 +1,13 @@ +import React from 'react' +import Image from 'next/image' +import img from '../public/test.jpg' + +const Page = () => { + return ( + <p> + <Image id="inside-paragraph" src={img} /> + </p> + ) +} + +export default Page
true
Other
vercel
next.js
1a0c1e8a5b47e49602e058a0d3e254fa885a61c4.json
Fix `next/image` when parent is `<p>` (#30041) - Fixes #29717 - Fixes #21433 - Closes #21475
test/integration/image-component/default/test/index.test.js
@@ -645,6 +645,19 @@ function runTests(mode) { expect(await hasRedbox(browser)).toBe(false) }) + + it('should not warn when Image is child of p', async () => { + const browser = await webdriver(appPort, '/inside-paragraph') + + const warnings = (await browser.log('browser')) + .map((lo...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
jest.config.js
@@ -4,7 +4,7 @@ module.exports = { verbose: true, rootDir: 'test', modulePaths: ['<rootDir>/lib'], - transformIgnorePatterns: ['/node_modules/', '/next[/\\\\]dist/'], + transformIgnorePatterns: ['/node_modules/', '/next[/\\\\]dist/', '/.next/'], transform: { '.+\\.(t|j)sx?$': [ // this matches...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
package.json
@@ -49,7 +49,7 @@ "@mdx-js/loader": "0.18.0", "@svgr/webpack": "5.5.0", "@swc/cli": "0.1.49", - "@swc/core": "1.2.88", + "@swc/core": "1.2.97", "@swc/jest": "0.2.3", "@testing-library/react": "11.2.5", "@types/cheerio": "0.22.16",
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/bin/next.ts
@@ -16,12 +16,13 @@ import { NON_STANDARD_NODE_ENV } from '../lib/constants' const defaultCommand = 'dev' export type cliCommand = (argv?: string[]) => void const commands: { [command: string]: () => Promise<cliCommand> } = { - build: () => import('../cli/next-build').then((i) => i.nextBuild), - start: () => impor...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/build/index.ts
@@ -170,7 +170,7 @@ export default async function build( const hasPublicDir = await fileExists(publicDir) telemetry.record( - eventCliSession(PHASE_PRODUCTION_BUILD, dir, { + eventCliSession(dir, config, { webpackVersion: 5, cliCommand: 'build', isSrcDir: path.relative(d...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/build/webpack-config.ts
@@ -393,7 +393,9 @@ export default async function getBaseWebpackConfig( Log.info(`Using tsconfig file: ${config.typescript.tsconfigPath}`) } - const ts = (await import(typeScriptPath!)) as typeof import('typescript') + const ts = (await Promise.resolve( + require(typeScriptPath!) + )) as typ...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/cli/next-dev.ts
@@ -58,7 +58,9 @@ const nextDev: cliCommand = (argv) => { } async function preflight() { - const { getPackageVersion } = await import('../lib/get-package-version') + const { getPackageVersion } = await Promise.resolve( + require('../lib/get-package-version') + ) const [sassVersion, nodeSassVe...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/export/index.ts
@@ -20,7 +20,6 @@ import { BUILD_ID_FILE, CLIENT_PUBLIC_FILES_PATH, CLIENT_STATIC_FILES_PATH, - CONFIG_FILE, EXPORT_DETAIL, EXPORT_MARKER, PAGES_MANIFEST, @@ -169,7 +168,7 @@ export default async function exportApp( if (telemetry) { telemetry.record( - eventCliSession(PHASE_EXPOR...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/lib/eslint/runLintCheck.ts
@@ -40,7 +40,9 @@ async function cliPrompt() { ) try { - const cliSelect = (await import('next/dist/compiled/cli-select')).default + const cliSelect = ( + await Promise.resolve(require('next/dist/compiled/cli-select')) + ).default const { value } = await cliSelect({ values: ESLINT_PROM...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/lib/verifyTypeScriptSetup.ts
@@ -49,8 +49,8 @@ export async function verifyTypeScriptSetup( } // Load TypeScript after we're sure it exists: - const ts = (await import( - deps.resolved.get('typescript')! + const ts = (await Promise.resolve( + require(deps.resolved.get('typescript')!) )) as typeof import('typescript...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/server/config-shared.ts
@@ -9,6 +9,8 @@ import { export type NextConfigComplete = Required<NextConfig> & { images: ImageConfigComplete typescript: Required<TypeScriptConfig> + configOrigin?: string + configFile?: string } export interface I18NConfig {
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/server/config.ts
@@ -1,10 +1,10 @@ import chalk from 'chalk' import findUp from 'next/dist/compiled/find-up' -import { basename, extname } from 'path' +import { basename, extname, relative } from 'path' import { Agent as HttpAgent } from 'http' import { Agent as HttpsAgent } from 'https' import * as Log from '../build/output/log' ...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/server/dev/next-dev-server.ts
@@ -334,7 +334,7 @@ export default class DevServer extends Server { const telemetry = new Telemetry({ distDir: this.distDir }) telemetry.record( - eventCliSession(PHASE_DEVELOPMENT_SERVER, this.distDir, { + eventCliSession(this.distDir, this.nextConfig, { webpackVersion: 5, cliCo...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/server/next.ts
@@ -22,7 +22,7 @@ let ServerImpl: typeof Server const getServerImpl = async () => { if (ServerImpl === undefined) - ServerImpl = (await import('./next-server')).default + ServerImpl = (await Promise.resolve(require('./next-server'))).default return ServerImpl }
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/server/render.tsx
@@ -1277,7 +1277,7 @@ function renderToStream( }) let resolved = false - const doResolve = () => { + const doResolve = (startWriting: any) => { if (!resolved) { resolved = true resolve((res, next) => { @@ -1314,11 +1314,11 @@ function renderToStream( }, onCom...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/shared/lib/constants.ts
@@ -15,7 +15,7 @@ export const REACT_LOADABLE_MANIFEST = 'react-loadable-manifest.json' export const FONT_MANIFEST = 'font-manifest.json' export const SERVER_DIRECTORY = 'server' export const SERVERLESS_DIRECTORY = 'serverless' -export const CONFIG_FILE = 'next.config.js' +export const CONFIG_FILES = ['next.config.j...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/taskfile-swc.js
@@ -20,6 +20,7 @@ module.exports = function (task) { const swcClientOptions = { module: { type: 'commonjs', + ignoreDynamic: true, }, jsc: { loose: true, @@ -45,6 +46,7 @@ module.exports = function (task) { const swcServerOptions = { modul...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
packages/next/telemetry/events/version.ts
@@ -1,12 +1,5 @@ -import findUp from 'next/dist/compiled/find-up' import path from 'path' -import { - CONFIG_FILE, - PHASE_DEVELOPMENT_SERVER, - PHASE_EXPORT, - PHASE_PRODUCTION_BUILD, -} from '../../shared/lib/constants' -import { normalizeConfig } from '../../server/config' +import { NextConfigComplete } from '....
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/.gitignore
@@ -0,0 +1 @@ +!node_modules \ No newline at end of file
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/components/hello-webpack-css.css
@@ -0,0 +1,3 @@ +.helloWorld { + font-size: 100px; +}
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/components/hello-webpack-css.js
@@ -0,0 +1,10 @@ +import css from './hello-webpack-css.css' +import sass from './hello-webpack-sass.scss' +import framework from 'css-framework/framework.css' +export default () => ( + <div + className={`hello-world ${css.helloWorld} ${sass.helloWorldSass} ${framework.frameworkClass}`} + > + Hello World + </di...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/components/hello-webpack-sass.scss
@@ -0,0 +1,5 @@ +$color: yellow; + +.helloWorldSass { + color: $color; +}
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/next.config.mjs
@@ -0,0 +1,35 @@ +export default { + onDemandEntries: { + // Make sure entries are not getting disposed. + maxInactiveAge: 1000 * 60 * 60, + }, + poweredByHeader: false, + cssModules: true, + serverRuntimeConfig: { + mySecret: 'secret', + }, + publicRuntimeConfig: { + staticFolder: '/static', + }, +...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/node_modules/css-framework/framework.css
@@ -0,0 +1,3 @@ +.frameworkClass { + background: blue; +}
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/node_modules/module-only-package/modern.js
@@ -0,0 +1 @@ +export default 'OK'
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/node_modules/module-only-package/package.json
@@ -0,0 +1,5 @@ +{ + "name": "module-only-package", + "description": "I'm a hipster package that only ships a module entrypoint.", + "module": "./modern.js" +}
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/pages/build-id.js
@@ -0,0 +1,3 @@ +export default () => { + return <p id="buildId">{process.env.CONFIG_BUILD_ID}</p> +}
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/pages/module-only-content.js
@@ -0,0 +1,3 @@ +import messageInAPackage from 'module-only-package' + +export default () => <p id="messageInAPackage">{messageInAPackage}</p>
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/pages/next-config.js
@@ -0,0 +1,10 @@ +import getConfig from 'next/config' +const { serverRuntimeConfig, publicRuntimeConfig } = getConfig() + +export default () => ( + <div> + <p id="server-only">{serverRuntimeConfig.mySecret}</p> + <p id="server-and-client">{publicRuntimeConfig.staticFolder}</p> + <p id="env">{process.env.custo...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/config-mjs/test/index.test.js
@@ -0,0 +1,85 @@ +/* eslint-env jest */ + +import cheerio from 'cheerio' +import { findPort, killApp, launchApp, renderViaHTTP } from 'next-test-utils' +import webdriver from 'next-webdriver' +import fetch from 'node-fetch' +import { join } from 'path' + +const context = {} + +describe('Configuration', () => { + befor...
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
test/integration/telemetry/next.config.i18n-images
@@ -1,7 +1,7 @@ module.exports = phase => { return { images: { - sizes: [64, 128, 256, 512, 1024], + imageSizes: [64, 128, 256, 512, 1024], domains: ['example.com'], }, i18n: {
true
Other
vercel
next.js
7e370134fb46dede3809df664db95c603a5a2997.json
Use import() to load next.config.js (#29935) Co-authored-by: JJ Kasper <jj@jjsweb.site> Co-authored-by: Steven <steven@ceriously.com>
yarn.lock
@@ -4149,85 +4149,79 @@ slash "3.0.0" source-map "^0.7.3" -"@swc/core-android-arm64@^1.2.88": - version "1.2.88" - resolved "https://registry.yarnpkg.com/@swc/core-android-arm64/-/core-android-arm64-1.2.88.tgz#ecd527a7e07285501f3d004ced8743d2e9092409" - integrity sha512-XuQIPCRVMHgdVKkIUj5ZQps0VhgopreZgq...
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/google-font-display.js
@@ -6,6 +6,7 @@ module.exports = { description: 'Ensure correct font-display property is assigned for Google Fonts', recommended: true, + url: 'https://nextjs.org/docs/messages/google-font-display', }, }, create: function (context) {
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/google-font-preconnect.js
@@ -5,6 +5,7 @@ module.exports = { docs: { description: 'Ensure preconnect is used with Google Fonts', recommended: true, + url: 'https://nextjs.org/docs/messages/google-font-preconnect', }, }, create: function (context) {
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/inline-script-id.js
@@ -4,6 +4,7 @@ module.exports = { description: 'next/script components with inline content must specify an `id` attribute.', recommended: true, + url: 'https://nextjs.org/docs/messages/inline-script-id', }, }, create: function (context) {
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/link-passhref.js
@@ -7,6 +7,7 @@ module.exports = { 'Ensure passHref is assigned if child of Link component is a custom component', category: 'HTML', recommended: true, + url: 'https://nextjs.org/docs/messages/link-passhref', }, fixable: null, },
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/next-script-for-ga.js
@@ -22,6 +22,7 @@ module.exports = { description: 'Prefer next script component when using the inline script for Google Analytics', recommended: true, + url: 'https://nextjs.org/docs/messages/next-script-for-ga', }, }, create: function (context) {
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/no-document-import-in-page.js
@@ -6,6 +6,7 @@ module.exports = { description: 'Disallow importing next/document outside of pages/document.js', recommended: true, + url: 'https://nextjs.org/docs/messages/no-document-import-in-page', }, }, create: function (context) {
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/no-duplicate-head.js
@@ -3,6 +3,7 @@ module.exports = { docs: { description: 'Enforce no duplicate usage of <Head> in pages/document.js', recommended: true, + url: 'https://nextjs.org/docs/messages/no-duplicate-head', }, }, create: function (context) {
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/no-head-import-in-document.js
@@ -5,6 +5,7 @@ module.exports = { docs: { description: 'Disallow importing next/head in pages/document.js', recommended: true, + url: 'https://nextjs.org/docs/messages/no-head-import-in-document', }, }, create: function (context) {
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/no-html-link-for-pages.js
@@ -25,6 +25,7 @@ module.exports = { description: 'Prohibit full page refresh for Next.js pages', category: 'HTML', recommended: true, + url: 'https://nextjs.org/docs/messages/no-html-link-for-pages', }, fixable: null, // or "code" or "whitespace" schema: [
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/no-img-element.js
@@ -4,6 +4,7 @@ module.exports = { description: 'Prohibit usage of HTML <img> element', category: 'HTML', recommended: true, + url: 'https://nextjs.org/docs/messages/no-img-element', }, fixable: 'code', },
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/no-page-custom-font.js
@@ -6,6 +6,7 @@ module.exports = { description: 'Recommend adding custom font in a custom document and not in a specific page', recommended: true, + url: 'https://nextjs.org/docs/messages/no-page-custom-font', }, }, create: function (context) {
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/no-script-in-document.js
@@ -5,6 +5,7 @@ module.exports = { docs: { description: 'Disallow importing next/script inside pages/_document.js', recommended: true, + url: 'https://nextjs.org/docs/messages/no-script-in-document-page', }, }, create: function (context) {
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/no-script-in-head.js
@@ -3,6 +3,7 @@ module.exports = { docs: { description: 'Disallow using next/script inside the next/head component', recommended: true, + url: 'https://nextjs.org/docs/messages/no-script-in-head-component', }, }, create: function (context) {
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/no-title-in-document-head.js
@@ -2,6 +2,7 @@ module.exports = { meta: { docs: { description: 'Disallow using <title> with Head from next/document', + url: 'https://nextjs.org/docs/messages/no-title-in-document-head', }, }, create: function (context) {
true
Other
vercel
next.js
2b7c910e8ab709d3ddef369ea3abb36e36f121a6.json
Add ESLint docs URLs (#29645)
packages/eslint-plugin-next/lib/rules/no-unwanted-polyfillio.js
@@ -69,6 +69,7 @@ module.exports = { 'Prohibit unwanted features to be listed in Polyfill.io tag.', category: 'HTML', recommended: true, + url: 'https://nextjs.org/docs/messages/no-unwanted-polyfillio', }, fixable: null, // or "code" or "whitespace" },
true
Other
vercel
next.js
80e5180e054a82b96ac5bc342866e408453088d2.json
Update webpack target to node12.22 (#29953) Follow up to #29949
packages/next/build/webpack/config/blocks/base.ts
@@ -9,7 +9,7 @@ export const base = curry(function base( config.mode = ctx.isDevelopment ? 'development' : 'production' config.name = ctx.isServer ? 'server' : 'client' // @ts-ignore TODO webpack 5 typings - config.target = ctx.isServer ? 'node12.17' : ['web', 'es5'] + config.target = ctx.isServer ? 'node12....
false
Other
vercel
next.js
067075ca072825c8345282af01c9ebc4cbf50a48.json
Update minimum Node version in Getting Started (#29952) Follow up to #29949 ## Documentation / Examples - [x] Make sure the linting passes
docs/getting-started.md
@@ -14,7 +14,7 @@ If you have questions about anything related to Next.js, you're always welcome t #### System Requirements -- [Node.js 12.0](https://nodejs.org/) or later +- [Node.js 12.22.0](https://nodejs.org/) or later - MacOS, Windows (including WSL), and Linux are supported ## Setup
false
Other
vercel
next.js
cf9eb36e7cf994bd593a7be3aaa9e3d4639ea60a.json
Remove unused SWC option
packages/next/build/webpack/loaders/next-swc-loader.js
@@ -73,7 +73,6 @@ function getSWCOptions({ : {}), // Disables getStaticProps/getServerSideProps tree shaking on the server compilation for pages disableNextSsg: true, - allowWrongLineComments: true, pagesDir, env: { targets: {
false
Other
vercel
next.js
ea0cdc5a3677c94a8c72166450b327c91716bd43.json
Add revalidate to the GetStaticPropsResult (#29919) Fixes #28687 According to the answer in #28687, `GetStaticPropsResult` should allow specifying `revalidate` next to the `notFound: true`. Right now it's missing in the types def and allows to return any type. Also this may lead to confusion, that `revalidate` can't ...
packages/next/types/index.d.ts
@@ -109,7 +109,7 @@ export type GetStaticPropsContext< export type GetStaticPropsResult<P> = | { props: P; revalidate?: number | boolean } | { redirect: Redirect; revalidate?: number | boolean } - | { notFound: true } + | { notFound: true; revalidate?: number | boolean } export type GetStaticProps< P ext...
false
Other
vercel
next.js
665b29ec8aeeeddf150e8201bfa84d3b5d22ff45.json
Add native build caching to main workflow also (#29920)
.github/workflows/build_test_deploy.yml
@@ -504,6 +504,17 @@ jobs: export CXX=$(xcrun -f clang++); SYSROOT=$(xcrun --sdk macosx --show-sdk-path); export CFLAGS="-isysroot $SYSROOT -isystem $SYSROOT"; + # We use restore-key to pick latest cache. + # We will not get exact match, but doc says + # "If there are mul...
false
Other
vercel
next.js
ba39ee458bf8d9e871547a4fe52ada50e7674004.json
upgrade strip-ansi in react-dev-overlay (#29906) * upgrade strip-ansi in react-dev-overlay * use the non-breaking version of strip-ansi
packages/react-dev-overlay/package.json
@@ -26,7 +26,7 @@ "shell-quote": "1.7.2", "source-map": "0.8.0-beta.0", "stacktrace-parser": "0.1.10", - "strip-ansi": "6.0.0" + "strip-ansi": "6.0.1" }, "peerDependencies": { "react": "^17.0.2",
true
Other
vercel
next.js
ba39ee458bf8d9e871547a4fe52ada50e7674004.json
upgrade strip-ansi in react-dev-overlay (#29906) * upgrade strip-ansi in react-dev-overlay * use the non-breaking version of strip-ansi
yarn.lock
@@ -5633,6 +5633,11 @@ ansi-regex@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.0.tgz#388539f55179bf39339c81af30a654d69f87cb75" +ansi-regex@^5.0.1: + version "5.0.1" + resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53...
true
Other
vercel
next.js
40cf9313387955c75e00c1b4f653fb0e63e28759.json
Remove unused options from swc-loader (#29907) Since this is not a swcrc option and will be removed in the future it's best to prune it from next-swc already. ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Fe...
packages/next/build/swc/index.js
@@ -23,20 +23,10 @@ async function transform(src, options) { options.jsc.parser.syntax = options.jsc.parser.syntax ?? 'ecmascript' } - const { plugin, ...newOptions } = options - - if (plugin) { - const m = - typeof src === 'string' - ? await this.parse(src, options?.jsc?.parser) - : s...
false
Other
vercel
next.js
c2b5f15c9304acf6bb36c2389ef382e7b34a3dad.json
Update typo in response helpers doc (#29899) Fixes typo per https://github.com/vercel/next.js/pull/29462#discussion_r728604242 ## Documentation / Examples - [x] Make sure the linting passes
docs/api-routes/response-helpers.md
@@ -9,7 +9,7 @@ The [Server Response object](https://nodejs.org/api/http.html#http_class_http_se The included helpers are: - `res.status(code)` - A function to set the status code. `code` must be a valid [HTTP status code](https://en.wikipedia.org/wiki/List_of_HTTP_status_codes) -- `res.json(body)` - Sends a JSON r...
false
Other
vercel
next.js
a002f612c3d00886402368cc0c705324a9b56ff0.json
Add experimental option to enable fullySpecified (#29880)
packages/next/build/webpack-config.ts
@@ -1012,12 +1012,16 @@ export default async function getBaseWebpackConfig( rules: [ // TODO: FIXME: do NOT webpack 5 support with this // x-ref: https://github.com/webpack/webpack/issues/11467 - { - test: /\.m?js/, - resolve: { - fullySpecified: false, - ...
true
Other
vercel
next.js
a002f612c3d00886402368cc0c705324a9b56ff0.json
Add experimental option to enable fullySpecified (#29880)
packages/next/server/config-shared.ts
@@ -144,6 +144,7 @@ export type NextConfig = { [key: string]: any } & { outputFileTracing?: boolean concurrentFeatures?: boolean serverComponents?: boolean + fullySpecified?: boolean } } @@ -224,6 +225,7 @@ export const defaultConfig: NextConfig = { outputFileTracing: false, concurrent...
true
Other
vercel
next.js
31a701b9dac6db200f5b75039a2d04a23cb572e4.json
feat(jsconfig-paths-plugin): Resolve paths synchronously (#29467)
packages/next/build/webpack/plugins/jsconfig-paths-plugin.ts
@@ -127,6 +127,36 @@ export function patternText({ prefix, suffix }: Pattern): string { return `${prefix}*${suffix}` } +/** + * Calls the iterator function for each entry of the array + * until the first result or error is reached + */ +function forEachBail<TEntry>( + array: TEntry[], + iterator: ( + entry: ...
false
Other
vercel
next.js
e40785e1e2d58459e958dad287e0e9ef3d089898.json
Avoid TypeError when comparing path param (#29821) ## Bug Fixes a TypeError when accessing url with no path params `_next/data/<BUILD_ID>` ``` TypeError: Cannot read property 'endsWith' of undefined at Object.fn (/app/node_modules/next/server/next-server.ts:644:52) at Router.execute (/app/node_modules/next/serv...
packages/next/server/next-server.ts
@@ -641,8 +641,10 @@ export default class Server { // remove buildId from URL params.path.shift() + const lastParam = params.path[params.path.length - 1] + // show 404 if it doesn't end with .json - if (!params.path[params.path.length - 1].endsWith('.json')) { + ...
true
Other
vercel
next.js
e40785e1e2d58459e958dad287e0e9ef3d089898.json
Avoid TypeError when comparing path param (#29821) ## Bug Fixes a TypeError when accessing url with no path params `_next/data/<BUILD_ID>` ``` TypeError: Cannot read property 'endsWith' of undefined at Object.fn (/app/node_modules/next/server/next-server.ts:644:52) at Router.execute (/app/node_modules/next/serv...
test/e2e/prerender.test.ts
@@ -818,6 +818,11 @@ describe('Prerender', () => { expect(html).toMatch(/This page could not be found/) }) + it('should 404 for an invalid data url', async () => { + const res = await fetchViaHTTP(next.url, `/_next/data/${next.buildId}`) + expect(res.status).toBe(404) + }) + it('shoul...
true
Other
vercel
next.js
3910c3890e2c2e7f71cc15b5a790d0ad96a2dbcf.json
Update typescript version (#29854) Resolves message using `yarn dev` ``` warn - Minimum recommended TypeScript version is v4.3.2, older versions can potentially be incompatible with Next.js. Detected: 4.0.8 ``` ## Bug - [ ] Related issues linked using `fixes #number` - [ ] Integration tests added - [ ] Errors ha...
examples/with-expo-typescript/package.json
@@ -28,6 +28,6 @@ "@types/react-dom": "16.9.8", "@types/react-native": "0.62.10", "babel-preset-expo": "~8.1.0", - "typescript": "4.0" + "typescript": "4.4.4" } }
false
Other
vercel
next.js
b0d36efb7460ef7cd43ef5f576cfe540fc6a173a.json
Move some img tests out of serverless mode (#32620) These tests were only running against serverless mode instead of all modes so I moved it up into the `runTests()` helper
test/integration/image-component/default/test/index.test.js
@@ -862,6 +862,82 @@ function runTests(mode) { } }) } + + it('should have blurry placeholder when enabled', async () => { + const html = await renderViaHTTP(appPort, '/blurry-placeholder') + const $html = cheerio.load(html) + + $html('noscript > img').attr('id', 'unused') + + expect($html('#...
false
Other
vercel
next.js
bb6d4d71fd419b64e2a3ce4d3496f2150f9ff86b.json
Move fs API for inc cache to node server (#32604) Move fs API for incremental cache to node-server, leave a small group of mock file system for base server
packages/next/server/base-server.ts
@@ -18,6 +18,7 @@ import type { Redirect, Rewrite, RouteType } from '../lib/load-custom-routes' import type { RenderOpts, RenderOptsPartial } from './render' import type { ResponseCacheEntry, ResponseCacheValue } from './response-cache' import type { UrlWithParsedQuery } from 'url' +import type { CacheFs } from '../...
true
Other
vercel
next.js
bb6d4d71fd419b64e2a3ce4d3496f2150f9ff86b.json
Move fs API for inc cache to node server (#32604) Move fs API for incremental cache to node-server, leave a small group of mock file system for base server
packages/next/server/incremental-cache.ts
@@ -1,9 +1,9 @@ -import { promises, readFileSync } from 'fs' import LRUCache from 'next/dist/compiled/lru-cache' import path from 'path' import { PrerenderManifest } from '../build' import { PRERENDER_MANIFEST } from '../shared/lib/constants' import { normalizePagePath } from './normalize-page-path' +import type {...
true
Other
vercel
next.js
bb6d4d71fd419b64e2a3ce4d3496f2150f9ff86b.json
Move fs API for inc cache to node server (#32604) Move fs API for incremental cache to node-server, leave a small group of mock file system for base server
packages/next/server/next-server.ts
@@ -1,13 +1,14 @@ +import type { Route } from './router' +import type { CacheFs } from '../shared/lib/utils' + import fs from 'fs' import { join, relative } from 'path' - import { PAGES_MANIFEST, BUILD_ID_FILE } from '../shared/lib/constants' import { PagesManifest } from '../build/webpack/plugins/pages-manifest-pl...
true
Other
vercel
next.js
bb6d4d71fd419b64e2a3ce4d3496f2150f9ff86b.json
Move fs API for inc cache to node server (#32604) Move fs API for incremental cache to node-server, leave a small group of mock file system for base server
packages/next/shared/lib/utils.ts
@@ -451,3 +451,11 @@ export const HtmlContext = createContext<HtmlProps>(null as any) if (process.env.NODE_ENV !== 'production') { HtmlContext.displayName = 'HtmlContext' } + +export interface CacheFs { + readFile(f: string): Promise<string> + readFileSync(f: string): string + writeFile(f: string, d: any): Prom...
true
Other
vercel
next.js
2be207a288e3ddda882901c218c2e3e6f78fa131.json
Add moduleDirectories for TS Jest Config (#32574) It took me a while to work out that if using TypeScript with the `baseUrl` set to `.` (quite common) - then the tests fail as Jest can't find the modules. Explicitly setting the `moduleDirectories`, as per the change to the config, fixes this issue. ## Documentatio...
docs/testing.md
@@ -282,6 +282,8 @@ const createJestConfig = nextJest({ // Add any custom config to be passed to Jest const customJestConfig = { setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], + // if using TypeScript with a baseUrl set to the root directory then you need the below for alias' to work + moduleDirectories: ['nod...
false
Other
vercel
next.js
6ad8c338d8cdc26e66759d1838886093cd45a80f.json
Update contributing guidelines for examples (#32584) * Update contributing.md * Apply suggestions from code review Co-authored-by: Lee Robinson <me@leerob.io>
contributing.md
@@ -223,22 +223,19 @@ When you add an example to the [examples](examples) directory, don’t forget to - Replace `DIRECTORY_NAME` with the directory name you’re adding. - Fill in `Example Name` and `Description`. +- Examples should be TypeScript first, if possible. +- You don’t need to add `name` or `version` in your...
false
Other
vercel
next.js
f26fea92af0113672c6c6329885c219a063432e9.json
Fix typo in documentation (#32581) ## 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 RFC. Make sure the feature request has been accepted for implementatio...
docs/migrating/from-create-react-app.md
@@ -114,7 +114,7 @@ export default function Home() { ## Environment Variables -Next.js has support for `.env` [Environment Variables](/docs/basic-features/environment-variables.md) similar to Create React App. The main different is the prefix used to expose environment variables on the client-side. +Next.js has su...
false
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/README.md
@@ -36,6 +36,4 @@ Deploy it to the cloud with [Vercel](https://vercel.com/new?utm_source=github&ut # Notes -This blog-starter-typescript 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/c...
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/alert.tsx
@@ -10,8 +10,8 @@ const Alert = ({ preview }: Props) => { return ( <div className={cn('border-b', { - 'bg-accent-7 border-accent-7 text-white': preview, - 'bg-accent-1 border-accent-2': !preview, + 'bg-neutral-800 border-neutral-800 text-white': preview, + 'bg-neutral-50 borde...
true