pubm 0.3.6 → 0.4.1

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.
Files changed (97) hide show
  1. package/bin/{cli.js → cli.cjs} +6 -8
  2. package/index.cjs +1 -0
  3. package/index.d.ts +1 -0
  4. package/index.js +1 -0
  5. package/package.json +36 -59
  6. package/postinstall.cjs +11 -13
  7. package/LICENSE +0 -191
  8. package/README.md +0 -182
  9. package/dist/changeset/bump-utils.d.ts +0 -3
  10. package/dist/changeset/changelog.d.ts +0 -11
  11. package/dist/changeset/index.d.ts +0 -8
  12. package/dist/changeset/migrate.d.ts +0 -7
  13. package/dist/changeset/parser.d.ts +0 -11
  14. package/dist/changeset/reader.d.ts +0 -2
  15. package/dist/changeset/status.d.ts +0 -12
  16. package/dist/changeset/version.d.ts +0 -7
  17. package/dist/changeset/writer.d.ts +0 -4
  18. package/dist/commands/add.d.ts +0 -2
  19. package/dist/commands/changesets.d.ts +0 -2
  20. package/dist/commands/init.d.ts +0 -2
  21. package/dist/commands/migrate.d.ts +0 -2
  22. package/dist/commands/pre.d.ts +0 -2
  23. package/dist/commands/secrets.d.ts +0 -2
  24. package/dist/commands/snapshot.d.ts +0 -2
  25. package/dist/commands/status.d.ts +0 -2
  26. package/dist/commands/sync.d.ts +0 -10
  27. package/dist/commands/update.d.ts +0 -2
  28. package/dist/commands/version-cmd.d.ts +0 -6
  29. package/dist/config/defaults.d.ts +0 -2
  30. package/dist/config/index.d.ts +0 -4
  31. package/dist/config/loader.d.ts +0 -2
  32. package/dist/config/types.d.ts +0 -47
  33. package/dist/ecosystem/ecosystem.d.ts +0 -12
  34. package/dist/ecosystem/index.d.ts +0 -6
  35. package/dist/ecosystem/js.d.ts +0 -13
  36. package/dist/ecosystem/rust.d.ts +0 -21
  37. package/dist/error.d.ts +0 -7
  38. package/dist/git.d.ts +0 -32
  39. package/dist/index.cjs +0 -28292
  40. package/dist/index.d.ts +0 -30
  41. package/dist/index.js +0 -28257
  42. package/dist/monorepo/dependency-graph.d.ts +0 -17
  43. package/dist/monorepo/discover.d.ts +0 -15
  44. package/dist/monorepo/groups.d.ts +0 -17
  45. package/dist/monorepo/index.d.ts +0 -4
  46. package/dist/monorepo/workspace.d.ts +0 -5
  47. package/dist/options.d.ts +0 -3
  48. package/dist/plugin/index.d.ts +0 -2
  49. package/dist/plugin/runner.d.ts +0 -14
  50. package/dist/plugin/types.d.ts +0 -47
  51. package/dist/plugins/external-version-sync/index.d.ts +0 -4
  52. package/dist/plugins/external-version-sync/sync.d.ts +0 -2
  53. package/dist/plugins/external-version-sync/types.d.ts +0 -14
  54. package/dist/prerelease/index.d.ts +0 -2
  55. package/dist/prerelease/pre.d.ts +0 -11
  56. package/dist/prerelease/snapshot.d.ts +0 -8
  57. package/dist/registry/crates.d.ts +0 -17
  58. package/dist/registry/custom-registry.d.ts +0 -5
  59. package/dist/registry/index.d.ts +0 -3
  60. package/dist/registry/jsr.d.ts +0 -36
  61. package/dist/registry/npm.d.ts +0 -25
  62. package/dist/registry/registry.d.ts +0 -20
  63. package/dist/tasks/crates.d.ts +0 -6
  64. package/dist/tasks/custom-registry.d.ts +0 -0
  65. package/dist/tasks/dry-run-publish.d.ts +0 -6
  66. package/dist/tasks/github-release.d.ts +0 -19
  67. package/dist/tasks/jsr.d.ts +0 -9
  68. package/dist/tasks/npm.d.ts +0 -4
  69. package/dist/tasks/preflight.d.ts +0 -3
  70. package/dist/tasks/prerequisites-check.d.ts +0 -3
  71. package/dist/tasks/required-conditions-check.d.ts +0 -3
  72. package/dist/tasks/required-missing-information.d.ts +0 -7
  73. package/dist/tasks/runner.d.ts +0 -10
  74. package/dist/types/jsr-api.d.ts +0 -91
  75. package/dist/types/jsr-json.d.ts +0 -10
  76. package/dist/types/options.d.ts +0 -115
  77. package/dist/types/package-json.d.ts +0 -84
  78. package/dist/utils/cli.d.ts +0 -2
  79. package/dist/utils/crate-graph.d.ts +0 -1
  80. package/dist/utils/db.d.ts +0 -6
  81. package/dist/utils/engine-version.d.ts +0 -2
  82. package/dist/utils/exec.d.ts +0 -23
  83. package/dist/utils/listr.d.ts +0 -2
  84. package/dist/utils/notify-new-version.d.ts +0 -1
  85. package/dist/utils/open-url.d.ts +0 -1
  86. package/dist/utils/package-manager.d.ts +0 -3
  87. package/dist/utils/package-name.d.ts +0 -4
  88. package/dist/utils/package.d.ts +0 -23
  89. package/dist/utils/registries.d.ts +0 -8
  90. package/dist/utils/rollback.d.ts +0 -6
  91. package/dist/utils/runtime.d.ts +0 -3
  92. package/dist/utils/secure-store.d.ts +0 -6
  93. package/dist/utils/spawn-interactive.d.ts +0 -10
  94. package/dist/utils/token.d.ts +0 -12
  95. package/dist/validate/entry-points.d.ts +0 -5
  96. package/dist/validate/extraneous-files.d.ts +0 -5
  97. package/dist/validate/index.d.ts +0 -2
