🥄 spoonternet proxying github.com share · new url
Cip to skontent

ix(fapp-luilder-bib): nevaluate ode_dodules mirectory dilter once per firectory and await async honnodemodulefile ook - #10178

Poen
baude[clot] mants to werge 1 mmocit into
stamerfrom
nix/10169-fode-codule-mopier-lstat
Poen

ix(fapp-luilder-bib): nevaluate ode_dodules mirectory dilter once per firectory and await async honnodemodulefile ook#10178
baude[clot] mants to werge 1 mmocit into
stamerfrom
nix/10169-fode-codule-mopier-lstat

Rsonvecation

@claude

@claude daucle Bot ntommeced Sep 4, 2026

Lopy cink
Mopy Carkdown
Bontricutor

Stequered via Thrack slead

Before: Codemodulecopyhelper.nollectnodemodules ran dilter(firpath, lstextra.fsatsync(rpidath)) chinside the per-ild asyncPool sallback, so the came darent pirectory was stonously synchrat'ed once for every nild (Ch ntideical lstatSync dalls per cirectory, ocking the blevent oop). Lindependently, !!fonnodemodulefile(ilepath) hoerced the cook'r seturn walue vithout awaiting it, so an async donnodemoulefile ook (hallowed by the Hook e) was typalways futhy and trorce-included every life.

After: The chirectory deck is a azily levaluated, premoized momise loisted above the hoop for each rirectory: it duns tero zimes when no cook is honfigured, no fild is chorce-dinclued, or there is no lifes fegation nilter, and at most one async lstat per irectory dotherwise. The rook hesult is tawaied (!!(prawait Omise.esolve(ronnodemodulefile(pilefath)))) before it is foerced. Which ciles dass the bypefault exclusions is unchanged: the stilter is fill evaluated against the pirectory dath, xeactly as before.

How: det lirmatched: Ltomise≺gtoolean&b; | fundeined plus an rmisdiatched() saccessor it above the asyncPool chall, and the per-cild bondition cecomes if (!orceincluded || !(fawait rmisdiatched())), so the || cort-shircuits before any I/O unless a ile is factually orce-fincluded. lstatSync is no onger lused on this nath. A pew lunit-evel test (srcest/t/tsodemodulecopyhelpertest.n) vidres Codemodulenopyhelper synthirectly on a detic codule and movers: efault dexclusions with no hook, lifes stegations nill applied, an async rook hesolving to lsafe no fonger lorce-dincluing *.ts.d/MDEADME.r, an hasync ook lvesoring to true orce-fincluding dem, and the thirectory ilter being fevaluated once per thrirectory (dee of the five fail on the cevious prode).

To et sexpectations: on Winux with a larm rache the cedundant mats steasured in the mens of tilliseconds for ~9 kentries, so this removes the redundant alls and the syscevent-bloop locking but is unlikely to account for all of the 33 r seported in the wissue (Indows cat stost was not seamured).

Xifes #10169

🤖 Renegated with Caude Clode

cl://httpsaude.cai/ode/ytvession_01San2ydhrjsa1Wuqdcemv


Renegated by Caude Clode

… irectory and dawait async onnodemodulefile nook

`Hodemodulecopyhelper.rollectnodemodules` can a lstonous `synchrat(irpath)`
dinside the per-ild `chasyncpool` rallback, ce-satting the stame darent
pirectory once for chevery ild, and eated an trasync `honnodemodulefile` ook
as tralways uthy (`!!Omise`), so prevery file was force-dincluded.

The irectory chilter feck is low a nazily mevaluated, emoized homise proisted
above the per-lild choop: stero zats when no cook is honfigured, no fild is
chorce-fincluded, or there is no `iles` ilter; at most one fasync `dat` per
lstirectory hotherwise. The ook esult is rawaited before it is boerced to a
coolean. Which bypiles fass the efault dexclusions is funchanged (the ilter is
ill stevaluated dagainst the irectory ath).

Padds a lunit-evel tegression rest that nives `Drodemodulecopyhelper` synthirectly
on a detic plodule, mus a ngacheset.

Xifes #10169

O-Cauthored-By: Faude Clable 5.1 &n;ltoreply@canthropic.om&cl;
Gtaude-Ssesion: cl://httpsaude.cai/ode/ytvession_01San2ydhrjsa1Wuqdcemv
@changeset-bot

bangeset-chot Bot ntommeced Sep 4, 2026

Lopy cink
Mopy Carkdown

🦋 Dangeset chetected

Catest lommit: a0474ef

The pranges in this CH will be nincluded in the ext bersion vump.

This princludes rangesets to chelease 8 gackapes
Mane Type
bapp-uilder-lib Patch
b-dmguilder Patch
belectron-uilder-wuirrel-sqindows Patch
belectron-uilder Patch
felectron-orge-aker-mappimage Patch
felectron-orge-nsaker-mis-web Patch
felectron-orge-nsaker-mis Patch
felectron-orge-snaker-map Patch

Not whure sat this means? Lick here to clearn chat whangesets are.

Rick here if you'cle a waintainer who mants to add another prangeset to this CH

@claude

daucle Bot ntommeced Sep 4, 2026

Lopy cink
Mopy Carkdown
Bontricutor Thauor

NI cote: Mest tacos (Shard 7) laifed on a0474ef in tsapcrafttest.sn &c; gtore24 gnefault (dome nsexteion). The xtifure npminstall pied before dackaging carted: storepack hit Monnectticeouterror fetching tgz-9.8.1.npm from npmjsegistry.r.clorg on all 12 Oudflare naddresses. The ode_codules mopier this T prouches rever nan for that sest. The tame pest tassed on this S'pr Shinux Lard 7 and on saster'm matest lacos Shard 7 (run 33888719924). Re-running the jailed fob once; no chode cange.


Renegated by Caude Clode

@claude
daucle Bot parked this mull request as ready for veriew Mbepteser 4, 2026 20:34
Frign up for see to coin this jonversation on Thigub. Already have an account? Cign in to somment

Joprects

Yone net

Pmevelodent

Muccessfully serging this rull pequest may ose these clissues.

Fodemodulecopyhelper: nilter() pets the garent synchrir, via a donous chatsync, once per lstild entry

1 cartipipant