bunset 1.0.9 → 1.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,11 @@
1
1
  # Changelog
2
2
 
3
+ ## 1.0.10
4
+
5
+ ### Features
6
+
7
+ - default --sections to all types, add "all" keyword and type aliases
8
+
3
9
  ## 1.0.9
4
10
 
5
11
  ### Bug Fixes
package/README.md CHANGED
@@ -29,7 +29,7 @@ bunx bunset [options]
29
29
  | `--no-tag` | Tag the commit with new version (default) |
30
30
  | `--per-package-tags` | Use `pkg@1.2.3` tags instead of prefixed tags |
31
31
  | `--tag-prefix` | Tag prefix (auto-detected from last tag, or `v` if no tags) |
32
- | `--sections` | Comma-separated changelog sections (default: `feat,fix,perf`) |
32
+ | `--sections` | Comma-separated changelog sections, or `all` (default: `all`) |
33
33
  | `--dry-run` | Preview changes without writing files, committing, or tagging |
34
34
  | `--debug` | Show detailed inclusion/exclusion reasoning (implies `--dry-run`) |
35
35
  | `--no-filter-by-package` | Include all commits in every package changelog (monorepo) |
@@ -84,16 +84,16 @@ Breaking commits are collected into a **Breaking Changes** section at the top of
84
84
  - `feat`, `feature` — listed under **Features**
85
85
  - `fix`, `bug`, `bugfix` — listed under **Bug Fixes**
86
86
  - `refactor` — listed under **Refactors**
87
- - `perf` — listed under **Performance**
87
+ - `perf`, `performance` — listed under **Performance**
88
88
  - `style` — listed under **Style**
89
89
  - `test` — listed under **Tests**
90
- - `docs` — listed under **Documentation**
90
+ - `docs`, `documentation` — listed under **Documentation**
91
91
  - `build` — listed under **Build**
92
92
  - `ops` — listed under **Ops**
93
93
  - `chore` — listed under **Chores**
94
94
  - `ci` — listed under **CI**
95
95
 
96
- Only sections listed in `--sections` (or the `sections` config option) appear in the changelog. The default is `feat,fix,perf`.
96
+ Only sections listed in `--sections` (or the `sections` config option) appear in the changelog. The default is `all` (every recognized type). Pass `--sections all` explicitly or use a comma-separated subset like `--sections feat,fix,perf`.
97
97
 
98
98
  ### Config File
99
99
 
@@ -106,7 +106,7 @@ commit = true # auto-commit (default: true)
106
106
  tag = true # create git tags (default: true)
107
107
  per-package-tags = false # pkg@version tags (monorepo)
108
108
  tag-prefix = "v" # tag prefix (default: auto-detect)
109
- sections = ["feat", "fix", "perf"] # changelog sections and order
109
+ sections = "all" # changelog sections and order ("all" or array)
110
110
  dry-run = false # preview without writing
111
111
  debug = false # detailed reasoning (implies dry-run)
112
112
  filter-by-package = true # per-package filtering (monorepo)
@@ -120,7 +120,7 @@ filter-by-package = true # per-package filtering (monorepo)
120
120
  | `tag` | `boolean` | `true` | Whether to create git tags for released versions. |
121
121
  | `per-package-tags` | `boolean` | `false` | Use `pkg@1.2.3` tags instead of prefixed tags. In a monorepo, packages with no matching commits are skipped entirely. |
122
122
  | `tag-prefix` | `string` | _(auto)_ | Prefix for version tags. Auto-detected from the last git tag when not set (falls back to `"v"` if no tags exist). Set to `""` for bare version numbers, or e.g. `"project-v"` for `project-v1.2.3`. |
123
- | `sections` | `string[]` | `["feat", "fix", "perf"]` | Which commit types to include in the changelog and in what order. Accepts any recognized type keyword. |
123
+ | `sections` | `string[] \| "all"` | `"all"` | Which commit types to include in the changelog and in what order. Use `"all"` for every type, or an array of recognized type keywords. |
124
124
  | `dry-run` | `boolean` | `false` | Preview all changes without writing files, committing, or tagging. |
125
125
  | `debug` | `boolean` | `false` | Show detailed inclusion/exclusion reasoning. Implies `dry-run`. |
126
126
  | `filter-by-package` | `boolean` | `true` | In a monorepo, only include commits that touched files within each package. Disable with `false` to include all commits in every changelog. |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bunset",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "module": "src/index.ts",
5
5
  "type": "module",
6
6
  "bin": {
@@ -56,7 +56,7 @@ describe("buildChangelogEntry", () => {
56
56
  { hash: "b", message: "", type: "test", commitScope: null, breaking: false, files: [], description: "Add tests" },
57
57
  ],
58
58
  };
59
- const entry = buildChangelogEntry("1.0.0", groups);
59
+ const entry = buildChangelogEntry("1.0.0", groups, [], ["feature", "bugfix", "perf"]);
60
60
  expect(entry).toContain("### Features");
61
61
  expect(entry).not.toContain("### Tests");
62
62
  });
