Skip to content

Commit

Permalink
Merge branch 'canary' into fix/draft-mode-invariant
Browse files Browse the repository at this point in the history
  • Loading branch information
Ethan-Arrowood committed Feb 21, 2024
2 parents 7042b15 + 79b7cb5 commit 5513684
Show file tree
Hide file tree
Showing 26 changed files with 63 additions and 12,937 deletions.
2 changes: 2 additions & 0 deletions docs/02-app/02-api-reference/01-components/link.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,8 @@ Prefetching happens when a `<Link />` component enters the user's viewport (init
- **`true` (default)**: The full route and its data will be prefetched.
- `false`: Prefetching will be disabled.

> **Good to know**: When `prefetch` is set to `false`, prefetching will still occur on hover.
```tsx filename="pages/index.tsx" switcher
import Link from 'next/link'

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": "14.1.1-canary.65"
"version": "14.1.1-canary.66"
}
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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"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": "14.1.1-canary.65",
"@next/eslint-plugin-next": "14.1.1-canary.66",
"@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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"description": "A polyfill for non-dead, nomodule browsers.",
"main": "dist/polyfill-nomodule.js",
"license": "MIT",
Expand Down
7 changes: 1 addition & 6 deletions packages/next-swc/crates/next-core/src/app_structure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ async fn get_directory_tree_internal(
// appDir ignores paths starting with an underscore
if !basename.starts_with('_') {
let result = get_directory_tree(dir, page_extensions);
subdirectories.insert(get_underscore_normalized_path(basename), result);
subdirectories.insert(basename.to_string(), result);
}
}
// TODO(WEB-952) handle symlinks in app dir
Expand Down Expand Up @@ -1145,11 +1145,6 @@ async fn directory_tree_to_entrypoints_internal_untraced(
Ok(Vc::cell(result))
}

/// If path contains %5F, replace it with _. [reference](https://github.com/vercel/next.js/blob/c390c1662bc79e12cf7c037dcb382ef5ead6e492/packages/next/src/build/entries.ts#L119)
fn get_underscore_normalized_path(path: &str) -> String {
path.replace("%5F", "_")
}

/// Returns the global metadata for an app directory.
#[turbo_tasks::function]
pub async fn get_global_metadata(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,17 +208,23 @@ impl ClientReferenceManifest {

let client_reference_manifest_json = serde_json::to_string(&entry_manifest).unwrap();

// We put normalized path for the each entry key and the manifest output path,
// to conform next.js's load client reference manifest behavior:
// https://github.com/vercel/next.js/blob/2f9d718695e4c90be13c3bf0f3647643533071bf/packages/next/src/server/load-components.ts#L162-L164
// note this only applies to the manifests, assets are placed to the original
// path still (same as webpack does)
let normalized_manifest_entry = entry_name.replace("%5F", "_");
Ok(Vc::upcast(VirtualOutputAsset::new(
node_root.join(format!(
"server/app/{entry_name}_client-reference-manifest.js",
"server/app{normalized_manifest_entry}_client-reference-manifest.js",
)),
AssetContent::file(
File::from(formatdoc! {
r#"
globalThis.__RSC_MANIFEST = globalThis.__RSC_MANIFEST || {{}};
globalThis.__RSC_MANIFEST[{entry_name}] = {manifest}
"#,
entry_name = StringifyJs(&entry_name),
entry_name = StringifyJs(&normalized_manifest_entry),
manifest = &client_reference_manifest_json
})
.into(),
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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"private": true,
"scripts": {
"clean": "node ../../scripts/rm.mjs 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": "14.1.1-canary.65",
"version": "14.1.1-canary.66",
"description": "The React Framework",
"main": "./dist/server/next.js",
"license": "MIT",
Expand Down Expand Up @@ -92,7 +92,7 @@
]
},
"dependencies": {
"@next/env": "14.1.1-canary.65",
"@next/env": "14.1.1-canary.66",
"@swc/helpers": "0.5.5",
"busboy": "1.6.0",
"caniuse-lite": "^1.0.30001579",
Expand Down Expand Up @@ -136,7 +136,7 @@
"@babel/runtime": "7.22.5",
"@babel/traverse": "7.22.5",
"@babel/types": "7.22.5",
"@capsizecss/metrics": "1.1.0",
"@capsizecss/metrics": "2.0.0",
"@edge-runtime/cookies": "4.0.2",
"@edge-runtime/ponyfill": "2.4.1",
"@edge-runtime/primitives": "4.0.2",
Expand All @@ -145,10 +145,10 @@
"@jest/types": "29.5.0",
"@mswjs/interceptors": "0.23.0",
"@napi-rs/triples": "1.2.0",
"@next/polyfill-module": "14.1.1-canary.65",
"@next/polyfill-nomodule": "14.1.1-canary.65",
"@next/react-refresh-utils": "14.1.1-canary.65",
"@next/swc": "14.1.1-canary.65",
"@next/polyfill-module": "14.1.1-canary.66",
"@next/polyfill-nomodule": "14.1.1-canary.66",
"@next/react-refresh-utils": "14.1.1-canary.66",
"@next/swc": "14.1.1-canary.66",
"@opentelemetry/api": "1.6.0",
"@playwright/test": "1.41.2",
"@taskr/clear": "1.1.0",
Expand Down

0 comments on commit 5513684

Please sign in to comment.