File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ # Changelog
2+
3+ All notable changes to this project will be documented in this file. See [ commit-and-tag-version] ( https://github.com/absolute-version/commit-and-tag-version ) for commit guidelines.
4+
5+ ## 0.2.0 (2025-06-09)
6+
7+
8+ ### Features
9+
10+ * ✨ add github runner files ([ 4ca30f9] ( https://github.com/tomgrv/synology-github-runner/commit/4ca30f9dfa1468a316635bbd5e43b9d6db6eea37 ) )
11+ * ** action:** :construction_worker : Add package build action ([ ada763e] ( https://github.com/tomgrv/synology-github-runner/commit/ada763e8fb41f201d4f2f453b1243873baa4ca52 ) )
12+
13+ ## 0.2.0 (2025-06-09)
14+
15+
16+ ### Features
17+
18+ * ✨ add github runner files ([ 4ca30f9] ( https://github.com/tomgrv/synology-github-runner/commit/4ca30f9dfa1468a316635bbd5e43b9d6db6eea37 ) )
19+ * ** action:** :construction_worker : Add package build action ([ ada763e] ( https://github.com/tomgrv/synology-github-runner/commit/ada763e8fb41f201d4f2f453b1243873baa4ca52 ) )
Original file line number Diff line number Diff line change 1+ /** @format */
2+
3+ const stringifyPackage = require ( 'commit-and-tag-version/lib/stringify-package' )
4+ const detectIndent = require ( 'detect-indent' )
5+ const detectNewline = require ( 'detect-newline' )
6+
7+ module . exports . readVersion = function ( contents ) {
8+ return JSON . parse ( contents ) . version
9+ }
10+
11+ module . exports . writeVersion = function ( contents , version ) {
12+ // Parse the current version as semver and extract the build metadata
13+ buildmeta = JSON . parse ( contents ) . version . split ( '+' ) [ 1 ] || ''
14+
15+ const json = JSON . parse ( contents )
16+ const indent = detectIndent ( contents ) . indent
17+ const newline = detectNewline ( contents )
18+ json . version = `${ version } +${ buildmeta } `
19+
20+ if ( json . packages && json . packages [ '' ] ) {
21+ // package-lock v2 stores version there too
22+ json . packages [ '' ] . version = `${ version } +${ buildmeta } `
23+ }
24+
25+ return stringifyPackage ( json , indent , newline )
26+ }
You can’t perform that action at this time.
0 commit comments