Skip to content

Commit

Permalink
Merge branch 'canary' into snyk-upgrade-5a7932c70c39751905a6deb93fc80465
Browse files Browse the repository at this point in the history
  • Loading branch information
mayank1513 authored Oct 4, 2023
2 parents 185f04b + ad42b61 commit 7a0a99f
Show file tree
Hide file tree
Showing 84 changed files with 605 additions and 413 deletions.
2 changes: 1 addition & 1 deletion docs/02-app/02-api-reference/04-functions/redirect.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ description: API Reference for the redirect function.

The `redirect` function allows you to redirect the user to another URL. `redirect` can be used in Server Components, Client Components, [Route Handlers](/docs/app/building-your-application/routing/route-handlers), and [Server Actions](/docs/app/building-your-application/data-fetching/forms-and-mutations).

When used in a streaming context, this will insert a meta tag to emit the redirect on the client side. Otherwise, it will serve a 307 HTTP redirect response to the caller.
When used in a [streaming context](/docs/app/building-your-application/routing/loading-ui-and-streaming#what-is-streaming), this will insert a meta tag to emit the redirect on the client side. Otherwise, it will serve a 307 HTTP redirect response to the caller.

If a resource doesn't exist, you can use the [`notFound` function](/docs/app/api-reference/functions/not-found) instead.

Expand Down
2 changes: 1 addition & 1 deletion examples/api-routes-apollo-server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"@apollo/server": "^4.1.1",
"@as-integrations/next": "^1.1.0",
"@graphql-tools/schema": "^9.0.9",
"graphql": "16.6.0",
"graphql": "16.8.1",
"graphql-tag": "^2.12.6",
"next": "latest",
"react": "^18.2.0",
Expand Down
2 changes: 1 addition & 1 deletion examples/cms-contentful/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"contentful-import": "^9.0.4",
"date-fns": "2.30.0",
"next": "latest",
"postcss": "8.4.28",
"postcss": "8.4.31",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"tailwindcss": "^3.3.3",
Expand Down
2 changes: 1 addition & 1 deletion examples/cms-cosmic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"@types/node": "^18.0.0",
"@types/react": "^18.0.14",
"autoprefixer": "10.4.7",
"postcss": "8.4.14",
"postcss": "8.4.31",
"tailwindcss": "^3.1.4",
"typescript": "^4.7.4"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/cms-datocms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"autoprefixer": "10.4.2",
"postcss": "8.4.5",
"postcss": "8.4.31",
"tailwindcss": "^3.0.15"
}
}
2 changes: 1 addition & 1 deletion examples/cms-drupal/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"devDependencies": {
"autoprefixer": "10.4.2",
"postcss": "8.4.5",
"postcss": "8.4.31",
"tailwindcss": "^3.0.15"
}
}
2 changes: 1 addition & 1 deletion examples/cms-enterspeed/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/node": "18.0.0",
"@types/react": "18.0.14",
"autoprefixer": "10.4.2",
"postcss": "8.4.5",
"postcss": "8.4.31",
"tailwindcss": "^3.0.15",
"typescript": "4.7.4"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/cms-ghost/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
"devDependencies": {
"autoprefixer": "10.4.2",
"postcss": "8.4.5",
"postcss": "8.4.31",
"tailwindcss": "^3.0.15"
}
}
2 changes: 1 addition & 1 deletion examples/cms-graphcms/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"devDependencies": {
"autoprefixer": "10.4.2",
"postcss": "8.4.5",
"postcss": "8.4.31",
"tailwindcss": "^3.0.15"
}
}
2 changes: 1 addition & 1 deletion examples/cms-kontent-ai/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
},
"devDependencies": {
"autoprefixer": "10.4.7",
"postcss": "8.4.14",
"postcss": "8.4.31",
"tailwindcss": "^3.0.15",
"tslib": "2.4.0"
}
Expand Down
2 changes: 1 addition & 1 deletion examples/cms-prepr/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"devDependencies": {
"autoprefixer": "10.4.2",
"postcss": "8.4.5",
"postcss": "8.4.31",
"tailwindcss": "^3.0.15"
}
}
2 changes: 1 addition & 1 deletion examples/cms-prismic/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
},
"devDependencies": {
"autoprefixer": "10.4.10",
"postcss": "8.4.16",
"postcss": "8.4.31",
"slice-machine-ui": "^0.4.2",
"tailwindcss": "^3.1.8",
"typescript": "^4.8.3"
Expand Down
2 changes: 1 addition & 1 deletion examples/cms-storyblok/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"autoprefixer": "10.4.2",
"postcss": "8.4.5",
"postcss": "8.4.31",
"tailwindcss": "^3.0.15"
}
}
2 changes: 1 addition & 1 deletion examples/cms-takeshape/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
},
"devDependencies": {
"autoprefixer": "10.4.2",
"postcss": "8.4.5",
"postcss": "8.4.31",
"tailwindcss": "^3.0.15"
}
}
2 changes: 1 addition & 1 deletion examples/cms-umbraco-heartcore/package.json
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
},
"devDependencies": {
"autoprefixer": "10.4.2",
"postcss": "8.4.5",
"postcss": "8.4.31",
"tailwindcss": "^3.0.15"
}
}
2 changes: 1 addition & 1 deletion examples/cms-wordpress/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
},
"devDependencies": {
"autoprefixer": "10.4.7",
"postcss": "8.4.14",
"postcss": "8.4.31",
"tailwindcss": "^3.0.24"
}
}
2 changes: 1 addition & 1 deletion examples/radix-ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"@types/node": "18.8.0",
"@types/react": "18.0.21",
"autoprefixer": "10.4.12",
"postcss": "8.4.17",
"postcss": "8.4.31",
"tailwindcss": "3.1.8",
"typescript": "4.8.4"
}
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": "13.5.5-canary.0"
"version": "13.5.5-canary.2"
}
6 changes: 6 additions & 0 deletions lint-staged.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,12 @@ module.exports = {
`git add ${escapedFileNames}`,
]
},
'**/*.rs': (filenames) => {
const escapedFileNames = filenames
.map((filename) => (isWin ? filename : escape([filename])))
.join(' ')
return [`cargo fmt -- ${escapedFileNames}`, `git add ${escapedFileNames}`]
},
}

