@reelout/core 0.6.0 → 0.7.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.
Files changed (43) hide show
  1. package/dist/analyzer.js +14 -10
  2. package/dist/analyzer.js.map +1 -1
  3. package/dist/builder.js +1 -1
  4. package/dist/changelog.js +1 -1
  5. package/dist/index.js +2 -36
  6. package/dist/index.js.map +1 -1
  7. package/dist/{workflow-c9uKSARL.js → workflow-BolfadM0.js} +690 -773
  8. package/dist/workflow-BolfadM0.js.map +1 -0
  9. package/package.json +1 -1
  10. package/src/analyzer.ts +27 -17
  11. package/src/config/const.ts +0 -2
  12. package/src/git/history/index.ts +2 -2
  13. package/src/git/history/{showGitHistory.ts → readGitHistory.ts} +3 -3
  14. package/src/git/history/{showParsedGitHistory.ts → readParsedGitHistory.ts} +6 -6
  15. package/src/git/tag/generateGitTagName.ts +1 -0
  16. package/src/git/tag/index.ts +1 -1
  17. package/src/git/tag/{isGitTagPointed.ts → isGitTagExact.ts} +1 -1
  18. package/src/workflow/analysis/deriveChangeReleases.ts +3 -3
  19. package/src/workflow/analysis/deriveTransitionReleases.ts +1 -1
  20. package/src/workflow/analysis/index.ts +1 -5
  21. package/src/workflow/analysis/{isCommitForPackage.ts → packageContainsCommit.ts} +4 -1
  22. package/src/workflow/analysis/readPackageHistory.ts +28 -9
  23. package/src/workflow/commit/index.ts +4 -0
  24. package/src/workflow/discovery/verifyPackageTag.ts +2 -2
  25. package/src/workflow/index.ts +2 -2
  26. package/src/workflow/{versioning/determineReleaseType.ts → version/deriveCommitReleaseType.ts} +2 -2
  27. package/src/workflow/{versioning → version}/deriveReleaseType.ts +2 -2
  28. package/src/workflow/{versioning → version}/index.ts +2 -1
  29. package/dist/workflow-c9uKSARL.js.map +0 -1
  30. package/src/workflow/analysis/collectUnreleased.ts +0 -44
  31. package/src/workflow/analysis/sliceUnreleased.ts +0 -24
  32. package/src/workflow/analysis/sliceUnreleasedForPackage.ts +0 -41
  33. package/src/workflow/committing/formatReleaseFilterPatterns.ts +0 -18
  34. package/src/workflow/committing/index.ts +0 -7
  35. package/src/workflow/committing/isReleaseCommit.ts +0 -56
  36. package/src/workflow/committing/readReleaseFilterPatterns.ts +0 -38
  37. /package/src/workflow/{committing → commit}/generateReleaseCommitMessage.ts +0 -0
  38. /package/src/workflow/{versioning → version}/bumpVersion.ts +0 -0
  39. /package/src/workflow/{versioning → version}/extractVersionQualifier.ts +0 -0
  40. /package/src/workflow/{versioning → version}/isSameReleaseCycle.ts +0 -0
  41. /package/src/workflow/{versioning → version}/isStableVersion.ts +0 -0
  42. /package/src/workflow/{versioning → version}/pickPriorityReleaseType.ts +0 -0
  43. /package/src/workflow/{analysis → version}/promotePrereleaseVersions.ts +0 -0
@@ -1,56 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
- // Copyright (c) 2026 Fai
3
-
4
- import { GIT_TRAILER_RELEASE_AGENT } from '#config'
5
- import { getParsedGitCommit } from '#git'
6
- import type { GitCommit, GitCommitTrailer } from '#types'
7
- import { execGit } from '#util'
8
-
9
- export type ReleaseMarker = string | ((trailer: GitCommitTrailer) => boolean)
10
-
11
- /**
12
- * Determine whether a commit represents a release or matches a release marker.
13
- *
14
- * Resolves string commit identifiers to parsed commit objects, checks if any
15
- * associated trailer matches the `marker` predicate, and falls back to
16
- * verifying exact tag matches for the `commit` hash.
17
- *
18
- * @param cwd Working directory path for Git commands
19
- * @param commit Commit object, hash string, or nullish value
20
- * @param marker Trailer key string or predicate function to evaluate
21
- * @returns `true` if the commit is a release commit, otherwise `false`
22
- */
23
- export async function isReleaseCommit(
24
- cwd: string,
25
- commit: GitCommit | string | null | undefined,
26
- marker: ReleaseMarker = GIT_TRAILER_RELEASE_AGENT
27
- ): Promise<boolean> {
28
- if (typeof commit === 'string') {
29
- try {
30
- commit = await getParsedGitCommit(
31
- cwd,
32
- commit,
33
- typeof marker === 'string' ? [marker] : []
34
- )
35
- } catch {
36
- commit = null
37
- }
38
- }
39
-
40
- if (!commit) {
41
- return false
42
- }
43
-
44
- const predicate =
45
- typeof marker === 'string'
46
- ? (trailer: GitCommitTrailer) => trailer.key === marker && !!trailer.value
47
- : marker
48
-
49
- if (commit.trailers.some(predicate)) {
50
- return true
51
- }
52
-
53
- return execGit(cwd, ['describe', '--tags', '--exact-match', commit.hash])
54
- .then(() => true)
55
- .catch(() => false)
56
- }
@@ -1,38 +0,0 @@
1
- // SPDX-License-Identifier: MIT
2
- // Copyright (c) 2026 Fai
3
-
4
- import { GIT_TRAILER_RELEASE_FILTER } from '#config'
5
- import type { GitCommit } from '#types'
6
-
7
- /**
8
- * Read release filter patterns from a parsed commit.
9
- *
10
- * Collects the release filter trailer values and splits them into individual
11
- * comma-separated filter patterns, unescaping the commas within patterns.
12
- * Returns `null` when the commit carries no release filter trailer, so
13
- * callers can treat it as a release of every package.
14
- *
15
- * @param commit Parsed commit object or nullish value
16
- * @returns Filter patterns carried by the trailer, or `null` when absent
17
- */
18
- export function readReleaseFilterPatterns(
19
- commit: GitCommit | null | undefined
20
- ): string[] | null {
21
- if (!commit) {
22
- return null
23
- }
24
-
25
- const values = commit.trailers
26
- .filter((trailer) => trailer.key === GIT_TRAILER_RELEASE_FILTER)
27
- .map((trailer) => trailer.value)
28
-
29
- if (values.length === 0) {
30
- return null
31
- }
32
-
33
- return values
34
- .flatMap((value) => value.split(/(?<!\\),/))
35
- .map((pattern) => pattern.trim())
36
- .map((pattern) => pattern.replaceAll('\\,', ','))
37
- .filter((pattern) => pattern.length > 0)
38
- }