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
01cd69fbc355af6bd2bbc330bc66c8b36009121f.json
Update deprecation for webpack5 config (#33560) * Removed the s Removed the s of "This option was moved to the top level" was before: "this options was moved to the top level" * Update packages/next/server/config-shared.ts Co-authored-by: JJ Kasper <jj@jjsweb.site> * Suggestion of @ijjk * lint-fix ...
packages/next/server/config-shared.ts
@@ -60,6 +60,9 @@ export type NextConfig = { [key: string]: any } & { > redirects?: () => Promise<Redirect[]> + /** + * @deprecated This option has been removed as webpack 5 is now default + */ webpack5?: false excludeDefaultMomentLocales?: boolean @@ -116,7 +119,7 @@ export type NextConfig = { [ke...
false
Other
vercel
next.js
7df38bc56b54706f3658445cd65800689dc60786.json
fix(docs): Fix typo in Custom Build Id docs (#33515) Tiny wordsmithing - fixing the tense of a verb and using a slightly more accurate word.
docs/api-reference/next.config.js/configuring-the-build-id.md
@@ -4,7 +4,7 @@ description: Configure the build id, which is used to identify the current build # Configuring the Build ID -Next.js uses a constant id generated at build time to identify which version of your application is being served. This can cause problems in multi-server deployments when `next build` is ran...
false
Other
vercel
next.js
c879fce0d465cd96d0d05e329c0a8a83f46e29d9.json
Fix multiple calls to image `onLoadingComplete()` (#33474) The image prop `onLoadingComplete()` was unexpectedly called multiple times because it uses a [callback ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs). This could lead to an infinite loop if `onLoadingComplete()` calls `setState()` as demo...
packages/next/client/image.tsx
@@ -1,4 +1,4 @@ -import React from 'react' +import React, { useRef, useEffect } from 'react' import Head from '../shared/lib/head' import { ImageConfigComplete, @@ -8,7 +8,6 @@ import { } from '../server/image-config' import { useIntersection } from './use-intersection' -const loadedImageURLs = new Set<string>...
true
Other
vercel
next.js
c879fce0d465cd96d0d05e329c0a8a83f46e29d9.json
Fix multiple calls to image `onLoadingComplete()` (#33474) The image prop `onLoadingComplete()` was unexpectedly called multiple times because it uses a [callback ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs). This could lead to an infinite loop if `onLoadingComplete()` calls `setState()` as demo...
test/integration/image-component/default/pages/on-loading-complete.js
@@ -1,74 +1,122 @@ import { useState } from 'react' import Image from 'next/image' -const Page = () => ( - <div> - <h1>On Loading Complete Test</h1> - <ImageWithMessage - id="1" - src="/test.jpg" - layout="intrinsic" - width="128" - height="128" - /> - <hr /> - <ImageWithMes...
true
Other
vercel
next.js
c879fce0d465cd96d0d05e329c0a8a83f46e29d9.json
Fix multiple calls to image `onLoadingComplete()` (#33474) The image prop `onLoadingComplete()` was unexpectedly called multiple times because it uses a [callback ref](https://reactjs.org/docs/refs-and-the-dom.html#callback-refs). This could lead to an infinite loop if `onLoadingComplete()` calls `setState()` as demo...
test/integration/image-component/default/test/index.test.js
@@ -193,47 +193,84 @@ function runTests(mode) { try { browser = await webdriver(appPort, '/on-loading-complete') - await browser.eval(`document.getElementById("footer").scrollIntoView()`) + await browser.eval( + `document.getElementById("footer").scrollIntoView({behavior: "smooth"})` + ...
true
Other
vercel
next.js
8ca32f15f77166bd439ddc783e39ad1a027ab8d0.json
Move static serving to next server (#33475) Part of #31506 Decouple static serving logic from base-server, let them go to next-server only
packages/next/server/base-server.ts
@@ -21,14 +21,12 @@ import type { PreviewData } from 'next/types' import type { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin' import type { BaseNextRequest, BaseNextResponse } from './base-http' -import { join, relative, resolve, sep } from 'path' +import { join, resolve } from 'path' impor...
true
Other
vercel
next.js
8ca32f15f77166bd439ddc783e39ad1a027ab8d0.json
Move static serving to next server (#33475) Part of #31506 Decouple static serving logic from base-server, let them go to next-server only
packages/next/server/next-server.ts
@@ -12,14 +12,16 @@ import type { FetchEventResult } from './web/types' import type { ParsedNextUrl } from '../shared/lib/router/utils/parse-next-url' import fs from 'fs' -import { join, relative } from 'path' +import { join, relative, resolve, sep } from 'path' import { IncomingMessage, ServerResponse } from 'htt...
true
Other
vercel
next.js
818f6b32583c260dfd4a4cd8dbd4841bd5d4639c.json
Update main field for nccd jest-worker (#33465)
packages/next/compiled/jest-worker/package.json
@@ -1 +1 @@ -{"name":"jest-worker","main":"threadChild.js.tmp.js","license":"MIT"} +{"name":"jest-worker","main":"index.js","license":"MIT"}
true
Other
vercel
next.js
818f6b32583c260dfd4a4cd8dbd4841bd5d4639c.json
Update main field for nccd jest-worker (#33465)
packages/next/taskfile.js
@@ -251,7 +251,7 @@ export async function ncc_jest_worker(task, opts) { ) ) ) - .ncc({ packageName: 'jest-worker', externals }) + .ncc({ externals }) .target('compiled/jest-worker/out') await fs.move(
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
errors/manifest.json
@@ -527,6 +527,10 @@ { "title": "invalid-styled-jsx-children", "path": "/errors/invalid-styled-jsx-children.md" + }, + { + "title": "middleware-relative-urls", + "path": "/errors/middleware-relative-urls.md" } ] }
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
errors/middleware-relative-urls.md
@@ -0,0 +1,38 @@ +# Middleware Relative URLs + +#### Why This Error Occurred + +You are using a Middleware function that uses `Response.redirect(url)`, `NextResponse.redirect(url)` or `NextResponse.rewrite(url)` where `url` is a relative or an invalid URL. Currently this will work, but building a request with `new Requ...
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
packages/next/server/web/next-url.ts
@@ -244,6 +244,10 @@ export class NextURL { toJSON() { return this.href } + + clone() { + return new NextURL(String(this), this[Internal].options) + } } const REGEX_LOCALHOST_HOSTNAME =
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
packages/next/server/web/spec-compliant/response.ts
@@ -1,5 +1,6 @@ import { Body, BodyInit, cloneBody, extractContentType } from './body' import { NextURL } from '../next-url' +import { validateURL } from '../utils' const INTERNALS = Symbol('internal response') const REDIRECTS = new Set([301, 302, 303, 307, 308]) @@ -45,7 +46,7 @@ class BaseResponse extends Body ...
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
packages/next/server/web/spec-extension/response.ts
@@ -1,6 +1,6 @@ import type { I18NConfig } from '../../config-shared' import { NextURL } from '../next-url' -import { toNodeHeaders } from '../utils' +import { toNodeHeaders, validateURL } from '../utils' import cookie from 'next/dist/compiled/cookie' import { CookieSerializeOptions } from '../types' @@ -79,7 +79...
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
packages/next/server/web/utils.ts
@@ -147,3 +147,20 @@ export function splitCookiesString(cookiesString: string) { return cookiesStrings } + +/** + * We will be soon deprecating the usage of relative URLs in Middleware introducing + * URL validation. This helper puts the future code in place and prints a warning + * for cases where it will break....
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
test/integration/middleware/core/pages/interface/_middleware.js
@@ -81,7 +81,8 @@ export async function middleware(request) { } if (url.pathname.endsWith('/dynamic-replace')) { - return NextResponse.rewrite('/_interface/dynamic-path') + url.pathname = '/_interface/dynamic-path' + return NextResponse.rewrite(url) } return new Response(null, {
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
test/integration/middleware/core/pages/redirects/_middleware.js
@@ -56,6 +56,6 @@ export async function middleware(request) { if (url.pathname === '/redirects/infinite-loop-1') { url.pathname = '/redirects/infinite-loop' - return Response.redirect(url.pathname) + return Response.redirect(url) } }
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
test/integration/middleware/core/pages/rewrites/_middleware.js
@@ -5,24 +5,27 @@ export async function middleware(request) { if (url.pathname.startsWith('/rewrites/to-blog')) { const slug = url.pathname.split('/').pop() - console.log('rewriting to slug', slug) - return NextResponse.rewrite(`/rewrites/fallback-true-blog/${slug}`) + url.pathname = `/rewrites/fallb...
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
test/integration/middleware/core/pages/urls/_middleware.js
@@ -0,0 +1,35 @@ +import { NextResponse, NextRequest } from 'next/server' + +export function middleware(request) { + try { + if (request.nextUrl.pathname === '/urls/relative-url') { + return NextResponse.json({ message: String(new URL('/relative')) }) + } + + if (request.nextUrl.pathname === '/urls/relat...
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
test/integration/middleware/core/pages/urls/index.js
@@ -0,0 +1,3 @@ +export default function URLsA() { + return <p className="title">URLs A</p> +}
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
test/integration/middleware/core/pages/urls/urls-b.js
@@ -0,0 +1,3 @@ +export default function URLsB() { + return <p className="title">URLs B</p> +}
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
test/integration/middleware/core/test/index.test.js
@@ -19,18 +19,20 @@ const context = {} context.appDir = join(__dirname, '../') const middlewareWarning = 'using beta Middleware (not covered by semver)' +const urlsWarning = 'using relative URLs for Middleware will be deprecated soon' describe('Middleware base tests', () => { describe('dev mode', () => { - ...
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
test/integration/middleware/hmr/pages/about/_middleware.js
@@ -1,5 +1,5 @@ import { NextResponse } from 'next/server' -export function middleware() { - return NextResponse.rewrite('/about/a') +export function middleware(request) { + return NextResponse.rewrite(new URL('/about/a', request.url)) }
true
Other
vercel
next.js
e5dee17f776dcc79ebb269f7b7341fa6e2b6c3f1.json
Enforce absolute URLs in Edge Functions runtime (#33410) We currently have inconsistencies when working with URLs in the Edge Functions runtime, this PR addresses them introducing a warning for inconsistent usage that will break in the future. Here is the reasoning. ### The Browser When we are in a browser environme...
test/unit/web-runtime/next-url.test.ts
@@ -170,3 +170,21 @@ it('allows to change the port', () => { url.port = '' expect(url.href).toEqual('https://localhost/foo') }) + +it('allows to clone a new copy', () => { + const url = new NextURL('/root/es/bar', { + base: 'http://127.0.0.1', + basePath: '/root', + i18n: { + defaultLocale: 'en', ...
true
Other
vercel
next.js
41614e52d72f532601dc2d118f4f40dbd1e63907.json
Fix broken html on streaming render for error page (#33399) ## Bug Fixes: #32515 Previously, we render the `suffix` after consuming 1st chunk, instead we should render it after stream finished - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, se...
packages/next/server/render.tsx
@@ -1551,6 +1551,7 @@ function renderToNodeStream( // Based on the suggestion here: // https://github.com/reactwg/react-18/discussions/110 + let suffixFlushed = false class NextWritable extends Writable { _write( chunk: any, @@ -1572,7 +1573,15 @@ function renderToNodeStream( ...
true
Other
vercel
next.js
41614e52d72f532601dc2d118f4f40dbd1e63907.json
Fix broken html on streaming render for error page (#33399) ## Bug Fixes: #32515 Previously, we render the `suffix` after consuming 1st chunk, instead we should render it after stream finished - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [x] Errors have helpful link attached, se...
test/integration/react-streaming-and-server-components/test/index.test.js
@@ -27,6 +27,7 @@ const documentPage = new File(join(appDir, 'pages/_document.jsx')) const appPage = new File(join(appDir, 'pages/_app.js')) const appServerPage = new File(join(appDir, 'pages/_app.server.js')) const error500Page = new File(join(appDir, 'pages/500.js')) +const error404Page = new File(join(appDir, 'pa...
true
Other
vercel
next.js
6d8923768460c2c70ad76b68d8c206378976d091.json
docs: add skynexui to examples (#33326) Recently I started to build this library that uses `styled-jsx` under the hood and provide a utility first API to create your own components. > https://github.com/skynexui/components/ Actually I run the lib docs over vercel ![image](https://user-images.githubusercontent.co...
examples/with-skynexui-components/.gitignore
@@ -0,0 +1,34 @@ +# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. + +# dependencies +/node_modules +/.pnp +.pnp.js + +# testing +/coverage + +# next.js +/.next/ +/out/ + +# production +/build + +# misc +.DS_Store +*.pem + +# debug +npm-debug.log* +yarn-debug.log* +yarn-error.log* +...
true
Other
vercel
next.js
6d8923768460c2c70ad76b68d8c206378976d091.json
docs: add skynexui to examples (#33326) Recently I started to build this library that uses `styled-jsx` under the hood and provide a utility first API to create your own components. > https://github.com/skynexui/components/ Actually I run the lib docs over vercel ![image](https://user-images.githubusercontent.co...
examples/with-skynexui-components/README.md
@@ -0,0 +1,29 @@ +# Example app with @skynexui/components + +Next.js ships with [styled-jsx](https://github.com/vercel/styled-jsx) allowing you to write scoped styled components with full CSS support. This is important for the modularity and code size of your bundles and also for the learning curve of the framework. If...
true
Other
vercel
next.js
6d8923768460c2c70ad76b68d8c206378976d091.json
docs: add skynexui to examples (#33326) Recently I started to build this library that uses `styled-jsx` under the hood and provide a utility first API to create your own components. > https://github.com/skynexui/components/ Actually I run the lib docs over vercel ![image](https://user-images.githubusercontent.co...
examples/with-skynexui-components/package.json
@@ -0,0 +1,15 @@ +{ + "private": true, + "scripts": { + "dev": "next", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "@skynexui/components": "^1.9.23", + "next": "latest", + "react": "^17.0.2", + "react-dom": "^17.0.2" + } +}
true
Other
vercel
next.js
6d8923768460c2c70ad76b68d8c206378976d091.json
docs: add skynexui to examples (#33326) Recently I started to build this library that uses `styled-jsx` under the hood and provide a utility first API to create your own components. > https://github.com/skynexui/components/ Actually I run the lib docs over vercel ![image](https://user-images.githubusercontent.co...
examples/with-skynexui-components/pages/_app.js
@@ -0,0 +1,17 @@ +import { Provider } from '@skynexui/components' + +export default function App({ Component, pageProps }) { + return ( + <Provider + theme={{ + components: { + textField: { + variant: 'basicBordered', // or put "bottomBorder" + }, + }, + }} + ...
true
Other
vercel
next.js
6d8923768460c2c70ad76b68d8c206378976d091.json
docs: add skynexui to examples (#33326) Recently I started to build this library that uses `styled-jsx` under the hood and provide a utility first API to create your own components. > https://github.com/skynexui/components/ Actually I run the lib docs over vercel ![image](https://user-images.githubusercontent.co...
examples/with-skynexui-components/pages/index.js
@@ -0,0 +1,36 @@ +import { Box, Text, TextField } from '@skynexui/components' + +export default function Index() { + return ( + <Box + styleSheet={{ + marginVertical: { + xs: '16px', + md: '32px', + }, + marginHorizontal: 'auto', + maxWidth: '50%', + }} + >...
true
Other
vercel
next.js
f4d2938503926e4bd212fbb6678c6cbd0234451e.json
Remove node fetch polyfill from base server (#33395) * keep fetch polyfill only in dev-server, next-server (polyfilled in next.ts) * also export worker, static paths worker since they also requires it
packages/next/build/index.ts
@@ -59,7 +59,6 @@ import { import { __ApiPreviewProps } from '../server/api-utils' import loadConfig, { isTargetLikeServerless } from '../server/config' import { BuildManifest } from '../server/get-page-files' -import '../server/node-polyfill-fetch' import { normalizePagePath } from '../server/normalize-page-path' ...
true
Other
vercel
next.js
f4d2938503926e4bd212fbb6678c6cbd0234451e.json
Remove node fetch polyfill from base server (#33395) * keep fetch polyfill only in dev-server, next-server (polyfilled in next.ts) * also export worker, static paths worker since they also requires it
packages/next/build/utils.ts
@@ -1,4 +1,3 @@ -import '../server/node-polyfill-fetch' import chalk from 'next/dist/compiled/chalk' import getGzipSize from 'next/dist/compiled/gzip-size' import textTable from 'next/dist/compiled/text-table'
true
Other
vercel
next.js
f4d2938503926e4bd212fbb6678c6cbd0234451e.json
Remove node fetch polyfill from base server (#33395) * keep fetch polyfill only in dev-server, next-server (polyfilled in next.ts) * also export worker, static paths worker since they also requires it
packages/next/server/base-server.ts
@@ -57,7 +57,6 @@ import { execOnce } from '../shared/lib/utils' import { isBlockedPage, isBot } from './utils' import RenderResult from './render-result' import { loadEnvConfig } from '@next/env' -import './node-polyfill-fetch' import { PagesManifest } from '../build/webpack/plugins/pages-manifest-plugin' import ...
true
Other
vercel
next.js
5429e8f12e7bf54177ba68eafd65160017b90cde.json
Update Manual Steps in Getting Started guide (#35898) This PR add necessary information to the Manual Section to add directories such as `pages` and `public`. ## Bug - [x] Related issues linked using fixes #29479 - [ ] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feat...
docs/getting-started.md
@@ -41,7 +41,7 @@ pnpm create next-app -- --typescript After the installation is complete: -- Run `npm run dev` or `yarn dev` to start the development server on `http://localhost:3000` +- Run `npm run dev` or `yarn dev` or `pnpm dev` to start the development server on `http://localhost:3000` - Visit `http://local...
false
Other
vercel
next.js
384953b35c5e9935bb4a2fcdfe5056efb73cd740.json
Stabilize react streaming ISR test (#35885)
test/integration/react-streaming-and-server-components/test/switchable-runtime.test.js
@@ -1,7 +1,7 @@ /* eslint-env jest */ import webdriver from 'next-webdriver' import { join } from 'path' -import { findPort, killApp, renderViaHTTP } from 'next-test-utils' +import { check, findPort, killApp, renderViaHTTP } from 'next-test-utils' import { nextBuild, nextDev, nextStart } from './utils' const app...
false
Other
vercel
next.js
081e7b00278395c205532a70a5da1be5c8f363eb.json
fix: reset visible state when src/href changed (#35287) * fix(#35286): reset visible state when image src changed * fix(#35286): reset visible state when link href changed * test(image): image with new src should be re-lazyloaded * test: apply code suggestions from @styfle's review * test: incorrect condit...
packages/next/client/image.tsx
@@ -417,11 +417,12 @@ export default function Image({ isLazy = false } - const [setIntersection, isIntersected] = useIntersection<HTMLImageElement>({ - rootRef: lazyRoot, - rootMargin: lazyBoundary, - disabled: !isLazy, - }) + const [setIntersection, isIntersected, resetIntersected] = + useInte...
true
Other
vercel
next.js
081e7b00278395c205532a70a5da1be5c8f363eb.json
fix: reset visible state when src/href changed (#35287) * fix(#35286): reset visible state when image src changed * fix(#35286): reset visible state when link href changed * test(image): image with new src should be re-lazyloaded * test: apply code suggestions from @styfle's review * test: incorrect condit...
packages/next/client/link.tsx
@@ -219,6 +219,9 @@ function Link(props: React.PropsWithChildren<LinkProps>) { } }, [router, props.href, props.as]) + const previousHref = React.useRef<string>(href) + const previousAs = React.useRef<string>(as) + let { children, replace, shallow, scroll, locale } = props if (typeof children === 'st...
true
Other
vercel
next.js
081e7b00278395c205532a70a5da1be5c8f363eb.json
fix: reset visible state when src/href changed (#35287) * fix(#35286): reset visible state when image src changed * fix(#35286): reset visible state when link href changed * test(image): image with new src should be re-lazyloaded * test: apply code suggestions from @styfle's review * test: incorrect condit...
packages/next/client/use-intersection.tsx
@@ -29,7 +29,7 @@ export function useIntersection<T extends Element>({ rootRef, rootMargin, disabled, -}: UseIntersection): [(element: T | null) => void, boolean] { +}: UseIntersection): [(element: T | null) => void, boolean, () => void] { const isDisabled: boolean = disabled || !hasIntersectionObserver ...
true
Other
vercel
next.js
081e7b00278395c205532a70a5da1be5c8f363eb.json
fix: reset visible state when src/href changed (#35287) * fix(#35286): reset visible state when image src changed * fix(#35286): reset visible state when link href changed * test(image): image with new src should be re-lazyloaded * test: apply code suggestions from @styfle's review * test: incorrect condit...
test/integration/image-component/default/pages/lazy-src-change.js
@@ -0,0 +1,18 @@ +import React from 'react' +import Image from 'next/image' + +const Page = () => { + const [src, setSrc] = React.useState('/test.jpg') + return ( + <div> + <p>Home Page</p> + <div id="spacer" style={{ height: '150vh' }} /> + <Image id="basic-image" src={src} width="400" height="400"...
true
Other
vercel
next.js
081e7b00278395c205532a70a5da1be5c8f363eb.json
fix: reset visible state when src/href changed (#35287) * fix(#35286): reset visible state when image src changed * fix(#35286): reset visible state when link href changed * test(image): image with new src should be re-lazyloaded * test: apply code suggestions from @styfle's review * test: incorrect condit...
test/integration/image-component/default/test/index.test.js
@@ -1183,6 +1183,95 @@ function runTests(mode) { } }) + it('should re-lazyload images after src changes', async () => { + let browser + try { + browser = await webdriver(appPort, '/lazy-src-change') + // image should not be loaded as it is out of viewport + await check(async () => { + ...
true
Other
vercel
next.js
127bbc0ba69463638bcf2b059846fc6a481747d5.json
Update dead link for getStaticPaths in docs (#35814)
errors/conflicting-ssg-paths.md
@@ -65,4 +65,4 @@ export default function CatchAll() { ### Useful Links -- [`getStaticPaths` Documentation](https://nextjs.org/docs/basic-features/data-fetching/get-static-paths.md) +- [`getStaticPaths` Documentation](https://nextjs.org/docs/api-reference/data-fetching/get-static-paths)
false
Other
vercel
next.js
6a1e8db7ff740dbca914f82658e0cae582160b2f.json
ci(trace): fix workflow conditions (#35800) Fixing skip check logic with small typos. ## Bug - [x] 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...
.github/workflows/build_test_deploy.yml
@@ -1216,7 +1216,7 @@ jobs: name: Performance Metrics for Release Build runs-on: ubuntu-latest needs: [build, build-native-test, check-trace-secrests] - if: needs.check-trace-secrests.trace-api-key == 'true' + if: needs.check-trace-secrests.outputs.trace-api-key == 'true' steps: - name:...
false
Other
vercel
next.js
69a166b263d6ebc34055c47953891b0000b0a9ef.json
ci(trace): adjust agent env variables (#35790) * ci(trace): adjust agent env variables * refactor(trace): exit early when there's no key * ci(trace): try to skip agent if api key is not available
.github/workflows/build_test_deploy.yml
@@ -1199,10 +1199,21 @@ jobs: name: wasm-dev-binary path: packages/next-swc/crates/wasm/pkg-nodejs + check-trace-secrests: + runs-on: ubuntu-latest + outputs: + trace-api-key: ${{ steps.trace-api-key.outputs.defined }} + steps: + - id: trace-api-key + env: + T...
true
Other
vercel
next.js
69a166b263d6ebc34055c47953891b0000b0a9ef.json
ci(trace): adjust agent env variables (#35790) * ci(trace): adjust agent env variables * refactor(trace): exit early when there's no key * ci(trace): try to skip agent if api key is not available
scripts/trace-dd.mjs
@@ -132,7 +132,14 @@ const collectTraces = async (filePath, metadata) => { * Naively validate, collect necessary args. */ const validateArgs = async () => { - const { DD_ENV, DD_SERVICE } = process.env + const { DD_ENV, DD_SERVICE, DATA_DOG_API_KEY } = process.env + + if (!DATA_DOG_API_KEY) { + console.log( ...
true
Other
vercel
next.js
446432719f63cf6df64939539fd9c8b4679f37b4.json
Run e2e suite against React 18 (#35774) * Run e2e suite against React 18 * update test Co-authored-by: JJ Kasper <jj@jjsweb.site>
test/e2e/prerender.test.ts
@@ -1701,13 +1701,13 @@ describe('Prerender', () => { it('should handle revalidating HTML correctly', async () => { const route = '/blog/post-2/comment-2' - await renderViaHTTP(next.url, route) const initialHtml = await renderViaHTTP(next.url, route) expect(initialHtml).toMatc...
true
Other
vercel
next.js
446432719f63cf6df64939539fd9c8b4679f37b4.json
Run e2e suite against React 18 (#35774) * Run e2e suite against React 18 * update test Co-authored-by: JJ Kasper <jj@jjsweb.site>
test/lib/next-modes/base.ts
@@ -90,8 +90,8 @@ export class NextInstance { } else if (!skipIsolatedNext) { this.testDir = await createNextInstall( { - react: '17.0.2', - 'react-dom': '17.0.2', + react: 'latest', + 'react-dom': 'latest', ...this.dependencies, ...((this.p...
true
Other
vercel
next.js
6577b2efc257d5988c58edaa0e5e38fe236d0d95.json
Send build trace to datadog in CI (#35306) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
.github/workflows/build_test_deploy.yml
@@ -174,7 +174,7 @@ jobs: testUnit: name: Test Unit runs-on: ubuntu-latest - needs: [build, build-native-dev] + needs: [build, build-native-test] env: NEXT_TELEMETRY_DISABLED: 1 NEXT_TEST_JOB: 1 @@ -195,7 +195,7 @@ jobs: - uses: actions/download-artifact@v2 if: ${{n...
true
Other
vercel
next.js
6577b2efc257d5988c58edaa0e5e38fe236d0d95.json
Send build trace to datadog in CI (#35306) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
bench/nested-deps/bench.mjs
@@ -1,4 +1,6 @@ -import { spawn } from 'child_process' +import { execSync, spawn } from 'child_process' +import { join } from 'path' +import { fileURLToPath } from 'url' import fetch from 'node-fetch' import { existsSync, @@ -7,8 +9,16 @@ import { unlinkSync, promises as fs, } from 'fs' +import prettyMs fro...
true
Other
vercel
next.js
6577b2efc257d5988c58edaa0e5e38fe236d0d95.json
Send build trace to datadog in CI (#35306) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
bench/nested-deps/package.json
@@ -7,5 +7,10 @@ "dev-nocache": "rimraf .next && yarn dev", "dev-cpuprofile-nocache": "rimraf .next && cross-env NEXT_PRIVATE_LOCAL_WEBPACK5=1 node --cpu-prof ../../node_modules/next/dist/bin/next", "build-nocache": "rimraf .next && yarn build" + }, + "devDependencies": { + "cross-env": "^7.0.3", + ...
true
Other
vercel
next.js
6577b2efc257d5988c58edaa0e5e38fe236d0d95.json
Send build trace to datadog in CI (#35306) Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
scripts/trace-dd.mjs
@@ -136,7 +136,7 @@ const validateArgs = async () => { if (!DD_ENV || !DD_SERVICE) { throw new Error( - `Could not find proper enviroment variables. Ensure to set DD_ENV / DD_SERVICE` + `Could not find proper environment variables. Ensure to set DD_ENV / DD_SERVICE` ) }
true
Other
vercel
next.js
fbfe430cf0d21513eadb7be7e9c05a6ac6d5048a.json
Docs: update react 18's overview (#35766) React 18 is now released and will have the following updates to the react 18 `overview` documentation - Links - Descriptions - Installation command
docs/advanced-features/react-18/overview.md
@@ -1,16 +1,16 @@ # React 18 -[React 18](https://reactjs.org/blog/2021/06/08/the-plan-for-react-18.html) adds new features including Suspense, automatic batching of updates, APIs like `startTransition`, and a new streaming API for server rendering with support for `React.lazy`. +[React 18](https://reactjs.org/blog/2...
true
Other
vercel
next.js
fbfe430cf0d21513eadb7be7e9c05a6ac6d5048a.json
Docs: update react 18's overview (#35766) React 18 is now released and will have the following updates to the react 18 `overview` documentation - Links - Descriptions - Installation command
docs/advanced-features/react-18/server-components.md
@@ -4,10 +4,10 @@ Server Components allow us to render React components on the server. This is fun ### Enable React Server Components -To use React Server Components, ensure you have React 18 installed: +To use React Server Components, ensure you have the latest React installed: ```jsx -npm install next@canary ...
true
Other
vercel
next.js
fe012ff916db6a9e5dc5317d0fef89a18fed9775.json
Fix document styles with react 18 (#35760) This is a follow-up to https://github.com/vercel/next.js/pull/35736 that ensures we use the styles from `_document.getInitialProps` instead of only applying the `styled-jsx` styles. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ...
packages/next/server/render.tsx
@@ -1431,23 +1431,33 @@ export async function renderToHTML( }) } - const styles = jsxStyleRegistry.styles() - jsxStyleRegistry.flush() + const hasDocumentGetInitialProps = !( + isServerComponent || + process.browser || + !Document.getInitialProps + ) - c...
true
Other
vercel
next.js
fe012ff916db6a9e5dc5317d0fef89a18fed9775.json
Fix document styles with react 18 (#35760) This is a follow-up to https://github.com/vercel/next.js/pull/35736 that ensures we use the styles from `_document.getInitialProps` instead of only applying the `styled-jsx` styles. ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ...
test/development/basic/styled-components.test.ts
@@ -2,7 +2,7 @@ import { join } from 'path' import webdriver from 'next-webdriver' import { createNext, FileRef } from 'e2e-utils' import { NextInstance } from 'test/lib/next-modes/base' -import { fetchViaHTTP } from 'next-test-utils' +import { fetchViaHTTP, renderViaHTTP } from 'next-test-utils' describe('styled...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/Cargo.lock
@@ -33,7 +33,7 @@ version = "0.7.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fcb51a0695d8f838b1ee009b3fbf66bda078cd64590202a864a8f3e8c4315c47" dependencies = [ - "getrandom 0.2.5", + "getrandom", "once_cell", "serde", "version_check", @@ -431,7 +431,7 @@ checksum = "c0834a35...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/Cargo.toml
@@ -6,5 +6,8 @@ members = [ "crates/wasm" ] +[profile.dev.package.swc_css_prefixer] +opt-level = 2 + [profile.release] lto = true \ No newline at end of file
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/Cargo.toml
@@ -19,20 +19,20 @@ radix_fmt = "1" regex = "1.5" serde = "1" serde_json = "1" -styled_components = "0.19.0" -swc = "0.150.1" -swc_atoms = "0.2.9" -swc_common = {version = "0.17.15", features = ["concurrent", "sourcemap"]} -swc_css = "0.100.0" -swc_ecma_loader = {version = "0.29.0", features = ["node", "lru"]} -swc_...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/src/emotion/mod.rs
@@ -307,8 +307,7 @@ impl<C: Comments> EmotionTransformer<C> { if index % 2 == 0 { if let Some(q) = tagged_tpl.quasis.get_mut(i) { let q = q.take(); - let minified = - minify_css_string(&q.raw.value, index == 0, index == args_le...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/src/next_dynamic.rs
@@ -6,7 +6,7 @@ use swc_common::{FileName, DUMMY_SP}; use swc_ecmascript::ast::{ ArrayLit, ArrowExpr, BinExpr, BinaryOp, BlockStmtOrExpr, Bool, CallExpr, Callee, Expr, ExprOrSpread, Ident, ImportDecl, ImportSpecifier, KeyValueProp, Lit, MemberExpr, MemberProp, - Null, ObjectLit, Prop, PropName, PropOrSpre...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/src/page_config.rs
@@ -54,8 +54,7 @@ impl Fold for PageConfig { init: Some(Box::new(Expr::Lit(Lit::Str(Str { value: format!("{} {}", STRING_LITERAL_DROP_BUNDLE, timestamp).into(), span: DUMMY_SP, - kind: StrKind::Synthesized {}, ...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/src/relay.rs
@@ -43,7 +43,7 @@ fn pull_first_operation_name_from_tpl(tpl: &TaggedTpl) -> Option<String> { static OPERATION_REGEX: Lazy<Regex> = Lazy::new(|| Regex::new(r"(fragment|mutation|query|subscription) (\w+)").unwrap()); - let capture_group = OPERATION_REGEX.captures_iter(&quasis.raw.value).nex...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/src/styled_jsx/mod.rs
@@ -475,8 +475,8 @@ impl StyledJSXTransformer { expr, ) => { if exprs.is_empty() { - hasher.write(quasis[0].raw.value.as_bytes()); - css = quasis[0].raw.value.to_string(); + hasher.write(quasis[0].raw.as_bytes()); + ...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/src/styled_jsx/transform_css.rs
@@ -12,10 +12,10 @@ use swc_css::codegen::{ use swc_css::parser::parser::input::ParserInput; use swc_css::parser::{parse_str, parse_tokens, parser::ParserConfig}; use swc_css::visit::{VisitMut, VisitMutWith}; -use swc_ecmascript::ast::{Expr, Str, StrKind, Tpl, TplElement}; +use swc_css_prefixer::prefixer; +use swc_e...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/src/styled_jsx/utils.rs
@@ -7,12 +7,7 @@ use super::{ExternalStyle, JSXStyle, LocalStyle}; fn tpl_element(value: &str) -> TplElement { TplElement { - raw: Str { - value: value.into(), - span: DUMMY_SP, - kind: StrKind::Synthesized, - has_escape: false, - }, + raw: value....
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/next-dynamic/no-arguments/output.stderr
@@ -1,6 +1,6 @@ -error: next/dynamic requires at least one argument - --> input.js:3:26 - | -3 | const DynamicComponent = dynamic() - | ^^^^^^^ + x next/dynamic requires at least one argument + ,-[input.js:3:1] + 3 | const DynamicComponent = dynamic() + : ^^^^^...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/next-dynamic/options-as-variable/output.stderr
@@ -1,7 +1,7 @@ -error: next/dynamic options must be an object literal. -Read more: https://nextjs.org/docs/messages/invalid-dynamic-options-type - --> input.js:4:43 - | -4 | const DynamicComponentWithCustomLoading = dynamic( - | ^^^^^^^ + x next/dynamic options must be an...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/next-dynamic/too-many-arguments/output.stderr
@@ -1,6 +1,6 @@ -error: next/dynamic only accepts 2 arguments - --> input.js:3:43 - | -3 | const DynamicComponentWithCustomLoading = dynamic( - | ^^^^^^^ + x next/dynamic only accepts 2 arguments + ,-[input.js:3:1] + 3 | const DynamicComponentWithCustomLoading = dynamic(...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/next-ssg/server-side-after-static-paths/output.stderr
@@ -1,6 +1,6 @@ -error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps - --> input.js:2:14 - | -2 | export const getServerSideProps = function getServerSideProps() {} - | ^^^^^^^^^^^^^^^^^^ + x You can not use getStaticProps or ge...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/next-ssg/server-side-after-static-props/output.stderr
@@ -1,6 +1,6 @@ -error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps - --> input.js:2:15 - | -2 | export { a as getServerSideProps } - | ^^^^^^^^^^^^^^^^^^ + x You can not use getStaticProps or getStaticPaths with getServerSid...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/next-ssg/static-paths-after-server-side/output.stderr
@@ -1,6 +1,6 @@ -error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps - --> input.js:2:10 - | -2 | export { getStaticPaths } from 'a' - | ^^^^^^^^^^^^^^ + x You can not use getStaticProps or getStaticPaths with getServerSideProps. To...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/next-ssg/static-props-after-server-side/output.stderr
@@ -1,6 +1,6 @@ -error: You can not use getStaticProps or getStaticPaths with getServerSideProps. To use SSG, please remove getServerSideProps - --> input.js:1:26 - | -1 | export { getStaticProps, getServerSideProps } - | ^^^^^^^^^^^^^^^^^^ + x You can not use getStaticProps or getStaticPa...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/re-export-all-in-page/re-export-all/output.stderr
@@ -1,7 +1,7 @@ -error: Using `export * from '...'` in a page is disallowed. Please use `export { default } from '...'` instead. -Read more: https://nextjs.org/docs/messages/export-all-in-page - --> input.js:1:1 - | -1 | export * from './other-page' - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + x Using `export * from '...'` ...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/re-export-all-in-page/re-export-default/output.js
@@ -1 +1 @@ -export { default, getStaticProps, getStaticPaths } from "./other-page"; +export { default, getStaticProps, getStaticPaths } from './other-page';
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/styled-jsx/no-child/output.stderr
@@ -1,8 +1,7 @@ -error: Expected one child under JSX style tag, but got 0. -Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children - --> input.js:3:5 - | -3 | / <style jsx> -4 | | </style> - | |____________^ + x Expected one child under JSX style tag, but got 0. + | Read more: https://nex...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/styled-jsx/ts-with-css-resolve/output.stderr
@@ -1,2 +1,2 @@ -error: /some-project/src/some-file.ts uses `css.resolve`, but ends with `.ts`. The file extension needs to be `.tsx` so that the jsx injected by `css.resolve` will be transformed. + x /some-project/src/some-file.ts uses `css.resolve`, but ends with `.ts`. The file extension needs to be `.tsx` so tha...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/styled-jsx/two-children/output.stderr
@@ -1,10 +1,9 @@ -error: Expected one child under JSX style tag, but got 2. -Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children - --> input.js:3:5 - | -3 | / <style jsx> -4 | | {`.p {}`} -5 | | {`.p {}`} -6 | | </style> - | |____________^ + x Expected one child under JSX st...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/styled-jsx/wrong-child-type/output.stderr
@@ -1,9 +1,8 @@ -error: Expected a single child of type JSXExpressionContainer under JSX Style tag. -Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children - --> input.js:3:5 - | -3 | / <style jsx> -4 | | 10 -5 | | </style> - | |____________^ + x Expected a single child of type JSXEx...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/errors/styled-jsx/wrong-jsx-expression-type/output.stderr
@@ -1,9 +1,8 @@ -error: Expected a template literal, string or identifier inside the JSXExpressionContainer. -Read more: https://nextjs.org/docs/messages/invalid-styled-jsx-children - --> input.js:3:5 - | -3 | / <style jsx> -4 | | {[]} -5 | | </style> - | |____________^ + x Expected a template litera...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/emotion/compress/output.ts
@@ -1,7 +1,7 @@ -import { css } from "@emotion/react"; -import styled from "@emotion/styled"; -const unitNormal = "1rem"; -const unitLarge = "2rem"; +import { css } from '@emotion/react'; +import styled from '@emotion/styled'; +const unitNormal = '1rem'; +const unitLarge = '2rem'; const Example = /*#__PURE__*/ styled(...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/emotion/css-in-callback/output.ts
@@ -1,34 +1,34 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime"; -import { css, Global } from "@emotion/react"; -import styled from "@emotion/styled"; -import { PureComponent } from "react"; -import ReactDOM from "react-dom"; +import { css, Global } from '@emotion/react'; +import styled from '@emotion...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/emotion/namespace-import/output.ts
@@ -1,16 +1,16 @@ import { jsx as _jsx } from "react/jsx-runtime"; -import * as emotionReact from "@emotion/react"; -import { PureComponent } from "react"; -import ReactDOM from "react-dom"; +import * as emotionReact from '@emotion/react'; +import { PureComponent } from 'react'; +import ReactDOM from 'react-dom'; con...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/modularize-imports/regex/output.js
@@ -1,4 +1,4 @@ -import MyModule from 'my-library/MyModule'; -import App from 'my-library/components/App'; -import Header from 'my-library/components/App/Header'; -import Footer from 'my-library/components/App/Footer'; +import MyModule from "my-library/MyModule"; +import App from "my-library/components/App"; +import He...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/modularize-imports/simple/output.js
@@ -1,5 +1,5 @@ import Grid from "react-bootstrap/lib/Grid"; import Row from "react-bootstrap/lib/Row"; import Col1 from "react-bootstrap/lib/Col"; -import { MyModule } from 'my-library-2/myModule'; -import { Widget } from 'my-library-2/widget'; +import { MyModule } from "my-library-2/myModule"; +import { Widget } f...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/duplicated-imports/output-dev.js
@@ -1,12 +1,18 @@ -import dynamic1 from 'next/dynamic' -import dynamic2 from 'next/dynamic' -const DynamicComponent1 = dynamic1(() => import('../components/hello1'), { - loadableGenerated: { - modules: ['some-file.js -> ' + '../components/hello1'], - }, -}) -const DynamicComponent2 = dynamic2(() => import('../comp...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/duplicated-imports/output-prod.js
@@ -1,12 +1,18 @@ -import dynamic1 from 'next/dynamic' -import dynamic2 from 'next/dynamic' -const DynamicComponent1 = dynamic1(() => import('../components/hello1'), { - loadableGenerated: { - webpack: () => [require.resolveWeak('../components/hello1')], - }, -}) -const DynamicComponent2 = dynamic2(() => import('....
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/duplicated-imports/output-server.js
@@ -1,12 +1,18 @@ -import dynamic1 from 'next/dynamic' -import dynamic2 from 'next/dynamic' -const DynamicComponent1 = dynamic1(() => import('../components/hello1'), { - loadableGenerated: { - modules: ['some-file.js -> ' + '../components/hello1'], - }, -}) -const DynamicComponent2 = dynamic2(() => import('../comp...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/member-with-same-name/output-dev.js
@@ -1,8 +1,11 @@ -import dynamic from 'next/dynamic' -import somethingElse from 'something-else' -const DynamicComponent = dynamic(() => import('../components/hello'), { - loadableGenerated: { - modules: ['some-file.js -> ' + '../components/hello'], - }, -}) -somethingElse.dynamic('should not be transformed') +imp...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/member-with-same-name/output-prod.js
@@ -1,8 +1,11 @@ -import dynamic from 'next/dynamic' -import somethingElse from 'something-else' -const DynamicComponent = dynamic(() => import('../components/hello'), { - loadableGenerated: { - webpack: () => [require.resolveWeak('../components/hello')], - }, -}) -somethingElse.dynamic('should not be transformed'...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/member-with-same-name/output-server.js
@@ -1,8 +1,11 @@ -import dynamic from 'next/dynamic' -import somethingElse from 'something-else' -const DynamicComponent = dynamic(() => import('../components/hello'), { - loadableGenerated: { - modules: ['some-file.js -> ' + '../components/hello'], - }, -}) -somethingElse.dynamic('should not be transformed') +imp...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/no-options/output-dev.js
@@ -1,6 +1,9 @@ -import dynamic from 'next/dynamic' -const DynamicComponent = dynamic(() => import('../components/hello'), { - loadableGenerated: { - modules: ['some-file.js -> ' + '../components/hello'], - }, -}) +import dynamic from 'next/dynamic'; +const DynamicComponent = dynamic(()=>import('../components/hell...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/no-options/output-prod.js
@@ -1,6 +1,9 @@ -import dynamic from 'next/dynamic' -const DynamicComponent = dynamic(() => import('../components/hello'), { - loadableGenerated: { - webpack: () => [require.resolveWeak('../components/hello')], - }, -}) +import dynamic from 'next/dynamic'; +const DynamicComponent = dynamic(()=>import('../component...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/no-options/output-server.js
@@ -1,6 +1,9 @@ -import dynamic from 'next/dynamic' -const DynamicComponent = dynamic(() => import('../components/hello'), { - loadableGenerated: { - modules: ['some-file.js -> ' + '../components/hello'], - }, -}) +import dynamic from 'next/dynamic'; +const DynamicComponent = dynamic(()=>import('../components/hell...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/with-options/output-dev.js
@@ -1,5 +1,5 @@ -import dynamic from "next/dynamic"; -const DynamicComponentWithCustomLoading = dynamic(()=>import("../components/hello") +import dynamic from 'next/dynamic'; +const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello') , { loadableGenerated: { modules: [ @@ -8,12 ...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/with-options/output-prod.js
@@ -1,5 +1,5 @@ -import dynamic from "next/dynamic"; -const DynamicComponentWithCustomLoading = dynamic(()=>import("../components/hello") +import dynamic from 'next/dynamic'; +const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello') , { loadableGenerated: { webpack: ()=>[ @@ -8...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/with-options/output-server.js
@@ -1,16 +1,18 @@ -import dynamic from 'next/dynamic' -const DynamicComponentWithCustomLoading = dynamic( - () => import('../components/hello'), - { +import dynamic from 'next/dynamic'; +const DynamicComponentWithCustomLoading = dynamic(()=>import('../components/hello') +, { loadableGenerated: { - modules: ...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/wrapped-import/output-dev.js
@@ -1,5 +1,5 @@ -import dynamic from "next/dynamic"; -const DynamicComponent = dynamic(()=>handleImport(import("./components/hello")) +import dynamic from 'next/dynamic'; +const DynamicComponent = dynamic(()=>handleImport(import('./components/hello')) , { loadableGenerated: { modules: [ @@ -9,4 +9,4 @@ c...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/wrapped-import/output-prod.js
@@ -1,5 +1,5 @@ -import dynamic from "next/dynamic"; -const DynamicComponent = dynamic(()=>handleImport(import("./components/hello")) +import dynamic from 'next/dynamic'; +const DynamicComponent = dynamic(()=>handleImport(import('./components/hello')) , { loadableGenerated: { webpack: ()=>[ @@ -9,4 +9,4 ...
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/next-dynamic/wrapped-import/output-server.js
@@ -1,4 +1,4 @@ -import dynamic from "next/dynamic"; +import dynamic from 'next/dynamic'; const DynamicComponent = dynamic(null, { loadableGenerated: { modules: [ @@ -8,4 +8,4 @@ const DynamicComponent = dynamic(null, { loading: ()=>null , ssr: false -}); \ No newline at end of file +});
true
Other
vercel
next.js
fdfa3c7baef221e637edd76c8b13aa1950d26a1f.json
feat(next-swc): Update swc crates (#35395) * Update crates * fixup * fix type * Update test refs * Update css crates * Update test refs * Update test refs * Update test refs * SourceMap * Fix? * Update crates * Fix * Update test refs * Update test refs * Update error reporter ...
packages/next-swc/crates/core/tests/fixture/page-config/amp-hybrid/output.js
@@ -1,7 +1,7 @@ export const config = { - amp: "hybrid" + amp: 'hybrid' }; function About(props) { - return <h3 >My AMP About Page!</h3>; + return <h3 >My AMP About Page!</h3>; } -export default About; \ No newline at end of file +export default About;
true