Skip to content

Commit

Permalink
Merge branch 'canary' into patch-1
Browse files Browse the repository at this point in the history
  • Loading branch information
ijjk committed Apr 15, 2024
2 parents e59ab69 + 64da71c commit 7cf11a9
Show file tree
Hide file tree
Showing 164 changed files with 5,134 additions and 1,333 deletions.
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ node_modules
**/.vscode/**
**/dist/**
e2e-tests/**
examples/cms-sanity/sanity.types.ts
examples/with-eslint/**
examples/with-typescript-eslint-jest/**
examples/with-kea/**
Expand Down
4 changes: 2 additions & 2 deletions .github/actions/next-integration-stat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"engines": {
"node": ">=18.17.0",
"pnpm": "8.15.4"
"pnpm": "8.15.7"
},
"packageManager": "pnpm@8.15.4"
"packageManager": "pnpm@8.15.7"
}
4 changes: 2 additions & 2 deletions .github/actions/next-stats-action/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"engines": {
"node": ">=18.17.0",
"pnpm": "8.15.4"
"pnpm": "8.15.7"
},
"packageManager": "pnpm@8.15.4"
"packageManager": "pnpm@8.15.7"
}
4 changes: 2 additions & 2 deletions .github/actions/upload-turboyet-data/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"engines": {
"node": ">=18.17.0",
"pnpm": "8.15.4"
"pnpm": "8.15.7"
},
"packageManager": "pnpm@8.15.4"
"packageManager": "pnpm@8.15.7"
}
3 changes: 3 additions & 0 deletions .github/workflows/build_and_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,9 @@ jobs:
cache-provider: 'turbo'
shared-key: build-${{ matrix.settings.target }}-${{ hashFiles('.cargo/config.toml') }}

- name: Clear native build
run: rm -rf packages/next-swc/native

# we only need custom caching for docker builds
# as they are on an older Node.js version and have
# issues with turbo caching
Expand Down
32 changes: 16 additions & 16 deletions Cargo.lock

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

3 changes: 2 additions & 1 deletion azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,9 @@ stages:
- script: npx playwright@1.35.1 install chromium
condition: eq(variables['isDocsOnly'], 'No')

# Test critical app router and CNA tests to cover basic usage cases with windows
- script: |
node run-tests.js -c 1 test/production/pages-dir/production/test/index.test.ts test/integration/css-client-nav/test/index.test.js test/integration/rewrites-has-condition/test/index.test.js
node run-tests.js -c 1 test/production/pages-dir/production/test/index.test.ts test/integration/css-client-nav/test/index.test.js test/integration/rewrites-has-condition/test/index.test.js test/integration/create-next-app/examples.test.ts test/integration/create-next-app/index.test.ts test/integration/create-next-app/package-manager/pnpm.test.ts
condition: eq(variables['isDocsOnly'], 'No')
displayName: 'Run tests'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -917,6 +917,7 @@ export function addItem() {
Defining a Server Action inside a component creates a [closure](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Closures) where the action has access to the outer function's scope. For example, the `publish` action has access to the `publishVersion` variable:
```tsx filename="app/page.tsx" switcher
'use client'
export default function Page() {
const publishVersion = await getLatestVersion();

Expand All @@ -928,11 +929,12 @@ export default function Page() {
...
}

return <button action={publish}>Publish</button>;
return <button onClick={publish}>Publish</button>;
}
```
```jsx filename="app/page.js" switcher
'use client'
export default function Page() {
const publishVersion = await getLatestVersion();

Expand All @@ -944,7 +946,7 @@ export default function Page() {
...
}

return <button action={publish}>Publish</button>;
return <button onClick={publish}>Publish</button>;
}
```
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,11 +72,11 @@ const nextConfig = {
config,
{ buildId, dev, isServer, defaultLoaders, nextRuntime, webpack }
) => {
if (cfg.cache && !dev) {
cfg.cache = Object.freeze({
if (config.cache && !dev) {
config.cache = Object.freeze({
type: 'memory',
})
cfg.cache.maxMemoryGenerations = 0
config.cache.maxMemoryGenerations = 0
}
// Important: return the modified config
return config
Expand Down

0 comments on commit 7cf11a9

Please sign in to comment.