Skip to content

Commit

Permalink
Merge branch 'canary' into cna
Browse files Browse the repository at this point in the history
  • Loading branch information
samcx authored Dec 3, 2024
2 parents ca11515 + 616bcb3 commit 00a9d6c
Show file tree
Hide file tree
Showing 93 changed files with 4,921 additions and 1,052 deletions.
133 changes: 103 additions & 30 deletions Cargo.lock

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

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ auto-hash-map = { path = "turbopack/crates/turbo-tasks-auto-hash-map" }
swc-ast-explorer = { path = "turbopack/crates/turbopack-swc-ast-explorer" }
turbo-prehash = { path = "turbopack/crates/turbo-prehash" }
turbo-rcstr = { path = "turbopack/crates/turbo-rcstr" }
turbo-persistence = { path = "turbopack/crates/turbo-persistence" }
turbo-tasks-malloc = { path = "turbopack/crates/turbo-tasks-malloc", default-features = false }
turbo-tasks = { path = "turbopack/crates/turbo-tasks" }
turbo-tasks-backend = { path = "turbopack/crates/turbo-tasks-backend" }
Expand Down
6 changes: 3 additions & 3 deletions contributing/core/developing-using-local-app.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ If you already have an app and it has dependencies, you can follow these steps:

1. Move your app inside of the Next.js monorepo.

2. Run with `pnpm next-with-deps ./app-path-in-monorepo`
2. Run with `pnpm next-with-deps ./app-path-in-monorepo`.

## Set as a local dependency in package.json
## Set as a local dependency in `package.json`

1. Run `pnpm dev` in the background in the Next.js monorepo.

Expand All @@ -38,7 +38,7 @@ If you already have an app and it has dependencies, you can follow these steps:
Failed to load SWC binary, see more info here: https://nextjs.org/docs/messages/failed-loading-swc
```

Try to add the below section to your `package.json`, then run again
Try to add the below section to your `package.json`, then run again.

```json
{
Expand Down
11 changes: 0 additions & 11 deletions contributing/core/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -107,17 +107,6 @@ and then inspected with `pnpm playwright show-trace ./path/to/trace`

Add `NEXT_TEST_TRACE=1` to enable test profiling. It's useful for improving our testing infrastructure.

### Recording the browser using Replay.io

Using [Replay.io](https://www.replay.io/) you can record and time-travel debug the browser.

1. Clear all local replays using `pnpm replay rm-all`
2. Run the test locally using the `RECORD_REPLAY=1` environment variables.
(e.g. `RECORD_REPLAY=1 pnpm test-dev test/e2e/app-dir/app/index.test.ts`)
3. Upload all the replays to your workspace using your API key:
`RECORD_REPLAY_API_KEY=addkeyhere pnpm replay upload-all`
4. Check the uploaded replays in your workspace, while uploading it provides the URLs.

### Testing Turbopack

To run the test suite using Turbopack, you can use the `TURBOPACK=1` environment variable:
Expand Down
4 changes: 2 additions & 2 deletions docs/01-app/03-api-reference/02-components/link.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ It's common to use [Middleware](/docs/app/building-your-application/routing/midd

For example, if you want to serve a `/dashboard` route that has authenticated and visitor views, you can add the following in your Middleware to redirect the user to the correct page:

```ts filename="middleware.ts"
```ts filename="middleware.ts" switcher
import { NextResponse } from 'next/server'

export function middleware(request: Request) {
Expand All @@ -1107,7 +1107,7 @@ export function middleware(request: Request) {
}
```

```js filename="middleware.js"
```js filename="middleware.js" switcher
import { NextResponse } from 'next/server'

export function middleware(request) {
Expand Down
2 changes: 1 addition & 1 deletion docs/01-app/03-api-reference/04-functions/cacheLife.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const nextConfig = {
export default nextConfig
```

Then, import and invoke The `cacheLife` function within the scope of the function or component:
Then, import and invoke the `cacheLife` function within the scope of the function or component:

```tsx filename="app/page.tsx" highlight={5} switcher
'use cache'
Expand Down
2 changes: 1 addition & 1 deletion docs/01-app/03-api-reference/04-functions/fetch.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ Set the cache lifetime of a resource (in seconds).
fetch(`https://...`, { next: { tags: ['collection'] } })
```

Set the cache tags of a resource. Data can then be revalidated on-demand using [`revalidateTag`](https://nextjs.org/docs/app/api-reference/functions/revalidateTag). The max length for a custom tag is 256 characters and the max tag items is 64.
Set the cache tags of a resource. Data can then be revalidated on-demand using [`revalidateTag`](https://nextjs.org/docs/app/api-reference/functions/revalidateTag). The max length for a custom tag is 256 characters and the max tag items is 128.

## Troubleshooting

Expand Down
Loading

0 comments on commit 00a9d6c

Please sign in to comment.