tegami 1.0.0-beta.5 → 1.0.2
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/cli/index.d.ts +1 -1
- package/dist/cli/index.js +8 -10
- package/dist/{draft-DtFyGxe8.js → draft-BqHcSCeX.js} +32 -23
- package/dist/{error-We7chQVJ.js → error-BhMYq9iW.js} +14 -1
- package/dist/{generate-BfYdNTFi.js → generate-Rvz4Lu98.js} +3 -33
- package/dist/generators/simple.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +6 -141
- package/dist/npm-5cG02krT.js +682 -0
- package/dist/plugins/cargo.d.ts +2 -0
- package/dist/plugins/cargo.js +405 -0
- package/dist/plugins/git.d.ts +1 -1
- package/dist/plugins/git.js +1 -1
- package/dist/plugins/github.d.ts +1 -1
- package/dist/plugins/github.js +4 -4
- package/dist/plugins/gitlab.d.ts +1 -1
- package/dist/plugins/gitlab.js +18 -25
- package/dist/plugins/go.d.ts +8 -7
- package/dist/plugins/go.js +34 -20
- package/dist/providers/npm.d.ts +1 -1
- package/dist/providers/npm.js +1 -1
- package/dist/shared-C92toqVI.js +32 -0
- package/dist/{types-C1rEqeM4.d.ts → types-DHddSAez.d.ts} +497 -178
- package/dist/utils/index.js +1 -1
- package/dist/{version-request-DKvR3_xb.js → version-request-oxy16TJ1.js} +1 -1
- package/package.json +2 -2
- package/dist/cargo-hlZX2akE.js +0 -292
- package/dist/npm-CMOyacwf.js +0 -371
- package/dist/providers/cargo.d.ts +0 -2
- package/dist/providers/cargo.js +0 -2
package/dist/plugins/go.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { i as isNodeError, n as execFailure } from "../error-
|
|
1
|
+
import { i as isNodeError, n as execFailure } from "../error-BhMYq9iW.js";
|
|
2
2
|
import { n as WorkspacePackage } from "../graph-gThXu8Cz.js";
|
|
3
3
|
import { relative, resolve } from "node:path";
|
|
4
4
|
import { x } from "tinyexec";
|
|
@@ -66,7 +66,7 @@ const packageLockSchema = z.object({
|
|
|
66
66
|
version: z.string()
|
|
67
67
|
});
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
69
|
+
* Plugin for Golang, the release flow of Golang is pretty special, there's some exceptions for it:
|
|
70
70
|
*
|
|
71
71
|
* - Version is stored in lock file, normally, it should prefer to store versions in a file like `package.json` & `Cargo.toml`, but for Golang, there is no such file.
|
|
72
72
|
* - Publishing is handed to Git plugin, because Golang uses Git tag for publishing.
|
|
@@ -153,6 +153,7 @@ function go({ updateLockFile = true, bumpDep: getBumpDepType } = {}) {
|
|
|
153
153
|
};
|
|
154
154
|
},
|
|
155
155
|
resolvePlanStatus({ plan }) {
|
|
156
|
+
if (!active) return;
|
|
156
157
|
return Array.from(plan.packages, async ([id, { preflight }]) => {
|
|
157
158
|
if (!preflight.shouldPublish) return;
|
|
158
159
|
const pkg = this.graph.get(id);
|
|
@@ -180,29 +181,42 @@ function go({ updateLockFile = true, bumpDep: getBumpDepType } = {}) {
|
|
|
180
181
|
};
|
|
181
182
|
}
|
|
182
183
|
function depsPolicy({ graph }, getBumpDepType = () => "patch") {
|
|
184
|
+
const dependentMap = /* @__PURE__ */ new Map();
|
|
185
|
+
for (const pkg of graph.getPackages()) {
|
|
186
|
+
if (!(pkg instanceof GoPackage)) continue;
|
|
187
|
+
for (const [name, version] of pkg.mod.requires) {
|
|
188
|
+
const id = `go:${name}`;
|
|
189
|
+
const refs = dependentMap.get(id);
|
|
190
|
+
if (refs) refs.push({
|
|
191
|
+
dependent: pkg,
|
|
192
|
+
name,
|
|
193
|
+
version
|
|
194
|
+
});
|
|
195
|
+
else dependentMap.set(id, [{
|
|
196
|
+
dependent: pkg,
|
|
197
|
+
name,
|
|
198
|
+
version
|
|
199
|
+
}]);
|
|
200
|
+
}
|
|
201
|
+
}
|
|
183
202
|
return {
|
|
184
203
|
id: "go:deps",
|
|
185
204
|
onUpdate({ pkg, packageDraft: plan }) {
|
|
186
205
|
if (!(pkg instanceof GoPackage)) return;
|
|
206
|
+
const deps = dependentMap.get(pkg.id);
|
|
207
|
+
if (!deps) return;
|
|
187
208
|
const group = graph.getPackageGroup(pkg.id);
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
});
|
|
200
|
-
if (bumpType === false) continue;
|
|
201
|
-
this.bumpPackage(dependent, {
|
|
202
|
-
type: bumpType,
|
|
203
|
-
reason: `update require "${moduleName}"`
|
|
204
|
-
});
|
|
205
|
-
}
|
|
209
|
+
const bumped = plan.bumpVersion(pkg);
|
|
210
|
+
if (!bumped) return;
|
|
211
|
+
for (const dep of deps) {
|
|
212
|
+
if (group?.options.syncBump && graph.getPackageGroup(dep.dependent.id) === group) continue;
|
|
213
|
+
if (semver$1.satisfies(bumped, stripGoVersion(dep.version))) continue;
|
|
214
|
+
const bumpType = getBumpDepType?.(dep);
|
|
215
|
+
if (bumpType === false) continue;
|
|
216
|
+
this.bumpPackage(dep.dependent, {
|
|
217
|
+
type: bumpType,
|
|
218
|
+
reason: `update require "${dep.name}"`
|
|
219
|
+
});
|
|
206
220
|
}
|
|
207
221
|
}
|
|
208
222
|
};
|
package/dist/providers/npm.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { d as npm, l as NpmPackage, u as NpmPluginOptions } from "../types-DHddSAez.js";
|
|
2
2
|
export { NpmPackage, NpmPluginOptions, npm };
|
package/dist/providers/npm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as npm, t as NpmPackage } from "../npm-
|
|
1
|
+
import { n as npm, t as NpmPackage } from "../npm-5cG02krT.js";
|
|
2
2
|
export { NpmPackage, npm };
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import z from "zod";
|
|
2
|
+
import { dump } from "js-yaml";
|
|
3
|
+
//#region src/changelog/shared.ts
|
|
4
|
+
const bumpTypeSchema = z.enum([
|
|
5
|
+
"major",
|
|
6
|
+
"minor",
|
|
7
|
+
"patch"
|
|
8
|
+
]);
|
|
9
|
+
const changelogPackageConfigSchema = z.object({
|
|
10
|
+
type: bumpTypeSchema.optional(),
|
|
11
|
+
replay: z.array(z.string().min(1)).optional()
|
|
12
|
+
});
|
|
13
|
+
const changelogFrontmatterSchema = z.object({
|
|
14
|
+
subject: z.string().optional(),
|
|
15
|
+
packages: z.union([z.array(z.string()), z.record(z.string(), z.union([
|
|
16
|
+
bumpTypeSchema,
|
|
17
|
+
z.null(),
|
|
18
|
+
changelogPackageConfigSchema
|
|
19
|
+
]))]).optional()
|
|
20
|
+
});
|
|
21
|
+
function renderChangelog(frontmatter, body) {
|
|
22
|
+
return [
|
|
23
|
+
"---",
|
|
24
|
+
dump(frontmatter).trim(),
|
|
25
|
+
"---",
|
|
26
|
+
"",
|
|
27
|
+
body.trim(),
|
|
28
|
+
""
|
|
29
|
+
].join("\n");
|
|
30
|
+
}
|
|
31
|
+
//#endregion
|
|
32
|
+
export { renderChangelog as n, changelogFrontmatterSchema as t };
|