Skip to content

Commit 3f4fd0f

Browse files
committed
chore: tightening and bump v21.3.0
Signed-off-by: rezky_nightky <130107241+oxyzenQ@users.noreply.github.com> ── bmi/main · cb3e763f6ef2 · 7 file · +51/-26 · 2026-06-03T11:18:26Z
1 parent cc49e3a commit 3f4fd0f

7 files changed

Lines changed: 50 additions & 25 deletions

File tree

.github/RELEASE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ bun run verify
5050
5151
### 2. Update Version Strings
5252

53-
Use the canonical update script to synchronize the version across `package.json`, `README.md`, and `LICENSE.md`:
53+
Use the canonical update script to synchronize the version across `package.json`, `README.md`, and `DORMANT.md`:
5454

5555
```bash
5656
# Preview changes before applying

.github/workflows/release.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ jobs:
194194
195195
# Copy documentation
196196
cp README.md "$STAGE/" 2>/dev/null || true
197-
cp LICENSE.md "$STAGE/" 2>/dev/null || true
197+
cp LICENSE "$STAGE/"
198198
cp SECURITY.md "$STAGE/" 2>/dev/null || true
199199
200200
# Create source zip
@@ -222,7 +222,7 @@ jobs:
222222
cp package.json "$STAGE/"
223223
cp README.md "$STAGE/" 2>/dev/null || true
224224
cp -r docs "$STAGE/" 2>/dev/null || true
225-
cp LICENSE.md "$STAGE/" 2>/dev/null || true
225+
cp LICENSE "$STAGE/"
226226
227227
# Create build zip
228228
cd "$STAGE"
@@ -301,7 +301,7 @@ jobs:
301301
echo ""
302302
echo "## 📄 License"
303303
echo ""
304-
echo "This project is licensed under the GPL v3 License. See the [LICENSE.md](LICENSE.md) file for details."
304+
echo "This project is licensed under the GPL v3 License. See the [LICENSE](LICENSE) file for details."
305305
echo ""
306306
echo "## 🙏 Acknowledgments"
307307
echo ""

DORMANT.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This guide is the wake-up checklist for BMI Stellar after a quiet period of 1-5
55
## Current Capsule
66

77
- App: BMI Stellar
8-
- Version: `21.2.0`
8+
- Version: `21.3.0`
99
- Runtime: Bun `1.3.11` from `package.json#packageManager`
1010
- Node range: `>=22 <25`
1111
- Framework: SvelteKit 2, Svelte 5, TypeScript

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div align="center">
22
<img src="static/assets/new_bmi_logo_2026.webp" alt="BMI Stellar logo" width="240">
33

4-
<h1>BMI Stellar v21.2</h1>
4+
<h1>BMI Stellar v21.3</h1>
55

66
<p>
77
<strong>Privacy-first BMI, TDEE, body-fat, and progress tracking.</strong>
@@ -15,8 +15,8 @@
1515
<a href="https://bmi-stellar.vercel.app">
1616
<img src="https://img.shields.io/badge/live-demo-7C3AED?style=flat-square&logo=vercel&logoColor=white&labelColor=111827" alt="Live demo">
1717
</a>
18-
<img src="https://img.shields.io/badge/version-v21.2-7C3AED?style=flat-square&labelColor=111827" alt="Version v21.2">
19-
<a href="LICENSE.md">
18+
<img src="https://img.shields.io/badge/version-v21.3-7C3AED?style=flat-square&labelColor=111827" alt="Version v21.3">
19+
<a href="LICENSE">
2020
<img src="https://img.shields.io/badge/license-GPL--3.0-6D28D9?style=flat-square&labelColor=111827" alt="GPL-3.0 license">
2121
</a>
2222
<a href="https://github.com/sveltejs/svelte">
@@ -157,7 +157,7 @@ docs/ # Long-form documentation (furthermore.md)
157157
The canonical version lives in `package.json` and is synchronized into display documents via `scripts/bmi-update-version.ts`.
158158

159159
> [!IMPORTANT]
160-
> Always use `bun run bmi-update-version <version>` to update the version. This keeps `package.json`, `README.md`, and `LICENSE.md` synchronized. Never edit release version strings manually.
160+
> Always use `bun run bmi-update-version <version>` to update the version. This keeps `package.json`, `README.md`, and the dormant maintenance capsule synchronized. Never edit release version strings manually.
161161
162162
Release tags follow the format `Stellar-v<major>.<minor>` (for example, `Stellar-v21.0`). The tag's major/minor pair must match `package.json` (for example, `21.0.0` -> `Stellar-v21.0`).
163163

@@ -194,4 +194,4 @@ _Support is completely optional, and the project will forever remain open-source
194194

195195
## License
196196

197-
Distributed under the GPL-3.0 License. See [LICENSE.md](LICENSE.md) for more information.
197+
Distributed under the GPL-3.0 License. See [LICENSE](LICENSE) for more information.