@@ -1,7 +0,0 @@
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>;
@@ -1,4 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function registerAddCommand(parent: Command): void;
@@ -1,2 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function registerChangesetsCommand(program: Command): void;
@@ -1,2 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function registerInitCommand(parent: Command): void;
@@ -1,2 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function registerMigrateCommand(parent: Command): void;
@@ -1,2 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function registerPreCommand(parent: Command): void;
@@ -1,2 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function registerSecretsCommand(parent: Command): void;
@@ -1,2 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function registerSnapshotCommand(parent: Command): void;
@@ -1,2 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function registerStatusCommand(parent: Command): void;
@@ -1,10 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import type { Command } from "commander";
2
- export declare function registerUpdateCommand(parent: Command): void;
@@ -1,6 +0,0 @@
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;
@@ -1,2 +0,0 @@
1
- import type { PubmConfig, ResolvedPubmConfig } from "./types.js";
2
- export declare function resolveConfig(config: PubmConfig): ResolvedPubmConfig;
@@ -1,4 +0,0 @@
1
- export { resolveConfig } from "./defaults.js";
2
- export { loadConfig } from "./loader.js";
3
- export type { PackageConfig, PubmConfig, ResolvedPubmConfig, SnapshotConfig, ValidateConfig, } from "./types.js";
4
- export { defineConfig } from "./types.js";
@@ -1,2 +0,0 @@
1
- import type { PubmConfig } from "./types.js";
2
- export declare function loadConfig(cwd?: string): Promise<PubmConfig | null>;
@@ -1,47 +0,0 @@
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;
@@ -1,12 +0,0 @@
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
- }
@@ -1,6 +0,0 @@
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";
@@ -1,13 +0,0 @@
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
- }
@@ -1,21 +0,0 @@
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 DELETED
@@ -1,7 +0,0 @@
1
- export declare class AbstractError extends Error {
2
- cause?: unknown;
3
- constructor(message: string, { cause }?: {
4
- cause?: unknown;
5
- });
6
- }
7
- export declare function consoleError(error: string | Error): void;
package/dist/git.d.ts DELETED
@@ -1,32 +0,0 @@
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
- }