Skip to content

Commit

Permalink
Merge branch 'canary' into 12-18-fix_intercepting_route_behavior_in_r…
Browse files Browse the repository at this point in the history
…oute_groups
  • Loading branch information
ztanner committed Dec 20, 2023
2 parents f4185bf + 8e0fd93 commit 4fa3949
Show file tree
Hide file tree
Showing 26 changed files with 241 additions and 142 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ You can also use the experimental [`unstable_cache` API](/docs/app/api-reference
In the example below:

- The React `cache` function is used to [memoize](/docs/app/building-your-application/caching#request-memoization) data requests.
- The `revalidate` option is set to `3600` in the `layout.ts` and `page.ts` segments, meaning the data will be cached and revalidated at most every hour.
- The `revalidate` option is set to `3600` in the Layout and Page segments, meaning the data will be cached and revalidated at most every hour.

```ts filename="app/utils.ts" switcher
import { cache } from 'react'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ There are a few recommended patterns and best practices for fetching data in Rea

## Fetching Data on the Server

Whenever possible, we recommend fetching data on the server. This allows you to:
Whenever possible, we recommend fetching data on the server with Server Components. This allows you to:

- Have direct access to backend data resources (e.g. databases).
- Keep your application more secure by preventing sensitive information, such as access tokens and API keys, from being exposed to the client.
Expand All @@ -17,7 +17,7 @@ Whenever possible, we recommend fetching data on the server. This allows you to:
- Reduce client-server [waterfalls](#parallel-and-sequential-data-fetching).
- Depending on your region, data fetching can also happen closer to your data source, reducing latency and improving performance.

You can fetch data on the server using Server Components, [Route Handlers](/docs/app/building-your-application/routing/route-handlers), and [Server Actions](/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
Then, you can mutate or update data with [Server Actions](/docs/app/building-your-application/data-fetching/server-actions-and-mutations).

## Fetching Data Where It's Needed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ export default async function sitemap({
`SELECT id, date FROM products WHERE id BETWEEN ${start} AND ${end}`
)
return products.map((product) => ({
url: `${BASE_URL}/product/${id}`
url: `${BASE_URL}/product/${id}`,
lastModified: product.date,
}))
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ export const metadata = {

### `viewport`

> **Deprecated**: The `themeColor` option in `metadata` is deprecated as of Next.js 14. Please use the [`viewport` configuration](/docs/app/api-reference/functions/generate-viewport) instead.
> **Deprecated**: The `viewport` option in `metadata` is deprecated as of Next.js 14. Please use the [`viewport` configuration](/docs/app/api-reference/functions/generate-viewport) instead.

### `verification`

Expand Down
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,5 @@
"registry": "https://registry.npmjs.org/"
}
},
"version": "14.0.5-canary.18"
"version": "14.0.5-canary.19"
}
2 changes: 1 addition & 1 deletion packages/create-next-app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "create-next-app",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"keywords": [
"react",
"next",
Expand Down
4 changes: 2 additions & 2 deletions packages/eslint-config-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "eslint-config-next",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"description": "ESLint configuration used by Next.js.",
"main": "index.js",
"license": "MIT",
Expand All @@ -10,7 +10,7 @@
},
"homepage": "https://nextjs.org/docs/app/building-your-application/configuring/eslint#eslint-config",
"dependencies": {
"@next/eslint-plugin-next": "14.0.5-canary.18",
"@next/eslint-plugin-next": "14.0.5-canary.19",
"@rushstack/eslint-patch": "^1.3.3",
"@typescript-eslint/parser": "^5.4.2 || ^6.0.0",
"eslint-import-resolver-node": "^0.3.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/eslint-plugin-next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/eslint-plugin-next",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"description": "ESLint plugin for Next.js.",
"main": "dist/index.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/font/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/font",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"repository": {
"url": "vercel/next.js",
"directory": "packages/font"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-bundle-analyzer/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/bundle-analyzer",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"main": "index.js",
"types": "index.d.ts",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-codemod/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/codemod",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"license": "MIT",
"repository": {
"type": "git",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-env/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/env",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-mdx/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/mdx",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"main": "index.js",
"license": "MIT",
"repository": {
Expand Down
2 changes: 1 addition & 1 deletion packages/next-plugin-storybook/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/plugin-storybook",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"repository": {
"url": "vercel/next.js",
"directory": "packages/next-plugin-storybook"
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-module/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-module",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"description": "A standard library polyfill for ES Modules supporting browsers (Edge 16+, Firefox 60+, Chrome 61+, Safari 10.1+)",
"main": "dist/polyfill-module.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-polyfill-nomodule/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/polyfill-nomodule",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/swc",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"private": true,
"scripts": {
"clean": "node ../../scripts/rm.mjs native",
Expand Down
14 changes: 7 additions & 7 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -92,7 +92,7 @@
]
},
"dependencies": {
"@next/env": "14.0.5-canary.18",
"@next/env": "14.0.5-canary.19",
"@swc/helpers": "0.5.2",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
Expand Down Expand Up @@ -147,11 +147,11 @@
"@mswjs/interceptors": "0.23.0",
"@napi-rs/cli": "2.16.2",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "14.0.5-canary.18",
"@next/polyfill-nomodule": "14.0.5-canary.18",
"@next/react-dev-overlay": "14.0.5-canary.18",
"@next/react-refresh-utils": "14.0.5-canary.18",
"@next/swc": "14.0.5-canary.18",
"@next/polyfill-module": "14.0.5-canary.19",
"@next/polyfill-nomodule": "14.0.5-canary.19",
"@next/react-dev-overlay": "14.0.5-canary.19",
"@next/react-refresh-utils": "14.0.5-canary.19",
"@next/swc": "14.0.5-canary.19",
"@opentelemetry/api": "1.6.0",
"@playwright/test": "^1.35.1",
"@taskr/clear": "1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-dev-overlay/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/react-dev-overlay",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"description": "A development-only overlay for developing React applications.",
"repository": {
"url": "vercel/next.js",
Expand Down
2 changes: 1 addition & 1 deletion packages/react-refresh-utils/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/react-refresh-utils",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"description": "An experimental package providing utilities for React Refresh.",
"repository": {
"url": "vercel/next.js",
Expand Down
4 changes: 2 additions & 2 deletions packages/third-parties/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@next/third-parties",
"version": "14.0.5-canary.18",
"version": "14.0.5-canary.19",
"repository": {
"url": "vercel/next.js",
"directory": "packages/third-parties"
Expand All @@ -26,7 +26,7 @@
"third-party-capital": "1.0.20"
},
"devDependencies": {
"next": "14.0.5-canary.18",
"next": "14.0.5-canary.19",
"outdent": "0.8.0",
"prettier": "2.5.1"
},
Expand Down
16 changes: 8 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 4 additions & 21 deletions test/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
// Make development mode typescript module resolving and jsx parsing correct for all tests
// Make development mode typescript module resolving and jsx parsing correct for all tests.
// We want to apply the compiler options to the testing app, but we don't want to do strict type checking for them.
// e.g. testing app could have import a from '3rd-lib-nextjs-ws-doesnt-have'
{
"compilerOptions": {
"strict": false,
"noEmit": true,
"allowJs": true,
"resolveJsonModule": true,
"jsx": "react-jsx",
"module": "esnext",
"target": "ESNext",
"esModuleInterop": true,
"moduleResolution": "node",
"baseUrl": ".",
"types": ["react", "jest", "node", "trusted-types", "jest-extended"],
"paths": {
"development-sandbox": ["./lib/development-sandbox"],
"next-test-utils": ["./lib/next-test-utils"],
"amp-test-utils": ["./lib/amp-test-utils"],
"next-webdriver": ["./lib/next-webdriver"],
"e2e-utils": ["./lib/e2e-utils"]
}
}
"extends": "../tsconfig.base.json"
}

0 comments on commit 4fa3949

Please sign in to comment.