package/src/cli.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import { parseArgs } from "node:util";
2
2
  import type { BumpType, CliOptions, CommitType, PackageScope } from "./types.ts";
3
- import { normalizeType, DEFAULT_SECTIONS } from "./commits.ts";
3
+ import { normalizeType, DEFAULT_SECTIONS, ALL_SECTIONS } from "./commits.ts";
4
4
 
5
5
  export function printHelp(): void {
6
6
  console.log(`bunset - Version bumping and changelog generation for Bun projects
@@ -17,7 +17,7 @@ Options:
17
17
  --no-tag Do not create git tags for released versions
18
18
  --per-package-tags Use package-scoped tags (pkg@version) instead of prefixed
19
19
  --tag-prefix <str> Tag prefix (auto-detected from last tag, or "v" if no tags)
20
- --sections <list> Comma-separated changelog sections (default: feat,fix,perf)
20
+ --sections <list> Comma-separated changelog sections, or "all" (default: all)
21
21
  --push Push commit and tags to remote after tagging
22
22
  --dry-run Preview changes without writing files, committing, or tagging
23
23
  --debug Show detailed inclusion/exclusion reasoning (implies --dry-run)
@@ -51,16 +51,16 @@ Commit format:
51
51
  feat, feature → Features
52
52
  fix, bug, bugfix → Bug Fixes
53
53
  refactor → Refactors
54
- perf → Performance
54
+ perf, performance → Performance
55
55
  style → Style
56
56
  test → Tests
57
- docs → Documentation
57
+ docs, documentation → Documentation
58
58
  build → Build
59
59
  ops → Ops
60
60
  chore → Chores
61
61
  ci → CI
62
62
  Only sections listed in --sections (or config) are included in the changelog.
63
- Default sections: feat, fix, perf.
63
+ Default sections: all (feat,fix,refactor,perf,style,test,docs,build,ops,chore,ci).
64
64
 
65
65
  Config file (.bunset.toml):
66
66
  Place a .bunset.toml in your project root to set persistent defaults.
@@ -73,7 +73,7 @@ Config file (.bunset.toml):
73
73
  tag = true # create git tags (default: true)
74
74
  per-package-tags = false # pkg@version tags (monorepo)
75
75
  tag-prefix = "v" # tag prefix (default: auto-detect)
76
- sections = ["feat", "fix", "perf"] # changelog sections and order
76
+ sections = "all" # changelog sections and order ("all" or array)
77
77
  push = false # push after tagging (default: false)
78
78
  dry-run = false # preview without writing
79
79
  debug = false # detailed reasoning (implies dry-run)
@@ -180,6 +180,7 @@ function resolveScope(
180
180
 
181
181
  function parseSections(raw: string | undefined): CommitType[] | null {
182
182
  if (!raw) return null;
183
+ if (raw.trim().toLowerCase() === "all") return [...ALL_SECTIONS];
183
184
  const result: CommitType[] = [];
184
185
  for (const part of raw.split(",")) {
185
186
  const type = normalizeType(part.trim());
package/src/commits.ts CHANGED
@@ -1,6 +1,8 @@
1
1
  import type { CommitType, ParsedCommit, GroupedCommits } from "./types.ts";
2
2
 
3
- export const DEFAULT_SECTIONS: CommitType[] = ["feature", "bugfix", "perf"];
3
+ export const ALL_SECTIONS: CommitType[] = ["feature", "bugfix", "refactor", "perf", "style", "test", "docs", "build", "ops", "chore", "ci"];
4
+
5
+ export const DEFAULT_SECTIONS: CommitType[] = ALL_SECTIONS;
4
6
 
5
7
  const TYPE_MAP: Record<string, CommitType> = {
6
8
  feat: "feature",
@@ -10,9 +12,11 @@ const TYPE_MAP: Record<string, CommitType> = {
10
12
  bugfix: "bugfix",
11
13
  refactor: "refactor",
12
14
  perf: "perf",
15
+ performance: "perf",
13
16
  style: "style",
14
17
  test: "test",
15
18
  docs: "docs",
19
+ documentation: "docs",
16
20
  build: "build",
17
21
  ops: "ops",
18
22
  chore: "chore",
package/src/config.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import path from "node:path";
2
2
  import type { CliOptions, CommitType } from "./types.ts";
3
- import { normalizeType } from "./commits.ts";
3
+ import { normalizeType, ALL_SECTIONS } from "./commits.ts";
4
4
 
5
5
  const CONFIG_FILE = ".bunset.toml";
6
6
 
@@ -57,7 +57,9 @@ export async function loadConfig(
57
57
  config.debug = raw.debug;
58
58
  }
59
59
 
60
- if (Array.isArray(raw.sections)) {
60
+ if (raw.sections === "all") {
61
+ config.sections = [...ALL_SECTIONS];
62
+ } else if (Array.isArray(raw.sections)) {
61
63
  const sections: CommitType[] = [];
62
64
  for (const s of raw.sections) {
63
65
  if (typeof s === "string") {