@williamthorsen/release-kit 10.0.0 → 10.1.0
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 +16 -0
- package/README.md +7 -5
- package/dist/esm/loadConfig.js +11 -7
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,22 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## 10.1.0 — 2026-08-03
|
|
6
|
+
|
|
7
|
+
### 🎉 Features
|
|
8
|
+
|
|
9
|
+
- Publish nmr's readyup kit with a test-tier conformance check (#580)
|
|
10
|
+
|
|
11
|
+
`@williamthorsen/nmr` is now bundled with ReadyUp kits that check a repo's alignment with `nmr` requirements and recommendations.
|
|
12
|
+
|
|
13
|
+
`rdy run --from npm:@williamthorsen/nmr` checks the repo against the kits without prior configuration. Once the package is added to the ReadyUp config, `rdy run --packages` will run the `nmr` kits along with those of any other registered package. Requires `readyup` v0.23 or greater.
|
|
14
|
+
|
|
15
|
+
### ♻️ Refactoring
|
|
16
|
+
|
|
17
|
+
- Load the config with Node's TypeScript support instead of jiti (#573)
|
|
18
|
+
|
|
19
|
+
`release-kit` now uses native Node with type-stripping to read its configs. `jiti` is no longer needed as a dependency. As a result, relative imports inside `.config/release-kit.config.ts` now require an explicit file extension.
|
|
20
|
+
|
|
5
21
|
## 10.0.0 — 2026-08-03
|
|
6
22
|
|
|
7
23
|
### 🎉 Features
|
package/README.md
CHANGED
|
@@ -5,15 +5,15 @@ Version-bumping and changelog-generation toolkit for release workflows.
|
|
|
5
5
|
Provides a self-contained CLI that auto-discovers workspaces from `pnpm-workspace.yaml`, parses conventional commits, determines version bumps, updates `package.json` files, and generates changelogs from `git-cliff --context` output rendered in-process (with optional [editorial overrides](#editorial-overrides)).
|
|
6
6
|
|
|
7
7
|
<!-- section:release-notes -->
|
|
8
|
-
## Release notes — v10.
|
|
8
|
+
## Release notes — v10.1.0 (2026-08-03)
|
|
9
9
|
|
|
10
10
|
### 🎉 Features
|
|
11
11
|
|
|
12
|
-
-
|
|
12
|
+
- Publish nmr's readyup kit with a test-tier conformance check (#580)
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
`@williamthorsen/nmr` is now bundled with ReadyUp kits that check a repo's alignment with `nmr` requirements and recommendations.
|
|
15
15
|
|
|
16
|
-
`nmr
|
|
16
|
+
`rdy run --from npm:@williamthorsen/nmr` checks the repo against the kits without prior configuration. Once the package is added to the ReadyUp config, `rdy run --packages` will run the `nmr` kits along with those of any other registered package. Requires `readyup` v0.23 or greater.
|
|
17
17
|
<!-- /section:release-notes -->
|
|
18
18
|
|
|
19
19
|
## Installation
|
|
@@ -69,7 +69,7 @@ That's it for most repos. The CLI auto-discovers workspaces and applies sensible
|
|
|
69
69
|
## How it works
|
|
70
70
|
|
|
71
71
|
1. **Workspace discovery**: reads `pnpm-workspace.yaml` and resolves its `packages` globs to find workspace directories. Each directory containing a `package.json` becomes a workspace. If no workspace file is found, the repo is treated as a single-package project.
|
|
72
|
-
2. **Config loading**: loads `.config/release-kit.config.ts` (if present)
|
|
72
|
+
2. **Config loading**: loads `.config/release-kit.config.ts` (if present) and merges it with discovered defaults.
|
|
73
73
|
3. **Commit analysis**: for each workspace, finds commits since the last version tag, parses them for type and scope, and determines the appropriate version bump.
|
|
74
74
|
4. **Version bump + changelog**: bumps `package.json` versions, builds structured `ChangelogEntry[]` from `git-cliff --context`, applies any [editorial overrides](#editorial-overrides) from per-scope `.meta/changelog-overrides.json` files, and renders both `CHANGELOG.md` and `.meta/changelog.json` from that single source. `git-cliff` is invoked only for its `--context` JSON; markdown rendering happens in-process so `.meta/changelog.json` and `CHANGELOG.md` always agree.
|
|
75
75
|
5. **Release tags file**: writes computed tags to `tmp/.release-tags` for the release workflow to read when tagging and pushing.
|
|
@@ -115,6 +115,8 @@ export default defineConfig({
|
|
|
115
115
|
|
|
116
116
|
`defineConfig` is a type-safe identity function: it gives the config object validation and completion in `.ts` files and full inference in `.js` ones. The loader also accepts a plain `export default config` or `export const config = { ... }`.
|
|
117
117
|
|
|
118
|
+
Node loads the file directly, so a relative import inside it needs an explicit file extension — `./work-types.ts`, not `./work-types`.
|
|
119
|
+
|
|
118
120
|
### `ReleaseKitConfig` reference
|
|
119
121
|
|
|
120
122
|
| Field | Type | Description |
|
package/dist/esm/loadConfig.js
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
|
+
var __rewriteRelativeImportExtension = (this && this.__rewriteRelativeImportExtension) || function (path, preserveJsx) {
|
|
2
|
+
if (typeof path === "string" && /^\.\.?\//.test(path)) {
|
|
3
|
+
return path.replace(/\.(tsx)$|((?:\.d)?)((?:\.[^./]+?)?)\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {
|
|
4
|
+
return tsx ? preserveJsx ? ".jsx" : ".js" : d && (!ext || !cm) ? m : (d + ext + "." + cm.toLowerCase() + "js");
|
|
5
|
+
});
|
|
6
|
+
}
|
|
7
|
+
return path;
|
|
8
|
+
};
|
|
1
9
|
import { existsSync, readFileSync } from 'node:fs';
|
|
2
10
|
import path from 'node:path';
|
|
11
|
+
import { pathToFileURL } from 'node:url';
|
|
3
12
|
import { DEFAULT_CHANGELOG_JSON_CONFIG, DEFAULT_PROJECT_TAG_PREFIX, DEFAULT_RELEASE_NOTES_CONFIG, DEFAULT_VERSION_PATTERNS, DEFAULT_WORK_TYPES, } from "./defaults.js";
|
|
4
13
|
import { deriveWorkspaceConfig } from "./deriveWorkspaceConfig.js";
|
|
5
14
|
import { isRecord } from "./typeGuards.js";
|
|
@@ -34,13 +43,8 @@ export async function loadConfig() {
|
|
|
34
43
|
if (!existsSync(absoluteConfigPath)) {
|
|
35
44
|
return undefined;
|
|
36
45
|
}
|
|
37
|
-
const
|
|
38
|
-
const
|
|
39
|
-
const imported = await jiti.import(absoluteConfigPath);
|
|
40
|
-
if (!isRecord(imported)) {
|
|
41
|
-
throw new Error(`Config file must export an object, got ${Array.isArray(imported) ? 'array' : typeof imported}`);
|
|
42
|
-
}
|
|
43
|
-
const resolved = imported.default ?? imported.config;
|
|
46
|
+
const imported = await import(__rewriteRelativeImportExtension(pathToFileURL(absoluteConfigPath).href));
|
|
47
|
+
const resolved = isRecord(imported) ? (imported.default ?? imported.config) : undefined;
|
|
44
48
|
if (resolved === undefined) {
|
|
45
49
|
throw new Error('Config file must have a default export or a named `config` export (e.g., `export default { ... }` or `export const config = { ... }`)');
|
|
46
50
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@williamthorsen/release-kit",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.1.0",
|
|
4
4
|
"description": "Version-bumping and changelog-generation toolkit for release workflows",
|
|
5
5
|
"keywords": [],
|
|
6
6
|
"homepage": "https://github.com/williamthorsen/node-monorepo-tools/tree/main/packages/release-kit#readme",
|
|
@@ -38,12 +38,11 @@
|
|
|
38
38
|
],
|
|
39
39
|
"dependencies": {
|
|
40
40
|
"glob": "13.0.6",
|
|
41
|
-
"jiti": "2.7.0",
|
|
42
41
|
"json-stringify-pretty-compact": "4.0.0",
|
|
43
42
|
"semver": "7.8.5",
|
|
44
43
|
"yaml": "2.9.0",
|
|
45
44
|
"zod": "4.4.3",
|
|
46
|
-
"@williamthorsen/nmr-core": "0.
|
|
45
|
+
"@williamthorsen/nmr-core": "0.9.0"
|
|
47
46
|
},
|
|
48
47
|
"devDependencies": {
|
|
49
48
|
"@types/semver": "7.7.1",
|