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
| `base-ref` | Base ref to compare against (defaults to main or PR target) | Yes | `main` |
42
+
| `base-ref` | Base ref to compare against (defaults to main or PR target) | No | Auto-detected from PR or `main` |
42
43
| `github-token` | The GitHub token for authentication | Yes | `${{ github.token }}` |
43
44
| `pr-number` | The number of the pull request to comment on | Yes | `${{ github.event.pull_request.number }}` |
44
45
| `dependency-threshold` | Threshold for warning about significant increase in number of dependencies | No | `10` |
45
46
| `size-threshold` | Threshold (in bytes) for warning about significant increase in package size | No | `100000` |
47
+
| `duplicate-threshold` | Threshold for warning about packages with multiple versions | No | `1` |
48
+
| `base-packages` | Glob pattern for base branch pack files (e.g., `"./base-packs/*.tgz"`) | No | None |
49
+
| `source-packages` | Glob pattern for source branch pack files (e.g., `"./source-packs/*.tgz"`) | No | None |
50
+
| `pack-size-threshold` | Threshold (in bytes) for warning about significant increase in total pack size | No | `50000` |
46
51
47
52
## Example with custom inputs
48
53
@@ -55,6 +60,90 @@ jobs:
55
60
size-threshold: '50000'
56
61
```
57
62
63
+
## Package Bundle Analysis
64
+
65
+
In addition to analyzing dependency changes, this action can optionally compare the actual bundle sizes of your packages by examining `npm pack` outputs. This provides insights into the **bundle size** (what gets published) rather than just the **install size** (what gets installed with dependencies).
66
+
67
+
### Package Inputs
68
+
69
+
The action accepts glob patterns to locate package tarballs for comparison:
70
+
71
+
- **`base-packages`** - Glob pattern for base branch pack files (e.g., `"./base-packs/*.tgz"`)
- **`pack-size-threshold`** - Threshold in bytes for warning about significant pack size increases
74
+
75
+
> [!NOTE]
76
+
> Package bundle analysis only runs when both `base-packages` and `source-packages` are provided. If these inputs are not set, this feature is skipped entirely.
0 commit comments