mirror of
https://github.com/hesprs/obsidian-webdav-sync.git
synced 2026-07-22 06:14:17 +00:00
* refactor(all): shift to bun * fix(lint): run lint * fix(test): organize mocks * fix(mock): restore mocks after declaration * fix(mock): reverse mock what is mocked
1.6 KiB
1.6 KiB
scripts/
Responsibility
Houses standalone Node scripts for release management. One script bumps plugin metadata during versioning; the other extracts release notes into a publishable file.
Design
- Both files are CLI-style, top-level scripts with no exports.
- They use Node built-ins directly and write repo-root files in place.
- Formatting is delegated to
bun oxfmtafter writes. version-bump.tsis driven bynpm_package_versionand updatesmanifest.jsonplusversions.json.release-notes.tsaccepts a version argument, readsCHANGELOG.md, and emitsrelease-notes.md; prerelease versions get a fixed debug message instead of changelog extraction.
Flow
- Package scripts invoke the files with
node. version-bump.tsreads the current manifest, copiesminAppVersion, writes the target version intomanifest.json, then records the version-to-minimum-app-version mapping inversions.json.release-notes.tsvalidates the argument, normalizes the version to semver, scansCHANGELOG.mdfor the matching##section, trims the captured notes, and writes them torelease-notes.md.- Both scripts run
bun oxfmton their output files to keep generated JSON/Markdown formatted.
Integration
package.jsonexposesver: node scripts/version-bump.tsfor release/version bumps.package.jsonexposesnotes: node scripts/release-notes.tsfor changelog extraction.version-bump.tsdepends onmanifest.jsonandversions.jsonat the repo root.release-notes.tsdepends onCHANGELOG.mdat the repo root and writesrelease-notes.mdin the same location.