docs/furthermore.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ GitHub workflows are located in `.github/workflows/`.
309309
# Preview changes before applying
310310
bun run bmi-update-version --dry-run <version>
311311

312-
# Apply version update (syncs package.json, README.md, and LICENSE.md)
312+
# Apply version update (syncs package.json, README.md, and DORMANT.md)
313313
bun run bmi-update-version <version>
314314

315315
# Verify integrity before tagging

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "bmi-stellar",
33
"private": true,
4-
"version": "21.2.0",
4+
"version": "21.3.0",
55
"type": "module",
66
"scripts": {
77
"dev": "vite dev --host",

scripts/bmi-update-version.ts

Lines changed: 38 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,11 +14,11 @@
1414
*
1515
* Canonical version sources after dynamic-version refactor:
1616
* - package.json (version)
17-
* - README.md (display title)
18-
* - LICENSE.md (display title)
17+
* - README.md (display title + badge)
18+
* - DORMANT.md (maintenance capsule version)
1919
*/
2020

21-
import { readFileSync, writeFileSync } from 'node:fs';
21+
import { existsSync, readFileSync, writeFileSync } from 'node:fs';
2222
import { resolve, dirname } from 'node:path';
2323
import { fileURLToPath } from 'node:url';
2424

@@ -58,6 +58,10 @@ function read(relPath: string): string {
5858
}
5959
}
6060

61+
function exists(relPath: string): boolean {
62+
return existsSync(resolve(ROOT, relPath));
63+
}
64+
6165
function write(relPath: string, content: string): void {
6266
writeFileSync(resolve(ROOT, relPath), content, 'utf-8');
6367
}
@@ -69,6 +73,11 @@ function replaceOrWarn(
6973
label: string,
7074
dryRun: boolean
7175
): void {
76+
if (!exists(relPath)) {
77+
console.log(` \x1b[33m⚠ ${relPath} not found — skipped\x1b[0m`);
78+
return;
79+
}
80+
7281
const original = read(relPath);
7382
if (!pattern.test(original)) {
7483
console.log(` \x1b[33m⚠ ${label} not found in ${relPath} — skipped\x1b[0m`);
@@ -93,9 +102,12 @@ function getCurrentVersion(): string {
93102

94103
function updatePackageJson(newVersion: string, dryRun: boolean): void {
95104
const raw = read('package.json');
96-
const pkg = JSON.parse(raw) as Record<string, unknown>;
97-
pkg.version = newVersion;
98-
if (!dryRun) write('package.json', `${JSON.stringify(pkg, null, 2)}\n`);
105+
const updated = raw.replace(/("version"\s*:\s*")\d+\.\d+\.\d+(")/, `$1${newVersion}$2`);
106+
if (updated === raw) {
107+
console.log(' \x1b[36m•\x1b[0m package.json version already current');
108+
return;
109+
}
110+
if (!dryRun) write('package.json', updated);
99111
console.log(' \x1b[32m✓\x1b[0m package.json version updated');
100112
}
101113

@@ -134,9 +146,8 @@ function main(): void {
134146
console.log('');
135147

136148
if (currentVersion === nextVersion) {
137-
console.log('\x1b[33m No changes: package.json already at target version.\x1b[0m');
149+
console.log('\x1b[33m package.json already at target version; syncing display files.\x1b[0m');
138150
console.log('');
139-
return;
140151
}
141152

142153
console.log(' \x1b[33m→\x1b[0m package.json');
@@ -150,13 +161,27 @@ function main(): void {
150161
'README display version',
151162
dryRun
152163
);
164+
replaceOrWarn(
165+
'README.md',
166+
/badge\/version-v\d+\.\d+(?:\.\d+)?-/g,
167+
`badge/version-v${nextShort}-`,
168+
'README version badge',
169+
dryRun
170+
);
171+
replaceOrWarn(
172+
'README.md',
173+
/alt="Version v\d+\.\d+(?:\.\d+)?"/g,
174+
`alt="Version v${nextShort}"`,
175+
'README version badge alt text',
176+
dryRun
177+
);
153178

154-
console.log(' \x1b[33m→\x1b[0m LICENSE.md');
179+
console.log(' \x1b[33m→\x1b[0m DORMANT.md');
155180
replaceOrWarn(
156-
'LICENSE.md',
157-
/BMI Stellar\s*[-]\s*v\d+\.\d+(?:\.\d+)?/g,
158-
`BMI Stellar – v${nextShort}`,
159-
'LICENSE display version',
181+
'DORMANT.md',
182+
/Version: `\d+\.\d+\.\d+`/g,
183+
`Version: \`${nextVersion}\``,
184+
'DORMANT capsule version',
160185
dryRun
161186
);
162187

0 commit comments

Comments
 (0)