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 | 467bf08a8a7f14ddf043c7c0141889edfbb9f970.json | Add events polyfill (#30256) | yarn.lock | @@ -9136,15 +9136,15 @@ eventemitter3@^4.0.0, eventemitter3@^4.0.4:
resolved "https://registry.yarnpkg.com/eventemitter3/-/eventemitter3-4.0.7.tgz#2de9b68f6528d5644ef5c59526a1b4a07306169f"
integrity sha512-8guHBZCwKnFhYdHr2ysuRWErTwhoN2X8XELRlrRwpmfeY2jjuUN4taQMsULKUVo1K4DvZl+0pgfyoysHxvmvEw==
-events@^3.0.0:
-... | true |
Other | vercel | next.js | 474f1e7d93e78e3d7a55ada235bf6c8e0b5c25bb.json | Add initial test trace outputs (#30246) | .github/workflows/build_test_deploy.yml | @@ -171,6 +171,15 @@ jobs:
name: Run test/e2e (dev)
if: ${{needs.build.outputs.docsChange != 'docs only change'}}
+ - name: Upload test trace
+ if: always()
+ uses: actions/upload-artifact@v2
+ with:
+ name: test-trace
+ retention-days: 2
+ path: ... | true |
Other | vercel | next.js | 474f1e7d93e78e3d7a55ada235bf6c8e0b5c25bb.json | Add initial test trace outputs (#30246) | packages/next/build/swc/tests/full/example/output.js | @@ -1,36 +1,36 @@
import a from "other";
-function _arrayWithHoles(b) {
- if (Array.isArray(b)) return b;
+function _arrayWithHoles(a) {
+ if (Array.isArray(a)) return a;
}
-function _classCallCheck(c, d) {
- if (!(c instanceof d)) throw new TypeError("Cannot call a class as a function");
+function _classCal... | true |
Other | vercel | next.js | 474f1e7d93e78e3d7a55ada235bf6c8e0b5c25bb.json | Add initial test trace outputs (#30246) | run-tests.js | @@ -250,6 +250,7 @@ async function main() {
...process.env,
// run tests in headless mode by default
HEADLESS: 'true',
+ TRACE_PLAYWRIGHT: 'true',
...(usePolling
? {
// Events can be finicky in CI. This switches to a more
@... | true |
Other | vercel | next.js | 474f1e7d93e78e3d7a55ada235bf6c8e0b5c25bb.json | Add initial test trace outputs (#30246) | test/lib/browsers/playwright.ts | @@ -1,4 +1,5 @@
import { BrowserInterface } from './base'
+import fs from 'fs-extra'
import {
chromium,
webkit,
@@ -8,11 +9,15 @@ import {
Page,
ElementHandle,
} from 'playwright-chromium'
+import path from 'path'
let page: Page
let browser: Browser
let context: BrowserContext
let pageLogs: Array<{... | true |
Other | vercel | next.js | 474f1e7d93e78e3d7a55ada235bf6c8e0b5c25bb.json | Add initial test trace outputs (#30246) | test/lib/e2e-utils.ts | @@ -8,6 +8,8 @@ import { NextStartInstance } from './next-modes/next-start'
const testFile = module.parent.filename
const testsFolder = path.join(__dirname, '..')
+process.env.TEST_FILE_PATH = testFile
+
let testMode = process.env.NEXT_TEST_MODE
if (!testFile.match(/\.test\.(js|tsx?)/)) { | true |
Other | vercel | next.js | 474f1e7d93e78e3d7a55ada235bf6c8e0b5c25bb.json | Add initial test trace outputs (#30246) | test/lib/next-modes/base.ts | @@ -160,6 +160,25 @@ export class NextInstance {
this.emit('destroy', [])
await this.stop()
+ if (process.env.TRACE_PLAYWRIGHT) {
+ await fs
+ .copy(
+ path.join(this.testDir, '.next/trace'),
+ path.join(
+ __dirname,
+ '../../traces',
+ `${p... | true |
Other | vercel | next.js | 474f1e7d93e78e3d7a55ada235bf6c8e0b5c25bb.json | Add initial test trace outputs (#30246) | test/lib/next-webdriver.ts | @@ -2,6 +2,10 @@ import { getFullUrl } from 'next-test-utils'
import os from 'os'
import { BrowserInterface } from './browsers/base'
+if (!process.env.TEST_FILE_PATH) {
+ process.env.TEST_FILE_PATH = module.parent.filename
+}
+
let deviceIP: string
const isBrowserStack = !!process.env.BROWSERSTACK
;(global as a... | true |
Other | vercel | next.js | df613d39095fcd0f194b9df1bf30dc4b9525f321.json | fix some labels for middleware stuff (#30241)
* show `(client only)` for _middleware files
* show f symbol for _middleware files in summary tree
add explanation
show only used symbols | packages/next/build/utils.ts | @@ -150,6 +150,8 @@ export async function printTreeView(
pageInfos
)
+ const usedSymbols = new Set()
+
const pageList = list
.slice()
.filter(
@@ -163,7 +165,7 @@ export async function printTreeView(
.sort((a, b) => a.localeCompare(b))
pageList.forEach((item, i, arr) => {
- const sy... | true |
Other | vercel | next.js | df613d39095fcd0f194b9df1bf30dc4b9525f321.json | fix some labels for middleware stuff (#30241)
* show `(client only)` for _middleware files
* show f symbol for _middleware files in summary tree
add explanation
show only used symbols | packages/next/server/dev/on-demand-entry-handler.ts | @@ -239,9 +239,9 @@ export default function onDemandEntryHandler(
if (entriesChanged) {
reportTrigger(
- isApiRoute || isMiddleware
+ isApiRoute
? `${normalizedPage} (server only)`
- : clientOnly
+ : clientOnly || isMiddleware
? `${norm... | true |
Other | vercel | next.js | 3bb098f882d9e78aac042259cc1e07ae1a39bdf6.json | hide next-middleware-loader in import trace (#30243) | packages/next/build/webpack/plugins/wellknown-errors-plugin/parseNotFoundError.ts | @@ -82,7 +82,10 @@ export async function getNotFoundError(
.map(({ origin }) =>
origin.readableIdentifier(compilation.requestShortener)
)
- .filter((name) => name && !name.includes('next-client-pages-loader.js'))
+ .filter(
+ (name) =>
+ name && !/next-(mid... | true |
Other | vercel | next.js | 3bb098f882d9e78aac042259cc1e07ae1a39bdf6.json | hide next-middleware-loader in import trace (#30243) | packages/next/client/dev/error-overlay/format-webpack-messages.js | @@ -38,7 +38,8 @@ function formatMessage(message, verbose) {
const filteredModuleTrace =
message.moduleTrace &&
message.moduleTrace.filter(
- (trace) => !trace.originName.includes('next-client-pages-loader.js')
+ (trace) =>
+ !/next-(middleware|client-pages)-loader\.js/.test(tr... | true |
Other | vercel | next.js | 864d5c6bd82339b4895ae496b865a4ee1a4ab290.json | Update removeHash handling for stats-app (#30235) | .github/actions/next-stats-action/src/run/index.js | @@ -67,7 +67,7 @@ async function runConfigs(
const results = await glob(rename.srcGlob, { cwd: statsAppDir })
for (const result of results) {
let dest = rename.removeHash
- ? result.replace(/(\.|-)[0-9a-f]{20}(\.|-)/g, '$1HASH$2')
+ ? result.replace(/(\.|-)[0-9a-f]{16}... | false |
Other | vercel | next.js | 9d4e7b45dcd8c351049d4e8c982aca8efc62fecd.json | Add initial documentation for output file tracing (#30199)
* Add initial documentation for output file tracing
* Apply suggestions from code review
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Steven <steven@ceriously.com> | docs/advanced-features/output-file-tracing.md | @@ -0,0 +1,24 @@
+---
+description: Next.js automatically traces which files are needed by each page to allow for easy deployment of your application. Learn how it works here.
+---
+
+# Output File Tracing
+
+During a build, Next.js will automatically trace each page and its dependencies to determine all of the files t... | true |
Other | vercel | next.js | 9d4e7b45dcd8c351049d4e8c982aca8efc62fecd.json | Add initial documentation for output file tracing (#30199)
* Add initial documentation for output file tracing
* Apply suggestions from code review
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Steven <steven@ceriously.com> | docs/manifest.json | @@ -221,6 +221,10 @@
"title": "Internationalized Routing",
"path": "/docs/advanced-features/i18n-routing.md"
},
+ {
+ "title": "Output File Tracing",
+ "path": "/docs/advanced-features/output-file-tracing.md"
+ },
{
... | true |
Other | vercel | next.js | 9d4e7b45dcd8c351049d4e8c982aca8efc62fecd.json | Add initial documentation for output file tracing (#30199)
* Add initial documentation for output file tracing
* Apply suggestions from code review
Co-authored-by: Steven <steven@ceriously.com>
Co-authored-by: Steven <steven@ceriously.com> | packages/next/build/index.ts | @@ -1177,11 +1177,6 @@ export default async function build(
const tracedFiles = new Set()
serverResult.fileList.forEach((file) => {
- const reason = serverResult.reasons.get(file)
-
- if (reason?.type === 'initial') {
- return
- }
traced... | true |
Other | vercel | next.js | 649b41704bcee18edad839a198f2fcd3627285e9.json | Add deprecation note for target (#30200)
* Add deprecation note for target
* Apply suggestions from code review
Co-authored-by: Steven <steven@ceriously.com>
* Mention Vercel leverages the traces
Co-authored-by: Steven <steven@ceriously.com> | errors/deprecated-target-config.md | @@ -0,0 +1,13 @@
+# Deprecated target config
+
+#### Why This Error Occurred
+
+The `target` property in `next.config.js` has been deprecated. Please migrate to leverage the default target instead.
+
+#### Possible Ways to Fix It
+
+For serverless cases, leverage the new output file traces or deploy your application so... | true |
Other | vercel | next.js | 649b41704bcee18edad839a198f2fcd3627285e9.json | Add deprecation note for target (#30200)
* Add deprecation note for target
* Apply suggestions from code review
Co-authored-by: Steven <steven@ceriously.com>
* Mention Vercel leverages the traces
Co-authored-by: Steven <steven@ceriously.com> | errors/manifest.json | @@ -8,6 +8,10 @@
"title": "beta-middleware",
"path": "/errors/beta-middleware.md"
},
+ {
+ "title": "deprecated-target-config",
+ "path": "/errors/deprecated-target-config.md"
+ },
{
"title": "custom-document-image-import",
"p... | true |
Other | vercel | next.js | 649b41704bcee18edad839a198f2fcd3627285e9.json | Add deprecation note for target (#30200)
* Add deprecation note for target
* Apply suggestions from code review
Co-authored-by: Steven <steven@ceriously.com>
* Mention Vercel leverages the traces
Co-authored-by: Steven <steven@ceriously.com> | packages/next/server/config.ts | @@ -575,6 +575,13 @@ export default async function loadConfig(
)
}
+ if (userConfig.target && userConfig.target !== 'server') {
+ Log.warn(
+ 'The `target` config is deprecated and will be removed in a future version.\n' +
+ 'See more info here https://nextjs.org/docs/messages/depr... | true |
Other | vercel | next.js | 649b41704bcee18edad839a198f2fcd3627285e9.json | Add deprecation note for target (#30200)
* Add deprecation note for target
* Apply suggestions from code review
Co-authored-by: Steven <steven@ceriously.com>
* Mention Vercel leverages the traces
Co-authored-by: Steven <steven@ceriously.com> | test/integration/production/test/index.test.js | @@ -57,6 +57,12 @@ describe('Production Usage', () => {
await killApp(app)
})
+ it('should not show target deprecation warning', () => {
+ expect(output).not.toContain(
+ 'The `target` config is deprecated and will be removed in a future version'
+ )
+ })
+
it('should contain generated page co... | true |
Other | vercel | next.js | 649b41704bcee18edad839a198f2fcd3627285e9.json | Add deprecation note for target (#30200)
* Add deprecation note for target
* Apply suggestions from code review
Co-authored-by: Steven <steven@ceriously.com>
* Mention Vercel leverages the traces
Co-authored-by: Steven <steven@ceriously.com> | test/integration/serverless/test/index.test.js | @@ -26,8 +26,14 @@ let appPort
let app
describe('Serverless', () => {
+ let output
+
beforeAll(async () => {
- await nextBuild(appDir)
+ const result = await nextBuild(appDir, undefined, {
+ stderr: true,
+ stdout: true,
+ })
+ output = result.stdout + result.stderr
appPort = await fi... | true |
Other | vercel | next.js | d6090178fe8d448baf6aaf8bb8aaaad9e8af2b5f.json | Fix: convert head instances to array (#38252)
* fix: convert head instances to array
* fix test | packages/next/shared/lib/side-effect.tsx | @@ -23,8 +23,8 @@ export default function SideEffect(props: SideEffectProps) {
function emitChange() {
if (headManager && headManager.mountedInstances) {
const headElements = Children.toArray(
- headManager.mountedInstances
- ).filter(Boolean) as React.ReactElement[]
+ Array.from(headM... | false |
Other | vercel | next.js | a1504f4cf43c44238cf7452ea144c7a26ffabe1e.json | Ensure page.server.js matches correctly (#38236)
* Ensure app/page.server.js matches correctly
* update check | packages/next/server/base-server.ts | @@ -1012,7 +1012,7 @@ export default abstract class Server<ServerOptions extends Options = Options> {
const appPathRoutes: Record<string, string> = {}
Object.keys(this.appPathsManifest || {}).forEach((entry) => {
- appPathRoutes[normalizeAppPath(entry)] = entry
+ appPathRoutes[normalizeAppPath(ent... | true |
Other | vercel | next.js | a1504f4cf43c44238cf7452ea144c7a26ffabe1e.json | Ensure page.server.js matches correctly (#38236)
* Ensure app/page.server.js matches correctly
* update check | packages/next/server/dev/next-dev-server.ts | @@ -337,9 +337,8 @@ export default class DevServer extends Server {
})
if (isAppPath) {
- // TODO: should only routes ending in /index.js be route-able?
const originalPageName = pageName
- pageName = normalizeAppPath(pageName)
+ pageName = normalizeA... | true |
Other | vercel | next.js | a1504f4cf43c44238cf7452ea144c7a26ffabe1e.json | Ensure page.server.js matches correctly (#38236)
* Ensure app/page.server.js matches correctly
* update check | packages/next/server/get-route-from-entrypoint.ts | @@ -29,6 +29,7 @@ export default function getRouteFromEntrypoint(
if (app) {
pagePath = matchBundle(APP_ROUTE_NAME_REGEX, entryFile)
+ if (typeof pagePath === 'string' && !pagePath) pagePath = '/'
if (pagePath) return pagePath
}
| true |
Other | vercel | next.js | a1504f4cf43c44238cf7452ea144c7a26ffabe1e.json | Ensure page.server.js matches correctly (#38236)
* Ensure app/page.server.js matches correctly
* update check | test/e2e/app-dir/app-rendering/app/page.server.js | @@ -0,0 +1,3 @@
+export default function Page(props) {
+ return <p>app/page.server.js</p>
+} | true |
Other | vercel | next.js | a1504f4cf43c44238cf7452ea144c7a26ffabe1e.json | Ensure page.server.js matches correctly (#38236)
* Ensure app/page.server.js matches correctly
* update check | test/e2e/app-dir/rendering.test.ts | @@ -31,6 +31,11 @@ describe('views dir rendering', () => {
})
afterAll(() => next.destroy())
+ it('should serve app/page.server.js at /', async () => {
+ const html = await renderViaHTTP(next.url, '/')
+ expect(html).toContain('app/page.server.js')
+ })
+
describe('getServerSideProps only', () => {
... | true |
Other | vercel | next.js | 157655700a031393ff6f0bb7e5a90b197bcbab06.json | fix: declare NextBundleAnalyzer as a type (#38168)
* fix: declare NextBundleAnalyzer as a type
* lint-fix
Co-authored-by: JJ Kasper <jj@jjsweb.site> | packages/next-bundle-analyzer/index.d.ts | @@ -1,8 +1,8 @@
import type { NextConfig } from 'next'
-const NextBundleAnalyzer =
- (options?: { enabled?: boolean; openAnalyzer?: boolean }) =>
- (config?: NextConfig) =>
- NextConfig
+type NextBundleAnalyzer = (options?: {
+ enabled?: boolean
+ openAnalyzer?: boolean
+}) => (config?: NextConfig) => NextCon... | false |
Other | vercel | next.js | f3659a5f931bec0e619ccabd678ab0cfdcf323ce.json | docs: remove eslint config link (#38206)
[Slack thread](https://vercel.slack.com/archives/C02UJ0QH45Q/p1656580818197009)
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feat... | docs/basic-features/eslint.md | @@ -72,8 +72,6 @@ Recommended rule-sets from the following ESLint plugins are all used within `esl
- [`eslint-plugin-react-hooks`](https://www.npmjs.com/package/eslint-plugin-react-hooks)
- [`eslint-plugin-next`](https://www.npmjs.com/package/@next/eslint-plugin-next)
-You can see the full details of the shareable ... | false |
Other | vercel | next.js | 66b83f4506b7fb4cfd39cf9e32a916f09b52e849.json | fix(next/swc): set cache dir explicitly (#38175)
This PR amends behavior of swc's cache by setting it explicitly under `distDir` from next.js config.
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- ... | packages/next/build/swc/options.js | @@ -31,6 +31,7 @@ function getBaseSWCOptions({
nextConfig,
resolvedBaseUrl,
jsConfig,
+ swcCacheDir,
}) {
const parserConfig = getParserOptions({ filename, jsConfig })
const paths = jsConfig?.compilerOptions?.paths
@@ -46,6 +47,7 @@ function getBaseSWCOptions({
const plugins = (nextConfig?.experimen... | true |
Other | vercel | next.js | 66b83f4506b7fb4cfd39cf9e32a916f09b52e849.json | fix(next/swc): set cache dir explicitly (#38175)
This PR amends behavior of swc's cache by setting it explicitly under `distDir` from next.js config.
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- ... | packages/next/build/webpack-config.ts | @@ -480,6 +480,12 @@ export default async function getBaseWebpackConfig(
supportedBrowsers: config.experimental.browsersListForSwc
? supportedBrowsers
: undefined,
+ swcCacheDir: path.join(
+ dir,
+ config?.distDir ?? '.next',
+ ... | true |
Other | vercel | next.js | 66b83f4506b7fb4cfd39cf9e32a916f09b52e849.json | fix(next/swc): set cache dir explicitly (#38175)
This PR amends behavior of swc's cache by setting it explicitly under `distDir` from next.js config.
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- ... | packages/next/build/webpack/loaders/next-swc-loader.js | @@ -43,6 +43,7 @@ async function loaderTransform(parentTrace, source, inputSourceMap) {
nextConfig,
jsConfig,
supportedBrowsers,
+ swcCacheDir,
} = loaderOptions
const isPageFile = filename.startsWith(pagesDir)
@@ -56,6 +57,7 @@ async function loaderTransform(parentTrace, source, inputSourceMa... | true |
Other | vercel | next.js | 66b83f4506b7fb4cfd39cf9e32a916f09b52e849.json | fix(next/swc): set cache dir explicitly (#38175)
This PR amends behavior of swc's cache by setting it explicitly under `distDir` from next.js config.
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- ... | test/integration/clean-distdir/test/index.test.js | @@ -7,6 +7,7 @@ import { nextBuild } from 'next-test-utils'
const appDir = join(__dirname, '../')
const customFile = join(appDir, '.next/extra-file.txt')
const cacheDir = join(appDir, '.next/cache')
+const swcCacheDir = join(appDir, '.next/cache/swc')
const nextConfig = join(appDir, 'next.config.js')
let nextCon... | true |
Other | vercel | next.js | da84abc58835066e911d8c27e3d8056894f9def7.json | Fix chunk path resolution (#38162)
The `chunkFilenameMap` should take priority over the webpack built-in one here.
## Bug
- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature re... | packages/next/build/webpack/plugins/flight-manifest-plugin.ts | @@ -137,7 +137,10 @@ export class FlightManifestPlugin {
chunks: appDir
? chunk.ids.map((chunkId: string) => {
return (
- chunkId + ':' + chunk.name + (dev ? '' : '-' + chunk.hash)
+ chunkId +
+ ':' +
+ ... | true |
Other | vercel | next.js | da84abc58835066e911d8c27e3d8056894f9def7.json | Fix chunk path resolution (#38162)
The `chunkFilenameMap` should take priority over the webpack built-in one here.
## Bug
- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature re... | packages/next/client/app-next.js | @@ -14,7 +14,7 @@ const chunkFilenameMap = {}
// eslint-disable-next-line no-undef
__webpack_require__.u = (chunkId) => {
- return getChunkScriptFilename(chunkId) || chunkFilenameMap[chunkId]
+ return chunkFilenameMap[chunkId] || getChunkScriptFilename(chunkId)
}
// Ignore the module ID transform in client. | true |
Other | vercel | next.js | da84abc58835066e911d8c27e3d8056894f9def7.json | Fix chunk path resolution (#38162)
The `chunkFilenameMap` should take priority over the webpack built-in one here.
## Bug
- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature re... | test/e2e/app-dir/app/app/dashboard/index/lazy.client.js | @@ -0,0 +1,7 @@
+export default function LazyComponent() {
+ return (
+ <>
+ <p>hello from lazy</p>
+ </>
+ )
+} | true |
Other | vercel | next.js | da84abc58835066e911d8c27e3d8056894f9def7.json | Fix chunk path resolution (#38162)
The `chunkFilenameMap` should take priority over the webpack built-in one here.
## Bug
- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature re... | test/e2e/app-dir/app/app/dashboard/index/page.server.js | @@ -1,7 +1,10 @@
+import { ClientComponent } from './test.client.js'
+
export default function DashboardIndexPage() {
return (
<>
<p>hello from app/dashboard/index</p>
+ <ClientComponent />
</>
)
} | true |
Other | vercel | next.js | da84abc58835066e911d8c27e3d8056894f9def7.json | Fix chunk path resolution (#38162)
The `chunkFilenameMap` should take priority over the webpack built-in one here.
## Bug
- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature re... | test/e2e/app-dir/app/app/dashboard/index/test.client.js | @@ -0,0 +1,13 @@
+import { useState, lazy } from 'react'
+
+const Lazy = lazy(() => import('./lazy.client.js'))
+
+export function ClientComponent() {
+ let [state] = useState('client')
+ return (
+ <>
+ <Lazy />
+ <p className="hi">hello from modern the {state}</p>
+ </>
+ )
+} | true |
Other | vercel | next.js | da84abc58835066e911d8c27e3d8056894f9def7.json | Fix chunk path resolution (#38162)
The `chunkFilenameMap` should take priority over the webpack built-in one here.
## Bug
- [ ] Related issues linked using `fixes #number`
- [x] Integration tests added
- [ ] Errors have helpful link attached, see `contributing.md`
## Feature
- [ ] Implements an existing feature re... | test/e2e/app-dir/index.test.ts | @@ -62,6 +62,11 @@ describe('views dir', () => {
expect(html).toContain('hello from app/dashboard/index')
})
+ it('should load chunks generated via async import correctly', async () => {
+ const html = await renderViaHTTP(next.url, '/dashboard/index')
+ expect(html).toContain('hello from lazy')
+ })
+... | true |
Other | vercel | next.js | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | docs/advanced-features/preview-mode.md | @@ -25,6 +25,7 @@ description: Next.js has the preview mode for statically generated pages. You ca
<li><a href="https://github.com/vercel/next.js/tree/canary/examples/cms-kontent">Kontent Example</a> (<a href="https://next-blog-kontent.vercel.app//">Demo</a>)</li>
<li><a href="https://github.com/vercel/next.j... | true |
Other | vercel | next.js | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | examples/cms-makeswift/.env.local.example | @@ -0,0 +1,2 @@
+MAKESWIFT_API_HOST=https://api.makeswift.com
+MAKESWIFT_SITE_API_KEY= | true |
Other | vercel | next.js | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | examples/cms-makeswift/.gitignore | @@ -0,0 +1,38 @@
+# 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 | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | examples/cms-makeswift/README.md | @@ -0,0 +1,74 @@
+# A statically generated landing page with Next.js and Makeswift
+
+This example showcases how you can use [Makeswift](https://www.makeswift.com/) to visually build statically generated pages in Next.js.
+
+## Deploy your own
+
+Deploy the example using [Vercel](https://vercel.com?utm_source=github&ut... | true |
Other | vercel | next.js | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | examples/cms-makeswift/lib/makeswift/register-components.tsx | @@ -0,0 +1,16 @@
+import { Style } from '@makeswift/runtime/controls'
+import { ReactRuntime } from '@makeswift/runtime/react'
+
+// Register your components here!
+
+function HelloWorld(props: { className?: string }) {
+ return <p {...props}>Hello, world!</p>
+}
+
+ReactRuntime.registerComponent(HelloWorld, {
+ type... | true |
Other | vercel | next.js | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | examples/cms-makeswift/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 | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | examples/cms-makeswift/next.config.js | @@ -0,0 +1,9 @@
+/** @type {import('next').NextConfig} */
+const nextConfig = {
+ reactStrictMode: true,
+ images: {
+ domains: ['s.mkswft.com'],
+ },
+}
+
+module.exports = nextConfig | true |
Other | vercel | next.js | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | examples/cms-makeswift/package.json | @@ -0,0 +1,19 @@
+{
+ "private": true,
+ "scripts": {
+ "dev": "next dev",
+ "build": "next build",
+ "start": "next start"
+ },
+ "dependencies": {
+ "@makeswift/runtime": "0.0.21",
+ "next": "latest",
+ "react": "18.2.0",
+ "react-dom": "18.2.0"
+ },
+ "devDependencies": {
+ "@types/node... | true |
Other | vercel | next.js | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | examples/cms-makeswift/pages/[[...path]].ts | @@ -0,0 +1,7 @@
+import '../lib/makeswift/register-components'
+
+export {
+ getStaticPaths,
+ getStaticProps,
+ Page as default,
+} from '@makeswift/runtime/next' | true |
Other | vercel | next.js | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | examples/cms-makeswift/pages/_document.ts | @@ -0,0 +1 @@
+export { Document as default } from '@makeswift/runtime/next' | true |
Other | vercel | next.js | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | examples/cms-makeswift/pages/makeswift.ts | @@ -0,0 +1,3 @@
+import '../lib/makeswift/register-components'
+
+export { getServerSideProps, Page as default } from '@makeswift/runtime/next' | true |
Other | vercel | next.js | 90deca9509cc04d8895028d41e90c1bf383c9d0a.json | Add a Makeswift example (#38018) | examples/cms-makeswift/tsconfig.json | @@ -0,0 +1,20 @@
+{
+ "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 | 82e63e3d74b3f0d69b11f4c170e48ffd6f5db886.json | docs(readme.md): remove broken 404 links (#38104) | packages/next/README.md | @@ -50,9 +50,9 @@ We have a list of [good first issues](https://github.com/vercel/next.js/labels/g
## Authors
-- Tim Neutkens ([@timneutkens](https://twitter.com/timneutkens)) – [Vercel](https://vercel.com/about/timneutkens)
-- Naoyuki Kanezawa ([@nkzawa](https://twitter.com/nkzawa)) – [Vercel](https://vercel.com/... | false |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/.env.local.example | @@ -1,7 +1,7 @@
# Public Environment variables that can be used in the browser.
-NEXT_PUBLIC_AUTH0_CLIENT_ID=
+NEXT_PUBLIC_AUTH0_CLIENT_ID=TEST
NEXT_PUBLIC_AUTH0_SCOPE="openid profile"
-NEXT_PUBLIC_AUTH0_DOMAIN=
+NEXT_PUBLIC_AUTH0_DOMAIN="http://example.com"
NEXT_PUBLIC_BASE_URL="http://localhost:3000"
NEXT_PUBLIC_... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/.gitignore | @@ -32,3 +32,6 @@ yarn-error.log*
# vercel
.vercel
+
+# typescript
+*.tsbuildinfo | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/README.md | @@ -4,10 +4,10 @@ This example shows how you can use `@auth0/nextjs-auth` to easily add authentica
- Signing in
- Signing out
-- Loading the user on the server side and adding it as part of SSR ([`pages/advanced/ssr-profile.js`](pages/advanced/ssr-profile.js))
-- Loading the user on the client side and using fast/c... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/additional.d.ts | @@ -0,0 +1,7 @@
+export {}
+
+declare global {
+ interface Window {
+ __user: any
+ }
+} | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/components/header.tsx | @@ -1,6 +1,11 @@
import Link from 'next/link'
-function Header({ user, loading }) {
+type HeaderProps = {
+ user?: any
+ loading: boolean
+}
+
+const Header = ({ user, loading }: HeaderProps) => {
return (
<header>
<nav> | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/components/layout.tsx | @@ -1,7 +1,13 @@
import Head from 'next/head'
import Header from './header'
-function Layout({ user, loading = false, children }) {
+type LayoutProps = {
+ user?: any
+ loading?: boolean
+ children: React.ReactNode
+}
+
+const Layout = ({ user, loading = false, children }: LayoutProps) => {
return (
<>
... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/interfaces/index.ts | @@ -0,0 +1,9 @@
+export type User = {
+ email: string
+ email_verified: boolean
+ name: string
+ nickname: string
+ picture: string
+ sub: string
+ updated_at: string
+} | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/lib/auth0.ts | @@ -1,6 +1,7 @@
import { initAuth0 } from '@auth0/nextjs-auth0'
+import { SignInWithAuth0 } from '@auth0/nextjs-auth0/dist/instance'
-export default initAuth0({
+const auth0: SignInWithAuth0 = initAuth0({
secret: process.env.SESSION_COOKIE_SECRET,
issuerBaseURL: process.env.NEXT_PUBLIC_AUTH0_DOMAIN,
baseURL... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/lib/user.ts | @@ -1,3 +1,4 @@
+import { UserProfile } from '@auth0/nextjs-auth0'
import { useState, useEffect } from 'react'
export async function fetchUser(cookie = '') {
@@ -21,14 +22,16 @@ export async function fetchUser(cookie = '') {
return null
}
- const json = await res.json()
+ const json: UserProfile = await... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/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 | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/package.json | @@ -6,10 +6,15 @@
"start": "next start"
},
"dependencies": {
- "@auth0/nextjs-auth0": "^1.4.2",
+ "@auth0/nextjs-auth0": "^1.9.1",
"next": "latest",
- "react": "^17.0.2",
- "react-dom": "^17.0.2",
- "tslib": "^2.2.0"
+ "react": "^18.2.0",
+ "react-dom": "^18.2.0"
+ },
+ "devDepend... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/about.tsx | @@ -1,7 +1,7 @@
import Layout from '../components/layout'
import { useFetchUser } from '../lib/user'
-function About() {
+const About = () => {
const { user, loading } = useFetchUser()
return ( | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/advanced/ssr-profile.tsx | @@ -1,8 +1,15 @@
+import { GetServerSideProps } from 'next'
+
// This import is only included in the server build, because it's only used by getServerSideProps
import auth0 from '../../lib/auth0'
import Layout from '../../components/layout'
+import { User } from '../../interfaces'
+
+type ProfileProps = {
+ user: U... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/api/callback.js | @@ -1,10 +0,0 @@
-import auth0 from '../../lib/auth0'
-
-export default async function callback(req, res) {
- try {
- await auth0.handleCallback(req, res)
- } catch (error) {
- console.error(error)
- res.status(error.status || 500).end(error.message)
- }
-} | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/api/callback.ts | @@ -0,0 +1,15 @@
+import type { NextApiRequest, NextApiResponse } from 'next'
+import auth0 from '../../lib/auth0'
+
+const callback = async (req: NextApiRequest, res: NextApiResponse) => {
+ try {
+ await auth0.handleCallback(req, res)
+ } catch (error) {
+ console.error(error)
+ const errorMessage =
+ ... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/api/login.js | @@ -1,10 +0,0 @@
-import auth0 from '../../lib/auth0'
-
-export default async function login(req, res) {
- try {
- await auth0.handleLogin(req, res)
- } catch (error) {
- console.error(error)
- res.status(error.status || 500).end(error.message)
- }
-} | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/api/login.ts | @@ -0,0 +1,15 @@
+import type { NextApiRequest, NextApiResponse } from 'next'
+import auth0 from '../../lib/auth0'
+
+const login = async (req: NextApiRequest, res: NextApiResponse) => {
+ try {
+ await auth0.handleLogin(req, res)
+ } catch (error) {
+ console.error(error)
+ const errorMessage =
+ error... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/api/logout.js | @@ -1,10 +0,0 @@
-import auth0 from '../../lib/auth0'
-
-export default async function logout(req, res) {
- try {
- await auth0.handleLogout(req, res)
- } catch (error) {
- console.error(error)
- res.status(error.status || 500).end(error.message)
- }
-} | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/api/logout.ts | @@ -0,0 +1,15 @@
+import type { NextApiRequest, NextApiResponse } from 'next'
+import auth0 from '../../lib/auth0'
+
+const logout = async (req: NextApiRequest, res: NextApiResponse) => {
+ try {
+ await auth0.handleLogout(req, res)
+ } catch (error) {
+ console.error(error)
+ const errorMessage =
+ err... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/api/me.js | @@ -1,10 +0,0 @@
-import auth0 from '../../lib/auth0'
-
-export default async function me(req, res) {
- try {
- await auth0.handleProfile(req, res)
- } catch (error) {
- console.error(error)
- res.status(error.status || 500).end(error.message)
- }
-} | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/api/me.ts | @@ -0,0 +1,15 @@
+import type { NextApiRequest, NextApiResponse } from 'next'
+import auth0 from '../../lib/auth0'
+
+const me = async (req: NextApiRequest, res: NextApiResponse) => {
+ try {
+ await auth0.handleProfile(req, res)
+ } catch (error) {
+ console.error(error)
+ const errorMessage =
+ error ... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/index.tsx | @@ -1,7 +1,7 @@
import Layout from '../components/layout'
import { useFetchUser } from '../lib/user'
-function Home() {
+const Home = () => {
const { user, loading } = useFetchUser()
return ( | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/pages/profile.tsx | @@ -2,8 +2,13 @@
// import auth0 from '../lib/auth0'
import { useFetchUser } from '../lib/user'
import Layout from '../components/layout'
+import { User } from '../interfaces'
-function ProfileCard({ user }) {
+type ProfileCardProps = {
+ user: User
+}
+
+const ProfileCard = ({ user }: ProfileCardProps) => {
r... | true |
Other | vercel | next.js | 55560e0c58c059c7db87ad9d4165bddd4fea9930.json | Convert auth0 example to TypeScript (#38087)
Converted auth0 example over to TypeScript to match the Contribution guidelines, and got rid of the `tslib` dependency.
Note: You must copy `.env.local.example` to `.env.local`, or you will encounter "TypeError: "secret" is required" at build time.
## Documentation / Exam... | examples/auth0/tsconfig.json | @@ -0,0 +1,20 @@
+{
+ "compilerOptions": {
+ "target": "es5",
+ "lib": ["dom", "dom.iterable", "esnext"],
+ "allowJs": true,
+ "skipLibCheck": true,
+ "strict": false,
+ "forceConsistentCasingInFileNames": true,
+ "noEmit": true,
+ "esModuleInterop": true,
+ "module": "esnext",
+ "moduleR... | true |
Other | vercel | next.js | 876d4d1214f3bbd4c96438c6bb19c0f05cba813c.json | Add default experimental values (#38135)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | packages/next/build/webpack-config.ts | @@ -1493,9 +1493,6 @@ export default async function getBaseWebpackConfig(
'process.env.__NEXT_BUILD_INDICATOR_POSITION': JSON.stringify(
config.devIndicators.buildActivityPosition
),
- 'process.env.__NEXT_PLUGINS': JSON.stringify(
- config.experimental.plugins
- ),
... | true |
Other | vercel | next.js | 876d4d1214f3bbd4c96438c6bb19c0f05cba813c.json | Add default experimental values (#38135)
Co-authored-by: kodiakhq[bot] <49736102+kodiakhq[bot]@users.noreply.github.com> | packages/next/server/config-shared.ts | @@ -90,17 +90,14 @@ export interface ExperimentalConfig {
swcFileReading?: boolean
cpus?: number
sharedPool?: boolean
- plugins?: boolean
profiling?: boolean
isrFlushToDisk?: boolean
- reactMode?: 'legacy' | 'concurrent' | 'blocking'
workerThreads?: boolean
pageEnv?: boolean
optimizeCss?: bool... | true |
Other | vercel | next.js | 0ecbcc6d5429bbde5f52522fb1282cad32841b7e.json | Fix unnecessary flight render passes (#38133)
Currently `renderToReadableStream` will be called whenever the component is re-rendered, but the result should actually be cached (per request).
Thanks to @sebmarkbage for pointing out.
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests add... | packages/next/build/webpack/loaders/next-edge-ssr-loader/index.ts | @@ -78,7 +78,7 @@ export default async function edgeSSRLoader(this: any) {
buildId: ${JSON.stringify(buildId)},
})
- export default function rscMiddleware(opts) {
+ export default function(opts) {
return adapter({
...opts,
handler: render | true |
Other | vercel | next.js | 0ecbcc6d5429bbde5f52522fb1282cad32841b7e.json | Fix unnecessary flight render passes (#38133)
Currently `renderToReadableStream` will be called whenever the component is re-rendered, but the result should actually be cached (per request).
Thanks to @sebmarkbage for pointing out.
## Bug
- [ ] Related issues linked using `fixes #number`
- [ ] Integration tests add... | packages/next/server/app-render.tsx | @@ -180,13 +180,20 @@ function createServerComponentRenderer(
globalThis.__next_chunk_load__ = () => Promise.resolve()
}
- const writable = transformStream.writable
- const ServerComponentWrapper = (props: any) => {
- const reqStream: ReadableStream<Uint8Array> = renderToReadableStream(
- <Component... | true |
Other | vercel | next.js | 1feaac03986e9cfa3cd073e76981261854e196ce.json | Remove unused `layoutRaw` config (#38120)
Removes the `layoutRaw` experimental config which was forgotten in a previous PR #38006 | packages/next/build/webpack-config.ts | @@ -1519,7 +1519,6 @@ export default async function getBaseWebpackConfig(
path: config.images.path,
loader: config.images.loader,
experimentalUnoptimized: config?.experimental?.images?.unoptimized,
- experimentalLayoutRaw: config.experimental?.images?.layoutRaw,
expe... | true |
Other | vercel | next.js | 1feaac03986e9cfa3cd073e76981261854e196ce.json | Remove unused `layoutRaw` config (#38120)
Removes the `layoutRaw` experimental config which was forgotten in a previous PR #38006 | packages/next/server/config-shared.ts | @@ -118,7 +118,6 @@ export interface ExperimentalConfig {
urlImports?: NonNullable<webpack5.Configuration['experiments']>['buildHttp']
outputFileTracingRoot?: string
images?: {
- layoutRaw?: boolean
remotePatterns?: RemotePattern[]
unoptimized?: boolean
allowFutureImage?: boolean
@@ -543,7 +5... | true |
Other | vercel | next.js | 1feaac03986e9cfa3cd073e76981261854e196ce.json | Remove unused `layoutRaw` config (#38120)
Removes the `layoutRaw` experimental config which was forgotten in a previous PR #38006 | test/integration/image-component/default/next.config.js | @@ -1,7 +0,0 @@
-module.exports = {
- experimental: {
- images: {
- layoutRaw: true,
- },
- },
-} | true |
Other | vercel | next.js | 9cc1c3c5762765fa85fbda8b418d8db079e881fe.json | Upgrade Edge Runtime (#38105) | package.json | @@ -54,7 +54,7 @@
"@babel/plugin-proposal-object-rest-spread": "7.14.7",
"@babel/preset-flow": "7.14.5",
"@babel/preset-react": "7.14.5",
- "@edge-runtime/jest-environment": "1.1.0-beta.8",
+ "@edge-runtime/jest-environment": "1.1.0-beta.10",
"@fullhuman/postcss-purgecss": "1.3.0",
"@mdx-... | true |
Other | vercel | next.js | 9cc1c3c5762765fa85fbda8b418d8db079e881fe.json | Upgrade Edge Runtime (#38105) | packages/next/compiled/@edge-runtime/primitives/index.js | @@ -1,39 +1,12 @@
+"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
-var __defProps = Object.defineProperties;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
-var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
var __getOwnPropNames = Object.getOwnPropertyNames;
-var... | true |
Other | vercel | next.js | 9cc1c3c5762765fa85fbda8b418d8db079e881fe.json | Upgrade Edge Runtime (#38105) | packages/next/compiled/@edge-runtime/primitives/package.json | @@ -1 +1 @@
-{"name":"@edge-runtime/primitives","version":"1.1.0-beta.8","main":"./index.js","license":"MPLv2"}
+{"name":"@edge-runtime/primitives","version":"1.1.0-beta.10","main":"./index.js","license":"MPLv2"} | true |
Other | vercel | next.js | 9cc1c3c5762765fa85fbda8b418d8db079e881fe.json | Upgrade Edge Runtime (#38105) | packages/next/compiled/edge-runtime/index.js | @@ -1 +1 @@
-(()=>{var e={608:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:true});t.EdgeVM=void 0;const n=r(951);const o=r(893);class EdgeVM extends o.VM{constructor(e={}){super({...e,extend:t=>e.extend?e.extend((0,n.addPrimitives)(t)):(0,n.addPrimitives)(t)})}}t.EdgeVM=EdgeVM},463:(e,t,r)=>{"use ... | true |
Other | vercel | next.js | 9cc1c3c5762765fa85fbda8b418d8db079e881fe.json | Upgrade Edge Runtime (#38105) | packages/next/package.json | @@ -118,7 +118,7 @@
"@babel/runtime": "7.15.4",
"@babel/traverse": "7.18.0",
"@babel/types": "7.18.0",
- "@edge-runtime/primitives": "1.1.0-beta.8",
+ "@edge-runtime/primitives": "1.1.0-beta.10",
"@hapi/accept": "5.0.2",
"@napi-rs/cli": "2.4.4",
"@napi-rs/triples": "1.1.0",
@@ -195,7... | true |
Other | vercel | next.js | 9cc1c3c5762765fa85fbda8b418d8db079e881fe.json | Upgrade Edge Runtime (#38105) | pnpm-lock.yaml | @@ -19,7 +19,7 @@ importers:
'@babel/plugin-proposal-object-rest-spread': 7.14.7
'@babel/preset-flow': 7.14.5
'@babel/preset-react': 7.14.5
- '@edge-runtime/jest-environment': 1.1.0-beta.8
+ '@edge-runtime/jest-environment': 1.1.0-beta.10
'@fullhuman/postcss-purgecss': 1.3.0
... | true |
Other | vercel | next.js | 40cf3ce63a18ceb3f0551377b24d0bf1bcb916f4.json | Add error for renaming of unstable_revalidate (#38070)
* Add error for renaming of unstable_revalidate
* update test
* run test for dev too | packages/next/server/api-utils/node.ts | @@ -243,6 +243,13 @@ export async function apiResolver(
}
) => revalidate(urlPath, opts || {}, req, apiContext)
+ // TODO: remove in next minor (current v12.2)
+ apiRes.unstable_revalidate = () => {
+ throw new Error(
+ `"unstable_revalidate" has been renamed to "revalidate" see more inf... | true |
Other | vercel | next.js | 40cf3ce63a18ceb3f0551377b24d0bf1bcb916f4.json | Add error for renaming of unstable_revalidate (#38070)
* Add error for renaming of unstable_revalidate
* update test
* run test for dev too | packages/next/shared/lib/utils.ts | @@ -256,6 +256,11 @@ export type NextApiResponse<T = any> = ServerResponse & {
) => NextApiResponse<T>
clearPreviewData: () => NextApiResponse<T>
+ /**
+ * @deprecated `unstable_revalidate` has been renamed to `revalidate`
+ */
+ unstable_revalidate: () => void
+
revalidate: (
urlPath: string,
... | true |
Other | vercel | next.js | 40cf3ce63a18ceb3f0551377b24d0bf1bcb916f4.json | Add error for renaming of unstable_revalidate (#38070)
* Add error for renaming of unstable_revalidate
* update test
* run test for dev too | test/e2e/prerender.test.ts | @@ -741,6 +741,20 @@ describe('Prerender', () => {
expect(value).toMatch(/Hi \[third\] \[fourth\]/)
})
+ if (!(global as any).isNextDeploy) {
+ it('should show error about renaming unstable_revalidate', async () => {
+ const res = await fetchViaHTTP(next.url, '/api/manual-revalidate', {
+ ... | true |
Other | vercel | next.js | 40cf3ce63a18ceb3f0551377b24d0bf1bcb916f4.json | Add error for renaming of unstable_revalidate (#38070)
* Add error for renaming of unstable_revalidate
* update test
* run test for dev too | test/e2e/prerender/pages/api/manual-revalidate.js | @@ -1,4 +1,7 @@
export default async function handler(req, res) {
+ if (req.query.deprecated) {
+ await res.unstable_revalidate(req.query.pathname)
+ }
// WARNING: don't use user input in production
// make sure to use trusted value for revalidating
let revalidated = false | true |
Other | vercel | next.js | 9573426599860dd839b25eec2a27fec2c9d85f5a.json | Add etag header to optimized image response (#18986)
Fixes #18563 by adding the etag header to the optimized image response.
This does _not_ change the expireAt (TTL) for cached files on the server, which still uses the max-age of the upstream response.
The new file format on disk for cached image files is the follo... | packages/next/next-server/server/api-utils.ts | @@ -1,15 +1,15 @@
import { IncomingMessage, ServerResponse } from 'http'
import { parse } from 'next/dist/compiled/content-type'
import { CookieSerializeOptions } from 'next/dist/compiled/cookie'
-import generateETag from 'etag'
-import fresh from 'next/dist/compiled/fresh'
import getRawBody from 'raw-body'
import... | true |
Other | vercel | next.js | 9573426599860dd839b25eec2a27fec2c9d85f5a.json | Add etag header to optimized image response (#18986)
Fixes #18563 by adding the etag header to the optimized image response.
This does _not_ change the expireAt (TTL) for cached files on the server, which still uses the max-age of the upstream response.
The new file format on disk for cached image files is the follo... | packages/next/next-server/server/image-optimizer.ts | @@ -10,6 +10,7 @@ import { fileExists } from '../../lib/file-exists'
// @ts-ignore no types for is-animated
import isAnimated from 'next/dist/compiled/is-animated'
import Stream from 'stream'
+import { sendEtagResponse } from './send-payload'
let sharp: typeof import('sharp')
//const AVIF = 'image/avif'
@@ -18,7... | true |
Other | vercel | next.js | 9573426599860dd839b25eec2a27fec2c9d85f5a.json | Add etag header to optimized image response (#18986)
Fixes #18563 by adding the etag header to the optimized image response.
This does _not_ change the expireAt (TTL) for cached files on the server, which still uses the max-age of the upstream response.
The new file format on disk for cached image files is the follo... | packages/next/next-server/server/send-payload.ts | @@ -26,17 +26,10 @@ export function sendPayload(
}
const etag = generateEtags ? generateETag(payload) : undefined
-
- if (fresh(req.headers, { etag })) {
- res.statusCode = 304
- res.end()
+ if (sendEtagResponse(req, res, etag)) {
return
}
- if (etag) {
- res.setHeader('ETag', etag)
- }
-... | true |
Other | vercel | next.js | 9573426599860dd839b25eec2a27fec2c9d85f5a.json | Add etag header to optimized image response (#18986)
Fixes #18563 by adding the etag header to the optimized image response.
This does _not_ change the expireAt (TTL) for cached files on the server, which still uses the max-age of the upstream response.
The new file format on disk for cached image files is the follo... | test/integration/image-optimizer/test/index.test.js | @@ -55,6 +55,10 @@ function runTests({ w, isDev, domains }) {
const res = await fetchViaHTTP(appPort, '/_next/image', query, {})
expect(res.status).toBe(200)
expect(res.headers.get('content-type')).toContain('image/gif')
+ expect(res.headers.get('cache-control')).toBe(
+ 'public, max-age=0, must-... | true |
Other | vercel | next.js | 91d4aa54506a68a99f99b8edcfea10a73bea2ec2.json | tests(create-next-app): prevent catch assertions (#18939)
Prevent `catch` assertions in tests. | test/integration/create-next-app/index.test.js | @@ -8,10 +8,7 @@ const cli = require.resolve('create-next-app/dist/index.js')
jest.setTimeout(1000 * 60 * 5)
-const run = (cwd, args, input) => {
- const options = input ? { cwd, input } : { cwd }
- return execa('node', [cli].concat(args), options)
-}
+const run = (args, options) => execa('node', [cli].concat(ar... | false |
Other | vercel | next.js | c571f3143aa4145d74a2c3cad9c0a8d0b919f9a0.json | Update Azure cache key (#18964)
This updates to use the `Build.SourceVersion` value from the [predefined variables](https://docs.microsoft.com/en-us/azure/devops/pipelines/build/variables?view=azure-devops&tabs=yaml) for the cache key instead of the pull request value since it isn't available after merging to canary. ... | azure-pipelines.yml | @@ -13,7 +13,7 @@ stages:
- script: echo $(Agent.BuildDirectory)
- script: dir
- script: dir $(System.DefaultWorkingDirectory)
- - script: echo $(System.pullRequest.sourceCommitId)
+ - script: echo $(Build.SourceVersion)
- powershell: Set-MpPreference -Exclu... | false |
Other | vercel | next.js | 3cece4d2adc80c0b3bdea26561adf5e9ab2dbae1.json | Update Azure config (#18931) | .eslintignore | @@ -15,3 +15,4 @@ packages/next-codemod/**/*.js
packages/next-codemod/**/*.d.ts
packages/next-env/**/*.d.ts
test/integration/async-modules/**
+test-timings.json
\ No newline at end of file | true |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.