@hyperfrontend/versioning 0.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/ARCHITECTURE.md +593 -0
- package/CHANGELOG.md +35 -0
- package/FUNDING.md +141 -0
- package/LICENSE.md +21 -0
- package/README.md +195 -0
- package/SECURITY.md +82 -0
- package/changelog/compare/diff.d.ts +128 -0
- package/changelog/compare/diff.d.ts.map +1 -0
- package/changelog/compare/index.cjs.js +628 -0
- package/changelog/compare/index.cjs.js.map +1 -0
- package/changelog/compare/index.d.ts +4 -0
- package/changelog/compare/index.d.ts.map +1 -0
- package/changelog/compare/index.esm.js +612 -0
- package/changelog/compare/index.esm.js.map +1 -0
- package/changelog/compare/is-equal.d.ts +114 -0
- package/changelog/compare/is-equal.d.ts.map +1 -0
- package/changelog/index.cjs.js +6448 -0
- package/changelog/index.cjs.js.map +1 -0
- package/changelog/index.d.ts +6 -0
- package/changelog/index.d.ts.map +1 -0
- package/changelog/index.esm.js +6358 -0
- package/changelog/index.esm.js.map +1 -0
- package/changelog/models/changelog.d.ts +86 -0
- package/changelog/models/changelog.d.ts.map +1 -0
- package/changelog/models/commit-ref.d.ts +51 -0
- package/changelog/models/commit-ref.d.ts.map +1 -0
- package/changelog/models/entry.d.ts +84 -0
- package/changelog/models/entry.d.ts.map +1 -0
- package/changelog/models/index.cjs.js +2043 -0
- package/changelog/models/index.cjs.js.map +1 -0
- package/changelog/models/index.d.ts +11 -0
- package/changelog/models/index.d.ts.map +1 -0
- package/changelog/models/index.esm.js +2026 -0
- package/changelog/models/index.esm.js.map +1 -0
- package/changelog/models/schema.d.ts +68 -0
- package/changelog/models/schema.d.ts.map +1 -0
- package/changelog/models/section.d.ts +25 -0
- package/changelog/models/section.d.ts.map +1 -0
- package/changelog/operations/add-entry.d.ts +56 -0
- package/changelog/operations/add-entry.d.ts.map +1 -0
- package/changelog/operations/add-item.d.ts +18 -0
- package/changelog/operations/add-item.d.ts.map +1 -0
- package/changelog/operations/filter-by-predicate.d.ts +81 -0
- package/changelog/operations/filter-by-predicate.d.ts.map +1 -0
- package/changelog/operations/filter-by-range.d.ts +63 -0
- package/changelog/operations/filter-by-range.d.ts.map +1 -0
- package/changelog/operations/filter-entries.d.ts +9 -0
- package/changelog/operations/filter-entries.d.ts.map +1 -0
- package/changelog/operations/index.cjs.js +2455 -0
- package/changelog/operations/index.cjs.js.map +1 -0
- package/changelog/operations/index.d.ts +15 -0
- package/changelog/operations/index.d.ts.map +1 -0
- package/changelog/operations/index.esm.js +2411 -0
- package/changelog/operations/index.esm.js.map +1 -0
- package/changelog/operations/merge.d.ts +88 -0
- package/changelog/operations/merge.d.ts.map +1 -0
- package/changelog/operations/remove-entry.d.ts +45 -0
- package/changelog/operations/remove-entry.d.ts.map +1 -0
- package/changelog/operations/remove-section.d.ts +50 -0
- package/changelog/operations/remove-section.d.ts.map +1 -0
- package/changelog/operations/transform.d.ts +143 -0
- package/changelog/operations/transform.d.ts.map +1 -0
- package/changelog/parse/index.cjs.js +1282 -0
- package/changelog/parse/index.cjs.js.map +1 -0
- package/changelog/parse/index.d.ts +5 -0
- package/changelog/parse/index.d.ts.map +1 -0
- package/changelog/parse/index.esm.js +1275 -0
- package/changelog/parse/index.esm.js.map +1 -0
- package/changelog/parse/line.d.ts +48 -0
- package/changelog/parse/line.d.ts.map +1 -0
- package/changelog/parse/parser.d.ts +16 -0
- package/changelog/parse/parser.d.ts.map +1 -0
- package/changelog/parse/tokenizer.d.ts +49 -0
- package/changelog/parse/tokenizer.d.ts.map +1 -0
- package/changelog/serialize/index.cjs.js +574 -0
- package/changelog/serialize/index.cjs.js.map +1 -0
- package/changelog/serialize/index.d.ts +6 -0
- package/changelog/serialize/index.d.ts.map +1 -0
- package/changelog/serialize/index.esm.js +564 -0
- package/changelog/serialize/index.esm.js.map +1 -0
- package/changelog/serialize/templates.d.ts +81 -0
- package/changelog/serialize/templates.d.ts.map +1 -0
- package/changelog/serialize/to-json.d.ts +57 -0
- package/changelog/serialize/to-json.d.ts.map +1 -0
- package/changelog/serialize/to-string.d.ts +30 -0
- package/changelog/serialize/to-string.d.ts.map +1 -0
- package/commits/index.cjs.js +648 -0
- package/commits/index.cjs.js.map +1 -0
- package/commits/index.d.ts +3 -0
- package/commits/index.d.ts.map +1 -0
- package/commits/index.esm.js +629 -0
- package/commits/index.esm.js.map +1 -0
- package/commits/models/breaking.d.ts +39 -0
- package/commits/models/breaking.d.ts.map +1 -0
- package/commits/models/commit-type.d.ts +32 -0
- package/commits/models/commit-type.d.ts.map +1 -0
- package/commits/models/conventional.d.ts +49 -0
- package/commits/models/conventional.d.ts.map +1 -0
- package/commits/models/index.cjs.js +207 -0
- package/commits/models/index.cjs.js.map +1 -0
- package/commits/models/index.d.ts +7 -0
- package/commits/models/index.d.ts.map +1 -0
- package/commits/models/index.esm.js +193 -0
- package/commits/models/index.esm.js.map +1 -0
- package/commits/parse/body.d.ts +18 -0
- package/commits/parse/body.d.ts.map +1 -0
- package/commits/parse/footer.d.ts +16 -0
- package/commits/parse/footer.d.ts.map +1 -0
- package/commits/parse/header.d.ts +15 -0
- package/commits/parse/header.d.ts.map +1 -0
- package/commits/parse/index.cjs.js +505 -0
- package/commits/parse/index.cjs.js.map +1 -0
- package/commits/parse/index.d.ts +5 -0
- package/commits/parse/index.d.ts.map +1 -0
- package/commits/parse/index.esm.js +499 -0
- package/commits/parse/index.esm.js.map +1 -0
- package/commits/parse/message.d.ts +17 -0
- package/commits/parse/message.d.ts.map +1 -0
- package/commits/utils/replace-char.d.ts +19 -0
- package/commits/utils/replace-char.d.ts.map +1 -0
- package/flow/executor/execute.d.ts +72 -0
- package/flow/executor/execute.d.ts.map +1 -0
- package/flow/executor/index.cjs.js +4402 -0
- package/flow/executor/index.cjs.js.map +1 -0
- package/flow/executor/index.d.ts +3 -0
- package/flow/executor/index.d.ts.map +1 -0
- package/flow/executor/index.esm.js +4398 -0
- package/flow/executor/index.esm.js.map +1 -0
- package/flow/factory.d.ts +58 -0
- package/flow/factory.d.ts.map +1 -0
- package/flow/index.cjs.js +8506 -0
- package/flow/index.cjs.js.map +1 -0
- package/flow/index.d.ts +7 -0
- package/flow/index.d.ts.map +1 -0
- package/flow/index.esm.js +8451 -0
- package/flow/index.esm.js.map +1 -0
- package/flow/models/flow.d.ts +130 -0
- package/flow/models/flow.d.ts.map +1 -0
- package/flow/models/index.cjs.js +285 -0
- package/flow/models/index.cjs.js.map +1 -0
- package/flow/models/index.d.ts +7 -0
- package/flow/models/index.d.ts.map +1 -0
- package/flow/models/index.esm.js +268 -0
- package/flow/models/index.esm.js.map +1 -0
- package/flow/models/step.d.ts +108 -0
- package/flow/models/step.d.ts.map +1 -0
- package/flow/models/types.d.ts +150 -0
- package/flow/models/types.d.ts.map +1 -0
- package/flow/presets/conventional.d.ts +59 -0
- package/flow/presets/conventional.d.ts.map +1 -0
- package/flow/presets/independent.d.ts +61 -0
- package/flow/presets/independent.d.ts.map +1 -0
- package/flow/presets/index.cjs.js +3903 -0
- package/flow/presets/index.cjs.js.map +1 -0
- package/flow/presets/index.d.ts +4 -0
- package/flow/presets/index.d.ts.map +1 -0
- package/flow/presets/index.esm.js +3889 -0
- package/flow/presets/index.esm.js.map +1 -0
- package/flow/presets/synced.d.ts +65 -0
- package/flow/presets/synced.d.ts.map +1 -0
- package/flow/steps/analyze-commits.d.ts +19 -0
- package/flow/steps/analyze-commits.d.ts.map +1 -0
- package/flow/steps/calculate-bump.d.ts +27 -0
- package/flow/steps/calculate-bump.d.ts.map +1 -0
- package/flow/steps/create-commit.d.ts +16 -0
- package/flow/steps/create-commit.d.ts.map +1 -0
- package/flow/steps/create-tag.d.ts +22 -0
- package/flow/steps/create-tag.d.ts.map +1 -0
- package/flow/steps/fetch-registry.d.ts +19 -0
- package/flow/steps/fetch-registry.d.ts.map +1 -0
- package/flow/steps/generate-changelog.d.ts +25 -0
- package/flow/steps/generate-changelog.d.ts.map +1 -0
- package/flow/steps/index.cjs.js +3523 -0
- package/flow/steps/index.cjs.js.map +1 -0
- package/flow/steps/index.d.ts +8 -0
- package/flow/steps/index.d.ts.map +1 -0
- package/flow/steps/index.esm.js +3504 -0
- package/flow/steps/index.esm.js.map +1 -0
- package/flow/steps/update-packages.d.ts +25 -0
- package/flow/steps/update-packages.d.ts.map +1 -0
- package/flow/utils/interpolate.d.ts +11 -0
- package/flow/utils/interpolate.d.ts.map +1 -0
- package/git/factory.d.ts +233 -0
- package/git/factory.d.ts.map +1 -0
- package/git/index.cjs.js +2863 -0
- package/git/index.cjs.js.map +1 -0
- package/git/index.d.ts +5 -0
- package/git/index.d.ts.map +1 -0
- package/git/index.esm.js +2785 -0
- package/git/index.esm.js.map +1 -0
- package/git/models/commit.d.ts +129 -0
- package/git/models/commit.d.ts.map +1 -0
- package/git/models/index.cjs.js +755 -0
- package/git/models/index.cjs.js.map +1 -0
- package/git/models/index.d.ts +7 -0
- package/git/models/index.d.ts.map +1 -0
- package/git/models/index.esm.js +729 -0
- package/git/models/index.esm.js.map +1 -0
- package/git/models/ref.d.ts +120 -0
- package/git/models/ref.d.ts.map +1 -0
- package/git/models/tag.d.ts +141 -0
- package/git/models/tag.d.ts.map +1 -0
- package/git/operations/commit.d.ts +97 -0
- package/git/operations/commit.d.ts.map +1 -0
- package/git/operations/head-info.d.ts +29 -0
- package/git/operations/head-info.d.ts.map +1 -0
- package/git/operations/index.cjs.js +1954 -0
- package/git/operations/index.cjs.js.map +1 -0
- package/git/operations/index.d.ts +14 -0
- package/git/operations/index.d.ts.map +1 -0
- package/git/operations/index.esm.js +1903 -0
- package/git/operations/index.esm.js.map +1 -0
- package/git/operations/log.d.ts +104 -0
- package/git/operations/log.d.ts.map +1 -0
- package/git/operations/manage-tags.d.ts +60 -0
- package/git/operations/manage-tags.d.ts.map +1 -0
- package/git/operations/query-tags.d.ts +88 -0
- package/git/operations/query-tags.d.ts.map +1 -0
- package/git/operations/stage.d.ts +66 -0
- package/git/operations/stage.d.ts.map +1 -0
- package/git/operations/status.d.ts +173 -0
- package/git/operations/status.d.ts.map +1 -0
- package/index.cjs.js +16761 -0
- package/index.cjs.js.map +1 -0
- package/index.d.ts +102 -0
- package/index.d.ts.map +1 -0
- package/index.esm.js +16427 -0
- package/index.esm.js.map +1 -0
- package/package.json +200 -0
- package/registry/factory.d.ts +18 -0
- package/registry/factory.d.ts.map +1 -0
- package/registry/index.cjs.js +543 -0
- package/registry/index.cjs.js.map +1 -0
- package/registry/index.d.ts +5 -0
- package/registry/index.d.ts.map +1 -0
- package/registry/index.esm.js +535 -0
- package/registry/index.esm.js.map +1 -0
- package/registry/models/index.cjs.js +69 -0
- package/registry/models/index.cjs.js.map +1 -0
- package/registry/models/index.d.ts +6 -0
- package/registry/models/index.d.ts.map +1 -0
- package/registry/models/index.esm.js +66 -0
- package/registry/models/index.esm.js.map +1 -0
- package/registry/models/package-info.d.ts +55 -0
- package/registry/models/package-info.d.ts.map +1 -0
- package/registry/models/registry.d.ts +62 -0
- package/registry/models/registry.d.ts.map +1 -0
- package/registry/models/version-info.d.ts +67 -0
- package/registry/models/version-info.d.ts.map +1 -0
- package/registry/npm/cache.d.ts +50 -0
- package/registry/npm/cache.d.ts.map +1 -0
- package/registry/npm/client.d.ts +30 -0
- package/registry/npm/client.d.ts.map +1 -0
- package/registry/npm/index.cjs.js +456 -0
- package/registry/npm/index.cjs.js.map +1 -0
- package/registry/npm/index.d.ts +4 -0
- package/registry/npm/index.d.ts.map +1 -0
- package/registry/npm/index.esm.js +451 -0
- package/registry/npm/index.esm.js.map +1 -0
- package/semver/compare/compare.d.ts +100 -0
- package/semver/compare/compare.d.ts.map +1 -0
- package/semver/compare/index.cjs.js +386 -0
- package/semver/compare/index.cjs.js.map +1 -0
- package/semver/compare/index.d.ts +3 -0
- package/semver/compare/index.d.ts.map +1 -0
- package/semver/compare/index.esm.js +370 -0
- package/semver/compare/index.esm.js.map +1 -0
- package/semver/compare/sort.d.ts +36 -0
- package/semver/compare/sort.d.ts.map +1 -0
- package/semver/format/index.cjs.js +58 -0
- package/semver/format/index.cjs.js.map +1 -0
- package/semver/format/index.d.ts +2 -0
- package/semver/format/index.d.ts.map +1 -0
- package/semver/format/index.esm.js +53 -0
- package/semver/format/index.esm.js.map +1 -0
- package/semver/format/to-string.d.ts +31 -0
- package/semver/format/to-string.d.ts.map +1 -0
- package/semver/increment/bump.d.ts +37 -0
- package/semver/increment/bump.d.ts.map +1 -0
- package/semver/increment/index.cjs.js +223 -0
- package/semver/increment/index.cjs.js.map +1 -0
- package/semver/increment/index.d.ts +2 -0
- package/semver/increment/index.d.ts.map +1 -0
- package/semver/increment/index.esm.js +219 -0
- package/semver/increment/index.esm.js.map +1 -0
- package/semver/index.cjs.js +1499 -0
- package/semver/index.cjs.js.map +1 -0
- package/semver/index.d.ts +6 -0
- package/semver/index.d.ts.map +1 -0
- package/semver/index.esm.js +1458 -0
- package/semver/index.esm.js.map +1 -0
- package/semver/models/index.cjs.js +153 -0
- package/semver/models/index.cjs.js.map +1 -0
- package/semver/models/index.d.ts +5 -0
- package/semver/models/index.d.ts.map +1 -0
- package/semver/models/index.esm.js +139 -0
- package/semver/models/index.esm.js.map +1 -0
- package/semver/models/range.d.ts +83 -0
- package/semver/models/range.d.ts.map +1 -0
- package/semver/models/version.d.ts +78 -0
- package/semver/models/version.d.ts.map +1 -0
- package/semver/parse/index.cjs.js +799 -0
- package/semver/parse/index.cjs.js.map +1 -0
- package/semver/parse/index.d.ts +5 -0
- package/semver/parse/index.d.ts.map +1 -0
- package/semver/parse/index.esm.js +793 -0
- package/semver/parse/index.esm.js.map +1 -0
- package/semver/parse/range.d.ts +38 -0
- package/semver/parse/range.d.ts.map +1 -0
- package/semver/parse/version.d.ts +49 -0
- package/semver/parse/version.d.ts.map +1 -0
- package/workspace/discovery/changelog-path.d.ts +21 -0
- package/workspace/discovery/changelog-path.d.ts.map +1 -0
- package/workspace/discovery/dependencies.d.ts +145 -0
- package/workspace/discovery/dependencies.d.ts.map +1 -0
- package/workspace/discovery/discover-changelogs.d.ts +76 -0
- package/workspace/discovery/discover-changelogs.d.ts.map +1 -0
- package/workspace/discovery/index.cjs.js +2300 -0
- package/workspace/discovery/index.cjs.js.map +1 -0
- package/workspace/discovery/index.d.ts +13 -0
- package/workspace/discovery/index.d.ts.map +1 -0
- package/workspace/discovery/index.esm.js +2283 -0
- package/workspace/discovery/index.esm.js.map +1 -0
- package/workspace/discovery/packages.d.ts +83 -0
- package/workspace/discovery/packages.d.ts.map +1 -0
- package/workspace/index.cjs.js +4445 -0
- package/workspace/index.cjs.js.map +1 -0
- package/workspace/index.d.ts +52 -0
- package/workspace/index.d.ts.map +1 -0
- package/workspace/index.esm.js +4394 -0
- package/workspace/index.esm.js.map +1 -0
- package/workspace/models/index.cjs.js +284 -0
- package/workspace/models/index.cjs.js.map +1 -0
- package/workspace/models/index.d.ts +10 -0
- package/workspace/models/index.d.ts.map +1 -0
- package/workspace/models/index.esm.js +261 -0
- package/workspace/models/index.esm.js.map +1 -0
- package/workspace/models/project.d.ts +118 -0
- package/workspace/models/project.d.ts.map +1 -0
- package/workspace/models/workspace.d.ts +139 -0
- package/workspace/models/workspace.d.ts.map +1 -0
- package/workspace/operations/batch-update.d.ts +99 -0
- package/workspace/operations/batch-update.d.ts.map +1 -0
- package/workspace/operations/cascade-bump.d.ts +125 -0
- package/workspace/operations/cascade-bump.d.ts.map +1 -0
- package/workspace/operations/index.cjs.js +2675 -0
- package/workspace/operations/index.cjs.js.map +1 -0
- package/workspace/operations/index.d.ts +12 -0
- package/workspace/operations/index.d.ts.map +1 -0
- package/workspace/operations/index.esm.js +2663 -0
- package/workspace/operations/index.esm.js.map +1 -0
- package/workspace/operations/validate.d.ts +85 -0
- package/workspace/operations/validate.d.ts.map +1 -0
|
@@ -0,0 +1,564 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Safe copies of Map built-in via factory function.
|
|
3
|
+
*
|
|
4
|
+
* Since constructors cannot be safely captured via Object.assign, this module
|
|
5
|
+
* provides a factory function that uses Reflect.construct internally.
|
|
6
|
+
*
|
|
7
|
+
* These references are captured at module initialization time to protect against
|
|
8
|
+
* prototype pollution attacks. Import only what you need for tree-shaking.
|
|
9
|
+
*
|
|
10
|
+
* @module @hyperfrontend/immutable-api-utils/built-in-copy/map
|
|
11
|
+
*/
|
|
12
|
+
// Capture references at module initialization time
|
|
13
|
+
const _Map = globalThis.Map;
|
|
14
|
+
const _Reflect = globalThis.Reflect;
|
|
15
|
+
/**
|
|
16
|
+
* (Safe copy) Creates a new Map using the captured Map constructor.
|
|
17
|
+
* Use this instead of `new Map()`.
|
|
18
|
+
*
|
|
19
|
+
* @param iterable - Optional iterable of key-value pairs.
|
|
20
|
+
* @returns A new Map instance.
|
|
21
|
+
*/
|
|
22
|
+
const createMap = (iterable) => _Reflect.construct(_Map, iterable ? [iterable] : []);
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* Maps section headings to their canonical types.
|
|
26
|
+
* Used during parsing to normalize different heading styles.
|
|
27
|
+
*/
|
|
28
|
+
/**
|
|
29
|
+
* Standard section headings for serialization.
|
|
30
|
+
* Maps section types to their preferred heading text.
|
|
31
|
+
*/
|
|
32
|
+
const SECTION_HEADINGS = {
|
|
33
|
+
breaking: 'Breaking Changes',
|
|
34
|
+
features: 'Features',
|
|
35
|
+
fixes: 'Bug Fixes',
|
|
36
|
+
performance: 'Performance',
|
|
37
|
+
documentation: 'Documentation',
|
|
38
|
+
deprecations: 'Deprecations',
|
|
39
|
+
refactoring: 'Refactoring',
|
|
40
|
+
tests: 'Tests',
|
|
41
|
+
build: 'Build',
|
|
42
|
+
ci: 'CI',
|
|
43
|
+
chores: 'Chores',
|
|
44
|
+
other: 'Other',
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Changelog Serialization Templates
|
|
49
|
+
*
|
|
50
|
+
* Output templates and formatting helpers for changelog serialization.
|
|
51
|
+
* Provides configurable options for different changelog styles.
|
|
52
|
+
*/
|
|
53
|
+
/**
|
|
54
|
+
* Default serialization options.
|
|
55
|
+
*/
|
|
56
|
+
const DEFAULT_SERIALIZE_OPTIONS = {
|
|
57
|
+
includeDescription: true,
|
|
58
|
+
includeLinks: true,
|
|
59
|
+
includeCompareUrls: true,
|
|
60
|
+
includeCommits: true,
|
|
61
|
+
includeReferences: true,
|
|
62
|
+
includeScope: true,
|
|
63
|
+
includeRawContent: false,
|
|
64
|
+
sectionOrder: [
|
|
65
|
+
'breaking',
|
|
66
|
+
'features',
|
|
67
|
+
'fixes',
|
|
68
|
+
'performance',
|
|
69
|
+
'documentation',
|
|
70
|
+
'deprecations',
|
|
71
|
+
'refactoring',
|
|
72
|
+
'tests',
|
|
73
|
+
'build',
|
|
74
|
+
'ci',
|
|
75
|
+
'chores',
|
|
76
|
+
'other',
|
|
77
|
+
],
|
|
78
|
+
sectionHeadings: {},
|
|
79
|
+
lineEnding: '\n',
|
|
80
|
+
entrySpacing: 1,
|
|
81
|
+
sectionSpacing: 1,
|
|
82
|
+
useAsterisks: false,
|
|
83
|
+
};
|
|
84
|
+
/**
|
|
85
|
+
* Merges user options with defaults.
|
|
86
|
+
*
|
|
87
|
+
* @param options - User-provided options
|
|
88
|
+
* @returns Complete options with defaults applied
|
|
89
|
+
*/
|
|
90
|
+
function resolveOptions(options) {
|
|
91
|
+
if (!options) {
|
|
92
|
+
return DEFAULT_SERIALIZE_OPTIONS;
|
|
93
|
+
}
|
|
94
|
+
return {
|
|
95
|
+
includeDescription: options.includeDescription ?? DEFAULT_SERIALIZE_OPTIONS.includeDescription,
|
|
96
|
+
includeLinks: options.includeLinks ?? DEFAULT_SERIALIZE_OPTIONS.includeLinks,
|
|
97
|
+
includeCompareUrls: options.includeCompareUrls ?? DEFAULT_SERIALIZE_OPTIONS.includeCompareUrls,
|
|
98
|
+
includeCommits: options.includeCommits ?? DEFAULT_SERIALIZE_OPTIONS.includeCommits,
|
|
99
|
+
includeReferences: options.includeReferences ?? DEFAULT_SERIALIZE_OPTIONS.includeReferences,
|
|
100
|
+
includeScope: options.includeScope ?? DEFAULT_SERIALIZE_OPTIONS.includeScope,
|
|
101
|
+
includeRawContent: options.includeRawContent ?? DEFAULT_SERIALIZE_OPTIONS.includeRawContent,
|
|
102
|
+
sectionOrder: options.sectionOrder ?? DEFAULT_SERIALIZE_OPTIONS.sectionOrder,
|
|
103
|
+
sectionHeadings: options.sectionHeadings ?? DEFAULT_SERIALIZE_OPTIONS.sectionHeadings,
|
|
104
|
+
lineEnding: options.lineEnding ?? DEFAULT_SERIALIZE_OPTIONS.lineEnding,
|
|
105
|
+
entrySpacing: options.entrySpacing ?? DEFAULT_SERIALIZE_OPTIONS.entrySpacing,
|
|
106
|
+
sectionSpacing: options.sectionSpacing ?? DEFAULT_SERIALIZE_OPTIONS.sectionSpacing,
|
|
107
|
+
useAsterisks: options.useAsterisks ?? DEFAULT_SERIALIZE_OPTIONS.useAsterisks,
|
|
108
|
+
};
|
|
109
|
+
}
|
|
110
|
+
/**
|
|
111
|
+
* Gets the heading for a section type, respecting custom headings.
|
|
112
|
+
*
|
|
113
|
+
* @param type - The changelog section type to get the heading for
|
|
114
|
+
* @param customHeadings - Optional map of custom section type to heading overrides
|
|
115
|
+
* @returns The heading string to use
|
|
116
|
+
*/
|
|
117
|
+
function getSectionHeading(type, customHeadings) {
|
|
118
|
+
return customHeadings?.[type] ?? SECTION_HEADINGS[type];
|
|
119
|
+
}
|
|
120
|
+
/**
|
|
121
|
+
* Creates a markdown link.
|
|
122
|
+
*
|
|
123
|
+
* @param text - The display text for the link
|
|
124
|
+
* @param url - The destination URL for the link
|
|
125
|
+
* @returns Formatted markdown link
|
|
126
|
+
*/
|
|
127
|
+
function formatLink(text, url) {
|
|
128
|
+
return `[${text}](${url})`;
|
|
129
|
+
}
|
|
130
|
+
/**
|
|
131
|
+
* Creates a list item marker.
|
|
132
|
+
*
|
|
133
|
+
* @param useAsterisks - Whether to use * instead of -
|
|
134
|
+
* @returns The list item marker ('- ' or '* ')
|
|
135
|
+
*/
|
|
136
|
+
function getListMarker(useAsterisks) {
|
|
137
|
+
return useAsterisks ? '* ' : '- ';
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Creates blank lines for spacing.
|
|
141
|
+
*
|
|
142
|
+
* @param count - Number of blank lines
|
|
143
|
+
* @param lineEnding - Line ending style
|
|
144
|
+
* @returns String with specified number of blank lines
|
|
145
|
+
*/
|
|
146
|
+
function createSpacing(count, lineEnding) {
|
|
147
|
+
if (count <= 0)
|
|
148
|
+
return '';
|
|
149
|
+
return lineEnding.repeat(count);
|
|
150
|
+
}
|
|
151
|
+
|
|
152
|
+
/**
|
|
153
|
+
* Changelog Serialization to String
|
|
154
|
+
*
|
|
155
|
+
* Converts a Changelog object back to markdown format.
|
|
156
|
+
* Supports configurable output formatting for different changelog styles.
|
|
157
|
+
*/
|
|
158
|
+
/**
|
|
159
|
+
* Serializes a Changelog object to markdown string.
|
|
160
|
+
*
|
|
161
|
+
* @param changelog - The changelog to serialize
|
|
162
|
+
* @param options - Optional serialization options
|
|
163
|
+
* @returns The markdown string representation
|
|
164
|
+
*
|
|
165
|
+
* @example
|
|
166
|
+
* ```ts
|
|
167
|
+
* const markdown = serializeChangelog(changelog)
|
|
168
|
+
* ```
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```ts
|
|
172
|
+
* const markdown = serializeChangelog(changelog, {
|
|
173
|
+
* includeCommits: false,
|
|
174
|
+
* useAsterisks: true,
|
|
175
|
+
* })
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
function serializeChangelog(changelog, options) {
|
|
179
|
+
const opts = resolveOptions(options);
|
|
180
|
+
const parts = [];
|
|
181
|
+
// Serialize header
|
|
182
|
+
parts.push(serializeHeader(changelog.header, opts));
|
|
183
|
+
// Serialize entries
|
|
184
|
+
for (let i = 0; i < changelog.entries.length; i++) {
|
|
185
|
+
const entry = changelog.entries[i];
|
|
186
|
+
parts.push(serializeEntry(entry, opts));
|
|
187
|
+
// Add spacing between entries (except after the last one)
|
|
188
|
+
if (i < changelog.entries.length - 1) {
|
|
189
|
+
parts.push(createSpacing(opts.entrySpacing, opts.lineEnding));
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
return parts.join('');
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* Serializes the changelog header.
|
|
196
|
+
*
|
|
197
|
+
* @param header - The header to serialize
|
|
198
|
+
* @param opts - Resolved options
|
|
199
|
+
* @returns The serialized header string
|
|
200
|
+
*/
|
|
201
|
+
function serializeHeader(header, opts) {
|
|
202
|
+
const parts = [];
|
|
203
|
+
const nl = opts.lineEnding;
|
|
204
|
+
// Title
|
|
205
|
+
parts.push(header.title + nl);
|
|
206
|
+
parts.push(nl);
|
|
207
|
+
// Description
|
|
208
|
+
if (opts.includeDescription && header.description.length > 0) {
|
|
209
|
+
for (const line of header.description) {
|
|
210
|
+
parts.push(line + nl);
|
|
211
|
+
}
|
|
212
|
+
parts.push(nl);
|
|
213
|
+
}
|
|
214
|
+
// Links section
|
|
215
|
+
if (opts.includeLinks && header.links.length > 0) {
|
|
216
|
+
for (const link of header.links) {
|
|
217
|
+
parts.push(serializeLink(link) + nl);
|
|
218
|
+
}
|
|
219
|
+
parts.push(nl);
|
|
220
|
+
}
|
|
221
|
+
return parts.join('');
|
|
222
|
+
}
|
|
223
|
+
/**
|
|
224
|
+
* Serializes a changelog link.
|
|
225
|
+
*
|
|
226
|
+
* @param link - The link to serialize
|
|
227
|
+
* @returns The serialized link
|
|
228
|
+
*/
|
|
229
|
+
function serializeLink(link) {
|
|
230
|
+
return `[${link.label}]: ${link.url}`;
|
|
231
|
+
}
|
|
232
|
+
/**
|
|
233
|
+
* Serializes a changelog entry.
|
|
234
|
+
*
|
|
235
|
+
* @param entry - The entry to serialize
|
|
236
|
+
* @param opts - Resolved options
|
|
237
|
+
* @returns The serialized entry string
|
|
238
|
+
*/
|
|
239
|
+
function serializeEntry(entry, opts) {
|
|
240
|
+
const parts = [];
|
|
241
|
+
const nl = opts.lineEnding;
|
|
242
|
+
// Entry heading
|
|
243
|
+
parts.push(serializeEntryHeading(entry, opts) + nl);
|
|
244
|
+
parts.push(nl);
|
|
245
|
+
// Raw content fallback
|
|
246
|
+
if (opts.includeRawContent && entry.rawContent) {
|
|
247
|
+
parts.push(entry.rawContent + nl);
|
|
248
|
+
return parts.join('');
|
|
249
|
+
}
|
|
250
|
+
// Sort sections by specified order
|
|
251
|
+
const sortedSections = sortSections(entry.sections, opts.sectionOrder);
|
|
252
|
+
// Serialize sections
|
|
253
|
+
for (let i = 0; i < sortedSections.length; i++) {
|
|
254
|
+
const section = sortedSections[i];
|
|
255
|
+
parts.push(serializeSection(section, opts));
|
|
256
|
+
// Add spacing between sections (except after the last one)
|
|
257
|
+
if (i < sortedSections.length - 1) {
|
|
258
|
+
parts.push(createSpacing(opts.sectionSpacing, nl));
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
return parts.join('');
|
|
262
|
+
}
|
|
263
|
+
/**
|
|
264
|
+
* Serializes an entry heading.
|
|
265
|
+
*
|
|
266
|
+
* @param entry - The changelog entry to serialize the heading for
|
|
267
|
+
* @param opts - Resolved serialization options
|
|
268
|
+
* @returns The heading line
|
|
269
|
+
*/
|
|
270
|
+
function serializeEntryHeading(entry, opts) {
|
|
271
|
+
const parts = ['## '];
|
|
272
|
+
// Version with optional compare URL
|
|
273
|
+
if (opts.includeCompareUrls && entry.compareUrl) {
|
|
274
|
+
parts.push(formatLink(entry.version, entry.compareUrl));
|
|
275
|
+
}
|
|
276
|
+
else {
|
|
277
|
+
parts.push(entry.version);
|
|
278
|
+
}
|
|
279
|
+
// Date
|
|
280
|
+
if (entry.date) {
|
|
281
|
+
parts.push(` - ${entry.date}`);
|
|
282
|
+
}
|
|
283
|
+
return parts.join('');
|
|
284
|
+
}
|
|
285
|
+
/**
|
|
286
|
+
* Sorts sections by the specified order.
|
|
287
|
+
*
|
|
288
|
+
* @param sections - The sections to sort
|
|
289
|
+
* @param order - The desired section order
|
|
290
|
+
* @returns Sorted sections
|
|
291
|
+
*/
|
|
292
|
+
function sortSections(sections, order) {
|
|
293
|
+
const orderMap = createMap();
|
|
294
|
+
order.forEach((type, index) => orderMap.set(type, index));
|
|
295
|
+
return [...sections].sort((a, b) => {
|
|
296
|
+
const orderA = orderMap.get(a.type) ?? Number.MAX_SAFE_INTEGER;
|
|
297
|
+
const orderB = orderMap.get(b.type) ?? Number.MAX_SAFE_INTEGER;
|
|
298
|
+
return orderA - orderB;
|
|
299
|
+
});
|
|
300
|
+
}
|
|
301
|
+
/**
|
|
302
|
+
* Serializes a changelog section.
|
|
303
|
+
*
|
|
304
|
+
* @param section - The section to serialize
|
|
305
|
+
* @param opts - Resolved options
|
|
306
|
+
* @returns The serialized section string
|
|
307
|
+
*/
|
|
308
|
+
function serializeSection(section, opts) {
|
|
309
|
+
const parts = [];
|
|
310
|
+
const nl = opts.lineEnding;
|
|
311
|
+
// Section heading - use original heading if available, otherwise generate
|
|
312
|
+
const heading = section.heading || getSectionHeading(section.type, opts.sectionHeadings);
|
|
313
|
+
parts.push(`### ${heading}${nl}`);
|
|
314
|
+
parts.push(nl);
|
|
315
|
+
// Items
|
|
316
|
+
for (const item of section.items) {
|
|
317
|
+
parts.push(serializeItem(item, opts) + nl);
|
|
318
|
+
}
|
|
319
|
+
return parts.join('');
|
|
320
|
+
}
|
|
321
|
+
/**
|
|
322
|
+
* Serializes a changelog item.
|
|
323
|
+
*
|
|
324
|
+
* @param item - The item to serialize
|
|
325
|
+
* @param opts - Resolved options
|
|
326
|
+
* @returns The serialized item string
|
|
327
|
+
*/
|
|
328
|
+
function serializeItem(item, opts) {
|
|
329
|
+
const parts = [];
|
|
330
|
+
const marker = getListMarker(opts.useAsterisks);
|
|
331
|
+
parts.push(marker);
|
|
332
|
+
// Breaking change indicator
|
|
333
|
+
if (item.breaking) {
|
|
334
|
+
parts.push('**BREAKING** ');
|
|
335
|
+
}
|
|
336
|
+
// Scope
|
|
337
|
+
if (opts.includeScope && item.scope) {
|
|
338
|
+
parts.push(`**${item.scope}:** `);
|
|
339
|
+
}
|
|
340
|
+
// Description
|
|
341
|
+
parts.push(item.description);
|
|
342
|
+
// Commit references
|
|
343
|
+
if (opts.includeCommits && item.commits.length > 0) {
|
|
344
|
+
parts.push(' (');
|
|
345
|
+
parts.push(item.commits.map(serializeCommitRef).join(', '));
|
|
346
|
+
parts.push(')');
|
|
347
|
+
}
|
|
348
|
+
// Issue/PR references
|
|
349
|
+
if (opts.includeReferences && item.references.length > 0) {
|
|
350
|
+
const refs = item.references.map(serializeIssueRef).join(', ');
|
|
351
|
+
parts.push(` ${refs}`);
|
|
352
|
+
}
|
|
353
|
+
return parts.join('');
|
|
354
|
+
}
|
|
355
|
+
/**
|
|
356
|
+
* Serializes a commit reference.
|
|
357
|
+
*
|
|
358
|
+
* @param ref - The commit reference
|
|
359
|
+
* @returns The serialized reference
|
|
360
|
+
*/
|
|
361
|
+
function serializeCommitRef(ref) {
|
|
362
|
+
if (ref.url) {
|
|
363
|
+
return formatLink(ref.shortHash, ref.url);
|
|
364
|
+
}
|
|
365
|
+
return ref.shortHash;
|
|
366
|
+
}
|
|
367
|
+
/**
|
|
368
|
+
* Serializes an issue/PR reference.
|
|
369
|
+
*
|
|
370
|
+
* @param ref - The issue reference
|
|
371
|
+
* @returns The serialized reference
|
|
372
|
+
*/
|
|
373
|
+
function serializeIssueRef(ref) {
|
|
374
|
+
const text = `#${ref.number}`;
|
|
375
|
+
if (ref.url) {
|
|
376
|
+
return formatLink(text, ref.url);
|
|
377
|
+
}
|
|
378
|
+
return text;
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/**
|
|
382
|
+
* Safe copies of JSON built-in methods.
|
|
383
|
+
*
|
|
384
|
+
* These references are captured at module initialization time to protect against
|
|
385
|
+
* prototype pollution attacks. Import only what you need for tree-shaking.
|
|
386
|
+
*
|
|
387
|
+
* @module @hyperfrontend/immutable-api-utils/built-in-copy/json
|
|
388
|
+
*/
|
|
389
|
+
// Capture references at module initialization time
|
|
390
|
+
const _JSON = globalThis.JSON;
|
|
391
|
+
/**
|
|
392
|
+
* (Safe copy) Converts a JavaScript value to a JavaScript Object Notation (JSON) string.
|
|
393
|
+
*/
|
|
394
|
+
const stringify = _JSON.stringify;
|
|
395
|
+
|
|
396
|
+
/**
|
|
397
|
+
* Changelog Serialization to JSON
|
|
398
|
+
*
|
|
399
|
+
* Converts a Changelog object to JSON format.
|
|
400
|
+
* Useful for storing changelogs in databases or APIs.
|
|
401
|
+
*/
|
|
402
|
+
/**
|
|
403
|
+
* Default JSON serialization options.
|
|
404
|
+
*/
|
|
405
|
+
const DEFAULT_JSON_OPTIONS = {
|
|
406
|
+
pretty: false,
|
|
407
|
+
indent: 2,
|
|
408
|
+
includeSource: false,
|
|
409
|
+
includeMetadata: true,
|
|
410
|
+
includeEmptyArrays: true,
|
|
411
|
+
};
|
|
412
|
+
/**
|
|
413
|
+
* Resolves JSON serialization options with defaults.
|
|
414
|
+
*
|
|
415
|
+
* @param options - User-provided options
|
|
416
|
+
* @returns Complete options with defaults applied
|
|
417
|
+
*/
|
|
418
|
+
function resolveJsonOptions(options) {
|
|
419
|
+
if (!options) {
|
|
420
|
+
return DEFAULT_JSON_OPTIONS;
|
|
421
|
+
}
|
|
422
|
+
return {
|
|
423
|
+
pretty: options.pretty ?? DEFAULT_JSON_OPTIONS.pretty,
|
|
424
|
+
indent: options.indent ?? DEFAULT_JSON_OPTIONS.indent,
|
|
425
|
+
includeSource: options.includeSource ?? DEFAULT_JSON_OPTIONS.includeSource,
|
|
426
|
+
includeMetadata: options.includeMetadata ?? DEFAULT_JSON_OPTIONS.includeMetadata,
|
|
427
|
+
includeEmptyArrays: options.includeEmptyArrays ?? DEFAULT_JSON_OPTIONS.includeEmptyArrays,
|
|
428
|
+
};
|
|
429
|
+
}
|
|
430
|
+
/**
|
|
431
|
+
* Serializes a Changelog object to JSON string.
|
|
432
|
+
*
|
|
433
|
+
* @param changelog - The changelog object to convert to JSON
|
|
434
|
+
* @param options - Optional JSON serialization options
|
|
435
|
+
* @returns The JSON string representation
|
|
436
|
+
*
|
|
437
|
+
* @example
|
|
438
|
+
* ```ts
|
|
439
|
+
* const json = serializeChangelogToJson(changelog)
|
|
440
|
+
* ```
|
|
441
|
+
*
|
|
442
|
+
* @example
|
|
443
|
+
* ```ts
|
|
444
|
+
* const json = serializeChangelogToJson(changelog, {
|
|
445
|
+
* pretty: true,
|
|
446
|
+
* indent: 4,
|
|
447
|
+
* })
|
|
448
|
+
* ```
|
|
449
|
+
*/
|
|
450
|
+
function serializeChangelogToJson(changelog, options) {
|
|
451
|
+
const opts = resolveJsonOptions(options);
|
|
452
|
+
const data = toJsonObject(changelog, opts);
|
|
453
|
+
if (opts.pretty) {
|
|
454
|
+
return stringify(data, null, opts.indent);
|
|
455
|
+
}
|
|
456
|
+
return stringify(data);
|
|
457
|
+
}
|
|
458
|
+
/**
|
|
459
|
+
* Converts a Changelog to a plain JSON-serializable object.
|
|
460
|
+
* Useful when you need the object itself rather than a string.
|
|
461
|
+
*
|
|
462
|
+
* @param changelog - The changelog to convert
|
|
463
|
+
* @param options - Optional JSON serialization options
|
|
464
|
+
* @returns A plain object suitable for JSON serialization
|
|
465
|
+
*/
|
|
466
|
+
function toJsonObject(changelog, options) {
|
|
467
|
+
const opts = resolveJsonOptions(options);
|
|
468
|
+
const result = {};
|
|
469
|
+
// Source
|
|
470
|
+
if (opts.includeSource && changelog.source) {
|
|
471
|
+
result['source'] = changelog.source;
|
|
472
|
+
}
|
|
473
|
+
// Header
|
|
474
|
+
result['header'] = {
|
|
475
|
+
title: changelog.header.title,
|
|
476
|
+
description: filterEmpty(changelog.header.description, opts.includeEmptyArrays),
|
|
477
|
+
links: filterEmpty(changelog.header.links.map((link) => ({
|
|
478
|
+
label: link.label,
|
|
479
|
+
url: link.url,
|
|
480
|
+
})), opts.includeEmptyArrays),
|
|
481
|
+
};
|
|
482
|
+
// Entries
|
|
483
|
+
result['entries'] = changelog.entries.map((entry) => {
|
|
484
|
+
const entryObj = {
|
|
485
|
+
version: entry.version,
|
|
486
|
+
date: entry.date,
|
|
487
|
+
unreleased: entry.unreleased,
|
|
488
|
+
};
|
|
489
|
+
if (entry.compareUrl) {
|
|
490
|
+
entryObj['compareUrl'] = entry.compareUrl;
|
|
491
|
+
}
|
|
492
|
+
entryObj['sections'] = entry.sections.map((section) => ({
|
|
493
|
+
type: section.type,
|
|
494
|
+
heading: section.heading,
|
|
495
|
+
items: section.items.map((item) => {
|
|
496
|
+
const itemObj = {
|
|
497
|
+
description: item.description,
|
|
498
|
+
breaking: item.breaking,
|
|
499
|
+
};
|
|
500
|
+
if (item.scope) {
|
|
501
|
+
itemObj['scope'] = item.scope;
|
|
502
|
+
}
|
|
503
|
+
itemObj['commits'] = filterEmpty(item.commits.map((commit) => {
|
|
504
|
+
const commitObj = {
|
|
505
|
+
hash: commit.hash,
|
|
506
|
+
shortHash: commit.shortHash,
|
|
507
|
+
};
|
|
508
|
+
if (commit.url) {
|
|
509
|
+
commitObj['url'] = commit.url;
|
|
510
|
+
}
|
|
511
|
+
return commitObj;
|
|
512
|
+
}), opts.includeEmptyArrays);
|
|
513
|
+
itemObj['references'] = filterEmpty(item.references.map((ref) => {
|
|
514
|
+
const refObj = {
|
|
515
|
+
number: ref.number,
|
|
516
|
+
type: ref.type,
|
|
517
|
+
};
|
|
518
|
+
if (ref.url) {
|
|
519
|
+
refObj['url'] = ref.url;
|
|
520
|
+
}
|
|
521
|
+
return refObj;
|
|
522
|
+
}), opts.includeEmptyArrays);
|
|
523
|
+
return itemObj;
|
|
524
|
+
}),
|
|
525
|
+
}));
|
|
526
|
+
if (entry.rawContent) {
|
|
527
|
+
entryObj['rawContent'] = entry.rawContent;
|
|
528
|
+
}
|
|
529
|
+
return entryObj;
|
|
530
|
+
});
|
|
531
|
+
// Metadata
|
|
532
|
+
if (opts.includeMetadata) {
|
|
533
|
+
const metadataObj = {
|
|
534
|
+
format: changelog.metadata.format,
|
|
535
|
+
isConventional: changelog.metadata.isConventional,
|
|
536
|
+
};
|
|
537
|
+
if (changelog.metadata.repositoryUrl) {
|
|
538
|
+
metadataObj['repositoryUrl'] = changelog.metadata.repositoryUrl;
|
|
539
|
+
}
|
|
540
|
+
if (changelog.metadata.packageName) {
|
|
541
|
+
metadataObj['packageName'] = changelog.metadata.packageName;
|
|
542
|
+
}
|
|
543
|
+
metadataObj['warnings'] = filterEmpty(changelog.metadata.warnings, opts.includeEmptyArrays);
|
|
544
|
+
result['metadata'] = metadataObj;
|
|
545
|
+
}
|
|
546
|
+
return result;
|
|
547
|
+
}
|
|
548
|
+
/**
|
|
549
|
+
* Filters out empty arrays if includeEmptyArrays is false.
|
|
550
|
+
*
|
|
551
|
+
* @param arr - The array to filter
|
|
552
|
+
* @param includeEmpty - Whether to include empty arrays
|
|
553
|
+
* @returns The array or undefined if empty and not including empty arrays
|
|
554
|
+
*/
|
|
555
|
+
function filterEmpty(arr, includeEmpty) {
|
|
556
|
+
if (!arr)
|
|
557
|
+
return includeEmpty ? [] : undefined;
|
|
558
|
+
if (arr.length === 0 && !includeEmpty)
|
|
559
|
+
return undefined;
|
|
560
|
+
return arr;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export { DEFAULT_SERIALIZE_OPTIONS, createSpacing, formatLink, getListMarker, getSectionHeading, resolveOptions, serializeChangelog, serializeChangelogToJson, toJsonObject };
|
|
564
|
+
//# sourceMappingURL=index.esm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.esm.js","sources":["../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/map/index.ts","../../../../../../../../../../libs/versioning/src/changelog/models/section.ts","../../../../../../../../../../libs/versioning/src/changelog/serialize/templates.ts","../../../../../../../../../../libs/versioning/src/changelog/serialize/to-string.ts","../../../../../../../../../../libs/utils/immutable-api/src/built-in-copy/json/index.ts","../../../../../../../../../../libs/versioning/src/changelog/serialize/to-json.ts"],"sourcesContent":[null,null,null,null,null,null],"names":[],"mappings":"AAAA;;;;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QAAQ,EAAE,IAAI,CAAC,kBAAkB,CAAC;AAE3F,QAAA,MAAM,CAAC,UAAU,CAAC,GAAG,WAAW;IAClC;AAEA,IAAA,OAAO,MAAM;AACf;AAEA;;;;;;AAMG;AACH,SAAS,WAAW,CAAI,GAA6B,EAAE,YAAqB,EAAA;AAC1E,IAAA,IAAI,CAAC,GAAG;QAAE,OAAO,YAAY,GAAG,EAAE,GAAG,SAAS;AAC9C,IAAA,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,IAAI,CAAC,YAAY;AAAE,QAAA,OAAO,SAAS;AACvD,IAAA,OAAO,GAAG;AACZ;;;;"}
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Changelog Serialization Templates
|
|
3
|
+
*
|
|
4
|
+
* Output templates and formatting helpers for changelog serialization.
|
|
5
|
+
* Provides configurable options for different changelog styles.
|
|
6
|
+
*/
|
|
7
|
+
import type { ChangelogSectionType } from '../models/section';
|
|
8
|
+
/**
|
|
9
|
+
* Serialization options for controlling output format.
|
|
10
|
+
*/
|
|
11
|
+
export interface SerializeOptions {
|
|
12
|
+
/** Include preamble description in header */
|
|
13
|
+
readonly includeDescription?: boolean;
|
|
14
|
+
/** Include links section */
|
|
15
|
+
readonly includeLinks?: boolean;
|
|
16
|
+
/** Include compare URLs for entries */
|
|
17
|
+
readonly includeCompareUrls?: boolean;
|
|
18
|
+
/** Include commit references */
|
|
19
|
+
readonly includeCommits?: boolean;
|
|
20
|
+
/** Include issue/PR references */
|
|
21
|
+
readonly includeReferences?: boolean;
|
|
22
|
+
/** Include scope in items */
|
|
23
|
+
readonly includeScope?: boolean;
|
|
24
|
+
/** Include raw content fallback */
|
|
25
|
+
readonly includeRawContent?: boolean;
|
|
26
|
+
/** Section ordering (defaults to standard order) */
|
|
27
|
+
readonly sectionOrder?: readonly ChangelogSectionType[];
|
|
28
|
+
/** Custom section headings (overrides defaults) */
|
|
29
|
+
readonly sectionHeadings?: Partial<Record<ChangelogSectionType, string>>;
|
|
30
|
+
/** Line ending style */
|
|
31
|
+
readonly lineEnding?: '\n' | '\r\n';
|
|
32
|
+
/** Number of blank lines between entries */
|
|
33
|
+
readonly entrySpacing?: number;
|
|
34
|
+
/** Number of blank lines between sections */
|
|
35
|
+
readonly sectionSpacing?: number;
|
|
36
|
+
/** Use asterisks (*) instead of dashes (-) for list items */
|
|
37
|
+
readonly useAsterisks?: boolean;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Default serialization options.
|
|
41
|
+
*/
|
|
42
|
+
export declare const DEFAULT_SERIALIZE_OPTIONS: Required<SerializeOptions>;
|
|
43
|
+
/**
|
|
44
|
+
* Merges user options with defaults.
|
|
45
|
+
*
|
|
46
|
+
* @param options - User-provided options
|
|
47
|
+
* @returns Complete options with defaults applied
|
|
48
|
+
*/
|
|
49
|
+
export declare function resolveOptions(options?: SerializeOptions): Required<SerializeOptions>;
|
|
50
|
+
/**
|
|
51
|
+
* Gets the heading for a section type, respecting custom headings.
|
|
52
|
+
*
|
|
53
|
+
* @param type - The changelog section type to get the heading for
|
|
54
|
+
* @param customHeadings - Optional map of custom section type to heading overrides
|
|
55
|
+
* @returns The heading string to use
|
|
56
|
+
*/
|
|
57
|
+
export declare function getSectionHeading(type: ChangelogSectionType, customHeadings?: Partial<Record<ChangelogSectionType, string>>): string;
|
|
58
|
+
/**
|
|
59
|
+
* Creates a markdown link.
|
|
60
|
+
*
|
|
61
|
+
* @param text - The display text for the link
|
|
62
|
+
* @param url - The destination URL for the link
|
|
63
|
+
* @returns Formatted markdown link
|
|
64
|
+
*/
|
|
65
|
+
export declare function formatLink(text: string, url: string): string;
|
|
66
|
+
/**
|
|
67
|
+
* Creates a list item marker.
|
|
68
|
+
*
|
|
69
|
+
* @param useAsterisks - Whether to use * instead of -
|
|
70
|
+
* @returns The list item marker ('- ' or '* ')
|
|
71
|
+
*/
|
|
72
|
+
export declare function getListMarker(useAsterisks: boolean): string;
|
|
73
|
+
/**
|
|
74
|
+
* Creates blank lines for spacing.
|
|
75
|
+
*
|
|
76
|
+
* @param count - Number of blank lines
|
|
77
|
+
* @param lineEnding - Line ending style
|
|
78
|
+
* @returns String with specified number of blank lines
|
|
79
|
+
*/
|
|
80
|
+
export declare function createSpacing(count: number, lineEnding: string): string;
|
|
81
|
+
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../../../../../../libs/versioning/src/changelog/serialize/templates.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAA;AAG7D;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,6CAA6C;IAC7C,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAErC,4BAA4B;IAC5B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;IAE/B,uCAAuC;IACvC,QAAQ,CAAC,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAErC,gCAAgC;IAChC,QAAQ,CAAC,cAAc,CAAC,EAAE,OAAO,CAAA;IAEjC,kCAAkC;IAClC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAEpC,6BAA6B;IAC7B,QAAQ,CAAC,YAAY,CAAC,EAAE,OAAO,CAAA;IAE/B,mCAAmC;IACnC,QAAQ,CAAC,iBAAiB,CAAC,EAAE,OAAO,CAAA;IAEpC,oDAAoD;IACpD,QAAQ,CAAC,YAAY,CAAC,EAAE,SAAS,oBAAoB,EAAE,CAAA;IAEvD,mDAAmD;IACnD,QAAQ,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,oBAAoB,EAAE,MAAM,CAAC,CAAC,CAAA;IAExE,wBAAwB;IACxB,QAAQ,CAAC,UAAU,CAAC,EAAE,IAAI,GAAG,MAAM,CAAA;IAEnC,4CAA4C;IAC5C,QAAQ,CAAC,Y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