@reelout/core 0.6.0 → 0.8.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/dist/analyzer.js +14 -10
- package/dist/analyzer.js.map +1 -1
- package/dist/builder.js +1 -1
- package/dist/changelog.js +1 -1
- package/dist/index.js +2 -51
- package/dist/index.js.map +1 -1
- package/dist/{workflow-c9uKSARL.js → workflow-MQRNVoZo.js} +765 -732
- package/dist/workflow-MQRNVoZo.js.map +1 -0
- package/package.json +1 -1
- package/src/analyzer.ts +27 -17
- package/src/config/const.ts +0 -2
- package/src/git/history/index.ts +2 -2
- package/src/git/history/{showGitHistory.ts → readGitHistory.ts} +3 -3
- package/src/git/history/{showParsedGitHistory.ts → readParsedGitHistory.ts} +6 -6
- package/src/git/tag/generateGitTagName.ts +1 -0
- package/src/git/tag/index.ts +1 -1
- package/src/git/tag/{isGitTagPointed.ts → isGitTagExact.ts} +1 -1
- package/src/util/index.ts +1 -0
- package/src/util/isGitHubActions.ts +18 -0
- package/src/workflow/analysis/deriveChangeReleases.ts +3 -3
- package/src/workflow/analysis/deriveTransitionReleases.ts +1 -1
- package/src/workflow/analysis/index.ts +1 -5
- package/src/workflow/analysis/{isCommitForPackage.ts → packageContainsCommit.ts} +4 -1
- package/src/workflow/analysis/readPackageHistory.ts +28 -9
- package/src/workflow/commit/index.ts +4 -0
- package/src/workflow/discovery/verifyPackageTag.ts +2 -2
- package/src/workflow/executeReleaseWorkflow.ts +11 -2
- package/src/workflow/index.ts +2 -2
- package/src/workflow/report/appendReleaseReportSummary.ts +115 -0
- package/src/workflow/report/index.ts +2 -0
- package/src/workflow/report/printReleaseReportAnnotation.ts +35 -0
- package/src/workflow/{versioning/determineReleaseType.ts → version/deriveCommitReleaseType.ts} +2 -2
- package/src/workflow/{versioning → version}/deriveReleaseType.ts +2 -2
- package/src/workflow/{versioning → version}/index.ts +2 -1
- package/dist/workflow-c9uKSARL.js.map +0 -1
- package/src/workflow/analysis/collectUnreleased.ts +0 -44
- package/src/workflow/analysis/sliceUnreleased.ts +0 -24
- package/src/workflow/analysis/sliceUnreleasedForPackage.ts +0 -41
- package/src/workflow/committing/formatReleaseFilterPatterns.ts +0 -18
- package/src/workflow/committing/index.ts +0 -7
- package/src/workflow/committing/isReleaseCommit.ts +0 -56
- package/src/workflow/committing/readReleaseFilterPatterns.ts +0 -38
- /package/src/workflow/{committing → commit}/generateReleaseCommitMessage.ts +0 -0
- /package/src/workflow/{versioning → version}/bumpVersion.ts +0 -0
- /package/src/workflow/{versioning → version}/extractVersionQualifier.ts +0 -0
- /package/src/workflow/{versioning → version}/isSameReleaseCycle.ts +0 -0
- /package/src/workflow/{versioning → version}/isStableVersion.ts +0 -0
- /package/src/workflow/{versioning → version}/pickPriorityReleaseType.ts +0 -0
- /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
|
-
}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|