@theholocron/astromech 5.0.0-alpha.246 → 5.0.0-alpha.248
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/config/index.d.mts +6 -16
- package/dist/config/index.mjs +4 -6
- package/dist/{editorconfig-checker-DPejtR5z.mjs → editorconfig-checker-HPpphHhI.mjs} +2 -4
- package/dist/index.d.mts +40 -126
- package/dist/index.mjs +130 -257
- package/dist/lint/index.d.mts +8 -26
- package/dist/lint/index.mjs +8 -15
- package/dist/{load-Bk9SYAfX.mjs → load-C1uY2yBv.mjs} +2 -4
- package/dist/release/index.d.mts +13 -33
- package/dist/release/index.mjs +7 -13
- package/dist/{schema-Djtv0sLM.mjs → schema-CalPyBNd.mjs} +1 -2
- package/dist/{schema.type-eVRlTGL1.d.mts → schema.type-B28guVbH.d.mts} +0 -2
- package/package.json +5 -5
package/dist/lint/index.d.mts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { QualifiedConfig } from "@commitlint/types";
|
|
2
|
-
//#region src/lint/alex-config/alex-config.d.ts
|
|
3
2
|
/**
|
|
4
3
|
* The org's canonical `alex` (inclusive-language) config, as raw parsed
|
|
5
4
|
* data rather than the pre-rendered file strings `createRcConfig()`/
|
|
@@ -14,11 +13,9 @@ import { QualifiedConfig } from "@commitlint/types";
|
|
|
14
13
|
* config, not N copies" reasoning `@theholocron/commitlint-config` already
|
|
15
14
|
* established for commit-message linting.
|
|
16
15
|
*/
|
|
17
|
-
declare const ALEX_CONFIG: {
|
|
16
|
+
export declare const ALEX_CONFIG: {
|
|
18
17
|
allow: string[];
|
|
19
18
|
};
|
|
20
|
-
//#endregion
|
|
21
|
-
//#region src/lint/alex-ignore-patterns/alex-ignore-patterns.d.ts
|
|
22
19
|
/**
|
|
23
20
|
* Glob-ish path patterns `alex` skips. Kept as a literal here rather than
|
|
24
21
|
* importing `../templates/configs/alexjs/alexignore` directly — that file
|
|
@@ -28,9 +25,7 @@ declare const ALEX_CONFIG: {
|
|
|
28
25
|
* a package boundary without an extension. Keep in sync with that file by
|
|
29
26
|
* hand; it changes rarely.
|
|
30
27
|
*/
|
|
31
|
-
declare const ALEX_IGNORE_PATTERNS: string[];
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/lint/editorconfig-checker-exclude/editorconfig-checker-exclude.d.ts
|
|
28
|
+
export declare const ALEX_IGNORE_PATTERNS: string[];
|
|
34
29
|
/**
|
|
35
30
|
* The paths editorconfig-checker skips, read from the same
|
|
36
31
|
* `editorconfig-checker.json` template `holocron repo setup` writes as a repo's
|
|
@@ -47,33 +42,21 @@ declare const ALEX_IGNORE_PATTERNS: string[];
|
|
|
47
42
|
* Each entry is a regular-expression source, matched against a
|
|
48
43
|
* repo-relative path, as editorconfig-checker itself treats them.
|
|
49
44
|
*/
|
|
50
|
-
declare const EDITORCONFIG_CHECKER_EXCLUDE: readonly string[];
|
|
51
|
-
//#endregion
|
|
52
|
-
//#region src/lint/is-editorconfig-excluded/is-editorconfig-excluded.d.ts
|
|
45
|
+
export declare const EDITORCONFIG_CHECKER_EXCLUDE: readonly string[];
|
|
53
46
|
/** `true` when `path` matches any {@link EDITORCONFIG_CHECKER_EXCLUDE} pattern. */
|
|
54
|
-
declare function isEditorConfigExcluded(path: string): boolean;
|
|
55
|
-
//#endregion
|
|
56
|
-
//#region src/lint/lint-message/lint-message.type.d.ts
|
|
47
|
+
export declare function isEditorConfigExcluded(path: string): boolean;
|
|
57
48
|
interface CommitMessageViolation {
|
|
58
49
|
/** Rule name, e.g. `"subject-empty"`. */
|
|
59
50
|
rule: string;
|
|
60
51
|
/** commitlint's own message for the failure, e.g. `"subject may not be empty"`. */
|
|
61
52
|
message: string;
|
|
62
53
|
}
|
|
63
|
-
|
|
64
|
-
//#region src/lint/lint-message/lint-message.d.ts
|
|
65
|
-
declare function lintCommitMessage(message: string, loaded: QualifiedConfig): Promise<CommitMessageViolation[]>;
|
|
66
|
-
//#endregion
|
|
67
|
-
//#region src/lint/lint-commit-msg-file/lint-commit-msg-file.type.d.ts
|
|
54
|
+
export declare function lintCommitMessage(message: string, loaded: QualifiedConfig): Promise<CommitMessageViolation[]>;
|
|
68
55
|
interface LintCommitMsgFileResult {
|
|
69
56
|
valid: boolean;
|
|
70
57
|
violations: CommitMessageViolation[];
|
|
71
58
|
}
|
|
72
|
-
|
|
73
|
-
//#region src/lint/lint-commit-msg-file/lint-commit-msg-file.d.ts
|
|
74
|
-
declare function lintCommitMsgFile(filePath: string, cwd?: string): Promise<LintCommitMsgFileResult>;
|
|
75
|
-
//#endregion
|
|
76
|
-
//#region src/lint/prettier-ignore-patterns/prettier-ignore-patterns.d.ts
|
|
59
|
+
export declare function lintCommitMsgFile(filePath: string, cwd?: string): Promise<LintCommitMsgFileResult>;
|
|
77
60
|
/**
|
|
78
61
|
* The org's canonical prettier ignore-pattern list for a central Sentinel
|
|
79
62
|
* check (holocron#769/#819) — the `PRETTIER_CONFIG` object itself doesn't
|
|
@@ -94,6 +77,5 @@ declare function lintCommitMsgFile(filePath: string, cwd?: string): Promise<Lint
|
|
|
94
77
|
* fights every subsequent `pnpm install` (this repo's own `.prettierignore`
|
|
95
78
|
* already excludes it for that exact reason).
|
|
96
79
|
*/
|
|
97
|
-
declare const PRETTIER_IGNORE_PATTERNS: string[];
|
|
98
|
-
|
|
99
|
-
export { ALEX_CONFIG, ALEX_IGNORE_PATTERNS, type CommitMessageViolation, EDITORCONFIG_CHECKER_EXCLUDE, type LintCommitMsgFileResult, PRETTIER_IGNORE_PATTERNS, isEditorConfigExcluded, lintCommitMessage, lintCommitMsgFile };
|
|
80
|
+
export declare const PRETTIER_IGNORE_PATTERNS: string[];
|
|
81
|
+
export type { CommitMessageViolation, LintCommitMsgFileResult };
|
package/dist/lint/index.mjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import { n as alexrc_default, t as editorconfig_checker_default } from "../editorconfig-checker-
|
|
1
|
+
import { n as alexrc_default, t as editorconfig_checker_default } from "../editorconfig-checker-HPpphHhI.mjs";
|
|
2
2
|
import { readFile } from "node:fs/promises";
|
|
3
3
|
import load from "@commitlint/load";
|
|
4
4
|
import lint from "@commitlint/lint";
|
|
5
|
-
|
|
5
|
+
// src/lint/alex-config/alex-config.ts
|
|
6
6
|
/**
|
|
7
7
|
* The org's canonical `alex` (inclusive-language) config, as raw parsed
|
|
8
8
|
* data rather than the pre-rendered file strings `createRcConfig()`/
|
|
@@ -18,8 +18,7 @@ import lint from "@commitlint/lint";
|
|
|
18
18
|
* established for commit-message linting.
|
|
19
19
|
*/
|
|
20
20
|
const ALEX_CONFIG = alexrc_default;
|
|
21
|
-
|
|
22
|
-
//#region src/lint/alex-ignore-patterns/alex-ignore-patterns.ts
|
|
21
|
+
// src/lint/alex-ignore-patterns/alex-ignore-patterns.ts
|
|
23
22
|
/**
|
|
24
23
|
* Glob-ish path patterns `alex` skips. Kept as a literal here rather than
|
|
25
24
|
* importing `../templates/configs/alexjs/alexignore` directly — that file
|
|
@@ -34,8 +33,7 @@ const ALEX_IGNORE_PATTERNS = [
|
|
|
34
33
|
"CHANGELOG.md",
|
|
35
34
|
"LICENSE"
|
|
36
35
|
];
|
|
37
|
-
|
|
38
|
-
//#region src/lint/editorconfig-checker-exclude/editorconfig-checker-exclude.ts
|
|
36
|
+
// src/lint/editorconfig-checker-exclude/editorconfig-checker-exclude.ts
|
|
39
37
|
/**
|
|
40
38
|
* The paths editorconfig-checker skips, read from the same
|
|
41
39
|
* `editorconfig-checker.json` template `holocron repo setup` writes as a repo's
|
|
@@ -53,14 +51,12 @@ const ALEX_IGNORE_PATTERNS = [
|
|
|
53
51
|
* repo-relative path, as editorconfig-checker itself treats them.
|
|
54
52
|
*/
|
|
55
53
|
const EDITORCONFIG_CHECKER_EXCLUDE = editorconfig_checker_default.Exclude;
|
|
56
|
-
|
|
57
|
-
//#region src/lint/is-editorconfig-excluded/is-editorconfig-excluded.ts
|
|
54
|
+
// src/lint/is-editorconfig-excluded/is-editorconfig-excluded.ts
|
|
58
55
|
/** `true` when `path` matches any {@link EDITORCONFIG_CHECKER_EXCLUDE} pattern. */
|
|
59
56
|
function isEditorConfigExcluded(path) {
|
|
60
57
|
return EDITORCONFIG_CHECKER_EXCLUDE.some((pattern) => new RegExp(pattern).test(path));
|
|
61
58
|
}
|
|
62
|
-
|
|
63
|
-
//#region src/lint/lint-message/lint-message.ts
|
|
59
|
+
// src/lint/lint-message/lint-message.ts
|
|
64
60
|
/**
|
|
65
61
|
* Lints one commit message string against an already-loaded commitlint
|
|
66
62
|
* config. The genuinely environment-independent half of commit-message
|
|
@@ -94,8 +90,7 @@ async function lintCommitMessage(message, loaded) {
|
|
|
94
90
|
message: error.message
|
|
95
91
|
}));
|
|
96
92
|
}
|
|
97
|
-
|
|
98
|
-
//#region src/lint/lint-commit-msg-file/lint-commit-msg-file.ts
|
|
93
|
+
// src/lint/lint-commit-msg-file/lint-commit-msg-file.ts
|
|
99
94
|
/**
|
|
100
95
|
* `holocron run lint commit-msg <file>` — a real programmatic replacement for
|
|
101
96
|
* shelling out to `commitlint --edit "$1"` from `.husky/commit-msg`
|
|
@@ -116,8 +111,7 @@ async function lintCommitMsgFile(filePath, cwd = process.cwd()) {
|
|
|
116
111
|
violations
|
|
117
112
|
};
|
|
118
113
|
}
|
|
119
|
-
|
|
120
|
-
//#region src/lint/prettier-ignore-patterns/prettier-ignore-patterns.ts
|
|
114
|
+
// src/lint/prettier-ignore-patterns/prettier-ignore-patterns.ts
|
|
121
115
|
/**
|
|
122
116
|
* The org's canonical prettier ignore-pattern list for a central Sentinel
|
|
123
117
|
* check (holocron#769/#819) — the `PRETTIER_CONFIG` object itself doesn't
|
|
@@ -139,5 +133,4 @@ async function lintCommitMsgFile(filePath, cwd = process.cwd()) {
|
|
|
139
133
|
* already excludes it for that exact reason).
|
|
140
134
|
*/
|
|
141
135
|
const PRETTIER_IGNORE_PATTERNS = [...ALEX_IGNORE_PATTERNS, "pnpm-lock.yaml"];
|
|
142
|
-
//#endregion
|
|
143
136
|
export { ALEX_CONFIG, ALEX_IGNORE_PATTERNS, EDITORCONFIG_CHECKER_EXCLUDE, PRETTIER_IGNORE_PATTERNS, isEditorConfigExcluded, lintCommitMessage, lintCommitMsgFile };
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
import { loadLayered } from "@theholocron/datapad";
|
|
2
|
-
|
|
2
|
+
// src/config/coerce-tasks/coerce-tasks.ts
|
|
3
3
|
/** A bare item array is shorthand for `{ tasks: [...] }`. */
|
|
4
4
|
function coerceTasks(value) {
|
|
5
5
|
if (value == null) return void 0;
|
|
6
6
|
return Array.isArray(value) ? { tasks: value } : value;
|
|
7
7
|
}
|
|
8
|
-
|
|
9
|
-
//#region src/config/load/load.ts
|
|
8
|
+
// src/config/load/load.ts
|
|
10
9
|
/**
|
|
11
10
|
* Resolve the task manifest for a repo: the `tasks` key of
|
|
12
11
|
* `holocron.config.*`, then a dedicated `astromech.config.*` merged on
|
|
@@ -33,5 +32,4 @@ async function loadTasksConfig(cwd, options = {}) {
|
|
|
33
32
|
coerce: (raw) => coerceTasks(raw)
|
|
34
33
|
}))?.config ?? {};
|
|
35
34
|
}
|
|
36
|
-
//#endregion
|
|
37
35
|
export { coerceTasks as n, loadTasksConfig as t };
|
package/dist/release/index.d.mts
CHANGED
|
@@ -1,17 +1,14 @@
|
|
|
1
|
-
import { r as TasksConfig } from "../schema.type-
|
|
1
|
+
import { r as TasksConfig } from "../schema.type-B28guVbH.mjs";
|
|
2
2
|
import { defineConfig } from "@theholocron/semantic-release-config";
|
|
3
|
-
//#region src/release/commit-files/commit-files.d.ts
|
|
4
3
|
/** Runs `git` with `args` in `cwd`, feeding it `input` on stdin, and returns stdout. */
|
|
5
|
-
type GitRun = (args: string[], input: string, cwd: string) => string;
|
|
4
|
+
export type GitRun = (args: string[], input: string, cwd: string) => string;
|
|
6
5
|
/**
|
|
7
6
|
* The repo-relative files each of `hashes` changed, from one
|
|
8
7
|
* `git diff-tree --stdin` call. A commit that changes nothing (or a merge
|
|
9
8
|
* commit) maps to `[]`. Paths come back verbatim, not quoted, whatever they
|
|
10
9
|
* contain.
|
|
11
10
|
*/
|
|
12
|
-
declare function commitFiles(cwd: string, hashes: readonly string[], run?: GitRun): Map<string, string[]>;
|
|
13
|
-
//#endregion
|
|
14
|
-
//#region src/release/release.type.d.ts
|
|
11
|
+
export declare function commitFiles(cwd: string, hashes: readonly string[], run?: GitRun): Map<string, string[]>;
|
|
15
12
|
/** The slice of a semantic-release commit this module reads. */
|
|
16
13
|
interface ReleaseCommit {
|
|
17
14
|
/** Full commit hash. */
|
|
@@ -29,8 +26,6 @@ type CommitStep = "analyzeCommits" | "generateNotes" | "success";
|
|
|
29
26
|
type StepFn = (pluginConfig: unknown, context: ReleaseContext) => unknown;
|
|
30
27
|
/** A plugin module that implements `Step`. */
|
|
31
28
|
type StepPlugin<Step extends CommitStep> = Partial<Record<Step, StepFn>>;
|
|
32
|
-
//#endregion
|
|
33
|
-
//#region src/release/folder-scoped/folder-scoped.type.d.ts
|
|
34
29
|
interface FolderScopedDeps {
|
|
35
30
|
/**
|
|
36
31
|
* Loads a plugin module by specifier, resolved from `cwd` (the repo being released). Defaults to a
|
|
@@ -40,8 +35,6 @@ interface FolderScopedDeps {
|
|
|
40
35
|
/** Lists the files each commit changed. Defaults to `git diff-tree`. */
|
|
41
36
|
listFiles?: typeof commitFiles;
|
|
42
37
|
}
|
|
43
|
-
//#endregion
|
|
44
|
-
//#region src/release/folder-scoped/folder-scoped.d.ts
|
|
45
38
|
/**
|
|
46
39
|
* An inline semantic-release plugin that runs `step` of the stock plugin
|
|
47
40
|
* (`@semantic-release/commit-analyzer` for `analyzeCommits`,
|
|
@@ -54,7 +47,7 @@ interface FolderScopedDeps {
|
|
|
54
47
|
* where a release actually runs. Commits are listed with one `git diff-tree`
|
|
55
48
|
* call, in `context.cwd`.
|
|
56
49
|
*/
|
|
57
|
-
declare function folderScoped<Step extends CommitStep>(step: Step, paths: readonly string[], deps?: FolderScopedDeps): StepPlugin<Step>;
|
|
50
|
+
export declare function folderScoped<Step extends CommitStep>(step: Step, paths: readonly string[], deps?: FolderScopedDeps): StepPlugin<Step>;
|
|
58
51
|
/**
|
|
59
52
|
* The mirror of {@link folderScoped}, for the release of everything that is in **no**
|
|
60
53
|
* version group: it sees only commits that changed a file outside every group folder. A commit
|
|
@@ -62,9 +55,9 @@ declare function folderScoped<Step extends CommitStep>(step: Step, paths: readon
|
|
|
62
55
|
* repo-wide one analyze it would release the repo for a change that is not in it, and write the
|
|
63
56
|
* group's commits into the repo's changelog.
|
|
64
57
|
*/
|
|
65
|
-
declare function ungroupedScoped<Step extends CommitStep>(step: Step, groups: readonly string[], deps?: FolderScopedDeps): StepPlugin<Step>;
|
|
58
|
+
export declare function ungroupedScoped<Step extends CommitStep>(step: Step, groups: readonly string[], deps?: FolderScopedDeps): StepPlugin<Step>;
|
|
66
59
|
/** The file `specifier` resolves to for the repo at `cwd`, else for `semantic-release`; `requireFrom` is a seam for tests. */
|
|
67
|
-
declare function resolvePlugin(specifier: string, cwd: string, requireFrom?: (file: string) => {
|
|
60
|
+
export declare function resolvePlugin(specifier: string, cwd: string, requireFrom?: (file: string) => {
|
|
68
61
|
resolve(id: string): string;
|
|
69
62
|
}): string;
|
|
70
63
|
/**
|
|
@@ -73,9 +66,7 @@ declare function resolvePlugin(specifier: string, cwd: string, requireFrom?: (fi
|
|
|
73
66
|
* release, but with the commenting turned off; `scoped` (a {@link folderScoped} or
|
|
74
67
|
* {@link ungroupedScoped} `success` step) then does the commenting with the entry's own config.
|
|
75
68
|
*/
|
|
76
|
-
declare function commentOnlyFor(entry: string | [string, Record<string, unknown> | undefined], scoped: StepPlugin<"success">): ((string | [string, Record<string, unknown> | undefined]) | [object, unknown])[];
|
|
77
|
-
//#endregion
|
|
78
|
-
//#region src/release/group-release-config/group-release-config.type.d.ts
|
|
69
|
+
export declare function commentOnlyFor(entry: string | [string, Record<string, unknown> | undefined], scoped: StepPlugin<"success">): ((string | [string, Record<string, unknown> | undefined]) | [object, unknown])[];
|
|
79
70
|
/** What `defineConfig()` from `@theholocron/semantic-release-config` accepts. */
|
|
80
71
|
type DefineConfigOptions = NonNullable<Parameters<typeof defineConfig>[0]>;
|
|
81
72
|
interface GroupReleaseOptions extends DefineConfigOptions {
|
|
@@ -89,8 +80,6 @@ interface GroupReleaseOptions extends DefineConfigOptions {
|
|
|
89
80
|
/** The group's changelog. Defaults to `<group>/CHANGELOG.md`. */
|
|
90
81
|
changelogFile?: string;
|
|
91
82
|
}
|
|
92
|
-
//#endregion
|
|
93
|
-
//#region src/release/group-release-config/group-release-config.d.ts
|
|
94
83
|
/**
|
|
95
84
|
* A semantic-release config that releases one version group of a monorepo,
|
|
96
85
|
* built on the org's `defineConfig()` so its rules, notes layout and plugin
|
|
@@ -104,38 +93,30 @@ interface GroupReleaseOptions extends DefineConfigOptions {
|
|
|
104
93
|
* Run one `semantic-release` per group. Cross-group dependencies resolve from
|
|
105
94
|
* the registry, so `paths` is the group's folder unless more is listed.
|
|
106
95
|
*/
|
|
107
|
-
declare function groupReleaseConfig(options: GroupReleaseOptions): object;
|
|
108
|
-
//#endregion
|
|
109
|
-
//#region src/release/in-scope/in-scope.d.ts
|
|
96
|
+
export declare function groupReleaseConfig(options: GroupReleaseOptions): object;
|
|
110
97
|
/**
|
|
111
98
|
* Whether any of `files` (repo-relative, `/`-separated) sits at or under one of
|
|
112
99
|
* `paths` (repo-relative folders). `clients` matches `clients/http/x.ts` but
|
|
113
100
|
* not `clients-old/x.ts`.
|
|
114
101
|
*/
|
|
115
|
-
declare function inScope(files: readonly string[], paths: readonly string[]): boolean;
|
|
102
|
+
export declare function inScope(files: readonly string[], paths: readonly string[]): boolean;
|
|
116
103
|
/**
|
|
117
104
|
* Whether any of `files` sits **outside** every one of `folders`: the mirror of
|
|
118
105
|
* {@link inScope}. A commit that only touches the version groups' folders is out;
|
|
119
106
|
* one that touches anything else, even beside a group's files, is in.
|
|
120
107
|
*/
|
|
121
|
-
declare function outsideFolders(files: readonly string[], folders: readonly string[]): boolean;
|
|
122
|
-
//#endregion
|
|
123
|
-
//#region src/release/release-groups/release-groups.d.ts
|
|
108
|
+
export declare function outsideFolders(files: readonly string[], folders: readonly string[]): boolean;
|
|
124
109
|
/**
|
|
125
110
|
* The version groups a repo releases on their own: the folder names listed under `groups`
|
|
126
111
|
* in its `delivery.publish` task. This is what the generated publish workflow reads, so a
|
|
127
112
|
* release config that asks here stays in step with it instead of keeping a second list.
|
|
128
113
|
* `[]` for a repo that releases as one.
|
|
129
114
|
*/
|
|
130
|
-
declare function releaseGroups(config: Pick<TasksConfig, "tasks">): string[];
|
|
131
|
-
//#endregion
|
|
132
|
-
//#region src/release/ungrouped-release-config/ungrouped-release-config.type.d.ts
|
|
115
|
+
export declare function releaseGroups(config: Pick<TasksConfig, "tasks">): string[];
|
|
133
116
|
interface UngroupedReleaseOptions extends DefineConfigOptions {
|
|
134
117
|
/** The version groups released on their own: folders of the repo whose commits this release ignores. */
|
|
135
118
|
groups: readonly string[];
|
|
136
119
|
}
|
|
137
|
-
//#endregion
|
|
138
|
-
//#region src/release/ungrouped-release-config/ungrouped-release-config.d.ts
|
|
139
120
|
/**
|
|
140
121
|
* The semantic-release config for everything that is in no version group, built on the org's
|
|
141
122
|
* `defineConfig()`: tags, changelog and release commit are the repo's own, as before. The commit
|
|
@@ -143,6 +124,5 @@ interface UngroupedReleaseOptions extends DefineConfigOptions {
|
|
|
143
124
|
* belong to the groups' releases ({@link ungroupedScoped}). With no groups it is `defineConfig()`
|
|
144
125
|
* unchanged.
|
|
145
126
|
*/
|
|
146
|
-
declare function ungroupedReleaseConfig({ groups, ...options }: UngroupedReleaseOptions): object;
|
|
147
|
-
|
|
148
|
-
export { type CommitStep, type DefineConfigOptions, type FolderScopedDeps, GitRun, type GroupReleaseOptions, type ReleaseCommit, type ReleaseContext, type StepPlugin, type UngroupedReleaseOptions, commentOnlyFor, commitFiles, folderScoped, groupReleaseConfig, inScope, outsideFolders, releaseGroups, resolvePlugin, ungroupedReleaseConfig, ungroupedScoped };
|
|
127
|
+
export declare function ungroupedReleaseConfig({ groups, ...options }: UngroupedReleaseOptions): object;
|
|
128
|
+
export type { CommitStep, DefineConfigOptions, FolderScopedDeps, GroupReleaseOptions, ReleaseCommit, ReleaseContext, StepPlugin, UngroupedReleaseOptions };
|
package/dist/release/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { t as normalizeTaskEntry } from "../schema-
|
|
1
|
+
import { t as normalizeTaskEntry } from "../schema-CalPyBNd.mjs";
|
|
2
2
|
import { createRequire } from "node:module";
|
|
3
3
|
import { join } from "node:path";
|
|
4
4
|
import { execFileSync } from "node:child_process";
|
|
5
5
|
import { pathToFileURL } from "node:url";
|
|
6
6
|
import { defineConfig } from "@theholocron/semantic-release-config";
|
|
7
|
-
|
|
7
|
+
// src/release/commit-files/commit-files.ts
|
|
8
8
|
const defaultGitRun = (args, input, cwd) => execFileSync("git", args, {
|
|
9
9
|
cwd,
|
|
10
10
|
input,
|
|
@@ -38,8 +38,7 @@ function commitFiles(cwd, hashes, run = defaultGitRun) {
|
|
|
38
38
|
}
|
|
39
39
|
return files;
|
|
40
40
|
}
|
|
41
|
-
|
|
42
|
-
//#region src/release/in-scope/in-scope.ts
|
|
41
|
+
// src/release/in-scope/in-scope.ts
|
|
43
42
|
/**
|
|
44
43
|
* Whether any of `files` (repo-relative, `/`-separated) sits at or under one of
|
|
45
44
|
* `paths` (repo-relative folders). `clients` matches `clients/http/x.ts` but
|
|
@@ -58,8 +57,7 @@ function outsideFolders(files, folders) {
|
|
|
58
57
|
const normalized = folders.map((folder) => folder.replace(/^\.\//, "").replace(/\/+$/, ""));
|
|
59
58
|
return files.some((file) => !normalized.some((folder) => file === folder || file.startsWith(`${folder}/`)));
|
|
60
59
|
}
|
|
61
|
-
|
|
62
|
-
//#region src/release/folder-scoped/folder-scoped.ts
|
|
60
|
+
// src/release/folder-scoped/folder-scoped.ts
|
|
63
61
|
/** The semantic-release plugin that implements each commit-reading step. `success` is the GitHub plugin's "released in…" comments. */
|
|
64
62
|
const MODULES = {
|
|
65
63
|
analyzeCommits: "@semantic-release/commit-analyzer",
|
|
@@ -135,8 +133,7 @@ function commentOnlyFor(entry, scoped) {
|
|
|
135
133
|
releasedLabels: false
|
|
136
134
|
}], [scoped, config]];
|
|
137
135
|
}
|
|
138
|
-
|
|
139
|
-
//#region src/release/group-release-config/group-release-config.ts
|
|
136
|
+
// src/release/group-release-config/group-release-config.ts
|
|
140
137
|
const GROUP = /^[a-z][a-z0-9-]*$/;
|
|
141
138
|
/**
|
|
142
139
|
* A semantic-release config that releases one version group of a monorepo,
|
|
@@ -190,8 +187,7 @@ function groupReleaseConfig(options) {
|
|
|
190
187
|
function groupMessage(message, group) {
|
|
191
188
|
return message.replace(/^chore\(release\): /, `chore(release): ${group} `);
|
|
192
189
|
}
|
|
193
|
-
|
|
194
|
-
//#region src/release/release-groups/release-groups.ts
|
|
190
|
+
// src/release/release-groups/release-groups.ts
|
|
195
191
|
/**
|
|
196
192
|
* The version groups a repo releases on their own: the folder names listed under `groups`
|
|
197
193
|
* in its `delivery.publish` task. This is what the generated publish workflow reads, so a
|
|
@@ -206,8 +202,7 @@ function releaseGroups(config) {
|
|
|
206
202
|
return typeof name === "string" ? [name] : [];
|
|
207
203
|
});
|
|
208
204
|
}
|
|
209
|
-
|
|
210
|
-
//#region src/release/ungrouped-release-config/ungrouped-release-config.ts
|
|
205
|
+
// src/release/ungrouped-release-config/ungrouped-release-config.ts
|
|
211
206
|
/**
|
|
212
207
|
* The semantic-release config for everything that is in no version group, built on the org's
|
|
213
208
|
* `defineConfig()`: tags, changelog and release commit are the repo's own, as before. The commit
|
|
@@ -232,5 +227,4 @@ function ungroupedReleaseConfig({ groups, ...options }) {
|
|
|
232
227
|
plugins: base.plugins.flatMap(scope)
|
|
233
228
|
};
|
|
234
229
|
}
|
|
235
|
-
//#endregion
|
|
236
230
|
export { commentOnlyFor, commitFiles, folderScoped, groupReleaseConfig, inScope, outsideFolders, releaseGroups, resolvePlugin, ungroupedReleaseConfig, ungroupedScoped };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
|
|
1
|
+
// src/config/schema/schema.ts
|
|
2
2
|
/**
|
|
3
3
|
* The `tasks` config shape — the single manifest of what a repo runs.
|
|
4
4
|
* Read from a dedicated `astromech.config.*` file or the `tasks` key of
|
|
@@ -15,5 +15,4 @@ function normalizeTaskEntry(item) {
|
|
|
15
15
|
...typeof item === "string" ? { name: item } : item
|
|
16
16
|
};
|
|
17
17
|
}
|
|
18
|
-
//#endregion
|
|
19
18
|
export { normalizeTaskEntry as t };
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
//#region src/config/schema/schema.type.d.ts
|
|
2
1
|
interface TaskEntry {
|
|
3
2
|
/** Registry task name — `verification.unitTests`, `sourceQuality.staticAnalysis`, `delivery.build`, … */
|
|
4
3
|
name: string;
|
|
@@ -72,5 +71,4 @@ interface TasksConfig {
|
|
|
72
71
|
prePush?: boolean;
|
|
73
72
|
};
|
|
74
73
|
}
|
|
75
|
-
//#endregion
|
|
76
74
|
export { TaskEntry as n, TasksConfig as r, TaskConfigItem as t };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@theholocron/astromech",
|
|
3
|
-
"version": "5.0.0-alpha.
|
|
3
|
+
"version": "5.0.0-alpha.248",
|
|
4
4
|
"description": "The Holocron task runner — one task manifest drives `holocron run`, `holocron run ci`, the CI workflows, package.json scripts, linters, and required checks.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"ci",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"@theholocron/fs-utils": "^1.16.0",
|
|
54
54
|
"@theholocron/json-utils": "^1.16.0",
|
|
55
55
|
"@theholocron/pkg-utils": "^1.16.0",
|
|
56
|
-
"@theholocron/datapad": "5.0.0-alpha.
|
|
56
|
+
"@theholocron/datapad": "5.0.0-alpha.248"
|
|
57
57
|
},
|
|
58
58
|
"devDependencies": {
|
|
59
59
|
"@commitlint/config-conventional": "^21.2.3",
|
|
@@ -67,14 +67,14 @@
|
|
|
67
67
|
"@theholocron/tsdown-config": "^8.8.2",
|
|
68
68
|
"@theholocron/vitest-config": "^8.8.2",
|
|
69
69
|
"@types/node": "^26",
|
|
70
|
-
"@vitest/coverage-v8": "^
|
|
70
|
+
"@vitest/coverage-v8": "^5.0.5",
|
|
71
71
|
"@vitest/eslint-plugin": "^1.6.27",
|
|
72
72
|
"eslint": "^10.8.1",
|
|
73
73
|
"eslint-plugin-n": "^18.3.0",
|
|
74
74
|
"globals": "^17.11.0",
|
|
75
|
-
"tsdown": "^0.
|
|
75
|
+
"tsdown": "^0.23.3",
|
|
76
76
|
"typescript": "^5.9.3",
|
|
77
|
-
"vitest": "^
|
|
77
|
+
"vitest": "^5.0.5"
|
|
78
78
|
},
|
|
79
79
|
"peerDependencies": {
|
|
80
80
|
"@semantic-release/commit-analyzer": "^13",
|