Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[pull] canary from vercel:canary #565

Merged
merged 921 commits into from
Jul 21, 2023
Merged
Changes from 1 commit
Commits
Show all changes
921 commits
Select commit Hold shift + click to select a range
8eb9730
Avoid unnecessary `resolveExternal` calls (#52053)
shuding Jul 3, 2023
805bfa4
Remove EnvironmentIntention (#51965)
alexkirsz Jul 3, 2023
10605a1
Renable flaky tests disabled before (#51680)
huozhi Jul 3, 2023
c87a1b1
fix: env hot reload for RSC pages (#51930)
huozhi Jul 3, 2023
eca3153
v13.4.8-canary.15
vercel-release-bot Jul 3, 2023
f6a1522
ReverseTopological -> AdjacencyMap (#52032)
alexkirsz Jul 3, 2023
11bd772
Add missing url hash (#52123)
ysm-dev Jul 3, 2023
4b4731d
Revert "ReverseTopological -> AdjacencyMap" (#52139)
huozhi Jul 3, 2023
b4a875e
v13.4.8
vercel-release-bot Jul 3, 2023
cd9372c
Reland "ReverseTopological -> AdjacencyMap"" (#52142)
huozhi Jul 3, 2023
3a87f00
Change the Server Actions feature flag to be validated at compile tim…
shuding Jul 3, 2023
d8ad0d3
Fix `modularizeImports` transform of `antd` (#52148)
shuding Jul 3, 2023
e477e01
Update test result step (#52154)
ijjk Jul 3, 2023
b4b98e8
Update result job condition (#52155)
ijjk Jul 3, 2023
e17218f
fix: next.config.js with `unstable_getImgProps()` (#52153)
styfle Jul 3, 2023
f60b562
v13.4.9-canary.0
vercel-release-bot Jul 4, 2023
b8ae8d2
update tests list to include all passing tests (#52026)
sokra Jul 4, 2023
5d06b79
Support scroll: false for Link component for app router (#51869)
timneutkens Jul 4, 2023
4f75c79
v13.4.9-canary.1
vercel-release-bot Jul 4, 2023
ae3db7c
Memoize useRouter from next/navigation when used in Pages Router (#52…
timneutkens Jul 4, 2023
9e4b87d
chore(deps): bump react `18.3.0-canary-1fdacbefd-20230630` (#52005)
styfle Jul 4, 2023
0b87ba2
fix: infinite dev reloads when parallel route is treated a page entry…
ztanner Jul 4, 2023
df82f1a
disable flaky test cases (#52184)
sokra Jul 4, 2023
12f2a66
Revert "chore(deps): bump react `18.3.0-canary-1fdacbefd-20230630`" (…
sokra Jul 4, 2023
532f779
update turbopack (#52186)
sokra Jul 4, 2023
13cfc2b
Update CustomModuleType import (#52133)
alexkirsz Jul 4, 2023
6cb6092
fix workflow needs (#52180)
sokra Jul 4, 2023
cd66e76
Skip build-time dynamic code checks for specific polyfills in the Edg…
shuding Jul 4, 2023
3406e13
Update Turbopack (#52198)
alexkirsz Jul 4, 2023
220377e
Use base36 for the RSC query (#52204)
shuding Jul 4, 2023
9bd5169
Fix `dynamicParams` check in TS plugin (#52211)
shuding Jul 4, 2023
8aa9a52
Fix tree shaking for image generation module (#51950)
shuding Jul 4, 2023
fd508b0
fix env reloading for turbopack (#52194)
sokra Jul 4, 2023
003f7dd
Remove zod from require-hook (#52197)
huozhi Jul 5, 2023
972d29b
Update generate-image-metadata.mdx (#52230)
simonswiss Jul 5, 2023
b2bf446
Optimize watch ignore (#52238)
timneutkens Jul 5, 2023
0b47075
v13.4.9-canary.2
vercel-release-bot Jul 5, 2023
baf3d2f
Fix title crashing while post processing metadata (#52196)
huozhi Jul 5, 2023
ef89890
Ensure Webpack isn't loaded in render workers (#52241)
shuding Jul 5, 2023
13e769a
Improve error message when using per function "use server" in Client …
shuding Jul 5, 2023
394533f
next-flight-css-loader - fix !=! support (#51115)
jantimon Jul 5, 2023
44d1a1c
docs: Migrate error messages to MDX and App Router. (#52038)
delbaoliveira Jul 5, 2023
6885b98
feat(turbopack): add crypto polyfill (#51622)
kwonoj Jul 5, 2023
a8d09d7
Fix small memory leaks (#52257)
shuding Jul 5, 2023
9049c0f
Update eslint-plugin-react-hooks to 5.0.0-canary-7118f5dd7-20230705 (…
acdlite Jul 5, 2023
ff1f75a
Fix stream cancellation in `RenderResult.pipe()` and `sendResponse()`…
jridgewell Jul 5, 2023
dd0a9d0
Revert "Update eslint-plugin-react-hooks to 5.0.0-canary-7118f5dd7-20…
ijjk Jul 5, 2023
9151362
Make tests result check more accurate (#52273)
ijjk Jul 5, 2023
5046ee1
Revert "Fix stream cancellation in `RenderResult.pipe()` and `sendRes…
ijjk Jul 5, 2023
8dc0b1b
Fix app cache enabling case (#52278)
ijjk Jul 5, 2023
941757f
chore(docs): remove "Legacy" from Preview Mode (#52284)
styfle Jul 5, 2023
8e1fa7e
docs: add a missing open brackets in a next/link custom component (#5…
nauvalazhar Jul 5, 2023
31dee6f
chore: remove experimental `appDir: true` from examples (#52289)
styfle Jul 5, 2023
267c2d2
Use 127.0.0.1 as the default host for the standalone server (#52283)
shuding Jul 5, 2023
e278326
chore: update issue template option to "App Router" (#52287)
styfle Jul 5, 2023
f9a1813
Remove the outdated error for find page dir (#52274)
huozhi Jul 5, 2023
0048908
Remove legacy head.js in examples (#52292)
huozhi Jul 5, 2023
3fb3bbb
Disable flakey turbopack env test (#52295)
ijjk Jul 6, 2023
927fc9e
skip hot reload sync event for applying hmr updates (#52270)
huozhi Jul 6, 2023
bd02b4d
docs: Add clearer instructions on the storage location of mdx-compone…
feikerwu Jul 6, 2023
8ed2b27
Handle 409s in fetch cache (#51652)
lubakravche Jul 6, 2023
525ffb4
chore: remove experimental `appDir: true` from tests (#52291)
styfle Jul 6, 2023
6527d29
docs: Improve some of the error messages pages. (#52271)
leerob Jul 6, 2023
ea67696
fix: correct `modularizeImports` for antd & ant-design/icons (#52169)
masnormen Jul 6, 2023
cee0599
fix wrong Link import (#52298)
woohsi Jul 6, 2023
37c40b7
Update checksum algorithm to SHA1 (#52102)
shuding Jul 6, 2023
6dafc42
chore(deps): bump react to 7118f5dd7 (#52282)
styfle Jul 6, 2023
bb8cf5e
Update eslint-plugin-react-hooks to 5.0.0-canary-7118f5dd7-20230705 (…
acdlite Jul 6, 2023
26c0730
[Docs] Document redirect parameters (#51987)
delbaoliveira Jul 6, 2023
2743d0c
msic: disable otel esm test (#52325)
feedthejim Jul 6, 2023
ec19537
Named page chunks (#51921)
alexkirsz Jul 6, 2023
931b1b5
[Docs] Add manual installation instructions for pages (#51995)
delbaoliveira Jul 6, 2023
202dcb0
Update 10-router-handlers.mdx (#52098)
mhmdrioaf Jul 6, 2023
38e45f2
Add app router example (#52066)
Jul 6, 2023
9141586
chore: fix next dev turbopack benchmark (#52328)
styfle Jul 6, 2023
b095e9e
Test Progressive Enhancement of Server Actions (#52062)
sebmarkbage Jul 6, 2023
a17f07a
doc: update typo in instrumentation page (#52311)
vincenthongzy Jul 6, 2023
ce483fd
fix(create-next-app): add missing metadata type (#52299)
yigithanyucedag Jul 6, 2023
c878caa
Fix to use keep-alive in standalone mode (#50221)
doinki Jul 6, 2023
21392cb
v13.4.9-canary.3
vercel-release-bot Jul 6, 2023
1045644
v13.4.9
vercel-release-bot Jul 6, 2023
f0fc83b
Fix trailing slash with locale domain (#52343)
ijjk Jul 6, 2023
1fbb513
perf: use fs.readdirSync with withFileTypes (#52340)
anonrig Jul 6, 2023
1c2de83
Make `get_client_chunking_context` independent of context (#51928)
alexkirsz Jul 6, 2023
4b2eef4
perf: use fs.opendir for better resource usage (#52341)
anonrig Jul 6, 2023
2c12c6a
chore(docs): fix link to `useSearchParams` (#52348)
gfgabrielfranca Jul 6, 2023
2721714
fix: metadatabase warning message (#52363)
styfle Jul 7, 2023
eb3d748
perf: simplify getShortDynamicParamType on app-render (#52355)
anonrig Jul 7, 2023
412992a
fix: prevent infinite dev refresh on nested parallel routes (#52362)
ztanner Jul 7, 2023
deb1d19
docs: Clarify `create-next-app` requires public GitHub URLs. (#52367)
leerob Jul 7, 2023
a3d5a85
add incremental cache for node.js app rendering (#52172)
sokra Jul 7, 2023
89bccd0
Refactor metadata og and twitter title to be always presented (#52320)
huozhi Jul 7, 2023
b2c6bc4
v13.4.10-canary.0
vercel-release-bot Jul 7, 2023
27a252b
chore(ci): update logging for release (#52357)
styfle Jul 7, 2023
67d7219
Fix typos in examples/with-redux (#52368)
kelly-keating Jul 7, 2023
d5f355a
perf: improve URL validation performance (#52353)
anonrig Jul 7, 2023
b0e4d8e
[Docs] remove unnecessary dot. (#52387)
Bitbbot Jul 7, 2023
82dd3db
perf: reduce system calls on eslint plugin (#52359)
anonrig Jul 7, 2023
ffc471c
Turbopack: Use a different chunking context for web entry (#52404)
alexkirsz Jul 7, 2023
f45a7fc
Temporarily revert change to pages render (#52407)
wyattjoh Jul 7, 2023
d11aafb
Update swc_core to `v0.79.13` (#52371)
kdy1 Jul 7, 2023
d660bc9
Remove integration tests now in vercel/turbo (#52413)
wbinnssmith Jul 7, 2023
b8589df
Update Rust nightly toolchain (#51757)
alexkirsz Jul 7, 2023
e50c918
Cache concurrent `ensurePage` requests for the same page (#52360)
shuding Jul 7, 2023
9ccc6fc
[turbopack]: Remove skipped integration tests (#52421)
jridgewell Jul 7, 2023
0abc874
chore(ci): fix turbo input path globs (#52414)
styfle Jul 8, 2023
99490de
fix metadata-related typo in MDX documentation (#52446)
BrennanColberg Jul 9, 2023
632a582
Fix metadata layer webpack rule for server-only (#52403)
huozhi Jul 9, 2023
1ffada9
docs: Simplify message in React essentials section. (#52469)
Nick-Mazuk Jul 9, 2023
7ea788e
docs: Improve error handling docs for server-side errors. (#52302)
delbaoliveira Jul 9, 2023
a2618ed
examples: Update Convex to latest version (`0.19`) (#52473)
thomasballinger Jul 9, 2023
399fa9c
docs: Add Playwright/Cypress Discord links (#52084)
lucgagan Jul 9, 2023
ef6cb4c
docs: Add Kuma to CSS-in-JS supported list. (#52438)
nroland013 Jul 9, 2023
ea000d1
docs: clarify `fetch` request de-duplication (#52100)
fuma-nama Jul 9, 2023
922498e
docs: Update TypeScript plugin section for VS Code prompt (#52111)
jenewland1999 Jul 9, 2023
4f8f9ae
docs: Improve hydration mismatch error guide. (#52481)
leerob Jul 10, 2023
af1948b
docs: add Supabase loader for `next/image` (#52480)
thorwebdev Jul 10, 2023
2ef8938
docs: fix the incrementalCacheHandlerPath (#52124)
jyunhanlin Jul 10, 2023
85033e3
Override file based images with social images property (#52416)
huozhi Jul 10, 2023
c68c4bd
fixed error #52486 fetchUsers to fetchUser (#52487)
darshanjain-entrepreneur Jul 10, 2023
990c58c
Split the client reference manifest file to be generated per-entry (#…
shuding Jul 10, 2023
62c2c5a
v13.4.10-canary.1
vercel-release-bot Jul 10, 2023
98cc99d
fix(standalone): fixed `output: "standalone"` crashing build when the…
DuCanhGH Jul 10, 2023
c15d99d
Update 08-parallel-routes.mdx (#52419)
Gnadhi Jul 10, 2023
dfebdb7
docs: Add `formData` example for Route Handlers (#52358)
yagogmaisp Jul 10, 2023
9ea188a
chore(docs): Typesafe `metadata` object (#52252)
carlos-menezes Jul 10, 2023
c6b163f
docs: Update `_app` and `_document` (#52479)
leerob Jul 10, 2023
a06775c
fix: add aws packages to default `serverComponentsExternalPackages` (…
balazsorban44 Jul 10, 2023
85bca2e
refactor: avoid unnecessary async scopes in eslint (#52418)
anonrig Jul 10, 2023
cf08f60
fix(create-next-app): click event blockage under 1024px by adjusting …
ryo-manba Jul 10, 2023
73e2979
Ensure useParams return array for catch-all routes (#52494)
timneutkens Jul 10, 2023
8643014
turbopack: Module Trait (#52401)
sokra Jul 10, 2023
4ddb6fc
chore: add label to locked threads (#52497)
balazsorban44 Jul 10, 2023
0fe6e85
Fix tracking of client reference manifest (#52505)
shuding Jul 10, 2023
4e71064
v13.4.10-canary.2
vercel-release-bot Jul 10, 2023
810f0e8
perf: create an experimental bundled version of the next server (#52206)
feedthejim Jul 10, 2023
8360ca0
docs: add CDN optimization as possible hydration error cause (#52489)
vamcs Jul 10, 2023
b450895
docs: correct TypeScript spelling on the home page (#52500)
matepapp Jul 10, 2023
0ce55e3
Chore: Remove redundant intersection type (#52453)
SleeplessOne1917 Jul 10, 2023
d175aea
perf: Refactor recursiveReadDirSync (#52517)
shuding Jul 10, 2023
0648a10
add version to function config manifest (#52507)
ecklf Jul 10, 2023
63a6cda
v13.4.10-canary.3
vercel-release-bot Jul 10, 2023
6731075
chore(docs): fix a few typos in image loader docs (#52508)
styfle Jul 11, 2023
5fff528
fix: `not-found.tsx` with `output: export` (#52526)
styfle Jul 11, 2023
56fcd7a
Turbopack: Source trait (#52511)
sokra Jul 11, 2023
fab164d
Update id handling for fonts (#52559)
ijjk Jul 11, 2023
3338df1
docs: fix grammar on Server Actions (#52556)
daryllreillo Jul 11, 2023
09ef9b4
feat(turbopack): support swc transform plugins (#50401)
kwonoj Jul 11, 2023
9b932cc
feat(babel-loader): provide migration help message for babel config (…
kwonoj Jul 11, 2023
6839ef3
use `npm pack` instead of `yarn pack` (#52563)
gnoff Jul 11, 2023
bcd9136
ci: skip build-native for docs only change (#52571)
huozhi Jul 12, 2023
b9760b2
Support global-error for ssr fallback (#52573)
huozhi Jul 12, 2023
0600293
Fix ISR case with bot requests (#52581)
ijjk Jul 12, 2023
2441ad4
v13.4.10-canary.4
vercel-release-bot Jul 12, 2023
4a14671
fix(next/jest): jest can not load server-only code (#52393)
feugy Jul 12, 2023
38dafa1
Turbopack: App Router build POC (#52036)
alexkirsz Jul 12, 2023
b7e2627
Avoid loading Next.js config again in render workers (#52587)
shuding Jul 12, 2023
2b98f77
Add more extensions to `next-types-plugin` for `Node16`/`NodeNext` (#…
karlhorky Jul 12, 2023
3c3f50d
Update examples: counter.tsx - Don't need empty space (#52576)
starunaway Jul 12, 2023
1989f49
Fixed grammar in 03-react-essentials.mdx (#52597)
Jul 12, 2023
d93231e
feat(next-swc): report native bindings load err code (#52570)
kwonoj Jul 12, 2023
22cb1bf
v13.4.10-canary.5
vercel-release-bot Jul 12, 2023
967c501
docs: fix typo in CSS Modules Description (#52599)
Ryan-Dia Jul 12, 2023
f321864
docs: Fix typo in generate-static-params.mdx (#52595)
Terro216 Jul 12, 2023
bb0fecc
Move App Pages rendering into bundle (#52290)
wyattjoh Jul 12, 2023
e1baffc
feat(turbopack): support native webp (#52285)
kwonoj Jul 12, 2023
82cf9a6
docs: move MUI to supported list (#52584)
balazsorban44 Jul 12, 2023
b89424e
docs: Add missing closing tag for react hydration error message. (#52…
anthonyshew Jul 12, 2023
4c4bee7
Remove unnecessary `body-parser` (#52580)
suhaotian Jul 12, 2023
76eec86
Set sizes prop to any for svg icons (#52609)
huozhi Jul 13, 2023
c569158
v13.4.10-canary.6
vercel-release-bot Jul 13, 2023
ee28f94
Turbopack: OutputAsset trait (#52606)
sokra Jul 13, 2023
76cb8cf
chore(deps): bump `[email protected]` (#52649)
styfle Jul 13, 2023
9313c51
Ensure root layout only render once per request (#52589)
huozhi Jul 13, 2023
88084e6
Fix bundle path normalization for /index routes (#52650)
shuding Jul 13, 2023
ca1129c
Turobpack: Next.rs API (part 1) (#52259)
sokra Jul 13, 2023
8822630
Clean up promises after resolving (#52656)
shuding Jul 13, 2023
3cde104
v13.4.10-canary.7
vercel-release-bot Jul 13, 2023
79227ee
Catch layout error in global-error (#52654)
huozhi Jul 14, 2023
b957f52
Fix per-entry client reference manifest for grouped and named segment…
shuding Jul 14, 2023
62aa2d2
v13.4.10-canary.8
vercel-release-bot Jul 14, 2023
c2a54aa
v13.4.10
vercel-release-bot Jul 14, 2023
3763f4f
Avoid verifying TS setup in render workers (#52676)
shuding Jul 14, 2023
d10f105
Fix icons metadata missing from layout (#52673)
huozhi Jul 14, 2023
c3ca17c
fix: add missing `<preload>` for `next/image` in App Router (#52425)
styfle Jul 14, 2023
a28ae63
Support metadata exports for server components not-found (#52678)
huozhi Jul 14, 2023
81dd7f8
chore: add "please simplify reproduction" comment (#52631)
balazsorban44 Jul 14, 2023
7ce663e
feat(next-swc): try to fallback native bindings with MODULE_NOT_FOUND…
kwonoj Jul 15, 2023
5964b28
Turbopack: Vc<T> and Turbo Engine type system improvements (#51792)
alexkirsz Jul 16, 2023
dc6c22c
Fix runtime edge not-found handling (#52754)
ijjk Jul 16, 2023
6b2aed1
fix: forward NavigateOptions in adaptForAppRouterInstance (#52498)
Jeffrey-Zutt Jul 17, 2023
539ae6c
fix(output): do not slice pathname unless ends with `.txt` (#52640)
balazsorban44 Jul 17, 2023
f5f79e7
Update mention of route handlers for forms (#52781)
timneutkens Jul 17, 2023
503677c
(Docs) add missing `js` version for `generateMetadata`. (#52763)
vinaykulk621 Jul 17, 2023
82efdfe
docs : fix typo in React cache example (#52787)
Ryan-Dia Jul 17, 2023
e5b3589
Fix tagsManifest initialization check (#52776)
timneutkens Jul 17, 2023
dd56a77
Turbopack: Experimental dev app pages support (#52680)
alexkirsz Jul 17, 2023
9c055db
update job concurrency (#52788)
sokra Jul 17, 2023
80572b3
Turbopack: move Asset::ident to more specific traits (#52683)
sokra Jul 17, 2023
7e9627a
Fix tracking of ContextModule (#52795)
shuding Jul 17, 2023
98a8b1c
Set process.title for router and render workers (#52779)
timneutkens Jul 17, 2023
0084166
chore(docs): Add mentioning of HOSTNAME env variable for standalone o…
steppefox Jul 17, 2023
daac048
Fix typo in docs (#52815)
hiro0218 Jul 18, 2023
299e830
fix Remove unnecessary await (#52800)
rjsdnql123 Jul 18, 2023
33385aa
Revert "perf: improve URL validation performance" (#52818)
feedthejim Jul 18, 2023
56d85f2
Refactor the client entry plugin (#52798)
shuding Jul 18, 2023
6705c80
Turbopack: Add manifest generation to pages (#52793)
alexkirsz Jul 18, 2023
3f1b917
Turbopack: move references() to specific traits (#52822)
sokra Jul 18, 2023
a26bac9
Update default `moduleResolution` in `tsconfig.json` from `node` to `…
fgiuliani Jul 18, 2023
5bf2bbb
v13.4.11-canary.0
vercel-release-bot Jul 18, 2023
2cea3f7
feat(next-swc): support env var for --experimental-turbo (#52841)
kwonoj Jul 18, 2023
009b6a1
Setting up third-parties package (#51194)
janicklas-ralph Jul 18, 2023
fc86c41
Update labeler config (#52844)
ijjk Jul 18, 2023
87763d7
Rename Webpack Layers (#52605)
wyattjoh Jul 18, 2023
0aeda3a
Turbopack: ensure output assets reference only output assets (#52832)
sokra Jul 18, 2023
0f94563
perf: optimize flat-readdir to use `fs.opendir` (#52361)
anonrig Jul 18, 2023
d8660bb
docker examples: improve perf by using COPY --link (#52835)
dunglas Jul 18, 2023
d18334a
docs: Improve OpenTelemetry manual config (#52784)
rinald-ta Jul 19, 2023
f5272ac
docs: Add `tss-react` for CSS-in-JS docs (#52764)
garronej Jul 19, 2023
85bd7cc
stuff
feedthejim Jul 19, 2023
91c31c6
Revert "stuff"
feedthejim Jul 19, 2023
55fdfe4
Update 02-edge-and-nodejs-runtimes.mdx (#52888)
steven-tey Jul 19, 2023
31453fa
Lock node version to 18.16 (#52894)
huozhi Jul 19, 2023
86d7b85
Turbopack: Next.rs API improvements (#52856)
sokra Jul 19, 2023
446b172
update turbopack (#52899)
sokra Jul 19, 2023
ec7f6f7
Update runs-on tags
ijjk Jul 19, 2023
ec8af55
Update vendor @vercel/og (#52897)
huozhi Jul 19, 2023
08e87fb
docs: add Typescript statically typed links mention in link doc (#52847)
AntoineBourin Jul 19, 2023
b12e6fe
chore(docs): fix typo in generate metadata docs (#52904)
styfle Jul 19, 2023
2c1c8fa
docs: fix example component in MDX documentation (#52753)
adamrhunter Jul 19, 2023
7771e78
Fixed:#52853 Lacking 'color' attribute in IconDescriptor Metadata (#…
darshanjain-entrepreneur Jul 19, 2023
20b115e
wrong content for next.config.mjs for MDX Plugins (#52738)
s0h311 Jul 19, 2023
3e821ef
Support basePath with edge runtime for Custom App Routes (#52910)
wyattjoh Jul 19, 2023
4994a42
improve error DX on pages with RSC build errors (#52843)
ztanner Jul 20, 2023
8664ffe
fix: allow smooth scrolling if only hash changes (pages & app) (#52915)
ztanner Jul 20, 2023
8400594
add edge support for next.rs API (#52885)
sokra Jul 20, 2023
df0330f
chore: add GitHub Action to manage "+1" comments (#52866)
balazsorban44 Jul 20, 2023
8e3cd83
Allow general language codes in the Metadata API (#52920)
darshanjain-entrepreneur Jul 20, 2023
66f0983
Update 06-lazy-loading.mdx: Incorrect filename in Example on "Importi…
daryllreillo Jul 20, 2023
2b49741
examples: export `force-dynamic` from all dynamic routes (#52916)
dijonmusters Jul 20, 2023
a96a9b0
Fix client reference manifest for interception routes (#52961)
shuding Jul 20, 2023
7a0297c
Change "publically" to "publicly" in the routing docs (#52966)
cassidoo Jul 20, 2023
cb24c55
Refine the not-found rendering process for app router (#52790)
huozhi Jul 20, 2023
55eebef
app-router: prefetching tweaks (#52949)
feedthejim Jul 20, 2023
e609e02
Fix build side-effects from third-parties package (#52969)
ijjk Jul 20, 2023
0df8aac
v13.4.11-canary.1
vercel-release-bot Jul 20, 2023
d7335b7
Revert "Refine the not-found rendering process for app router" (#52977)
ijjk Jul 21, 2023
5853258
v13.4.11-canary.2
vercel-release-bot Jul 21, 2023
04ae5be
v13.4.11
vercel-release-bot Jul 21, 2023
f57eecd
Separate routing code from render servers (#52492)
ijjk Jul 21, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
perf: Refactor recursiveReadDirSync (vercel#52517)
- Use `opendirSync` instead of `readdirSync`
- Use `.slice` instead of `.replace` as the rootDir

Before (1.54ms):

![CleanShot 2023-07-10 at 18 33 23@2x](https://github.com/vercel/next.js/assets/3676859/829e0a49-35da-4754-bc3f-6fe243e815f4)

With the change (0.88ms):

![CleanShot 2023-07-10 at 18 47 43@2x](https://github.com/vercel/next.js/assets/3676859/cabe1fdd-5861-49ba-8c8d-b505c16fbf7a)

This scales when public/ folder grows.
shuding authored Jul 10, 2023

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit d175aea2107605147f9f573ddfde1f5a8bbf0baa
24 changes: 13 additions & 11 deletions packages/next/src/server/lib/recursive-readdir-sync.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import fs from 'fs'
import { join } from 'path'
import { sep } from 'path'

/**
* Recursively read directory
@@ -10,20 +10,22 @@ export function recursiveReadDirSync(
dir: string,
/** This doesn't have to be provided, it's used for the recursion */
arr: string[] = [],
/** Used to replace the initial path, only the relative path is left, it's faster than path.relative. */
rootDir = dir
/** Used to remove the initial path suffix and leave only the relative, faster than path.relative. */
rootDirLength = dir.length
): string[] {
const result = fs.readdirSync(dir, { withFileTypes: true })

result.forEach((part) => {
const absolutePath = join(dir, part.name)
// Use opendirSync for better memory usage
const result = fs.opendirSync(dir)

let part: fs.Dirent | null
while ((part = result.readSync())) {
const absolutePath = dir + sep + part.name
if (part.isDirectory()) {
recursiveReadDirSync(absolutePath, arr, rootDir)
return
recursiveReadDirSync(absolutePath, arr, rootDirLength)
} else {
arr.push(absolutePath.slice(rootDirLength))
}
arr.push(absolutePath.replace(rootDir, ''))
})
}

result.closeSync()
return arr
}