Skip to content

Commit

Permalink
Merge branch 'canary' into sokra/app-externals
Browse files Browse the repository at this point in the history
  • Loading branch information
sokra authored Mar 7, 2024
2 parents 7c70191 + c1d4450 commit 6c6cbec
Show file tree
Hide file tree
Showing 28 changed files with 818 additions and 1,211 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/build_reusable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ env:

jobs:
build:
timeout-minutes: 15
timeout-minutes: 30
runs-on:
- 'self-hosted'
- 'linux'
Expand Down Expand Up @@ -171,6 +171,7 @@ jobs:
- run: turbo run get-test-timings -- --build ${{ github.sha }}

- run: /bin/bash -c "${{ inputs.afterBuild }}"
timeout-minutes: 15

- name: Upload artifact
uses: actions/upload-artifact@v4
Expand Down
70 changes: 35 additions & 35 deletions Cargo.lock

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

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,11 @@ swc_core = { version = "0.90.17", features = [
testing = { version = "0.35.20" }

# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240305.2" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240307.1" }
# [TODO]: need to refactor embed_directory! macro usages, as well as resolving turbo_tasks::function, macros..
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240305.2" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240307.1" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240305.2" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-240307.1" }

# General Deps

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ export default async function Page() {
>
> - Next.js provides helpful functions you may need when fetching data in Server Components such as [`cookies`](/docs/app/api-reference/functions/cookies) and [`headers`](/docs/app/api-reference/functions/headers). These will cause the route to be dynamically rendered as they rely on request time information.
> - In Route handlers, `fetch` requests are not memoized as Route Handlers are not part of the React component tree.
> - In [Server Actions](/docs/app/building-your-application/data-fetching/server-actions-and-mutations), `fetch` requests are not cached (defaults `cache: no-store`).
> - To use `async`/`await` in a Server Component with TypeScript, you'll need to use TypeScript `5.1.3` or higher and `@types/react` `18.2.8` or higher.
### Caching Data
Expand All @@ -80,7 +81,10 @@ By default, Next.js automatically caches the returned values of `fetch` in the [
fetch('https://...', { cache: 'force-cache' })
```

`fetch` requests that use the `POST` method are also automatically cached. Unless it's inside a [Route Handler](/docs/app/building-your-application/routing/route-handlers) that uses the `POST` method, then it will not be cached.
However, there are exceptions, `fetch` requests are not cached when:

- Used inside a [Server Action](/docs/app/building-your-application/data-fetching/server-actions-and-mutations).
- Used inside a [Route Handler](/docs/app/building-your-application/routing/route-handlers) that uses the `POST` method.

> **What is the Data Cache?**
>
Expand Down
16 changes: 16 additions & 0 deletions examples/basic-css/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
export const metadata = {
title: "Next.js Basic CSS Example",
description: "Generated by Next.js",
};

export default function RootLayout({
children,
}: {
children: React.ReactNode;
}) {
return (
<html lang="en">
<body>{children}</body>
</html>
);
}
File renamed without changes.
Loading

0 comments on commit 6c6cbec

Please sign in to comment.