Skip to content

feat: bundle-stats plugin poc implementation #1024

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

Open
wants to merge 35 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
5868ef2
fix: poc stats plugin
BioPhoton Jun 18, 2025
a3d5027
fix: poc stats plugin v2
BioPhoton Jul 6, 2025
faa4599
fix: cleanup 1
BioPhoton Jul 7, 2025
b539f42
docs: update CONTRIBUTING.md
BioPhoton Jul 7, 2025
b230f92
Merge branch 'refs/heads/main' into plugin-bundle-stats-poc
BioPhoton Jul 7, 2025
29a2d30
fix: cleanup files
BioPhoton Jul 7, 2025
d343f46
fix: cleanup pkg
BioPhoton Jul 7, 2025
2153fa6
fix: cleanup pkg
BioPhoton Jul 7, 2025
9db9a71
fix: wip
BioPhoton Jul 7, 2025
7946613
fix: wip
BioPhoton Jul 10, 2025
a9bc1f5
fix: wip
BioPhoton Jul 10, 2025
afa8088
fix: adjust grouping and external imports
BioPhoton Jul 10, 2025
d6ee241
docs: add examples
BioPhoton Jul 10, 2025
c009534
feat: MVP v1
BioPhoton Jul 13, 2025
383b305
test: builder++
BioPhoton Jul 14, 2025
fbe2139
feat: vite builder basic
BioPhoton Jul 14, 2025
475ccbc
feat: sort nodes and children by bytes for improved pruning
hoebbelsB Jul 14, 2025
bef3529
feat: add minimum size filtering to tree pruning
hoebbelsB Jul 14, 2025
025de30
feat: update angular large bundle stats config
hoebbelsB Jul 16, 2025
7e4630c
feat: add auto grouping
BioPhoton Jul 19, 2025
b45f496
feat: add global selection options
BioPhoton Jul 19, 2025
d3b8f0c
fix: adjust select logic
BioPhoton Jul 21, 2025
0c9a6a6
fix: move code
BioPhoton Jul 22, 2025
1f0eed3
test: enhance unit tests for aggregateAndSortGroups with additional i…
hoebbelsB Jul 22, 2025
21627cb
fix: move code
BioPhoton Jul 22, 2025
f9f80d6
Merge remote-tracking branch 'origin/plugin-bundle-stats-poc' into pl…
BioPhoton Jul 22, 2025
9080b92
fix: move code
BioPhoton Jul 22, 2025
4b8ef07
fix: move code
BioPhoton Jul 23, 2025
581911f
Merge branch 'main' into plugin-bundle-stats-poc
BioPhoton Jul 23, 2025
60afd22
fix: fix merge plugin and audit config
BioPhoton Jul 23, 2025
eaa79fd
fix: update types
BioPhoton Jul 24, 2025
e12ae3f
fix: wip
BioPhoton Jul 24, 2025
8efd201
docs: add examples
BioPhoton Jul 24, 2025
b3d0961
docs: add examples
BioPhoton Jul 25, 2025
9b5b477
docs: edit examples
BioPhoton Jul 25, 2025
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
48 changes: 48 additions & 0 deletions .cursor/rules/general.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
---
description:
globs:
alwaysApply: true
---
# ALWAYS FOLLOW
- DO not add coments


## JSDoc Documentation Pattern

**Structure**: Add very short descriptive JSDoc blocks for functions with this format:

```javascript
/**
* [What it does]. [Why it exists].
*/
```

**Structure Breakdown**:
1. **What it does** - Very short description of the function's behavior
2. **Why it exists** - Very short description of the purpose/benefit

**Examples**:
```javascript
/**
* Compiles pattern into cached matcher function. Avoids recompilation overhead.
*/
export function compilePattern(pattern: string): PatternMatcher

/**
* Collects and caches input paths from output. Prevents repeated path extraction.
*/
export function getInputPaths(output: UnifiedStatsOutput): string[]

/**
* Evaluates paths against include/exclude patterns. Core filtering logic for all path types.
* Enables selective filtering by allowing users to focus on specific files while excluding unwanted ones.
*/
export function evaluateMatchers(...)
```

**Key Principles**:
- **Brevity**: Keep descriptions very short
- **Clarity**: First sentence = what it does, second sentence = why it's needed
- **No fluff**: Avoid verbose explanations
- **Action-oriented**: Start with verbs (Compiles, Collects, Evaluates)
- **Value-focused**: The "why" explains the benefit (performance, reusability, etc.)
40 changes: 40 additions & 0 deletions .cursor/rules/toc.mdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
---
description:
globs:
alwaysApply: false
---
## Update ToC -> `grep`-Sync Markdown TOC

**1. Get Headings:**

```bash
grep -n "^##\\+ " your-file.md
```

(`-n`=line numbers; `^##\\+ `=headings H2-H6).

**2. Analyze & Rebuild TOC:**
Compare `grep` output to your TOC in `your-file.md`. Edit TOC to match `grep` data:

- **Hierarchy Mapping (from `grep` `^##\\+ ` to TOC indent):**
- `##`: `**[Text](#link)**` (0 spaces indent)
- `###`: `- [Text](#link)` (2 spaces indent)
- `####`: `- [Text](#link)` (4 spaces indent)
- (etc., +2 spaces/level, no `**`)
- **Anchor Links (`#link`):** Lowercase heading, spaces to hyphens.

**Example Fix (`cpu-profiling.md` "Data Structure" section):**
`grep` showed `### Dimensions and Time` under `## Data Structure`.
TOC changed from:

```markdown
- **[Data Structure](#data-structure)**
- **[Dimensions and Time](#dimensions-and-time)**
```

To (correctly nested):

```markdown
- **[Data Structure](#data-structure)**
- [Dimensions and Time](#dimensions-and-time)
```
Loading
Loading