Skip to content

Commit

Permalink
Merge branch 'canary' into feedthejim/add-no-store
Browse files Browse the repository at this point in the history
  • Loading branch information
kodiakhq[bot] committed Oct 17, 2023
2 parents 89a4a44 + 218d070 commit 0a01c77
Show file tree
Hide file tree
Showing 33 changed files with 559 additions and 227 deletions.
610 changes: 438 additions & 172 deletions Cargo.lock

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,18 @@ next-transform-dynamic = { path = "packages/next-swc/crates/next-transform-dynam
next-transform-strip-page-exports = { path = "packages/next-swc/crates/next-transform-strip-page-exports" }

# SWC crates
swc_core = { version = "0.83.28", features = [
swc_core = { version = "0.86.1", features = [
"ecma_loader_lru",
"ecma_loader_parking_lot",
] }
testing = { version = "0.34.1" }
testing = { version = "0.35.0" }

# Turbo crates
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-231013.3" }
turbopack-binding = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-231017.3" }
# [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-231013.3" }
turbo-tasks = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-231017.3" }
# [TODO]: need to refactor embed_directory! macro usage in next-core
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-231013.3" }
turbo-tasks-fs = { git = "https://github.com/vercel/turbo.git", tag = "turbopack-231017.3" }

# General Deps

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.6-canary.1"
"version": "13.5.6-canary.2"
}
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.6-canary.1",
"version": "13.5.6-canary.2",
"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": "13.5.6-canary.1",
"version": "13.5.6-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.6-canary.1",
"@next/eslint-plugin-next": "13.5.6-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.6-canary.1",
"version": "13.5.6-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.6-canary.1",
"version": "13.5.6-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.6-canary.1",
"version": "13.5.6-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.6-canary.1",
"version": "13.5.6-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.6-canary.1",
"version": "13.5.6-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.6-canary.1",
"version": "13.5.6-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.6-canary.1",
"version": "13.5.6-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.6-canary.1",
"version": "13.5.6-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.6-canary.1",
"version": "13.5.6-canary.2",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
4 changes: 2 additions & 2 deletions packages/next-swc/crates/core/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ turbopack-binding = { workspace = true, features = [
"__swc_transform_modularize_imports",
"__swc_transform_relay",
] }
react_remove_properties = "0.3.0"
remove_console = "0.4.0"
react_remove_properties = "0.5.0"
remove_console = "0.6.0"

[dev-dependencies]
turbopack-binding = { workspace = true, features = [
Expand Down
2 changes: 1 addition & 1 deletion packages/next-swc/crates/core/src/cjs_optimizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl VisitMut for CjsOptimizer {
self.data.imports.insert(
key,
ImportRecord {
module_specifier: v.value.clone().into(),
module_specifier: v.value.clone(),
},
);
}
Expand Down
6 changes: 2 additions & 4 deletions packages/next-swc/crates/core/src/optimize_server_react.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ impl Fold for OptimizeServerReact {
new_items.push(item.clone().fold_with(self));

if let ModuleItem::ModuleDecl(ModuleDecl::Import(import_decl)) = &item {
if import_decl.src.value.to_string() != "react" {
if import_decl.src.value != "react" {
continue;
}
for specifier in &import_decl.specifiers {
Expand Down Expand Up @@ -119,9 +119,7 @@ impl Fold for OptimizeServerReact {
if &f.to_id() == react_ident {
if let MemberProp::Ident(i) = &member.prop {
// Remove `React.useEffect` and `React.useLayoutEffect` calls
if i.sym.to_string() == "useEffect"
|| i.sym.to_string() == "useLayoutEffect"
{
if i.sym == "useEffect" || i.sym == "useLayoutEffect" {
return Expr::Lit(Lit::Null(Null { span: DUMMY_SP }));
}
}
Expand Down
6 changes: 3 additions & 3 deletions packages/next-swc/crates/core/src/page_config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ impl Fold for PageConfig {
for decl in &var_decl.decls {
let mut is_config = false;
if let Pat::Ident(ident) = &decl.name {
if &ident.id.sym == CONFIG_KEY {
if ident.id.sym == CONFIG_KEY {
is_config = true;
}
}
Expand Down Expand Up @@ -151,14 +151,14 @@ impl Fold for PageConfig {
match &specifier.exported {
Some(ident) => {
if let ModuleExportName::Ident(ident) = ident {
if &ident.sym == CONFIG_KEY {
if ident.sym == CONFIG_KEY {
self.handle_error("Config cannot be re-exported.", specifier.span)
}
}
}
None => {
if let ModuleExportName::Ident(ident) = &specifier.orig {
if &ident.sym == CONFIG_KEY {
if ident.sym == CONFIG_KEY {
self.handle_error("Config cannot be re-exported.", specifier.span)
}
}
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": "13.5.6-canary.1",
"version": "13.5.6-canary.2",
"private": true,
"scripts": {
"clean": "node ../../scripts/rm.mjs native",
Expand Down
16 changes: 8 additions & 8 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "13.5.6-canary.1",
"version": "13.5.6-canary.2",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -90,7 +90,7 @@
]
},
"dependencies": {
"@next/env": "13.5.6-canary.1",
"@next/env": "13.5.6-canary.2",
"@swc/helpers": "0.5.2",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
Expand Down Expand Up @@ -144,11 +144,11 @@
"@mswjs/interceptors": "0.23.0",
"@napi-rs/cli": "2.16.2",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "13.5.6-canary.1",
"@next/polyfill-nomodule": "13.5.6-canary.1",
"@next/react-dev-overlay": "13.5.6-canary.1",
"@next/react-refresh-utils": "13.5.6-canary.1",
"@next/swc": "13.5.6-canary.1",
"@next/polyfill-module": "13.5.6-canary.2",
"@next/polyfill-nomodule": "13.5.6-canary.2",
"@next/react-dev-overlay": "13.5.6-canary.2",
"@next/react-refresh-utils": "13.5.6-canary.2",
"@next/swc": "13.5.6-canary.2",
"@opentelemetry/api": "1.4.1",
"@playwright/test": "^1.35.1",
"@taskr/clear": "1.1.0",
Expand Down Expand Up @@ -191,7 +191,7 @@
"@types/ws": "8.2.0",
"@vercel/ncc": "0.34.0",
"@vercel/nft": "0.22.6",
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231013.3",
"@vercel/turbopack-ecmascript-runtime": "https://gitpkg-fork.vercel.sh/vercel/turbo/crates/turbopack-ecmascript-runtime/js?turbopack-231017.3",
"acorn": "8.5.0",
"amphtml-validator": "1.0.35",
"anser": "1.4.9",
Expand Down
3 changes: 3 additions & 0 deletions packages/next/src/server/app-render/app-render.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -728,6 +728,9 @@ async function renderToHTMLOrFlightImpl(
}

const is404 = res.statusCode === 404
if (!is404 && !hasRedirectError) {
res.statusCode = 500
}

// Preserve the existing RSC inline chunks from the page rendering.
// To avoid the same stream being operated twice, clone the origin stream for error rendering.
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": "13.5.6-canary.1",
"version": "13.5.6-canary.2",
"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": "13.5.6-canary.1",
"version": "13.5.6-canary.2",
"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": "13.5.6-canary.1",
"version": "13.5.6-canary.2",
"private": true,
"repository": {
"url": "vercel/next.js",
Expand All @@ -23,7 +23,7 @@
"third-party-capital": "1.0.20"
},
"devDependencies": {
"next": "13.5.6-canary.1",
"next": "13.5.6-canary.2",
"outdent": "0.8.0",
"prettier": "2.5.1"
},
Expand Down
26 changes: 13 additions & 13 deletions pnpm-lock.yaml

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

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { use } from 'react'

function getData({ params }) {
async function getData({ params }) {
return {
now: Date.now(),
params,
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export const revalidate = 1

export default function UnexpectedErrorPage(props) {
// use query param to only throw error during runtime, not build time
if (props.searchParams.error) {
throw new Error('Oh no')
}
return <p id="page">/unexpected-error</p>
}
7 changes: 7 additions & 0 deletions test/production/app-dir/unexpected-error/app/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
export default function Root({ children }: { children: React.ReactNode }) {
return (
<html>
<body>{children}</body>
</html>
)
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
export default function Loading() {
return <p>loading</p>
}

0 comments on commit 0a01c77

Please sign in to comment.