Skip to content

fix(bundle-size): normalize ./ dist_paths and prune the measure walk - #328

Merged
Shinrai merged 2 commits into
nextfrom
fix/bundle-size-dist-paths
Sep 28, 2026
Merged

Shinrai merged 2 commits into
nextfrom
fix/bundle-size-dist-paths

Conversation

@cldmv-bot

@cldmv-bot cldmv-bot Bot commented Sep 28, 2026 •

Copy link
Copy Markdown
Contributor

🚀 What's Changed

💥 Breaking Changes

No breaking changes

✨ Features

No new features

🐛 Bug Fixes

📦 Dependencies

No dependency updates

🔧 Other Changes

No other changes

👥 Contributors

Three dist_paths problems in the measure action, plus the scaffolding
checklist gap, all found while fixing #325:

- A `./`-prefixed glob (`./dist/**`) never matched: walked paths come
  back as `dist/x` but the regex was built from `./dist/**`. A `./`
  single file did match but was recorded as `./index.mjs`, so compare
  treated it as a different file from `index.mjs`. Leading `./` is now
  stripped from every pattern, so all entries use one canonical form.
- A wildcard mid-segment (`lib/ut*.mjs`) walked the nonexistent root
  `lib/ut` and matched nothing. The root is now the whole segments
  before the first wildcard.
- A root-level glob walked the entire tree, node_modules and .git
  included. The walk now skips node_modules/.git and only enters
  directories some pattern can still match beneath (so `*.mjs` reads the
  root only, and never hits an unreadable subdirectory).
- Overlapping patterns (`index.mjs,*.mjs`) counted a file once per
  matching root; files are now measured once.

Tests added for each case; existing cases unchanged. The "Always (v4
release flow)" table in AGENT-SCAFFOLDING.md now lists feature-pr.yml
and release-merge.yml, the two release-flow-v4 templates it omitted.

Fixes #327
@cldmv-bot cldmv-bot Bot added ! fix → next v4 flow: fix contributor PR targeting the next integration branch area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure type: config Changes to repository or project configuration files type: documentation Relates to docs, README updates, guides, or inline code comments labels Sep 28, 2026
@Shinrai

Shinrai commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Resolves #327 — closed when this ships to the default branch.

Stacked on #326 (ci/bundle-size-standard), so this PR's diff also shows #326's two commits until #326 merges. After that, this branch gets rebased onto next so only its own commit remains. Merge #326 first.

Shinrai
Shinrai previously approved these changes Sep 28, 2026
@cldmv-bot
cldmv-bot Bot dismissed Shinrai’s stale review September 28, 2026 13:05

The merge-base changed after approval.

Shinrai
Shinrai previously approved these changes Sep 28, 2026
@cldmv-bot
cldmv-bot Bot dismissed Shinrai’s stale review September 28, 2026 13:05

The merge-base changed after approval.

Shinrai
Shinrai previously approved these changes Sep 28, 2026
@cldmv-bot
cldmv-bot Bot dismissed Shinrai’s stale review September 28, 2026 13:12

The merge-base changed after approval.

@Shinrai
Shinrai merged commit 1e2fe29 into next Sep 28, 2026
15 checks passed
@cldmv-bot
cldmv-bot Bot deleted the fix/bundle-size-dist-paths branch September 28, 2026 13:25
cldmv-bot Bot added a commit that referenced this pull request Sep 28, 2026
…mpty…

## 🚀 What's Changed

### 💥 Breaking Changes
_No breaking changes_

### ✨ Features
_No new features_

### 🐛 Bug Fixes
- #331
  - fix(paths-gate): fall back to full CI when the diff can't be computed (63d87e6)

- #328
  - fix(bundle-size): normalize ./ dist_paths and prune the measure walk (5e6e1c1)

- #326
  - fix(bundle-size): treat bundle-size.yml as standard v4 and warn on empty dist_paths (085f941)

### 📦 Dependencies
_No dependency updates_

### 🔧 Other Changes
- #326
  - test(bundle-size): cover exact-path, glob and zero-match dist_paths (4db8fec)



<details>
<summary>👥 Contributors</summary>

- @Shinrai

</details>

<!-- co-authors -->

Co-authored-by: Shinrai <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: core Touches core library / runtime source code area: tests Touches test files, fixtures, or test infrastructure ! fix → next v4 flow: fix contributor PR targeting the next integration branch type: config Changes to repository or project configuration files type: documentation Relates to docs, README updates, guides, or inline code comments

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant