Skip to content

Commit

Permalink
merge canary
Browse files Browse the repository at this point in the history
  • Loading branch information
shuding committed May 4, 2023
2 parents 1ae5e0d + aec49ec commit 9129e5f
Show file tree
Hide file tree
Showing 60 changed files with 325 additions and 119 deletions.
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.3.5-canary.8"
"version": "13.3.5-canary.9"
}
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.3.5-canary.8",
"version": "13.3.5-canary.9",
"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.3.5-canary.8",
"version": "13.3.5-canary.9",
"description": "ESLint configuration used by NextJS.",
"main": "index.js",
"license": "MIT",
Expand All @@ -9,7 +9,7 @@
"directory": "packages/eslint-config-next"
},
"dependencies": {
"@next/eslint-plugin-next": "13.3.5-canary.8",
"@next/eslint-plugin-next": "13.3.5-canary.9",
"@rushstack/eslint-patch": "^1.1.3",
"@typescript-eslint/parser": "^5.42.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.3.5-canary.8",
"version": "13.3.5-canary.9",
"description": "ESLint plugin for NextJS.",
"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.3.5-canary.8",
"version": "13.3.5-canary.9",
"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.3.5-canary.8",
"version": "13.3.5-canary.9",
"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.3.5-canary.8",
"version": "13.3.5-canary.9",
"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.3.5-canary.8",
"version": "13.3.5-canary.9",
"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.3.5-canary.8",
"version": "13.3.5-canary.9",
"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.3.5-canary.8",
"version": "13.3.5-canary.9",
"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.3.5-canary.8",
"version": "13.3.5-canary.9",
"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.3.5-canary.8",
"version": "13.3.5-canary.9",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
5 changes: 4 additions & 1 deletion packages/next-swc/crates/core/src/server_actions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1205,7 +1205,8 @@ fn annotate_ident_as_action(
generate_action_id(file_name, export_name).into(),
));

