pubm 0.2.11 → 0.3.3
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/LICENSE +191 -21
- package/README.md +126 -63
- package/bin/cli.js +53 -8338
- package/dist/changeset/bump-utils.d.ts +3 -0
- package/dist/changeset/changelog.d.ts +11 -0
- package/dist/changeset/index.d.ts +8 -0
- package/dist/changeset/migrate.d.ts +7 -0
- package/dist/changeset/parser.d.ts +11 -0
- package/dist/changeset/reader.d.ts +2 -0
- package/dist/changeset/status.d.ts +12 -0
- package/dist/changeset/version.d.ts +7 -0
- package/dist/changeset/writer.d.ts +4 -0
- package/dist/commands/add.d.ts +2 -0
- package/dist/commands/changesets.d.ts +2 -0
- package/dist/commands/init.d.ts +2 -0
- package/dist/commands/migrate.d.ts +2 -0
- package/dist/commands/pre.d.ts +2 -0
- package/dist/commands/secrets.d.ts +2 -0
- package/dist/commands/snapshot.d.ts +2 -0
- package/dist/commands/status.d.ts +2 -0
- package/dist/commands/sync.d.ts +10 -0
- package/dist/commands/update.d.ts +2 -0
- package/dist/commands/version-cmd.d.ts +6 -0
- package/dist/config/defaults.d.ts +2 -0
- package/dist/config/index.d.ts +4 -0
- package/dist/config/loader.d.ts +2 -0
- package/dist/config/types.d.ts +47 -0
- package/dist/ecosystem/ecosystem.d.ts +12 -0
- package/dist/ecosystem/index.d.ts +6 -0
- package/dist/ecosystem/js.d.ts +13 -0
- package/dist/ecosystem/rust.d.ts +21 -0
- package/dist/error.d.ts +7 -0
- package/dist/git.d.ts +32 -0
- package/dist/index.cjs +24070 -4016
- package/dist/index.d.ts +20 -281
- package/dist/index.js +23983 -3933
- package/dist/monorepo/dependency-graph.d.ts +17 -0
- package/dist/monorepo/discover.d.ts +15 -0
- package/dist/monorepo/groups.d.ts +17 -0
- package/dist/monorepo/index.d.ts +4 -0
- package/dist/monorepo/workspace.d.ts +5 -0
- package/dist/options.d.ts +3 -0
- package/dist/plugin/index.d.ts +2 -0
- package/dist/plugin/runner.d.ts +14 -0
- package/dist/plugin/types.d.ts +47 -0
- package/dist/plugins/external-version-sync/index.d.ts +4 -0
- package/dist/plugins/external-version-sync/sync.d.ts +2 -0
- package/dist/plugins/external-version-sync/types.d.ts +14 -0
- package/dist/prerelease/index.d.ts +2 -0
- package/dist/prerelease/pre.d.ts +11 -0
- package/dist/prerelease/snapshot.d.ts +8 -0
- package/dist/registry/crates.d.ts +17 -0
- package/dist/registry/custom-registry.d.ts +5 -0
- package/dist/registry/index.d.ts +3 -0
- package/dist/registry/jsr.d.ts +36 -0
- package/dist/registry/npm.d.ts +25 -0
- package/dist/registry/registry.d.ts +20 -0
- package/dist/tasks/crates.d.ts +6 -0
- package/dist/tasks/custom-registry.d.ts +0 -0
- package/dist/tasks/dry-run-publish.d.ts +6 -0
- package/dist/tasks/github-release.d.ts +19 -0
- package/dist/tasks/jsr.d.ts +9 -0
- package/dist/tasks/npm.d.ts +4 -0
- package/dist/tasks/preflight.d.ts +3 -0
- package/dist/tasks/prerequisites-check.d.ts +3 -0
- package/dist/tasks/required-conditions-check.d.ts +3 -0
- package/dist/tasks/required-missing-information.d.ts +7 -0
- package/dist/tasks/runner.d.ts +10 -0
- package/dist/types/jsr-api.d.ts +91 -0
- package/dist/types/jsr-json.d.ts +10 -0
- package/dist/types/options.d.ts +115 -0
- package/dist/types/package-json.d.ts +84 -0
- package/dist/utils/cli.d.ts +2 -0
- package/dist/utils/crate-graph.d.ts +1 -0
- package/dist/utils/db.d.ts +6 -0
- package/dist/utils/engine-version.d.ts +2 -0
- package/dist/utils/exec.d.ts +23 -0
- package/dist/utils/listr.d.ts +2 -0
- package/dist/utils/notify-new-version.d.ts +1 -0
- package/dist/utils/open-url.d.ts +1 -0
- package/dist/utils/package-manager.d.ts +3 -0
- package/dist/utils/package-name.d.ts +4 -0
- package/dist/utils/package.d.ts +23 -0
- package/dist/utils/registries.d.ts +8 -0
- package/dist/utils/rollback.d.ts +6 -0
- package/dist/utils/runtime.d.ts +3 -0
- package/dist/utils/secure-store.d.ts +6 -0
- package/dist/utils/spawn-interactive.d.ts +10 -0
- package/dist/utils/token.d.ts +12 -0
- package/dist/validate/entry-points.d.ts +5 -0
- package/dist/validate/extraneous-files.d.ts +5 -0
- package/dist/validate/index.d.ts +2 -0
- package/package.json +30 -23
- package/postinstall.cjs +42 -0
- package/dist/index.d.cts +0 -291
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { BumpType } from "./parser.js";
|
|
2
|
+
export interface ChangelogEntry {
|
|
3
|
+
summary: string;
|
|
4
|
+
type: BumpType;
|
|
5
|
+
id: string;
|
|
6
|
+
}
|
|
7
|
+
export interface DependencyUpdate {
|
|
8
|
+
name: string;
|
|
9
|
+
version: string;
|
|
10
|
+
}
|
|
11
|
+
export declare function generateChangelog(version: string, entries: ChangelogEntry[], depUpdates?: DependencyUpdate[]): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { BUMP_ORDER, maxBump } from "./bump-utils.js";
|
|
2
|
+
export { type ChangelogEntry, type DependencyUpdate, generateChangelog, } from "./changelog.js";
|
|
3
|
+
export { type MigrationResult, migrateFromChangesets } from "./migrate.js";
|
|
4
|
+
export { type BumpType, type Changeset, parseChangeset, type Release, } from "./parser.js";
|
|
5
|
+
export { readChangesets } from "./reader.js";
|
|
6
|
+
export { getStatus, type PackageStatus, type Status } from "./status.js";
|
|
7
|
+
export { calculateVersionBumps, type VersionBump } from "./version.js";
|
|
8
|
+
export { generateChangesetContent, generateChangesetId, writeChangeset, } from "./writer.js";
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export type BumpType = "patch" | "minor" | "major";
|
|
2
|
+
export interface Release {
|
|
3
|
+
name: string;
|
|
4
|
+
type: BumpType;
|
|
5
|
+
}
|
|
6
|
+
export interface Changeset {
|
|
7
|
+
id: string;
|
|
8
|
+
summary: string;
|
|
9
|
+
releases: Release[];
|
|
10
|
+
}
|
|
11
|
+
export declare function parseChangeset(content: string, fileName: string): Changeset;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { BumpType, Changeset } from "./parser.js";
|
|
2
|
+
export interface PackageStatus {
|
|
3
|
+
bumpType: BumpType;
|
|
4
|
+
changesetCount: number;
|
|
5
|
+
summaries: string[];
|
|
6
|
+
}
|
|
7
|
+
export interface Status {
|
|
8
|
+
packages: Map<string, PackageStatus>;
|
|
9
|
+
changesets: Changeset[];
|
|
10
|
+
hasChangesets: boolean;
|
|
11
|
+
}
|
|
12
|
+
export declare function getStatus(cwd?: string): Status;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import type { BumpType } from "./parser.js";
|
|
2
|
+
export interface VersionBump {
|
|
3
|
+
currentVersion: string;
|
|
4
|
+
newVersion: string;
|
|
5
|
+
bumpType: BumpType;
|
|
6
|
+
}
|
|
7
|
+
export declare function calculateVersionBumps(currentVersions: Map<string, string>, cwd?: string): Map<string, VersionBump>;
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import type { Release } from "./parser.js";
|
|
2
|
+
export declare function generateChangesetId(): string;
|
|
3
|
+
export declare function generateChangesetContent(releases: Release[], summary: string): string;
|
|
4
|
+
export declare function writeChangeset(releases: Release[], summary: string, cwd?: string): string;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
export interface DiscoveredReference {
|
|
3
|
+
file: string;
|
|
4
|
+
type: "json" | "pattern";
|
|
5
|
+
jsonPath?: string;
|
|
6
|
+
match?: string;
|
|
7
|
+
line?: number;
|
|
8
|
+
}
|
|
9
|
+
export declare function discoverVersionReferences(cwd: string, currentVersion: string): Promise<DiscoveredReference[]>;
|
|
10
|
+
export declare function registerSyncCommand(parent: Command): void;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Command } from "commander";
|
|
2
|
+
export interface VersionCommandOptions {
|
|
3
|
+
dryRun?: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function runVersionCommand(cwd: string, options?: VersionCommandOptions): Promise<void>;
|
|
6
|
+
export declare function registerVersionCommand(parent: Command): void;
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { PubmPlugin } from "../plugin/types.js";
|
|
2
|
+
import type { RegistryType } from "../types/options.js";
|
|
3
|
+
export interface PackageConfig {
|
|
4
|
+
path: string;
|
|
5
|
+
registries: RegistryType[];
|
|
6
|
+
ecosystem?: "js" | "rust";
|
|
7
|
+
buildCommand?: string;
|
|
8
|
+
testCommand?: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ValidateConfig {
|
|
11
|
+
cleanInstall?: boolean;
|
|
12
|
+
entryPoints?: boolean;
|
|
13
|
+
extraneousFiles?: boolean;
|
|
14
|
+
}
|
|
15
|
+
export interface SnapshotConfig {
|
|
16
|
+
useCalculatedVersion?: boolean;
|
|
17
|
+
prereleaseTemplate?: string;
|
|
18
|
+
}
|
|
19
|
+
export interface PubmConfig {
|
|
20
|
+
versioning?: "independent" | "fixed";
|
|
21
|
+
branch?: string;
|
|
22
|
+
registries?: RegistryType[];
|
|
23
|
+
packages?: PackageConfig[];
|
|
24
|
+
changelog?: boolean | string;
|
|
25
|
+
changelogFormat?: "default" | "github" | string;
|
|
26
|
+
commit?: boolean;
|
|
27
|
+
access?: "public" | "restricted";
|
|
28
|
+
fixed?: string[][];
|
|
29
|
+
linked?: string[][];
|
|
30
|
+
updateInternalDependencies?: "patch" | "minor";
|
|
31
|
+
ignore?: string[];
|
|
32
|
+
validate?: ValidateConfig;
|
|
33
|
+
snapshot?: SnapshotConfig;
|
|
34
|
+
tag?: string;
|
|
35
|
+
contents?: string;
|
|
36
|
+
saveToken?: boolean;
|
|
37
|
+
releaseDraft?: boolean;
|
|
38
|
+
releaseNotes?: boolean;
|
|
39
|
+
rollbackStrategy?: "individual" | "all";
|
|
40
|
+
plugins?: PubmPlugin[];
|
|
41
|
+
}
|
|
42
|
+
export interface ResolvedPubmConfig extends Required<Omit<PubmConfig, "packages" | "validate" | "snapshot">> {
|
|
43
|
+
packages: PackageConfig[];
|
|
44
|
+
validate: Required<ValidateConfig>;
|
|
45
|
+
snapshot: Required<SnapshotConfig>;
|
|
46
|
+
}
|
|
47
|
+
export declare function defineConfig(config: PubmConfig): PubmConfig;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import type { RegistryType } from "../types/options.js";
|
|
2
|
+
export declare abstract class Ecosystem {
|
|
3
|
+
packagePath: string;
|
|
4
|
+
constructor(packagePath: string);
|
|
5
|
+
abstract packageName(): Promise<string>;
|
|
6
|
+
abstract readVersion(): Promise<string>;
|
|
7
|
+
abstract writeVersion(newVersion: string): Promise<void>;
|
|
8
|
+
abstract manifestFiles(): string[];
|
|
9
|
+
abstract defaultTestCommand(): Promise<string> | string;
|
|
10
|
+
abstract defaultBuildCommand(): Promise<string> | string;
|
|
11
|
+
abstract supportedRegistries(): RegistryType[];
|
|
12
|
+
}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { RegistryType } from "../types/options.js";
|
|
2
|
+
import type { Ecosystem } from "./ecosystem.js";
|
|
3
|
+
export declare function detectEcosystem(packagePath: string, registries?: RegistryType[]): Promise<Ecosystem | null>;
|
|
4
|
+
export { Ecosystem } from "./ecosystem.js";
|
|
5
|
+
export { JsEcosystem } from "./js.js";
|
|
6
|
+
export { RustEcosystem } from "./rust.js";
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { RegistryType } from "../types/options.js";
|
|
2
|
+
import { Ecosystem } from "./ecosystem.js";
|
|
3
|
+
export declare class JsEcosystem extends Ecosystem {
|
|
4
|
+
static detect(packagePath: string): Promise<boolean>;
|
|
5
|
+
private readPackageJson;
|
|
6
|
+
packageName(): Promise<string>;
|
|
7
|
+
readVersion(): Promise<string>;
|
|
8
|
+
writeVersion(newVersion: string): Promise<void>;
|
|
9
|
+
manifestFiles(): string[];
|
|
10
|
+
defaultTestCommand(): Promise<string>;
|
|
11
|
+
defaultBuildCommand(): Promise<string>;
|
|
12
|
+
supportedRegistries(): RegistryType[];
|
|
13
|
+
}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { RegistryType } from "../types/options.js";
|
|
2
|
+
import { Ecosystem } from "./ecosystem.js";
|
|
3
|
+
export declare class RustEcosystem extends Ecosystem {
|
|
4
|
+
static detect(packagePath: string): Promise<boolean>;
|
|
5
|
+
private readCargoToml;
|
|
6
|
+
packageName(): Promise<string>;
|
|
7
|
+
readVersion(): Promise<string>;
|
|
8
|
+
writeVersion(newVersion: string): Promise<void>;
|
|
9
|
+
/**
|
|
10
|
+
* Update the `version` field of dependencies that match sibling crate names.
|
|
11
|
+
* This ensures `cargo publish` works when crates depend on each other via path.
|
|
12
|
+
*/
|
|
13
|
+
updateSiblingDependencyVersions(siblingVersions: Map<string, string>): Promise<boolean>;
|
|
14
|
+
syncLockfile(): Promise<string | undefined>;
|
|
15
|
+
private findLockfile;
|
|
16
|
+
dependencies(): Promise<string[]>;
|
|
17
|
+
manifestFiles(): string[];
|
|
18
|
+
defaultTestCommand(): string;
|
|
19
|
+
defaultBuildCommand(): string;
|
|
20
|
+
supportedRegistries(): RegistryType[];
|
|
21
|
+
}
|
package/dist/error.d.ts
ADDED
package/dist/git.d.ts
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare class Git {
|
|
2
|
+
git(args: string[]): Promise<string>;
|
|
3
|
+
userName(): Promise<string>;
|
|
4
|
+
latestTag(): Promise<string | null>;
|
|
5
|
+
tags(): Promise<string[]>;
|
|
6
|
+
previousTag(tag: string): Promise<string | null>;
|
|
7
|
+
dryFetch(): Promise<string>;
|
|
8
|
+
fetch(): Promise<boolean>;
|
|
9
|
+
pull(): Promise<boolean>;
|
|
10
|
+
revisionDiffsCount(): Promise<number>;
|
|
11
|
+
status(): Promise<string>;
|
|
12
|
+
commits(leftRev: string, rightRev: string): Promise<{
|
|
13
|
+
id: string;
|
|
14
|
+
message: string;
|
|
15
|
+
}[]>;
|
|
16
|
+
version(): Promise<string>;
|
|
17
|
+
branch(): Promise<string>;
|
|
18
|
+
switch(branch: string): Promise<boolean>;
|
|
19
|
+
checkTagExist(tag: string): Promise<boolean>;
|
|
20
|
+
deleteTag(tag: string): Promise<boolean>;
|
|
21
|
+
stageAll(): Promise<boolean>;
|
|
22
|
+
stash(): Promise<boolean>;
|
|
23
|
+
popStash(): Promise<boolean>;
|
|
24
|
+
stage(file: string): Promise<boolean>;
|
|
25
|
+
reset(rev?: string, option?: string): Promise<boolean>;
|
|
26
|
+
latestCommit(): Promise<string>;
|
|
27
|
+
firstCommit(): Promise<string>;
|
|
28
|
+
commit(message: string): Promise<string>;
|
|
29
|
+
repository(): Promise<string>;
|
|
30
|
+
createTag(tag: string, commitRev?: string): Promise<boolean>;
|
|
31
|
+
push(options?: string): Promise<boolean>;
|
|
32
|
+
}
|