function escape(str) {
Expand Down
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": "13.5.5-canary.0",
"version": "13.5.5-canary.2",
"keywords": [
"react",
"next",
Expand Down
2 changes: 1 addition & 1 deletion packages/create-next-app/templates/app-tw/js/app/layout.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './globals.css'
import { Inter } from 'next/font/google'
import './globals.css'

const inter = Inter({ subsets: ['latin'] })

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'

const inter = Inter({ subsets: ['latin'] })

Expand Down
2 changes: 1 addition & 1 deletion packages/create-next-app/templates/app/js/app/layout.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import './globals.css'
import { Inter } from 'next/font/google'
import './globals.css'

const inter = Inter({ subsets: ['latin'] })

Expand Down
2 changes: 1 addition & 1 deletion packages/create-next-app/templates/app/ts/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import './globals.css'
import type { Metadata } from 'next'
import { Inter } from 'next/font/google'
import './globals.css'

const inter = Inter({ subsets: ['latin'] })

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": "13.5.5-canary.0",
"version": "13.5.5-canary.2",
"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": "13.5.5-canary.0",
"@next/eslint-plugin-next": "13.5.5-canary.2",
"@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": "13.5.5-canary.0",
"version": "13.5.5-canary.2",
"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": "13.5.5-canary.0",
"version": "13.5.5-canary.2",
"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": "13.5.5-canary.0",
"version": "13.5.5-canary.2",
"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": "13.5.5-canary.0",
"version": "13.5.5-canary.2",
"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": "13.5.5-canary.0",
"version": "13.5.5-canary.2",
"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": "13.5.5-canary.0",
"version": "13.5.5-canary.2",
"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": "13.5.5-canary.0",
"version": "13.5.5-canary.2",
"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": "13.5.5-canary.0",
"version": "13.5.5-canary.2",
"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": "13.5.5-canary.0",
"version": "13.5.5-canary.2",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
8 changes: 4 additions & 4 deletions packages/next-swc/crates/next-core/src/next_import_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,7 @@ async fn insert_next_server_special_aliases(
match runtime {
NextRuntime::Edge => "next/dist/compiled/react/jsx-runtime",
NextRuntime::NodeJs => {
"next/dist/server/future/route-modules/app-page/vendored/shared/\
"next/dist/server/future/route-modules/app-page/vendored/ssr/\
react-jsx-runtime"
}
},
Expand All @@ -465,7 +465,7 @@ async fn insert_next_server_special_aliases(
match runtime {
NextRuntime::Edge => "next/dist/compiled/react/jsx-dev-runtime",
NextRuntime::NodeJs => {
"next/dist/server/future/route-modules/app-page/vendored/shared/\
"next/dist/server/future/route-modules/app-page/vendored/ssr/\
react-jsx-dev-runtime"
}
},
Expand Down Expand Up @@ -579,7 +579,7 @@ async fn insert_next_server_special_aliases(
match runtime {
NextRuntime::Edge => "next/dist/compiled/react/jsx-runtime",
NextRuntime::NodeJs => {
"next/dist/server/future/route-modules/app-page/vendored/shared/\
"next/dist/server/future/route-modules/app-page/vendored/rsc/\
react-jsx-runtime"
}
},
Expand All @@ -592,7 +592,7 @@ async fn insert_next_server_special_aliases(
match runtime {
NextRuntime::Edge => "next/dist/compiled/react/jsx-dev-runtime",
NextRuntime::NodeJs => {
"next/dist/server/future/route-modules/app-page/vendored/shared/\
"next/dist/server/future/route-modules/app-page/vendored/rsc/\
react-jsx-dev-runtime"
}
},
Expand Down
2 changes: 2 additions & 0 deletions packages/next-swc/crates/next-core/src/next_server/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ pub async fn get_server_resolve_options_context(
let unsupported_modules_resolve_plugin = UnsupportedModulesResolvePlugin::new(project_path);
let server_component_externals_plugin = ExternalCjsModulesResolvePlugin::new(
project_path,
project_path.root(),
ExternalPredicate::Only(next_config.server_component_externals()).cell(),
);
let ty = ty.into_value();
Expand All @@ -125,6 +126,7 @@ pub async fn get_server_resolve_options_context(
};
let external_cjs_modules_plugin = ExternalCjsModulesResolvePlugin::new(
project_path,
project_path.root(),
ExternalPredicate::AllExcept(next_config.transpile_packages()).cell(),
);

Expand Down
Loading

0 comments on commit 7a0a99f

Please sign in to comment.