// myAction.$$bound = [];
// myAction.$$bound = [arg1, arg2, arg3];
// or myAction.$$bound = null; if there are no bound values.
annotations.push(annotate(
&ident,
"$$bound",
Expand All @@ -1219,6 +1220,8 @@ fn annotate_ident_as_action(
optional: false,
}),
}))
} else if bound.is_empty() {
Lit::Null(Null { span: DUMMY_SP }).into()
} else {
ArrayLit {
span: DUMMY_SP,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
}
fn.$$typeof = Symbol.for("react.server.reference");
fn.$$id = "6d53ce510b2e36499b8f56038817b9bad86cabb4";
fn.$$bound = [];
fn.$$bound = null;
return <div>App</div>;
}
export async function $$ACTION_0(closure) {}
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ ensureServerEntryExports([
]);
foo.$$typeof = Symbol.for("react.server.reference");
foo.$$id = "ab21efdafbe611287bc25c0462b1e0510d13e48b";
foo.$$bound = [];
foo.$$bound = null;
foo.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ ensureServerEntryExports([
]);
bar.$$typeof = Symbol.for("react.server.reference");
bar.$$id = "ac840dcaf5e8197cb02b7f3a43c119b7a770b272";
bar.$$bound = [];
bar.$$bound = null;
bar.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ ensureServerEntryExports([
]);
x.$$typeof = Symbol.for("react.server.reference");
x.$$id = "b78c261f135a7a852508c2920bd7228020ff4bd7";
x.$$bound = [];
x.$$bound = null;
x.$$with_bound = false;
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
/* __next_internal_action_entry_do_not_use__ $$ACTION_1 */ const foo = ($$ACTION_0 = ()=>$$ACTION_1($$ACTION_0.$$bound), $$ACTION_0.$$typeof = Symbol.for("react.server.reference"), $$ACTION_0.$$id = "188d5d945750dc32e2c842b93c75a65763d4a922", $$ACTION_0.$$bound = [], $$ACTION_0);
/* __next_internal_action_entry_do_not_use__ $$ACTION_1 */ const foo = ($$ACTION_0 = ()=>$$ACTION_1($$ACTION_0.$$bound), $$ACTION_0.$$typeof = Symbol.for("react.server.reference"), $$ACTION_0.$$id = "188d5d945750dc32e2c842b93c75a65763d4a922", $$ACTION_0.$$bound = null, $$ACTION_0);
export const $$ACTION_1 = (closure)=>{};
var $$ACTION_0;
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* __next_internal_action_entry_do_not_use__ $$ACTION_1 */ const foo = ($$ACTION_0 = async ()=>$$ACTION_1($$ACTION_0.$$bound), $$ACTION_0.$$typeof = Symbol.for("react.server.reference"), $$ACTION_0.$$id = "188d5d945750dc32e2c842b93c75a65763d4a922", $$ACTION_0.$$bound = [], $$ACTION_0);
/* __next_internal_action_entry_do_not_use__ $$ACTION_1 */ const foo = ($$ACTION_0 = async ()=>$$ACTION_1($$ACTION_0.$$bound), $$ACTION_0.$$typeof = Symbol.for("react.server.reference"), $$ACTION_0.$$id = "188d5d945750dc32e2c842b93c75a65763d4a922", $$ACTION_0.$$bound = null, $$ACTION_0);
export const $$ACTION_1 = async (closure)=>{
'use strict';
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ ensureServerEntryExports([
]);
foo.$$typeof = Symbol.for("react.server.reference");
foo.$$id = "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d";
foo.$$bound = [];
foo.$$bound = null;
foo.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ ensureServerEntryExports([
]);
$$ACTION_0.$$typeof = Symbol.for("react.server.reference");
$$ACTION_0.$$id = "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d";
$$ACTION_0.$$bound = [];
$$ACTION_0.$$bound = null;
$$ACTION_0.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ ensureServerEntryExports([
]);
foo.$$typeof = Symbol.for("react.server.reference");
foo.$$id = "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d";
foo.$$bound = [];
foo.$$bound = null;
foo.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ ensureServerEntryExports([
]);
foo.$$typeof = Symbol.for("react.server.reference");
foo.$$id = "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d";
foo.$$bound = [];
foo.$$bound = null;
foo.$$with_bound = false;
bar.$$typeof = Symbol.for("react.server.reference");
bar.$$id = "ac840dcaf5e8197cb02b7f3a43c119b7a770b272";
bar.$$bound = [];
bar.$$bound = null;
bar.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ ensureServerEntryExports([
]);
foo.$$typeof = Symbol.for("react.server.reference");
foo.$$id = "ab21efdafbe611287bc25c0462b1e0510d13e48b";
foo.$$bound = [];
foo.$$bound = null;
foo.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ ensureServerEntryExports([
]);
$$ACTION_0.$$typeof = Symbol.for("react.server.reference");
$$ACTION_0.$$id = "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d";
$$ACTION_0.$$bound = [];
$$ACTION_0.$$bound = null;
$$ACTION_0.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ ensureServerEntryExports([
]);
foo.$$typeof = Symbol.for("react.server.reference");
foo.$$id = "ab21efdafbe611287bc25c0462b1e0510d13e48b";
foo.$$bound = [];
foo.$$bound = null;
foo.$$with_bound = false;
bar.$$typeof = Symbol.for("react.server.reference");
bar.$$id = "ac840dcaf5e8197cb02b7f3a43c119b7a770b272";
bar.$$bound = [];
bar.$$bound = null;
bar.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
}
myAction.$$typeof = Symbol.for("react.server.reference");
myAction.$$id = "6d53ce510b2e36499b8f56038817b9bad86cabb4";
myAction.$$bound = [];
myAction.$$bound = null;
myAction.$$with_bound = false;
export const $$ACTION_0 = myAction;
export default function Page() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ ensureServerEntryExports([
]);
foo.$$typeof = Symbol.for("react.server.reference");
foo.$$id = "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d";
foo.$$bound = [];
foo.$$bound = null;
foo.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export async function $$ACTION_1(closure, z = closure[1]) {
return x + closure[0] + z;
}
var $$ACTION_0;
validator(($$ACTION_2 = async ()=>$$ACTION_3($$ACTION_2.$$bound), $$ACTION_2.$$typeof = Symbol.for("react.server.reference"), $$ACTION_2.$$id = "56a859f462d35a297c46a1bbd1e6a9058c104ab8", $$ACTION_2.$$bound = [], $$ACTION_2));
validator(($$ACTION_2 = async ()=>$$ACTION_3($$ACTION_2.$$bound), $$ACTION_2.$$typeof = Symbol.for("react.server.reference"), $$ACTION_2.$$id = "56a859f462d35a297c46a1bbd1e6a9058c104ab8", $$ACTION_2.$$bound = null, $$ACTION_2));
export const $$ACTION_3 = async (closure)=>{};
var $$ACTION_2;
another(validator(($$ACTION_4 = async ()=>$$ACTION_5($$ACTION_4.$$bound), $$ACTION_4.$$typeof = Symbol.for("react.server.reference"), $$ACTION_4.$$id = "1383664d1dc2d9cfe33b88df3fa0eaffef8b99bc", $$ACTION_4.$$bound = [], $$ACTION_4)));
another(validator(($$ACTION_4 = async ()=>$$ACTION_5($$ACTION_4.$$bound), $$ACTION_4.$$typeof = Symbol.for("react.server.reference"), $$ACTION_4.$$id = "1383664d1dc2d9cfe33b88df3fa0eaffef8b99bc", $$ACTION_4.$$bound = null, $$ACTION_4)));
export const $$ACTION_5 = async (closure)=>{};
var $$ACTION_4;
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ ensureServerEntryExports([
]);
action.$$typeof = Symbol.for("react.server.reference");
action.$$id = "f14702b5a021dd117f7ec7a3c838f397c2046d3b";
action.$$bound = [];
action.$$bound = null;
action.$$with_bound = false;
$$ACTION_0.$$typeof = Symbol.for("react.server.reference");
$$ACTION_0.$$id = "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d";
$$ACTION_0.$$bound = [];
$$ACTION_0.$$bound = null;
$$ACTION_0.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ ensureServerEntryExports([
]);
myAction.$$typeof = Symbol.for("react.server.reference");
myAction.$$id = "e10665baac148856374b2789aceb970f66fec33e";
myAction.$$bound = [];
myAction.$$bound = null;
myAction.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ ensureServerEntryExports([
]);
a.$$typeof = Symbol.for("react.server.reference");
a.$$id = "6e7bc104e4d6e7fda190c4a51be969cfd0be6d6d";
a.$$bound = [];
a.$$bound = null;
a.$$with_bound = false;
b.$$typeof = Symbol.for("react.server.reference");
b.$$id = "d1f7eb64271d7c601dfef7d4d7053de1c2ca4338";
b.$$bound = [];
b.$$bound = null;
b.$$with_bound = false;
c.$$typeof = Symbol.for("react.server.reference");
c.$$id = "1ab723c80dcca470e0410b4b2a2fc2bf21f41476";
c.$$bound = [];
c.$$bound = null;
c.$$with_bound = false;
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
}
myAction.$$typeof = Symbol.for("react.server.reference");
myAction.$$id = "6d53ce510b2e36499b8f56038817b9bad86cabb4";
myAction.$$bound = [];
myAction.$$bound = null;
myAction.$$with_bound = false;
export const $$ACTION_0 = myAction;
export default function Page() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ ensureServerEntryExports([
]);
foo.$$typeof = Symbol.for("react.server.reference");
foo.$$id = "ab21efdafbe611287bc25c0462b1e0510d13e48b";
foo.$$bound = [];
foo.$$bound = null;
foo.$$with_bound = false;
bar.$$typeof = Symbol.for("react.server.reference");
bar.$$id = "050e3854b72b19e3c7e3966a67535543a90bf7e0";
bar.$$bound = [];
bar.$$bound = null;
bar.$$with_bound = false;
qux.$$typeof = Symbol.for("react.server.reference");
qux.$$id = "c18c215a6b7cdc64bf709f3a714ffdef1bf9651d";
qux.$$bound = [];
qux.$$bound = null;
qux.$$with_bound = false;
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.3.5-canary.8",
"version": "13.3.5-canary.9",
"private": true,
"scripts": {
"clean": "rm -rf ./native/*",
Expand Down
14 changes: 7 additions & 7 deletions packages/next/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "next",
"version": "13.3.5-canary.8",
"version": "13.3.5-canary.9",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -83,7 +83,7 @@
]
},
"dependencies": {
"@next/env": "13.3.5-canary.8",
"@next/env": "13.3.5-canary.9",
"@swc/helpers": "0.5.1",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001406",
Expand Down Expand Up @@ -142,11 +142,11 @@
"@jest/types": "29.5.0",
"@napi-rs/cli": "2.14.7",
"@napi-rs/triples": "1.1.0",
"@next/polyfill-module": "13.3.5-canary.8",
"@next/polyfill-nomodule": "13.3.5-canary.8",
"@next/react-dev-overlay": "13.3.5-canary.8",
"@next/react-refresh-utils": "13.3.5-canary.8",
"@next/swc": "13.3.5-canary.8",
"@next/polyfill-module": "13.3.5-canary.9",
"@next/polyfill-nomodule": "13.3.5-canary.9",
"@next/react-dev-overlay": "13.3.5-canary.9",
"@next/react-refresh-utils": "13.3.5-canary.9",
"@next/swc": "13.3.5-canary.9",
"@opentelemetry/api": "1.4.1",
"@segment/ajv-human-errors": "2.1.2",
"@taskr/clear": "1.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/build/webpack/loaders/next-app-loader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ const nextAppLoader: AppLoader = async function nextAppLoader() {
export * as serverHooks from 'next/dist/client/components/hooks-server-context'
export { renderToReadableStream, decodeReply } from 'react-server-dom-webpack/server.edge'
export { renderToReadableStream, decodeReply, decodeAction } from 'react-server-dom-webpack/server.edge'
export const __next_app_webpack_require__ = __webpack_require__
export { preloadStyle, preloadFont, preconnect } from 'next/dist/server/app-render/rsc/preloads'
Expand Down
2 changes: 1 addition & 1 deletion packages/next/src/lib/metadata/generate/icons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ function IconDescriptorLink({ icon }: { icon: IconDescriptor }) {

function IconLink({ rel, icon }: { rel?: string; icon: Icon }) {
if (typeof icon === 'object' && !(icon instanceof URL)) {
if (rel) icon.rel = rel
if (!icon.rel && rel) icon.rel = rel
return <IconDescriptorLink icon={icon} />
} else {
const href = icon.toString()
Expand Down
6 changes: 3 additions & 3 deletions packages/next/src/lib/metadata/resolvers/resolve-opengraph.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import type { FieldResolverWithMetadataBase } from '../types/resolvers'
import type { ResolvedTwitterMetadata, Twitter } from '../types/twitter-types'
import { resolveAsArrayOrUndefined } from '../generate/utils'
import {
getFallbackMetadataBaseIfPresent,
getSocialImageFallbackMetadataBase,
isStringOrURL,
resolveUrl,
} from './resolve-url'
Expand Down Expand Up @@ -101,7 +101,7 @@ export const resolveOpenGraph: FieldResolverWithMetadataBase<'openGraph'> = (
}
}

const imageMetadataBase = getFallbackMetadataBaseIfPresent(metadataBase)
const imageMetadataBase = getSocialImageFallbackMetadataBase(metadataBase)
resolved.images = resolveImages(og.images, imageMetadataBase)
}

Expand Down Expand Up @@ -132,7 +132,7 @@ export const resolveTwitter: FieldResolverWithMetadataBase<'twitter'> = (
for (const infoKey of TwitterBasicInfoKeys) {
resolved[infoKey] = twitter[infoKey] || null
}
const imageMetadataBase = getFallbackMetadataBaseIfPresent(metadataBase)
const imageMetadataBase = getSocialImageFallbackMetadataBase(metadataBase)
resolved.images = resolveImages(twitter.images, imageMetadataBase)

if ('card' in resolved) {
Expand Down
Loading

0 comments on commit 9129e5f

Please sign in to comment.