tegami 1.2.1 → 1.2.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/generators/simple.d.ts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/{npm-4iA03RvC.js → npm-cS-D2xGI.js} +40 -8
- package/dist/plugins/cargo.d.ts +1 -1
- package/dist/plugins/git.d.ts +1 -1
- package/dist/plugins/github.d.ts +2 -2
- package/dist/plugins/gitlab.d.ts +2 -2
- package/dist/plugins/go.d.ts +1 -1
- package/dist/providers/npm.d.ts +1 -1
- package/dist/providers/npm.js +1 -1
- package/dist/{types-BbwOrNZ2.d.ts → types-C_vz41r2.d.ts} +2 -1
- package/dist/{version-request-BQwP7EWa.d.ts → version-request-DXk_B7O_.d.ts} +1 -1
- package/package.json +1 -1
package/dist/cli/index.d.ts
CHANGED
package/dist/index.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { A as WorkspacePackage, M as DraftPolicy, N as PackageDraft, O as PackageGraph, P as BumpType, _ as PublishOptions, a as PublishPreflight, b as TegamiContext, c as TegamiPluginOption, d as GenerateChangelogOptions, f as Tegami, g as PackagePublishResult, h as PackagePublishPlan, i as PackageOptions, j as Draft, k as PackageGroup, m as PublishLock, n as GroupOptions, o as TegamiOptions, p as tegami, r as LogGenerator, s as TegamiPlugin, v as PublishPlan, y as CommitChangelog } from "./types-
|
|
1
|
+
import { A as WorkspacePackage, M as DraftPolicy, N as PackageDraft, O as PackageGraph, P as BumpType, _ as PublishOptions, a as PublishPreflight, b as TegamiContext, c as TegamiPluginOption, d as GenerateChangelogOptions, f as Tegami, g as PackagePublishResult, h as PackagePublishPlan, i as PackageOptions, j as Draft, k as PackageGroup, m as PublishLock, n as GroupOptions, o as TegamiOptions, p as tegami, r as LogGenerator, s as TegamiPlugin, v as PublishPlan, y as CommitChangelog } from "./types-C_vz41r2.js";
|
|
2
2
|
export { type BumpType, type CommitChangelog, type Draft, type DraftPolicy, GenerateChangelogOptions, type GroupOptions, type LogGenerator, type PackageDraft, PackageGraph, type PackageGroup, type PackageOptions, type PackagePublishPlan, type PackagePublishResult, type PublishLock, type PublishOptions, type PublishPlan, type PublishPreflight, Tegami, type TegamiContext, type TegamiOptions, type TegamiPlugin, type TegamiPluginOption, WorkspacePackage, tegami };
|
package/dist/index.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { n as generateFromCommits } from "./generate-Cnd8RiKO.js";
|
|
2
2
|
import { i as handlePluginError } from "./error-CAsrGb6e.js";
|
|
3
3
|
import { a as createDraft, c as parseChangelogFile, i as runPublishPlan, l as readChangelogEntries, n as publishPlanStatus, r as runPreflights, t as initPublishPlan } from "./publish-Bt3e1RPs.js";
|
|
4
|
-
import { t as npm } from "./npm-
|
|
4
|
+
import { t as npm } from "./npm-cS-D2xGI.js";
|
|
5
5
|
import { n as WorkspacePackage, t as PackageGraph } from "./graph-BmXTJZxx.js";
|
|
6
6
|
import { mkdir, rm, writeFile } from "node:fs/promises";
|
|
7
7
|
import path, { join } from "node:path";
|
|
@@ -887,14 +887,21 @@ function npm({ client: defaultClient, onBreakPeerDep = "set", updateLockFile = t
|
|
|
887
887
|
}
|
|
888
888
|
} } = {}) {
|
|
889
889
|
let active = false;
|
|
890
|
-
let client;
|
|
891
890
|
return {
|
|
892
891
|
name: "npm",
|
|
893
892
|
enforce: "pre",
|
|
894
893
|
async init() {
|
|
895
|
-
if (defaultClient)
|
|
896
|
-
|
|
897
|
-
|
|
894
|
+
if (defaultClient) this.npm = {
|
|
895
|
+
client: defaultClient,
|
|
896
|
+
agent: defaultClient
|
|
897
|
+
};
|
|
898
|
+
else {
|
|
899
|
+
const result = await detect({ cwd: this.cwd });
|
|
900
|
+
this.npm = {
|
|
901
|
+
client: result?.name ?? "npm",
|
|
902
|
+
agent: result?.agent ?? "npm"
|
|
903
|
+
};
|
|
904
|
+
}
|
|
898
905
|
},
|
|
899
906
|
async resolve() {
|
|
900
907
|
if (!this.npm) return;
|
|
@@ -952,9 +959,9 @@ function npm({ client: defaultClient, onBreakPeerDep = "set", updateLockFile = t
|
|
|
952
959
|
}
|
|
953
960
|
},
|
|
954
961
|
async publish({ pkg, plan }) {
|
|
955
|
-
if (!(pkg instanceof NpmPackage)) return;
|
|
962
|
+
if (!(pkg instanceof NpmPackage) || !this.npm) return;
|
|
956
963
|
const { distTag, markLatest } = plan.packages.get(pkg.id)?.npm ?? {};
|
|
957
|
-
const result = await publish(client, pkg, distTag);
|
|
964
|
+
const result = await publish(this.npm.client, pkg, distTag);
|
|
958
965
|
if (result.type === "published" && markLatest) {
|
|
959
966
|
const tagResult = await x("npm", [
|
|
960
967
|
"dist-tag",
|
|
@@ -1003,8 +1010,33 @@ function npm({ client: defaultClient, onBreakPeerDep = "set", updateLockFile = t
|
|
|
1003
1010
|
await Promise.all(writes);
|
|
1004
1011
|
},
|
|
1005
1012
|
async applyCliDraft() {
|
|
1006
|
-
if (!active || !updateLockFile) return;
|
|
1007
|
-
|
|
1013
|
+
if (!this.npm || !active || !updateLockFile) return;
|
|
1014
|
+
let args;
|
|
1015
|
+
switch (this.npm.agent) {
|
|
1016
|
+
case "pnpm":
|
|
1017
|
+
case "pnpm@6":
|
|
1018
|
+
args = [
|
|
1019
|
+
"install",
|
|
1020
|
+
"--lockfile-only",
|
|
1021
|
+
"--no-frozen-lockfile"
|
|
1022
|
+
];
|
|
1023
|
+
break;
|
|
1024
|
+
case "npm":
|
|
1025
|
+
args = ["install", "--package-lock-only"];
|
|
1026
|
+
break;
|
|
1027
|
+
case "bun":
|
|
1028
|
+
args = ["install", "--lockfile-only"];
|
|
1029
|
+
break;
|
|
1030
|
+
case "yarn@berry":
|
|
1031
|
+
args = [
|
|
1032
|
+
"install",
|
|
1033
|
+
"--mode=update-lockfile",
|
|
1034
|
+
"--no-immutable"
|
|
1035
|
+
];
|
|
1036
|
+
break;
|
|
1037
|
+
default: args = ["install"];
|
|
1038
|
+
}
|
|
1039
|
+
const result = await x(this.npm.client, args, { nodeOptions: { cwd: this.cwd } });
|
|
1008
1040
|
if (result.exitCode !== 0) throw execFailure("Failed to update lockfile.", result);
|
|
1009
1041
|
},
|
|
1010
1042
|
initCli(cli) {
|
package/dist/plugins/cargo.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { D as cargo, E as CargoPluginOptions, T as CargoPackage, w as CargoGraph } from "../types-
|
|
1
|
+
import { D as cargo, E as CargoPluginOptions, T as CargoPackage, w as CargoGraph } from "../types-C_vz41r2.js";
|
|
2
2
|
export { CargoGraph, CargoPackage, CargoPluginOptions, cargo };
|
package/dist/plugins/git.d.ts
CHANGED
package/dist/plugins/github.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as WorkspacePackage, b as TegamiContext, s as TegamiPlugin, t as Awaitable, v as PublishPlan } from "../types-
|
|
1
|
+
import { A as WorkspacePackage, b as TegamiContext, s as TegamiPlugin, t as Awaitable, v as PublishPlan } from "../types-C_vz41r2.js";
|
|
2
2
|
import { GitPluginOptions } from "./git.js";
|
|
3
|
-
import { t as VersionRequestOptions } from "../version-request-
|
|
3
|
+
import { t as VersionRequestOptions } from "../version-request-DXk_B7O_.js";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/github.d.ts
|
|
6
6
|
interface GithubRelease {
|
package/dist/plugins/gitlab.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { A as WorkspacePackage, b as TegamiContext, s as TegamiPlugin, t as Awaitable, v as PublishPlan } from "../types-
|
|
1
|
+
import { A as WorkspacePackage, b as TegamiContext, s as TegamiPlugin, t as Awaitable, v as PublishPlan } from "../types-C_vz41r2.js";
|
|
2
2
|
import { GitPluginOptions } from "./git.js";
|
|
3
|
-
import { t as VersionRequestOptions } from "../version-request-
|
|
3
|
+
import { t as VersionRequestOptions } from "../version-request-DXk_B7O_.js";
|
|
4
4
|
|
|
5
5
|
//#region src/plugins/gitlab.d.ts
|
|
6
6
|
interface GitlabRelease {
|
package/dist/plugins/go.d.ts
CHANGED
package/dist/providers/npm.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { C as NpmPackage, S as NpmGraph, l as NpmPluginOptions, u as npm, x as DependencySpec } from "../types-
|
|
1
|
+
import { C as NpmPackage, S as NpmGraph, l as NpmPluginOptions, u as npm, x as DependencySpec } from "../types-C_vz41r2.js";
|
|
2
2
|
export { type DependencySpec, type NpmGraph, NpmPackage, NpmPluginOptions, npm };
|
package/dist/providers/npm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { n as NpmPackage, t as npm } from "../npm-
|
|
1
|
+
import { n as NpmPackage, t as npm } from "../npm-cS-D2xGI.js";
|
|
2
2
|
export { NpmPackage, npm };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AgentName } from "package-manager-detector";
|
|
1
|
+
import { Agent, AgentName } from "package-manager-detector";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/semver.d.ts
|
|
4
4
|
type BumpType = "major" | "minor" | "patch";
|
|
@@ -523,6 +523,7 @@ interface TegamiContext {
|
|
|
523
523
|
};
|
|
524
524
|
/** additional context when npm plugin is configured */
|
|
525
525
|
npm?: {
|
|
526
|
+
agent: Agent;
|
|
526
527
|
client: AgentName; /** available after resolve */
|
|
527
528
|
graph?: NpmGraph;
|
|
528
529
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { b as TegamiContext, j as Draft, m as PublishLock, t as Awaitable, v as PublishPlan } from "./types-
|
|
1
|
+
import { b as TegamiContext, j as Draft, m as PublishLock, t as Awaitable, v as PublishPlan } from "./types-C_vz41r2.js";
|
|
2
2
|
|
|
3
3
|
//#region src/utils/version-request.d.ts
|
|
4
4
|
interface VersionRequestOptions {
|