You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
bundle-size dist_paths: ./-prefixed patterns never match, and root globs walk node_modules; AGENT-SCAFFOLDING omits two v4 files #327
priority: lowMinor issue or improvement that can be deferred without impactstatus: in progressPartially implemented — actively being builttype: bugSomething is broken or not behaving as expected
.github/actions/npm/jobs/bundle-size/action.mjs normalizes walked paths to dist/x, so a pattern such as ./dist/** or ./index.mjs never matches. Nothing warns you either, apart from the zero-match warning added in #326. Fix: strip a leading ./ from each pattern, and add a test for it.
2. Root-level globs walk node_modules and .git
A top-level pattern such as *.mjs walks from the repo root, which includes node_modules/ and .git/. The results are correct, because the regex is anchored, but the walk is slow on large installs. Fix: skip node_modules, .git, and any directory that no pattern can reach. Check the result against the existing tests.
3. AGENT-SCAFFOLDING.md omits feature-pr.yml and release-merge.yml
The "Always (v4 release flow)" table in examples/guides/AGENT-SCAFFOLDING.md doesn't list feature-pr.yml or release-merge.yml, although both are part of every v4 repo. Add them, and check the other checklists (WORKFLOW-SETUP-GUIDE.md, docs/migration/v3-to-v4.md) against the full release-flow-v4/ folder.
Checked against the measure action on #326's branch (4db8fec). All three parts hold, with one refinement to part 1.
./dist/** measures nothing, as described. ./index.mjs does match, though: a wildcard-free pattern's root is yielded as written, so it's recorded as ./index.mjs. compare then treats it as a different file from index.mjs. The fix should strip a leading ./ from both the patterns and the walked paths, so every entry is recorded under one canonical form.
*.mjs resolves its walk root to . and descends into node_modules/ and .git/. The results are right because the regex is anchored; the cost is the walk.
The "Always (v4 release flow)" table in AGENT-SCAFFOLDING.md lists six of the eight release-flow-v4/ files and omits feature-pr.yml and release-merge.yml. WORKFLOW-SETUP-GUIDE.md and v3-to-v4.md both reference both files.
This touches files #326 changes (action.mjs, the new action.test.mjs, AGENT-SCAFFOLDING.md), so the fix should branch off next once #326 merges rather than stack on it.
4. Duplicate counting when globs share a walked directory
action.mjs walks each distinct path prefix separately and doesn't de-duplicate. A leading * walks the whole repo, so a mix like *index.mjs,*index.cjs,dist/** counts every dist/ file twice. Measured with the v4.29.2 action:
Repo
Entries
Unique files
holdmytask
8
6
droidsock
108
57
jsonv-vscode
7
4
slothlet
+70
—
For now, consumers are working around it by starting every glob with *.
Fix: de-duplicate matched files by path before measuring, and add a test for overlapping patterns. Once #326's plain-file-path support and this fix ship, consumers can use natural globs such as index.mjs,index.cjs,dist/**, and the * workaround can be dropped from consumer bundle-size.yml files in a later sync.
priority: lowMinor issue or improvement that can be deferred without impactstatus: in progressPartially implemented — actively being builttype: bugSomething is broken or not behaving as expected
Activity
Shinrai commentedon Sep 28, 2026
Checked against the measure action on #326's branch (
4db8fec). All three parts hold, with one refinement to part 1../dist/**measures nothing, as described../index.mjsdoes match, though: a wildcard-free pattern's root is yielded as written, so it's recorded as./index.mjs.comparethen treats it as a different file fromindex.mjs. The fix should strip a leading./from both the patterns and the walked paths, so every entry is recorded under one canonical form.*.mjsresolves its walk root to.and descends intonode_modules/and.git/. The results are right because the regex is anchored; the cost is the walk.AGENT-SCAFFOLDING.mdlists six of the eightrelease-flow-v4/files and omitsfeature-pr.ymlandrelease-merge.yml.WORKFLOW-SETUP-GUIDE.mdandv3-to-v4.mdboth reference both files.This touches files #326 changes (
action.mjs, the newaction.test.mjs,AGENT-SCAFFOLDING.md), so the fix should branch offnextonce #326 merges rather than stack on it.Shinrai commentedon Sep 28, 2026
4. Duplicate counting when globs share a walked directory
action.mjswalks each distinct path prefix separately and doesn't de-duplicate. A leading*walks the whole repo, so a mix like*index.mjs,*index.cjs,dist/**counts everydist/file twice. Measured with the v4.29.2 action:For now, consumers are working around it by starting every glob with
*.Fix: de-duplicate matched files by path before measuring, and add a test for overlapping patterns. Once #326's plain-file-path support and this fix ship, consumers can use natural globs such as
index.mjs,index.cjs,dist/**, and the*workaround can be dropped from consumerbundle-size.ymlfiles in a later sync.cldmv-bot commentedon Sep 28, 2026
Closed in v4.29.3 — resolved by #328.