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
e3776989bf26e9a236c6156c8078ab36ad8412ac.json
Remove anonymous default export rule from Babel (#32763) We didn't port this plugin to next-swc given that the eslint setup warns for this automatically. Given that we still get issues opened for this particular warning coming from the plugin it'd be good to remove it. ## Bug - [ ] Related issues linked using `fix...
test/integration/no-anon-default-export/pages/both.js
@@ -1,4 +0,0 @@ -import Child from '../components/Child' -export default function () { - return <Child /> -}
true
Other
vercel
next.js
e3776989bf26e9a236c6156c8078ab36ad8412ac.json
Remove anonymous default export rule from Babel (#32763) We didn't port this plugin to next-swc given that the eslint setup warns for this automatically. Given that we still get issues opened for this particular warning coming from the plugin it'd be good to remove it. ## Bug - [ ] Related issues linked using `fix...
test/integration/no-anon-default-export/pages/child.js
@@ -1,4 +0,0 @@ -import Child from '../components/Child' -export default function A() { - return <Child /> -}
true
Other
vercel
next.js
e3776989bf26e9a236c6156c8078ab36ad8412ac.json
Remove anonymous default export rule from Babel (#32763) We didn't port this plugin to next-swc given that the eslint setup warns for this automatically. Given that we still get issues opened for this particular warning coming from the plugin it'd be good to remove it. ## Bug - [ ] Related issues linked using `fix...
test/integration/no-anon-default-export/pages/page.js
@@ -1,3 +0,0 @@ -export default function () { - return <div /> -}
true
Other
vercel
next.js
e3776989bf26e9a236c6156c8078ab36ad8412ac.json
Remove anonymous default export rule from Babel (#32763) We didn't port this plugin to next-swc given that the eslint setup warns for this automatically. Given that we still get issues opened for this particular warning coming from the plugin it'd be good to remove it. ## Bug - [ ] Related issues linked using `fix...
test/integration/no-anon-default-export/test/index.test.js
@@ -1,105 +0,0 @@ -/* eslint-env jest */ - -import fs from 'fs-extra' -import { check, findPort, killApp, launchApp } from 'next-test-utils' -import webdriver from 'next-webdriver' -import { join } from 'path' - -const appDir = join(__dirname, '../') - -describe('no anonymous default export warning', () => { - functio...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
docs/testing.md
@@ -262,10 +262,10 @@ npx create-next-app@latest --example with-jest with-jest-app Since the release of [Next.js 12](https://nextjs.org/blog/next-12), Next.js now has built-in configuration for Jest. -To set up Jest, install `jest` , `@testing-library/react`, `@testing-library/jest-dom` and `react-test-renderer`: ...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/README.md
@@ -2,7 +2,7 @@ This example shows how to configure Jest to work with Next.js and Babel. Since the release of Next.js 12, Next.js has in-built configuration for Jest with SWC. See the [with-jest](https://github.com/vercel/next.js/tree/canary/examples/with-jest) example for the latest implementation. -This includes...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/__mocks__/fileMock.js
@@ -1 +1,3 @@ +// Read more at "Handling stylesheets and image imports" on https://nextjs.org/docs/testing + module.exports = 'test-file-stub'
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/__mocks__/styleMock.js
@@ -1,4 +1,5 @@ // Mock CSS files. // If you're using CSS modules, this file can be deleted. +// Read more at "Handling stylesheets and image imports" on https://nextjs.org/docs/testing module.exports = {}
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/__tests__/__snapshots__/snapshot.js.snap
@@ -1,206 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`renders homepage unchanged 1`] = ` -<div - className="container" -> - <main> - <h1 - className="title" - > - Welcome to - <a - href="https://nextjs.org" - > - Next.js! - </a> - </h1> - <p - ...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/__tests__/__snapshots__/snapshot.tsx.snap
@@ -0,0 +1,116 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders homepage unchanged 1`] = ` +<div> + <div + class="container" + > + <main> + <h1 + class="title" + > + Welcome to + <a + href="https://nextjs.org" + > + Next.js! + </a...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/__tests__/index.test.tsx
@@ -1,10 +1,5 @@ -/** - * @jest-environment jsdom - */ - -import React from 'react' import { render, screen } from '@testing-library/react' -import Home from '../pages/index' +import Home from '@/pages/index' describe('Home', () => { it('renders a heading', () => {
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/__tests__/snapshot.js
@@ -1,8 +0,0 @@ -import React from 'react' -import renderer from 'react-test-renderer' -import Index from '../pages/index' - -it('renders homepage unchanged', () => { - const tree = renderer.create(<Index />).toJSON() - expect(tree).toMatchSnapshot() -})
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/__tests__/snapshot.tsx
@@ -0,0 +1,7 @@ +import { render } from '@testing-library/react' +import Home from '@/pages/index' + +it('renders homepage unchanged', () => { + const { container } = render(<Home />) + expect(container).toMatchSnapshot() +})
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/jest.config.js
@@ -20,6 +20,8 @@ module.exports = { // Handle module aliases '^@/components/(.*)$': '<rootDir>/components/$1', + + '^@/pages/(.*)$': '<rootDir>/pages/$1', }, setupFilesAfterEnv: ['<rootDir>/jest.setup.js'], testPathIgnorePatterns: ['<rootDir>/node_modules/', '<rootDir>/.next/'], @@ -32,4 +34,5 ...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/jsconfig.json
@@ -1,8 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@/components/*": ["components/*"] - } - } -}
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/next-env.d.ts
@@ -0,0 +1,5 @@ +/// <reference types="next" /> +/// <reference types="next/image-types/global" /> + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information.
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/package.json
@@ -14,15 +14,16 @@ "react-dom": "^17.0.2" }, "devDependencies": { - "@testing-library/jest-dom": "5.14.1", - "@testing-library/react": "12.0.0", - "@testing-library/user-event": "13.2.1", - "babel-jest": "27.0.6", - "eslint": "7.32.0", + "@testing-library/jest-dom": "5.16.1", + "@testin...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/pages/_app.js
@@ -1,6 +0,0 @@ -import '../styles/global.css' - -// This default export is required in a new `pages/_app.js` file. -export default function MyApp({ Component, pageProps }) { - return <Component {...pageProps} /> -}
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/pages/_app.tsx
@@ -0,0 +1,6 @@ +import '@/styles/global.css' +import type { AppProps } from 'next/app' + +export default function MyApp({ Component, pageProps }: AppProps) { + return <Component {...pageProps} /> +}
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/pages/index.js
@@ -1,62 +0,0 @@ -import Head from 'next/head' -import styles from './index.module.css' -import Image from 'next/image' - -const Home = () => ( - <div className={styles.container}> - <Head> - <title>Create Next App</title> - <link rel="icon" href="/favicon.ico" /> - </Head> - - <main> - <h1 cla...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/pages/index.tsx
@@ -0,0 +1,65 @@ +import Head from 'next/head' +import Image from 'next/image' + +import styles from '@/pages/index.module.css' + +export default function Home() { + return ( + <div className={styles.container}> + <Head> + <title>Create Next App</title> + <link rel="icon" href="/favicon.ico" /> +...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/tsconfig.json
@@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleRe...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest-babel/types.d.ts
@@ -0,0 +1,6 @@ +declare module '*module.css' { + const styles: { + [className: string]: string + } + export default styles +}
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/README.md
@@ -2,7 +2,7 @@ This example shows how to configure Jest to work with Next.js. -This includes Next.js' built-in support for Global CSS and CSS Modules. +This includes Next.js' built-in support for Global CSS, CSS Modules and TypeScript. ## How to Use
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/__tests__/__snapshots__/snapshot.js.snap
@@ -1,206 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`renders homepage unchanged 1`] = ` -<div - className="container" -> - <main> - <h1 - className="title" - > - Welcome to - <a - href="https://nextjs.org" - > - Next.js! - </a> - </h1> - <p - ...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/__tests__/__snapshots__/snapshot.tsx.snap
@@ -0,0 +1,116 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`renders homepage unchanged 1`] = ` +<div> + <div + class="container" + > + <main> + <h1 + class="title" + > + Welcome to + <a + href="https://nextjs.org" + > + Next.js! + </a...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/__tests__/index.test.tsx
@@ -1,10 +1,5 @@ -/** - * @jest-environment jsdom - */ - -import React from 'react' import { render, screen } from '@testing-library/react' -import Home from '../pages/index' +import Home from '@/pages/index' describe('Home', () => { it('renders a heading', () => {
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/__tests__/snapshot.js
@@ -1,8 +0,0 @@ -import React from 'react' -import renderer from 'react-test-renderer' -import Index from '../pages/index' - -it('renders homepage unchanged', () => { - const tree = renderer.create(<Index />).toJSON() - expect(tree).toMatchSnapshot() -})
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/__tests__/snapshot.tsx
@@ -0,0 +1,7 @@ +import { render } from '@testing-library/react' +import Home from '@/pages/index' + +it('renders homepage unchanged', () => { + const { container } = render(<Home />) + expect(container).toMatchSnapshot() +})
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/jest.config.js
@@ -11,7 +11,10 @@ const customJestConfig = { moduleNameMapper: { // Handle module aliases (this will be automatically configured for you soon) '^@/components/(.*)$': '<rootDir>/components/$1', + + '^@/pages/(.*)$': '<rootDir>/pages/$1', }, + testEnvironment: 'jest-environment-jsdom', } // creat...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/jsconfig.json
@@ -1,8 +0,0 @@ -{ - "compilerOptions": { - "baseUrl": ".", - "paths": { - "@/components/*": ["components/*"] - } - } -}
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/next-env.d.ts
@@ -0,0 +1,5 @@ +/// <reference types="next" /> +/// <reference types="next/image-types/global" /> + +// NOTE: This file should not be edited +// see https://nextjs.org/docs/basic-features/typescript for more information.
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/package.json
@@ -14,14 +14,13 @@ "react-dom": "^17.0.2" }, "devDependencies": { - "@testing-library/jest-dom": "5.14.1", - "@testing-library/react": "12.0.0", - "@testing-library/user-event": "13.2.1", - "babel-jest": "27.0.6", - "eslint": "7.32.0", + "@testing-library/jest-dom": "5.16.1", + "@testin...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/pages/_app.js
@@ -1,6 +0,0 @@ -import '../styles/global.css' - -// This default export is required in a new `pages/_app.js` file. -export default function MyApp({ Component, pageProps }) { - return <Component {...pageProps} /> -}
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/pages/_app.tsx
@@ -0,0 +1,6 @@ +import '@/styles/global.css' +import type { AppProps } from 'next/app' + +export default function MyApp({ Component, pageProps }: AppProps) { + return <Component {...pageProps} /> +}
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/pages/index.js
@@ -1,62 +0,0 @@ -import Head from 'next/head' -import Image from 'next/image' -import styles from './index.module.css' - -const Home = () => ( - <div className={styles.container}> - <Head> - <title>Create Next App</title> - <link rel="icon" href="/favicon.ico" /> - </Head> - - <main> - <h1 cla...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/pages/index.tsx
@@ -0,0 +1,65 @@ +import Head from 'next/head' +import Image from 'next/image' + +import styles from '@/pages/index.module.css' + +export default function Home() { + return ( + <div className={styles.container}> + <Head> + <title>Create Next App</title> + <link rel="icon" href="/favicon.ico" /> +...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/tsconfig.json
@@ -0,0 +1,26 @@ +{ + "compilerOptions": { + "target": "es5", + "lib": ["dom", "dom.iterable", "esnext"], + "allowJs": true, + "skipLibCheck": true, + "strict": true, + "forceConsistentCasingInFileNames": true, + "noEmit": true, + "esModuleInterop": true, + "module": "esnext", + "moduleRe...
true
Other
vercel
next.js
48dba6457d842dab446ac48a37dc84a70644a5bc.json
chore: convert Jest examples to TypeScript (#32705) * chore: convert Jest examples to TypeScript * test: use absolute imports in test files * chore: address review comments * fix: add pages to tsconfig.json paths * fix: add styles to tsconfig.json paths * chore: upgrade dependencies/snapshots * docs:...
examples/with-jest/types.d.ts
@@ -0,0 +1,6 @@ +declare module '*module.css' { + const styles: { + [className: string]: string + } + export default styles +}
true
Other
vercel
next.js
0eba5b2558abc0a7a63006efcf74ae5f7571a690.json
web runtime: add AbortController & AbortSignal (#32089) It adds AbortController and AbortSignal Web runtimes APIs to be used by the user at Edge Functions. For doing that it delegates into `abort-controller` dependency that has been frozen to prevent any modification. Co-authored-by: Zhang Zhi <20026577+fytriht@use...
docs/api-reference/edge-runtime.md
@@ -82,10 +82,6 @@ The following JavaScript language features are disabled, and **will not work:** - [`eval`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/eval): Evaluates JavaScript code represented as a string - [`new Function(evalString)`](https://developer.mozilla.org/en-US/doc...
true
Other
vercel
next.js
0eba5b2558abc0a7a63006efcf74ae5f7571a690.json
web runtime: add AbortController & AbortSignal (#32089) It adds AbortController and AbortSignal Web runtimes APIs to be used by the user at Edge Functions. For doing that it delegates into `abort-controller` dependency that has been frozen to prevent any modification. Co-authored-by: Zhang Zhi <20026577+fytriht@use...
packages/next/compiled/abort-controller/LICENSE
@@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2017 Toru Nagashima + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, m...
true
Other
vercel
next.js
0eba5b2558abc0a7a63006efcf74ae5f7571a690.json
web runtime: add AbortController & AbortSignal (#32089) It adds AbortController and AbortSignal Web runtimes APIs to be used by the user at Edge Functions. For doing that it delegates into `abort-controller` dependency that has been frozen to prevent any modification. Co-authored-by: Zhang Zhi <20026577+fytriht@use...
packages/next/compiled/abort-controller/abort-controller.js
@@ -0,0 +1 @@ +(()=>{"use strict";var e={27:(e,t,n)=>{Object.defineProperty(t,"__esModule",{value:true});var r=n(369);class AbortSignal extends r.EventTarget{constructor(){super();throw new TypeError("AbortSignal cannot be constructed directly")}get aborted(){const e=o.get(this);if(typeof e!=="boolean"){throw new TypeE...
true
Other
vercel
next.js
0eba5b2558abc0a7a63006efcf74ae5f7571a690.json
web runtime: add AbortController & AbortSignal (#32089) It adds AbortController and AbortSignal Web runtimes APIs to be used by the user at Edge Functions. For doing that it delegates into `abort-controller` dependency that has been frozen to prevent any modification. Co-authored-by: Zhang Zhi <20026577+fytriht@use...
packages/next/compiled/abort-controller/package.json
@@ -0,0 +1 @@ +{"name":"abort-controller","main":"abort-controller.js","author":"Toru Nagashima (https://github.com/mysticatea)","license":"MIT"}
true
Other
vercel
next.js
0eba5b2558abc0a7a63006efcf74ae5f7571a690.json
web runtime: add AbortController & AbortSignal (#32089) It adds AbortController and AbortSignal Web runtimes APIs to be used by the user at Edge Functions. For doing that it delegates into `abort-controller` dependency that has been frozen to prevent any modification. Co-authored-by: Zhang Zhi <20026577+fytriht@use...
packages/next/server/web/sandbox/context.ts
@@ -5,6 +5,10 @@ import { requireDependencies } from './require' import { TransformStream } from 'next/dist/compiled/web-streams-polyfill' import cookie from 'next/dist/compiled/cookie' import * as polyfills from './polyfills' +import { + AbortController, + AbortSignal, +} from 'next/dist/compiled/abort-controller...
true
Other
vercel
next.js
0eba5b2558abc0a7a63006efcf74ae5f7571a690.json
web runtime: add AbortController & AbortSignal (#32089) It adds AbortController and AbortSignal Web runtimes APIs to be used by the user at Edge Functions. For doing that it delegates into `abort-controller` dependency that has been frozen to prevent any modification. Co-authored-by: Zhang Zhi <20026577+fytriht@use...
packages/next/taskfile.js
@@ -1331,6 +1331,16 @@ export async function ncc_web_streams_polyfill(task, opts) { .target('compiled/web-streams-polyfill') } // eslint-disable-next-line camelcase +externals['abort-controller'] = 'next/dist/compiled/abort-controller' +export async function ncc_abort_controller(task, opts) { + await task + ...
true
Other
vercel
next.js
0eba5b2558abc0a7a63006efcf74ae5f7571a690.json
web runtime: add AbortController & AbortSignal (#32089) It adds AbortController and AbortSignal Web runtimes APIs to be used by the user at Edge Functions. For doing that it delegates into `abort-controller` dependency that has been frozen to prevent any modification. Co-authored-by: Zhang Zhi <20026577+fytriht@use...
packages/next/types/misc.d.ts
@@ -244,6 +244,12 @@ declare module 'next/dist/compiled/web-streams-polyfill' { import m from 'web-streams-polyfill/ponyfill' export = m } +declare module 'next/dist/compiled/abort-controller' { + type BaseAbortController = typeof AbortController + type BaseAbortSignal = typeof AbortSignal + export { BaseAbor...
true
Other
vercel
next.js
0eba5b2558abc0a7a63006efcf74ae5f7571a690.json
web runtime: add AbortController & AbortSignal (#32089) It adds AbortController and AbortSignal Web runtimes APIs to be used by the user at Edge Functions. For doing that it delegates into `abort-controller` dependency that has been frozen to prevent any modification. Co-authored-by: Zhang Zhi <20026577+fytriht@use...
test/integration/middleware/core/pages/interface/_middleware.js
@@ -57,6 +57,29 @@ export async function middleware(request) { return fetch(url) } + if (url.pathname.endsWith('/abort-controller')) { + const controller = new AbortController() + const signal = controller.signal + + controller.abort() + const response = {} + + try { + await fetch('https:...
true
Other
vercel
next.js
0eba5b2558abc0a7a63006efcf74ae5f7571a690.json
web runtime: add AbortController & AbortSignal (#32089) It adds AbortController and AbortSignal Web runtimes APIs to be used by the user at Edge Functions. For doing that it delegates into `abort-controller` dependency that has been frozen to prevent any modification. Co-authored-by: Zhang Zhi <20026577+fytriht@use...
test/integration/middleware/core/test/index.test.js
@@ -405,6 +405,18 @@ function interfaceTests(locale = '') { expect(response.error.name).not.toBe('TypeError') }) + it(`${locale} abort a fetch request`, async () => { + const res = await fetchViaHTTP( + context.appPort, + '/interface/abort-controller' + ) + const response = await res.json(...
true
Other
vercel
next.js
b3b92b610f12051159758179733acbcad3d57239.json
Upgrade react 18 to rc, drop prerelease warning (#32619) ### Enhancement * Auto enable reactRoot API for react 18 since the legacy render in `react-dom` is dropped * Remove prelrease warning
package.json
@@ -137,9 +137,9 @@ "pretty-ms": "7.0.0", "random-seed": "0.3.0", "react": "17.0.2", - "react-18": "npm:react@18.0.0-beta-0cc724c77-20211125", + "react-18": "npm:react@18.0.0-rc.0", "react-dom": "17.0.2", - "react-dom-18": "npm:react-dom@18.0.0-beta-0cc724c77-20211125", + "react-dom-18":...
true
Other
vercel
next.js
b3b92b610f12051159758179733acbcad3d57239.json
Upgrade react 18 to rc, drop prerelease warning (#32619) ### Enhancement * Auto enable reactRoot API for react 18 since the legacy render in `react-dom` is dropped * Remove prelrease warning
packages/next/build/webpack-config.ts
@@ -346,13 +346,15 @@ export default async function getBaseWebpackConfig( Boolean(reactDomVersion) && (semver.gte(reactDomVersion!, '18.0.0') || semver.coerce(reactDomVersion)?.version === '18.0.0') - const hasReactPrerelease = - (Boolean(reactDomVersion) && semver.prerelease(reactDomVersion!) != n...
true
Other
vercel
next.js
b3b92b610f12051159758179733acbcad3d57239.json
Upgrade react 18 to rc, drop prerelease warning (#32619) ### Enhancement * Auto enable reactRoot API for react 18 since the legacy render in `react-dom` is dropped * Remove prelrease warning
test/integration/react-18/test/index.test.js
@@ -24,8 +24,6 @@ const nextConfig = new File(join(appDir, 'next.config.js')) const dynamicHello = new File(join(appDir, 'components/dynamic-hello.js')) const unwrappedPage = new File(join(appDir, 'pages/suspense/unwrapped.js')) -const UNSUPPORTED_PRERELEASE = - "You are using an unsupported prerelease of 'react-d...
true
Other
vercel
next.js
b3b92b610f12051159758179733acbcad3d57239.json
Upgrade react 18 to rc, drop prerelease warning (#32619) ### Enhancement * Auto enable reactRoot API for react 18 since the legacy render in `react-dom` is dropped * Remove prelrease warning
yarn.lock
@@ -16482,22 +16482,22 @@ rc@^1.0.1, rc@^1.1.6, rc@^1.2.7, rc@^1.2.8: minimist "^1.2.0" strip-json-comments "~2.0.1" -"react-18@npm:react@18.0.0-beta-0cc724c77-20211125": - version "18.0.0-beta-0cc724c77-20211125" - resolved "https://registry.yarnpkg.com/react/-/react-18.0.0-beta-0cc724c77-20211125.tgz#e0...
true
Other
vercel
next.js
26efcc5ded3485b996a3652407924c157112ee07.json
Fix missing interpolation on next/head exports (#36435) fixes https://github.com/vercel/next.js/issues/36183 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature reques...
packages/next/head.js
@@ -1 +1,3 @@ -module.exports = require('./dist/shared/lib/head') +var head = require('./dist/shared/lib/head') +Object.assign(head.default, head) +module.exports = head.default
true
Other
vercel
next.js
26efcc5ded3485b996a3652407924c157112ee07.json
Fix missing interpolation on next/head exports (#36435) fixes https://github.com/vercel/next.js/issues/36183 ## Bug - [x] Related issues linked using `fixes #number` - [x] Integration tests added - [ ] Errors have helpful link attached, see `contributing.md` ## Feature - [ ] Implements an existing feature reques...
test/e2e/type-module-interop/index.test.ts
@@ -12,10 +12,23 @@ describe('Type module interop', () => { files: { 'pages/index.js': ` import Link from 'next/link' + import Head from 'next/head' + import Script from 'next/script' export default function Page() { return ( <> + ...
true
Other
vercel
next.js
ec4f96c97493564630128df9986958421c79cdad.json
Simplify the App and Component handling in render (#36395) Make the render procedure of `App` and `Component` more explict and clear
packages/next/pages/_error.tsx
@@ -41,16 +41,13 @@ export default class Error<P = {}> extends React.Component<P & ErrorProps> { return ( <div style={styles.error}> - {/* TODO: remove this once RSC supports next/head */} - {!process.env.__NEXT_RSC && ( - <Head> - <title> - {statusCode - ...
true
Other
vercel
next.js
ec4f96c97493564630128df9986958421c79cdad.json
Simplify the App and Component handling in render (#36395) Make the render procedure of `App` and `Component` more explict and clear
packages/next/server/base-server.ts
@@ -18,7 +18,7 @@ import type { PagesManifest } from '../build/webpack/plugins/pages-manifest-plug import type { BaseNextRequest, BaseNextResponse } from './base-http' import type { PayloadOptions } from './send-payload' -import { join, resolve } from 'path' +import pathMod from '../shared/lib/isomorphic/path' imp...
true
Other
vercel
next.js
ec4f96c97493564630128df9986958421c79cdad.json
Simplify the App and Component handling in render (#36395) Make the render procedure of `App` and `Component` more explict and clear
packages/next/server/render.tsx
@@ -196,20 +196,19 @@ function enhanceComponents( } } -function renderFlight(AppMod: any, ComponentMod: any, props: any) { - const isServerComponent = !!ComponentMod.__next_rsc__ - const App = interopDefault(AppMod) - const Component = interopDefault(ComponentMod) - const AppServer = isServerComponent - ? ...
true
Other
vercel
next.js
60488e68e323ce7ca1b2eee74ea560f486d34e68.json
Fix broken data fetching links in docs (#33766) * Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: ...
docs/basic-features/eslint.md
@@ -80,24 +80,24 @@ This will take precedence over the configuration from `next.config.js`. Next.js provides an ESLint plugin, [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next), already bundled within the base configuration that makes it possible to catch common issues and problems in a ...
true
Other
vercel
next.js
60488e68e323ce7ca1b2eee74ea560f486d34e68.json
Fix broken data fetching links in docs (#33766) * Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: ...
errors/conflicting-ssg-paths.md
@@ -65,4 +65,4 @@ export default function CatchAll() { ### Useful Links -- [`getStaticPaths` Documentation](https://nextjs.org/docs/api-reference/data-fetching/get-static-paths) +- [`getStaticPaths` Documentation](https://nextjs.org/docs/basic-features/data-fetching/get-static-paths)
true
Other
vercel
next.js
60488e68e323ce7ca1b2eee74ea560f486d34e68.json
Fix broken data fetching links in docs (#33766) * Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: ...
errors/gsp-redirect-during-prerender.md
@@ -10,4 +10,4 @@ Remove any paths that result in a redirect from being prerendered in `getStaticP ### Useful Links -- [Data Fetching Documentation](/docs/basic-features/data-fetching/get-static-props.md) +- [Data Fetching Documentation](https://nextjs.org/docs/basic-features/data-fetching/get-static-props)
true
Other
vercel
next.js
60488e68e323ce7ca1b2eee74ea560f486d34e68.json
Fix broken data fetching links in docs (#33766) * Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: ...
errors/gssp-export.md
@@ -33,6 +33,6 @@ The `getServerSideProps` lifecycle is not compatible with `next export`, so you' ### Useful Links -- [Automatic Static Optimization](/docs/advanced-features/automatic-static-optimization.md) -- [`getStaticProps` documentation](/docs/basic-features/data-fetching/get-static-props.md) -- [`exportPat...
true
Other
vercel
next.js
60488e68e323ce7ca1b2eee74ea560f486d34e68.json
Fix broken data fetching links in docs (#33766) * Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: ...
errors/gssp-mixed-not-found-redirect.md
@@ -12,5 +12,5 @@ Make sure only `notFound` **or** `redirect` is being returned on your page's `ge ### Useful Links -- [`getStaticProps` Documentation](/docs/basic-features/data-fetching/get-static-props.md) -- [`getServerSideProps` Documentation](/docs/basic-features/data-fetching/get-server-side-props.md) +- [`g...
true
Other
vercel
next.js
60488e68e323ce7ca1b2eee74ea560f486d34e68.json
Fix broken data fetching links in docs (#33766) * Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: ...
errors/gssp-no-mutating-res.md
@@ -16,4 +16,4 @@ If you’re using a custom server and running into this problem due to session m ### Useful Links -- [Data Fetching Docs](https://nextjs.org/docs/basic-features/data-fetching) +- [Data Fetching Docs](https://nextjs.org/docs/basic-features/data-fetching/index)
true
Other
vercel
next.js
60488e68e323ce7ca1b2eee74ea560f486d34e68.json
Fix broken data fetching links in docs (#33766) * Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: ...
errors/invalid-redirect-gssp.md
@@ -29,4 +29,4 @@ export const getStaticProps = ({ params }) => { ### Useful Links -- [Data Fetching Documentation](/docs/basic-features/data-fetching/get-static-props.md) +- [Data Fetching Documentation](https://nextjs.org/docs/basic-features/data-fetching/get-static-props)
true
Other
vercel
next.js
60488e68e323ce7ca1b2eee74ea560f486d34e68.json
Fix broken data fetching links in docs (#33766) * Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: ...
errors/large-page-data.md
@@ -10,4 +10,4 @@ Reduce the amount of data returned from `getStaticProps`, `getServerSideProps`, ### Useful Links -- [Data Fetching Documentation](https://nextjs.org/docs/basic-features/data-fetching) +- [Data Fetching Documentation](https://nextjs.org/docs/basic-features/data-fetching/overview)
true
Other
vercel
next.js
60488e68e323ce7ca1b2eee74ea560f486d34e68.json
Fix broken data fetching links in docs (#33766) * Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: ...
errors/page-data-collection-timeout.md
@@ -15,4 +15,5 @@ When restarted it will retry all uncompleted jobs, but if a job was unsuccessful ### Useful Links -- [`getStaticPaths`](/docs/basic-features/data-fetching/get-static-paths.md) +- [`getStaticPaths`](https://nextjs.org/docs/basic-features/data-fetching/get-static-paths) +- [`getStaticProps`](https:...
true
Other
vercel
next.js
60488e68e323ce7ca1b2eee74ea560f486d34e68.json
Fix broken data fetching links in docs (#33766) * Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: ...
errors/prerender-error.md
@@ -11,4 +11,4 @@ While prerendering a page an error occurred. This can occur for many reasons fro - Set default values for all dynamic pages' props (avoid `undefined`, use `null` instead so it can be serialized) - Check for any out of date modules that you might be relying on - Make sure your component handles `fal...
true
Other
vercel
next.js
60488e68e323ce7ca1b2eee74ea560f486d34e68.json
Fix broken data fetching links in docs (#33766) * Fix broken links for Data Fetching * Fix link data fetching doc * Improve link file paths * Update errors/large-page-data.md Co-authored-by: Steven <steven@ceriously.com> * Update links * Fix linting * Lint tests * Lint tests Co-authored-by: ...
errors/ssg-fallback-true-export.md
@@ -11,4 +11,4 @@ If you would like the `fallback: true` behavior, `next export` should not be use ### Useful Links - [deployment documentation](https://nextjs.org/docs/deployment#vercel-recommended) -- [`fallback: true` documentation](https://nextjs.org/docs/basic-features/data-fetching#fallback-true) +- [`fallbac...
true
Other
vercel
next.js
835aeae1cbdbd0314176e5ae88a43741ba82a757.json
Add telemetry for image config formats (avif/webp) (#36289) This PR adds telemetry for image config formats since AVIF is opt-in (#30180). See docs https://nextjs.org/docs/api-reference/next/image#acceptable-formats
packages/next/telemetry/events/version.ts
@@ -23,6 +23,7 @@ type EventCliSessionStarted = { imageDomainsCount: number | null imageSizes: string | null imageLoader: string | null + imageFormats: string | null trailingSlashEnabled: boolean reactStrictMode: boolean webpackVersion: number | null @@ -66,6 +67,7 @@ export function eventCliSession(...
true
Other
vercel
next.js
835aeae1cbdbd0314176e5ae88a43741ba82a757.json
Add telemetry for image config formats (avif/webp) (#36289) This PR adds telemetry for image config formats since AVIF is opt-in (#30180). See docs https://nextjs.org/docs/api-reference/next/image#acceptable-formats
test/integration/telemetry/next.config.i18n-images
@@ -1,6 +1,7 @@ module.exports = phase => { return { images: { + formats: ['image/avif', 'image/webp'], imageSizes: [64, 128, 256, 512, 1024], domains: ['example.com'], },
true
Other
vercel
next.js
835aeae1cbdbd0314176e5ae88a43741ba82a757.json
Add telemetry for image config formats (avif/webp) (#36289) This PR adds telemetry for image config formats since AVIF is opt-in (#30180). See docs https://nextjs.org/docs/api-reference/next/image#acceptable-formats
test/integration/telemetry/test/index.test.js
@@ -485,6 +485,7 @@ describe('Telemetry CLI', () => { expect(event1).toMatch(/"localeDetectionEnabled": true/) expect(event1).toMatch(/"imageDomainsCount": 1/) expect(event1).toMatch(/"imageSizes": "64,128,256,512,1024"/) + expect(event1).toMatch(/"imageFormats": "image\/avif,image\/webp"/) expec...
true
Other
vercel
next.js
91fd5971d68ec87be8a0f496471053cc699c8962.json
docs: add yoga to examples (#36253) ## Description The Yoga design system follows design guidelines specification, we developed a React and React Native UI library that contains a set of high-quality components that defines our interfaces. - https://github.com/Gympass/yoga - https://gympass.github.io/yoga/ ## Bug...
examples/with-yoga/.gitignore
@@ -0,0 +1,32 @@ +# 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
91fd5971d68ec87be8a0f496471053cc699c8962.json
docs: add yoga to examples (#36253) ## Description The Yoga design system follows design guidelines specification, we developed a React and React Native UI library that contains a set of high-quality components that defines our interfaces. - https://github.com/Gympass/yoga - https://gympass.github.io/yoga/ ## Bug...
examples/with-yoga/README.md
@@ -0,0 +1,23 @@ +# Yoga Design System Example + +This example shows how to use Next.js along with [Yoga Design System](https://gympass.github.io/yoga/). This is intended to show the integration of this UI toolkit with the Framework. + +## Deploy your own + +Deploy the example using [Vercel](https://vercel.com?utm_sour...
true
Other
vercel
next.js
91fd5971d68ec87be8a0f496471053cc699c8962.json
docs: add yoga to examples (#36253) ## Description The Yoga design system follows design guidelines specification, we developed a React and React Native UI library that contains a set of high-quality components that defines our interfaces. - https://github.com/Gympass/yoga - https://gympass.github.io/yoga/ ## Bug...
examples/with-yoga/next.config.js
@@ -0,0 +1,9 @@ +/** @type {import('next').NextConfig} */ +const nextConfig = { + reactStrictMode: true, + compiler: { + styledComponents: true, + }, +} + +module.exports = nextConfig
true
Other
vercel
next.js
91fd5971d68ec87be8a0f496471053cc699c8962.json
docs: add yoga to examples (#36253) ## Description The Yoga design system follows design guidelines specification, we developed a React and React Native UI library that contains a set of high-quality components that defines our interfaces. - https://github.com/Gympass/yoga - https://gympass.github.io/yoga/ ## Bug...
examples/with-yoga/package.json
@@ -0,0 +1,16 @@ +{ + "private": true, + "scripts": { + "dev": "next dev", + "build": "next build", + "start": "next start", + "lint": "next lint" + }, + "dependencies": { + "@gympass/yoga": "^7.28.0", + "next": "latest", + "react": "^17.0.2", + "react-dom": "^17.0.2", + "styled-component...
true
Other
vercel
next.js
91fd5971d68ec87be8a0f496471053cc699c8962.json
docs: add yoga to examples (#36253) ## Description The Yoga design system follows design guidelines specification, we developed a React and React Native UI library that contains a set of high-quality components that defines our interfaces. - https://github.com/Gympass/yoga - https://gympass.github.io/yoga/ ## Bug...
examples/with-yoga/pages/_app.js
@@ -0,0 +1,22 @@ +import { ThemeProvider, FontLoader } from '@gympass/yoga' +import { createGlobalStyle } from 'styled-components' + +const GlobalStyle = createGlobalStyle` + body { + margin: 20px; + padding: 0; + box-sizing: border-box; + } +` + +function MyApp({ Component, pageProps }) { + return ( + <...
true
Other
vercel
next.js
91fd5971d68ec87be8a0f496471053cc699c8962.json
docs: add yoga to examples (#36253) ## Description The Yoga design system follows design guidelines specification, we developed a React and React Native UI library that contains a set of high-quality components that defines our interfaces. - https://github.com/Gympass/yoga - https://gympass.github.io/yoga/ ## Bug...
examples/with-yoga/pages/_document.js
@@ -0,0 +1,30 @@ +import Document from 'next/document' +import { ServerStyleSheet } from 'styled-components' + +export default class MyDocument extends Document { + static async getInitialProps(ctx) { + const sheet = new ServerStyleSheet() + const originalRenderPage = ctx.renderPage + + try { + ctx.rende...
true
Other
vercel
next.js
91fd5971d68ec87be8a0f496471053cc699c8962.json
docs: add yoga to examples (#36253) ## Description The Yoga design system follows design guidelines specification, we developed a React and React Native UI library that contains a set of high-quality components that defines our interfaces. - https://github.com/Gympass/yoga - https://gympass.github.io/yoga/ ## Bug...
examples/with-yoga/pages/index.js
@@ -0,0 +1,11 @@ +import { Box, Text, Button, Divider } from '@gympass/yoga' + +export default function Home() { + return ( + <Box d="flex" flexDirection="column" alignItems="center"> + <Text.H2>@gympass/yoga with Next.js</Text.H2> + <Divider /> + <Button>Yoga Design System</Button> + </Box> + ) ...
true
Other
vercel
next.js
3e8099e6802d46e097ca01eb7a37aa9306a5becd.json
Fix flight loader (#36282) * make sure `left` is defined
packages/next/build/webpack/loaders/next-flight-client-loader.ts
@@ -103,7 +103,7 @@ async function collectExports( } = node // exports.xxx = xxx if ( - left.object && + left?.object && left.type === 'MemberExpression' && left.object.type === 'Identifier' && left.object.value === 'exports'
false
Other
vercel
next.js
90d3478c52d020aaa763dd9777a928f004139f82.json
Use renderToStaticMarkup to render documentHTML (#36213) There wasn't a strong reason to choose `renderToStream` over `renderToStaticMarkup` for the document wrapper. But due to problems like #35870, we can switch back to the static renderer for now. Fixes #35870. ## Bug - [x] Related issues linked using `fixes #nu...
packages/next/server/node-web-streams-helper.ts
@@ -1,3 +1,5 @@ +import { nonNullable } from '../lib/non-nullable' + export function readableStreamTee<T = any>( readable: ReadableStream<T> ): [ReadableStream<T>, ReadableStream<T>] { @@ -172,7 +174,7 @@ export async function continueFromInitialStream({ suffixUnclosed != null ? createPrefixStream(suffixUnclo...
true
Other
vercel
next.js
90d3478c52d020aaa763dd9777a928f004139f82.json
Use renderToStaticMarkup to render documentHTML (#36213) There wasn't a strong reason to choose `renderToStream` over `renderToStaticMarkup` for the document wrapper. But due to problems like #35870, we can switch back to the static renderer for now. Fixes #35870. ## Bug - [x] Related issues linked using `fixes #nu...
packages/next/server/render.tsx
@@ -72,7 +72,6 @@ import { streamToString, chainStreams, createBufferedTransformStream, - renderToStream, renderToInitialStream, continueFromInitialStream, } from './node-web-streams-helper' @@ -1628,17 +1627,7 @@ export async function renderToHTML( </AmpStateContext.Provider> ) - let docume...
true
Other
vercel
next.js
90d3478c52d020aaa763dd9777a928f004139f82.json
Use renderToStaticMarkup to render documentHTML (#36213) There wasn't a strong reason to choose `renderToStream` over `renderToStaticMarkup` for the document wrapper. But due to problems like #35870, we can switch back to the static renderer for now. Fixes #35870. ## Bug - [x] Related issues linked using `fixes #nu...
test/integration/react-streaming-and-server-components/app/pages/index.server.js
@@ -10,6 +10,7 @@ export default function Index({ header }) { <div> <Head> <meta name="rsc-title" content="index" /> + <title>hello, {envVar}</title> </Head> <h1>{`component:index.server`}</h1> <div>{'env:' + envVar}</div>
true
Other
vercel
next.js
90d3478c52d020aaa763dd9777a928f004139f82.json
Use renderToStaticMarkup to render documentHTML (#36213) There wasn't a strong reason to choose `renderToStream` over `renderToStaticMarkup` for the document wrapper. But due to problems like #35870, we can switch back to the static renderer for now. Fixes #35870. ## Bug - [x] Related issues linked using `fixes #nu...
test/integration/react-streaming-and-server-components/test/basic.js
@@ -10,6 +10,11 @@ export default async function basic(context, { env }) { expect(pathNotFoundHTML).toContain('custom-404-page') }) + it('should render title correctly', async () => { + const res = await renderViaHTTP(context.appPort, '/') + expect(res).toContain('<title>hello, env_var_test</title>') +...
true
Other
vercel
next.js
44c7fd79994d4515dd47e3c8ac94cb0e9f670027.json
Add onLoad gotcha note to basic-features doc (#36261) #33097 adds a note to the `Script` documentation explaining that `onLoad` cannot be used with the `beforeInteractive` strategy. However, this note was missing in the [Basic Features](https://nextjs.org/docs/basic-features/script) documentation, causing some confusi...
docs/basic-features/script.md
@@ -256,6 +256,8 @@ export default function Home() { } ``` +> **Note: `onLoad` can't be used with the `beforeInteractive` loading strategy.** + Sometimes it is helpful to catch when a script fails to load. These errors can be handled with the `onError` property: ```jsx
false
Other
vercel
next.js
d895a50abbc8f91726daa2d7ebc22c58f58aabbb.json
rsc: skip next builtin module when apply loaders (#36202) x-ref: https://github.com/vercel/server-components-notes-demo/pull/17 Previously in #35975 we ignore handling node_modules as a workaround for 3rd party packages, but for next buildin components we should still handle them for processing client components
packages/next/build/webpack-config.ts
@@ -1211,9 +1211,6 @@ export default async function getBaseWebpackConfig( ...rscCodeCondition, use: { loader: 'next-flight-server-loader', - options: { - extensions: rawPageExtensions, - }, ...
true
Other
vercel
next.js
d895a50abbc8f91726daa2d7ebc22c58f58aabbb.json
rsc: skip next builtin module when apply loaders (#36202) x-ref: https://github.com/vercel/server-components-notes-demo/pull/17 Previously in #35975 we ignore handling node_modules as a workaround for 3rd party packages, but for next buildin components we should still handle them for processing client components
packages/next/build/webpack/loaders/next-flight-server-loader.ts
@@ -5,9 +5,13 @@ import { buildExports, createClientComponentFilter, createServerComponentFilter, + isNextBuiltinClientComponent, } from './utils' -function createFlightServerRequest(request: string, options: object) { +function createFlightServerRequest( + request: string, + options?: { client: 1 | unde...
true
Other
vercel
next.js
d895a50abbc8f91726daa2d7ebc22c58f58aabbb.json
rsc: skip next builtin module when apply loaders (#36202) x-ref: https://github.com/vercel/server-components-notes-demo/pull/17 Previously in #35975 we ignore handling node_modules as a workaround for 3rd party packages, but for next buildin components we should still handle them for processing client components
packages/next/build/webpack/loaders/utils.ts
@@ -1,4 +1,4 @@ -const defaultJsFileExtensions = ['js', 'mjs', 'jsx', 'ts', 'tsx', 'json'] +export const defaultJsFileExtensions = ['js', 'mjs', 'jsx', 'ts', 'tsx'] const imageExtensions = ['jpg', 'jpeg', 'png', 'webp', 'avif'] const nextClientComponents = ['link', 'image', 'head', 'script'] @@ -24,16 +24,14 @@ exp...
true
Other
vercel
next.js
d895a50abbc8f91726daa2d7ebc22c58f58aabbb.json
rsc: skip next builtin module when apply loaders (#36202) x-ref: https://github.com/vercel/server-components-notes-demo/pull/17 Previously in #35975 we ignore handling node_modules as a workaround for 3rd party packages, but for next buildin components we should still handle them for processing client components
packages/next/build/webpack/plugins/flight-manifest-plugin.ts
@@ -23,6 +23,7 @@ type Options = { const PLUGIN_NAME = 'FlightManifestPlugin' +const isClientComponent = createClientComponentFilter() export class FlightManifestPlugin { dev: boolean = false pageExtensions: string[] @@ -64,7 +65,6 @@ export class FlightManifestPlugin { createAsset(assets: any, compila...
true
Other
vercel
next.js
d895a50abbc8f91726daa2d7ebc22c58f58aabbb.json
rsc: skip next builtin module when apply loaders (#36202) x-ref: https://github.com/vercel/server-components-notes-demo/pull/17 Previously in #35975 we ignore handling node_modules as a workaround for 3rd party packages, but for next buildin components we should still handle them for processing client components
test/production/react-18-streaming-ssr/index.test.ts
@@ -11,7 +11,7 @@ describe('react 18 streaming SSR in minimal mode', () => { next = await createNext({ files: { 'pages/index.server.js': ` - export default function Page() { + export default function Page() { return <p>static streaming</p> } `, @@...
true
Other
vercel
next.js
f73e7d51adad24938522c61c871d18ae0d97e1cd.json
Improve NextApiHandler type for early returns (#35166) I would like to be able to write handlers with early returns like this: ```typescript import { NextApiHandler } from 'next' const handler: NextApiHandler = (req, res) => { const value = getStuff() if (value === 'branch') { return res.json({}) } res....
packages/next/shared/lib/utils.ts
@@ -267,7 +267,7 @@ export type NextApiResponse<T = any> = ServerResponse & { export type NextApiHandler<T = any> = ( req: NextApiRequest, res: NextApiResponse<T> -) => void | Promise<void> +) => unknown | Promise<unknown> /** * Utils
false
Other
vercel
next.js
e69820accc313bbe81659bff5b42a7037f22541e.json
Loosen the "public" condition on getSSP (#36018) <!-- Thanks for opening a PR! Your contribution is much appreciated. In order to make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change that you're making: -- ## Documentat...
docs/basic-features/data-fetching/get-static-props.md
@@ -20,8 +20,8 @@ You should use `getStaticProps` if: - The data required to render the page is available at build time ahead of a user’s request - The data comes from a headless CMS -- The data can be publicly cached (not user-specific) - The page must be pre-rendered (for SEO) and be very fast — `getStaticProps`...
false
Other
vercel
next.js
9f54b56bdea140f6aa474ebf39ed2cd98b3f7c8c.json
examples: update instructions for create-strapi-app (#35288) Not sure how you want to handle this, but the current instructions aren't compatible with the latest version of strapi and migration steps aren't super clear yet. It does work flawlessly with v3 of Strapi though. ## Bug - [ ] Related issues linked using ...
examples/cms-strapi/README.md
@@ -48,8 +48,8 @@ yarn create next-app --example cms-strapi cms-strapi-app Use the provided [Strapi template Next example](https://github.com/strapi/strapi-template-next-example) to run a pre-configured Strapi project locally. See the [Strapi template docs](https://strapi.io/documentation/developer-docs/latest/setup-d...
false
Other
vercel
next.js
84720697e4f00bd77689153f7cf39421be9b1d25.json
Convert server.js to module.exports (#35181) If different contexts (using Jest, using Nx, etc), server.js is getting imported when using middleware and throwing the error: "SyntaxError: Unexpected token 'export'". fixes #32848 ## Bug - [x] Related issues linked using `fixes #number` - [ ] Integration tests added ...
packages/next/server.js
@@ -1,2 +1,6 @@ -export { NextRequest } from 'next/dist/server/web/spec-extension/request' -export { NextResponse } from 'next/dist/server/web/spec-extension/response' +module.exports = { + NextRequest: require('next/dist/server/web/spec-extension/request') + .NextRequest, + NextResponse: require('next/dist/server...
false
Other
vercel
next.js
9bff48b9d5998455c9c038d7f5834a58bb9f429f.json
Adopt react 18 rc2 (#35161) * Adopt react 18 rc2 * execute shouldUseReactRoot only once * update test Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
package.json
@@ -146,9 +146,9 @@ "pretty-ms": "7.0.0", "random-seed": "0.3.0", "react": "17.0.2", - "react-18": "npm:react@18.0.0-rc.1", + "react-18": "npm:react@18.0.0-rc.2", "react-dom": "17.0.2", - "react-dom-18": "npm:react-dom@18.0.0-rc.1", + "react-dom-18": "npm:react-dom@18.0.0-rc.2", "re...
true
Other
vercel
next.js
9bff48b9d5998455c9c038d7f5834a58bb9f429f.json
Adopt react 18 rc2 (#35161) * Adopt react 18 rc2 * execute shouldUseReactRoot only once * update test Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next/server/config.ts
@@ -733,7 +733,7 @@ export default async function loadConfig( return completeConfig } -export function shouldUseReactRoot() { +export const shouldUseReactRoot = execOnce(() => { const reactDomVersion = require('react-dom').version const isReactExperimental = Boolean( reactDomVersion && /0\.0\.0-experim...
true
Other
vercel
next.js
9bff48b9d5998455c9c038d7f5834a58bb9f429f.json
Adopt react 18 rc2 (#35161) * Adopt react 18 rc2 * execute shouldUseReactRoot only once * update test Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
packages/next/server/render.tsx
@@ -67,7 +67,6 @@ import isError from '../lib/is-error' import { readableStreamTee } from './web/utils' import { ImageConfigContext } from '../shared/lib/image-config-context' import { FlushEffectsContext } from '../shared/lib/flush-effects' -import { execOnce } from '../shared/lib/utils' let optimizeAmp: typeof ...
true
Other
vercel
next.js
9bff48b9d5998455c9c038d7f5834a58bb9f429f.json
Adopt react 18 rc2 (#35161) * Adopt react 18 rc2 * execute shouldUseReactRoot only once * update test Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
test/integration/react-18/app/pages/index.js
@@ -19,7 +19,3 @@ export default function Index() { </div> ) } - -// export const config = { -// runtime: 'edge', -// }
true
Other
vercel
next.js
9bff48b9d5998455c9c038d7f5834a58bb9f429f.json
Adopt react 18 rc2 (#35161) * Adopt react 18 rc2 * execute shouldUseReactRoot only once * update test Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
test/integration/react-streaming-and-server-components/app/pages/err/render.js
@@ -1,5 +1,5 @@ let did = false -export default function Error() { +export default function MyError() { if (!did && typeof window === 'undefined') { did = true throw new Error('oops')
true
Other
vercel
next.js
9bff48b9d5998455c9c038d7f5834a58bb9f429f.json
Adopt react 18 rc2 (#35161) * Adopt react 18 rc2 * execute shouldUseReactRoot only once * update test Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
test/integration/react-streaming-and-server-components/app/pages/err/suspense.js
@@ -1,7 +1,7 @@ import { Suspense } from 'react' let did = false -function Error() { +function MyError() { if (!did && typeof window === 'undefined') { did = true throw new Error('oops') @@ -12,8 +12,8 @@ export default function page() { return ( <> <h1>Hey Error</h1> - <Suspense> -...
true
Other
vercel
next.js
9bff48b9d5998455c9c038d7f5834a58bb9f429f.json
Adopt react 18 rc2 (#35161) * Adopt react 18 rc2 * execute shouldUseReactRoot only once * update test Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com>
test/integration/react-streaming-and-server-components/test/basic.js
@@ -37,12 +37,21 @@ export default async function basic(context, { env }) { }) it('should render 500 error correctly', async () => { - const html = await renderViaHTTP(context.appPort, '/err') - if (env === 'dev') { - // In dev mode it should show the error popup. - expect(html).toContain('Error...
true