pubm 0.3.5 → 0.4.0
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/bin/{cli.js → cli.cjs} +6 -8
- package/index.cjs +1 -0
- package/index.d.ts +1 -0
- package/index.js +1 -0
- package/package.json +36 -59
- package/postinstall.cjs +11 -13
- package/LICENSE +0 -191
- package/README.md +0 -182
- package/dist/changeset/bump-utils.d.ts +0 -3
- package/dist/changeset/changelog.d.ts +0 -11
- package/dist/changeset/index.d.ts +0 -8
- package/dist/changeset/migrate.d.ts +0 -7
- package/dist/changeset/parser.d.ts +0 -11
- package/dist/changeset/reader.d.ts +0 -2
- package/dist/changeset/status.d.ts +0 -12
- package/dist/changeset/version.d.ts +0 -7
- package/dist/changeset/writer.d.ts +0 -4
- package/dist/commands/add.d.ts +0 -2
- package/dist/commands/changesets.d.ts +0 -2
- package/dist/commands/init.d.ts +0 -2
- package/dist/commands/migrate.d.ts +0 -2
- package/dist/commands/pre.d.ts +0 -2
- package/dist/commands/secrets.d.ts +0 -2
- package/dist/commands/snapshot.d.ts +0 -2
- package/dist/commands/status.d.ts +0 -2
- package/dist/commands/sync.d.ts +0 -10
- package/dist/commands/update.d.ts +0 -2
- package/dist/commands/version-cmd.d.ts +0 -6
- package/dist/config/defaults.d.ts +0 -2
- package/dist/config/index.d.ts +0 -4
- package/dist/config/loader.d.ts +0 -2
- package/dist/config/types.d.ts +0 -47
- package/dist/ecosystem/ecosystem.d.ts +0 -12
- package/dist/ecosystem/index.d.ts +0 -6
- package/dist/ecosystem/js.d.ts +0 -13
- package/dist/ecosystem/rust.d.ts +0 -21
- package/dist/error.d.ts +0 -7
- package/dist/git.d.ts +0 -32
- package/dist/index.cjs +0 -28292
- package/dist/index.d.ts +0 -30
- package/dist/index.js +0 -28257
- package/dist/monorepo/dependency-graph.d.ts +0 -17
- package/dist/monorepo/discover.d.ts +0 -15
- package/dist/monorepo/groups.d.ts +0 -17
- package/dist/monorepo/index.d.ts +0 -4
- package/dist/monorepo/workspace.d.ts +0 -5
- package/dist/options.d.ts +0 -3
- package/dist/plugin/index.d.ts +0 -2
- package/dist/plugin/runner.d.ts +0 -14
- package/dist/plugin/types.d.ts +0 -47
- package/dist/plugins/external-version-sync/index.d.ts +0 -4
- package/dist/plugins/external-version-sync/sync.d.ts +0 -2
- package/dist/plugins/external-version-sync/types.d.ts +0 -14
- package/dist/prerelease/index.d.ts +0 -2
- package/dist/prerelease/pre.d.ts +0 -11
- package/dist/prerelease/snapshot.d.ts +0 -8
- package/dist/registry/crates.d.ts +0 -17
- package/dist/registry/custom-registry.d.ts +0 -5
- package/dist/registry/index.d.ts +0 -3
- package/dist/registry/jsr.d.ts +0 -36
- package/dist/registry/npm.d.ts +0 -25
- package/dist/registry/registry.d.ts +0 -20
- package/dist/tasks/crates.d.ts +0 -6
- package/dist/tasks/custom-registry.d.ts +0 -0
- package/dist/tasks/dry-run-publish.d.ts +0 -6
- package/dist/tasks/github-release.d.ts +0 -19
- package/dist/tasks/jsr.d.ts +0 -9
- package/dist/tasks/npm.d.ts +0 -4
- package/dist/tasks/preflight.d.ts +0 -3
- package/dist/tasks/prerequisites-check.d.ts +0 -3
- package/dist/tasks/required-conditions-check.d.ts +0 -3
- package/dist/tasks/required-missing-information.d.ts +0 -7
- package/dist/tasks/runner.d.ts +0 -10
- package/dist/types/jsr-api.d.ts +0 -91
- package/dist/types/jsr-json.d.ts +0 -10
- package/dist/types/options.d.ts +0 -115
- package/dist/types/package-json.d.ts +0 -84
- package/dist/utils/cli.d.ts +0 -2
- package/dist/utils/crate-graph.d.ts +0 -1
- package/dist/utils/db.d.ts +0 -6
- package/dist/utils/engine-version.d.ts +0 -2
- package/dist/utils/exec.d.ts +0 -23
- package/dist/utils/listr.d.ts +0 -2
- package/dist/utils/notify-new-version.d.ts +0 -1
- package/dist/utils/open-url.d.ts +0 -1
- package/dist/utils/package-manager.d.ts +0 -3
- package/dist/utils/package-name.d.ts +0 -4
- package/dist/utils/package.d.ts +0 -23
- package/dist/utils/registries.d.ts +0 -8
- package/dist/utils/rollback.d.ts +0 -6
- package/dist/utils/runtime.d.ts +0 -3
- package/dist/utils/secure-store.d.ts +0 -6
- package/dist/utils/spawn-interactive.d.ts +0 -10
- package/dist/utils/token.d.ts +0 -12
- package/dist/validate/entry-points.d.ts +0 -5
- package/dist/validate/extraneous-files.d.ts +0 -5
- package/dist/validate/index.d.ts +0 -2
package/bin/{cli.js → cli.cjs}
RENAMED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const childProcess = require("child_process");
|
|
4
|
-
const fs = require("fs");
|
|
5
|
-
const path = require("path");
|
|
6
|
-
const os = require("os");
|
|
3
|
+
const childProcess = require("node:child_process");
|
|
4
|
+
const fs = require("node:fs");
|
|
5
|
+
const path = require("node:path");
|
|
6
|
+
const os = require("node:os");
|
|
7
7
|
|
|
8
8
|
function run(target) {
|
|
9
9
|
const result = childProcess.spawnSync(target, process.argv.slice(2), {
|
|
@@ -44,7 +44,7 @@ if (!arch) {
|
|
|
44
44
|
arch = os.arch();
|
|
45
45
|
}
|
|
46
46
|
|
|
47
|
-
const base =
|
|
47
|
+
const base = `@pubm/${platform}-${arch}`;
|
|
48
48
|
const binary = platform === "windows" ? "pubm.exe" : "pubm";
|
|
49
49
|
|
|
50
50
|
function findBinary(startDir) {
|
|
@@ -68,9 +68,7 @@ function findBinary(startDir) {
|
|
|
68
68
|
const resolved = findBinary(scriptDir);
|
|
69
69
|
if (!resolved) {
|
|
70
70
|
console.error(
|
|
71
|
-
|
|
72
|
-
base +
|
|
73
|
-
'" package, or set the PUBM_BIN_PATH environment variable.',
|
|
71
|
+
`Failed to find the pubm binary for your platform. You can try manually installing the "${base}" package, or set the PUBM_BIN_PATH environment variable.`,
|
|
74
72
|
);
|
|
75
73
|
process.exit(1);
|
|
76
74
|
}
|
package/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
module.exports = require("@pubm/core");
|
package/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@pubm/core";
|
package/index.js
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from "@pubm/core";
|
package/package.json
CHANGED
|
@@ -1,78 +1,60 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "pubm",
|
|
3
|
-
"version": "0.
|
|
4
|
-
"engines": {
|
|
5
|
-
"node": ">=18",
|
|
6
|
-
"git": ">=2.11.0"
|
|
7
|
-
},
|
|
8
|
-
"description": "publish manager for multiple registry (jsr, npm and private registries)",
|
|
3
|
+
"version": "0.4.0",
|
|
9
4
|
"type": "module",
|
|
10
|
-
"
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
"description": "publish manager for multiple registry (jsr, npm and private registries)",
|
|
6
|
+
"types": "./index.d.ts",
|
|
7
|
+
"main": "./index.cjs",
|
|
8
|
+
"module": "./index.js",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./index.d.ts",
|
|
12
|
+
"import": "./index.js",
|
|
13
|
+
"require": "./index.cjs"
|
|
14
|
+
},
|
|
15
|
+
"./bin": "./bin/cli.cjs",
|
|
16
|
+
"./bin/cli.cjs": "./bin/cli.cjs",
|
|
17
|
+
"./package.json": "./package.json"
|
|
18
|
+
},
|
|
13
19
|
"bin": {
|
|
14
|
-
"pubm": "./bin/cli.
|
|
20
|
+
"pubm": "./bin/cli.cjs"
|
|
15
21
|
},
|
|
16
|
-
"author": "Yein Sung <syi778800@gmail.com>",
|
|
17
|
-
"types": "./dist/index.d.ts",
|
|
18
|
-
"main": "./dist/index.cjs",
|
|
19
|
-
"module": "./dist/index.js",
|
|
20
22
|
"files": [
|
|
21
23
|
"bin/",
|
|
24
|
+
"index.js",
|
|
25
|
+
"index.cjs",
|
|
26
|
+
"index.d.ts",
|
|
22
27
|
"dist/",
|
|
23
28
|
"postinstall.cjs"
|
|
24
29
|
],
|
|
25
|
-
"exports": {
|
|
26
|
-
".": {
|
|
27
|
-
"types": "./dist/index.d.ts",
|
|
28
|
-
"import": "./dist/index.js",
|
|
29
|
-
"require": "./dist/index.cjs"
|
|
30
|
-
}
|
|
31
|
-
},
|
|
32
30
|
"scripts": {
|
|
33
|
-
"build": "bun run build.ts",
|
|
34
31
|
"postinstall": "node ./postinstall.cjs",
|
|
35
32
|
"check": "biome check",
|
|
36
|
-
"format": "bun check --write",
|
|
37
33
|
"typecheck": "tsc --noEmit",
|
|
38
34
|
"test": "vitest --run",
|
|
39
|
-
"coverage": "vitest --run --coverage"
|
|
40
|
-
"release": "bun run build && bun src/cli.ts --preflight",
|
|
41
|
-
"ci:release": "bun src/cli.ts --ci",
|
|
42
|
-
"dev:site": "cd website && pnpm dev",
|
|
43
|
-
"build:site": "cd website && pnpm build",
|
|
44
|
-
"preview:site": "cd website && pnpm preview"
|
|
35
|
+
"coverage": "vitest --run --coverage"
|
|
45
36
|
},
|
|
46
37
|
"dependencies": {
|
|
47
|
-
"@
|
|
38
|
+
"@pubm/core": "workspace:*",
|
|
48
39
|
"commander": "^14.0.3",
|
|
49
40
|
"enquirer": "^2.4.1",
|
|
50
|
-
"jiti": "^2.6.1",
|
|
51
|
-
"listr2": "^8.2.5",
|
|
52
|
-
"micromatch": "^4.0.8",
|
|
53
41
|
"semver": "^7.6.3",
|
|
54
|
-
"
|
|
55
|
-
"
|
|
56
|
-
"update-kit": "^0.1.1",
|
|
57
|
-
"yaml": "^2.8.2"
|
|
42
|
+
"std-env": "^4.0.0",
|
|
43
|
+
"update-kit": "^0.1.12"
|
|
58
44
|
},
|
|
59
45
|
"devDependencies": {
|
|
60
|
-
"@
|
|
61
|
-
"@types/bun": "^1.3.10",
|
|
62
|
-
"@types/micromatch": "^4.0.10",
|
|
63
|
-
"@types/node": "^22.7.4",
|
|
64
|
-
"@types/semver": "^7.5.8",
|
|
65
|
-
"@vitest/coverage-v8": "^2.1.1",
|
|
66
|
-
"jsr": "^0.13.2",
|
|
67
|
-
"typescript": "^5.6.2",
|
|
68
|
-
"vitest": "^2.1.1"
|
|
46
|
+
"@types/semver": "^7.7.1"
|
|
69
47
|
},
|
|
70
48
|
"optionalDependencies": {
|
|
71
|
-
"@pubm/darwin-arm64": "
|
|
72
|
-
"@pubm/darwin-x64": "
|
|
73
|
-
"@pubm/linux-arm64": "
|
|
74
|
-
"@pubm/linux-x64": "
|
|
75
|
-
"@pubm/windows-x64": "
|
|
49
|
+
"@pubm/darwin-arm64": "workspace:*",
|
|
50
|
+
"@pubm/darwin-x64": "workspace:*",
|
|
51
|
+
"@pubm/linux-arm64": "workspace:*",
|
|
52
|
+
"@pubm/linux-x64": "workspace:*",
|
|
53
|
+
"@pubm/windows-x64": "workspace:*"
|
|
54
|
+
},
|
|
55
|
+
"engines": {
|
|
56
|
+
"node": ">=24",
|
|
57
|
+
"git": ">=2.11.0"
|
|
76
58
|
},
|
|
77
59
|
"license": "Apache-2.0",
|
|
78
60
|
"publishConfig": {
|
|
@@ -80,10 +62,8 @@
|
|
|
80
62
|
},
|
|
81
63
|
"repository": {
|
|
82
64
|
"type": "git",
|
|
83
|
-
"url": "git+https://github.com/syi0808/pubm.git"
|
|
84
|
-
|
|
85
|
-
"bugs": {
|
|
86
|
-
"url": "https://github.com/syi0808/pubm/issues"
|
|
65
|
+
"url": "git+https://github.com/syi0808/pubm.git",
|
|
66
|
+
"directory": "packages/pubm"
|
|
87
67
|
},
|
|
88
68
|
"keywords": [
|
|
89
69
|
"npm",
|
|
@@ -94,8 +74,5 @@
|
|
|
94
74
|
"publish manager",
|
|
95
75
|
"private registry",
|
|
96
76
|
"multiple publish"
|
|
97
|
-
]
|
|
98
|
-
"patchedDependencies": {
|
|
99
|
-
"listr2@8.2.5": "patches/listr2.patch"
|
|
100
|
-
}
|
|
77
|
+
]
|
|
101
78
|
}
|
package/postinstall.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
2
|
|
|
3
|
-
const fs = require("fs");
|
|
4
|
-
const path = require("path");
|
|
5
|
-
const os = require("os");
|
|
3
|
+
const fs = require("node:fs");
|
|
4
|
+
const path = require("node:path");
|
|
5
|
+
const os = require("node:os");
|
|
6
6
|
|
|
7
7
|
function main() {
|
|
8
8
|
const platformMap = { darwin: "darwin", linux: "linux", win32: "windows" };
|
|
@@ -10,11 +10,11 @@ function main() {
|
|
|
10
10
|
|
|
11
11
|
const platform = platformMap[os.platform()] || os.platform();
|
|
12
12
|
const arch = archMap[os.arch()] || os.arch();
|
|
13
|
-
const packageName =
|
|
13
|
+
const packageName = `@pubm/${platform}-${arch}`;
|
|
14
14
|
const binaryName = platform === "windows" ? "pubm.exe" : "pubm";
|
|
15
15
|
|
|
16
16
|
try {
|
|
17
|
-
const packageJsonPath = require.resolve(packageName
|
|
17
|
+
const packageJsonPath = require.resolve(`${packageName}/package.json`);
|
|
18
18
|
const binaryPath = path.join(
|
|
19
19
|
path.dirname(packageJsonPath),
|
|
20
20
|
"bin",
|
|
@@ -22,18 +22,16 @@ function main() {
|
|
|
22
22
|
);
|
|
23
23
|
|
|
24
24
|
if (!fs.existsSync(binaryPath)) {
|
|
25
|
-
console.
|
|
26
|
-
|
|
25
|
+
console.warn(
|
|
26
|
+
`pubm: binary not found at ${binaryPath}. Run \`bun run build\` to compile platform binaries.`,
|
|
27
|
+
);
|
|
28
|
+
process.exit(0);
|
|
27
29
|
}
|
|
28
30
|
|
|
29
|
-
console.log(
|
|
31
|
+
console.log(`pubm: platform binary verified (${packageName})`);
|
|
30
32
|
} catch {
|
|
31
33
|
console.error(
|
|
32
|
-
|
|
33
|
-
os.platform() +
|
|
34
|
-
"-" +
|
|
35
|
-
os.arch() +
|
|
36
|
-
").",
|
|
34
|
+
`pubm: could not find platform binary package. You may need to install it manually for your platform (${os.platform()}-${os.arch()}).`,
|
|
37
35
|
);
|
|
38
36
|
process.exit(0);
|
|
39
37
|
}
|
package/LICENSE
DELETED
|
@@ -1,191 +0,0 @@
|
|
|
1
|
-
|
|
2
|
-
Apache License
|
|
3
|
-
Version 2.0, January 2004
|
|
4
|
-
http://www.apache.org/licenses/
|
|
5
|
-
|
|
6
|
-
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
7
|
-
|
|
8
|
-
1. Definitions.
|
|
9
|
-
|
|
10
|
-
"License" shall mean the terms and conditions for use, reproduction,
|
|
11
|
-
and distribution as defined by Sections 1 through 9 of this document.
|
|
12
|
-
|
|
13
|
-
"Licensor" shall mean the copyright owner or entity authorized by
|
|
14
|
-
the copyright owner that is granting the License.
|
|
15
|
-
|
|
16
|
-
"Legal Entity" shall mean the union of the acting entity and all
|
|
17
|
-
other entities that control, are controlled by, or are under common
|
|
18
|
-
control with that entity. For the purposes of this definition,
|
|
19
|
-
"control" means (i) the power, direct or indirect, to cause the
|
|
20
|
-
direction or management of such entity, whether by contract or
|
|
21
|
-
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
22
|
-
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
23
|
-
|
|
24
|
-
"You" (or "Your") shall mean an individual or Legal Entity
|
|
25
|
-
exercising permissions granted by this License.
|
|
26
|
-
|
|
27
|
-
"Source" form shall mean the preferred form for making modifications,
|
|
28
|
-
including but not limited to software source code, documentation
|
|
29
|
-
source, and configuration files.
|
|
30
|
-
|
|
31
|
-
"Object" form shall mean any form resulting from mechanical
|
|
32
|
-
transformation or translation of a Source form, including but
|
|
33
|
-
not limited to compiled object code, generated documentation,
|
|
34
|
-
and conversions to other media types.
|
|
35
|
-
|
|
36
|
-
"Work" shall mean the work of authorship, whether in Source or
|
|
37
|
-
Object form, made available under the License, as indicated by a
|
|
38
|
-
copyright notice that is included in or attached to the work
|
|
39
|
-
(an example is provided in the Appendix below).
|
|
40
|
-
|
|
41
|
-
"Derivative Works" shall mean any work, whether in Source or Object
|
|
42
|
-
form, that is based on (or derived from) the Work and for which the
|
|
43
|
-
editorial revisions, annotations, elaborations, or other modifications
|
|
44
|
-
represent, as a whole, an original work of authorship. For the purposes
|
|
45
|
-
of this License, Derivative Works shall not include works that remain
|
|
46
|
-
separable from, or merely link (or bind by name) to the interfaces of,
|
|
47
|
-
the Work and Derivative Works thereof.
|
|
48
|
-
|
|
49
|
-
"Contribution" shall mean any work of authorship, including
|
|
50
|
-
the original version of the Work and any modifications or additions
|
|
51
|
-
to that Work or Derivative Works thereof, that is intentionally
|
|
52
|
-
submitted to the Licensor for inclusion in the Work by the copyright owner
|
|
53
|
-
or by an individual or Legal Entity authorized to submit on behalf of
|
|
54
|
-
the copyright owner. For the purposes of this definition, "submitted"
|
|
55
|
-
means any form of electronic, verbal, or written communication sent
|
|
56
|
-
to the Licensor or its representatives, including but not limited to
|
|
57
|
-
communication on electronic mailing lists, source code control systems,
|
|
58
|
-
and issue tracking systems that are managed by, or on behalf of, the
|
|
59
|
-
Licensor for the purpose of discussing and improving the Work, but
|
|
60
|
-
excluding communication that is conspicuously marked or otherwise
|
|
61
|
-
designated in writing by the copyright owner as "Not a Contribution."
|
|
62
|
-
|
|
63
|
-
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
64
|
-
on behalf of whom a Contribution has been received by the Licensor and
|
|
65
|
-
subsequently incorporated within the Work.
|
|
66
|
-
|
|
67
|
-
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
68
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
69
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
70
|
-
copyright license to reproduce, prepare Derivative Works of,
|
|
71
|
-
publicly display, publicly perform, sublicense, and distribute the
|
|
72
|
-
Work and such Derivative Works in Source or Object form.
|
|
73
|
-
|
|
74
|
-
3. Grant of Patent License. Subject to the terms and conditions of
|
|
75
|
-
this License, each Contributor hereby grants to You a perpetual,
|
|
76
|
-
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
77
|
-
(except as stated in this section) patent license to make, have made,
|
|
78
|
-
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
79
|
-
where such license applies only to those patent claims licensable
|
|
80
|
-
by such Contributor that are necessarily infringed by their
|
|
81
|
-
Contribution(s) alone or by combination of their Contribution(s)
|
|
82
|
-
with the Work to which such Contribution(s) was submitted. If You
|
|
83
|
-
institute patent litigation against any entity (including a
|
|
84
|
-
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
85
|
-
or a Contribution incorporated within the Work constitutes direct
|
|
86
|
-
or contributory patent infringement, then any patent licenses
|
|
87
|
-
granted to You under this License for that Work shall terminate
|
|
88
|
-
as of the date such litigation is filed.
|
|
89
|
-
|
|
90
|
-
4. Redistribution. You may reproduce and distribute copies of the
|
|
91
|
-
Work or Derivative Works thereof in any medium, with or without
|
|
92
|
-
modifications, and in Source or Object form, provided that You
|
|
93
|
-
meet the following conditions:
|
|
94
|
-
|
|
95
|
-
(a) You must give any other recipients of the Work or
|
|
96
|
-
Derivative Works a copy of this License; and
|
|
97
|
-
|
|
98
|
-
(b) You must cause any modified files to carry prominent notices
|
|
99
|
-
stating that You changed the files; and
|
|
100
|
-
|
|
101
|
-
(c) You must retain, in the Source form of any Derivative Works
|
|
102
|
-
that You distribute, all copyright, patent, trademark, and
|
|
103
|
-
attribution notices from the Source form of the Work,
|
|
104
|
-
excluding those notices that do not pertain to any part of
|
|
105
|
-
the Derivative Works; and
|
|
106
|
-
|
|
107
|
-
(d) If the Work includes a "NOTICE" text file as part of its
|
|
108
|
-
distribution, then any Derivative Works that You distribute must
|
|
109
|
-
include a readable copy of the attribution notices contained
|
|
110
|
-
within such NOTICE file, excluding any notices that do not
|
|
111
|
-
pertain to any part of the Derivative Works, in at least one
|
|
112
|
-
of the following places: within a NOTICE text file distributed
|
|
113
|
-
as part of the Derivative Works; within the Source form or
|
|
114
|
-
documentation, if provided along with the Derivative Works; or,
|
|
115
|
-
within a display generated by the Derivative Works, if and
|
|
116
|
-
wherever such third-party notices normally appear. The contents
|
|
117
|
-
of the NOTICE file are for informational purposes only and
|
|
118
|
-
do not modify the License. You may add Your own attribution
|
|
119
|
-
notices within Derivative Works that You distribute, alongside
|
|
120
|
-
or as an addendum to the NOTICE text from the Work, provided
|
|
121
|
-
that such additional attribution notices cannot be construed
|
|
122
|
-
as modifying the License.
|
|
123
|
-
|
|
124
|
-
You may add Your own copyright statement to Your modifications and
|
|
125
|
-
may provide additional or different license terms and conditions
|
|
126
|
-
for use, reproduction, or distribution of Your modifications, or
|
|
127
|
-
for any such Derivative Works as a whole, provided Your use,
|
|
128
|
-
reproduction, and distribution of the Work otherwise complies with
|
|
129
|
-
the conditions stated in this License.
|
|
130
|
-
|
|
131
|
-
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
132
|
-
any Contribution intentionally submitted for inclusion in the Work
|
|
133
|
-
by You to the Licensor shall be under the terms and conditions of
|
|
134
|
-
this License, without any additional terms or conditions.
|
|
135
|
-
Notwithstanding the above, nothing herein shall supersede or modify
|
|
136
|
-
the terms of any separate license agreement you may have executed
|
|
137
|
-
with Licensor regarding such Contributions.
|
|
138
|
-
|
|
139
|
-
6. Trademarks. This License does not grant permission to use the trade
|
|
140
|
-
names, trademarks, service marks, or product names of the Licensor,
|
|
141
|
-
except as required for reasonable and customary use in describing the
|
|
142
|
-
origin of the Work and reproducing the content of the NOTICE file.
|
|
143
|
-
|
|
144
|
-
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
145
|
-
agreed to in writing, Licensor provides the Work (and each
|
|
146
|
-
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
147
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
148
|
-
implied, including, without limitation, any warranties or conditions
|
|
149
|
-
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
150
|
-
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
151
|
-
appropriateness of using or redistributing the Work and assume any
|
|
152
|
-
risks associated with Your exercise of permissions under this License.
|
|
153
|
-
|
|
154
|
-
8. Limitation of Liability. In no event and under no legal theory,
|
|
155
|
-
whether in tort (including negligence), contract, or otherwise,
|
|
156
|
-
unless required by applicable law (such as deliberate and grossly
|
|
157
|
-
negligent acts) or agreed to in writing, shall any Contributor be
|
|
158
|
-
liable to You for damages, including any direct, indirect, special,
|
|
159
|
-
incidental, or consequential damages of any character arising as a
|
|
160
|
-
result of this License or out of the use or inability to use the
|
|
161
|
-
Work (including but not limited to damages for loss of goodwill,
|
|
162
|
-
work stoppage, computer failure or malfunction, or any and all
|
|
163
|
-
other commercial damages or losses), even if such Contributor
|
|
164
|
-
has been advised of the possibility of such damages.
|
|
165
|
-
|
|
166
|
-
9. Accepting Warranty or Additional Liability. While redistributing
|
|
167
|
-
the Work or Derivative Works thereof, You may choose to offer,
|
|
168
|
-
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
169
|
-
or other liability obligations and/or rights consistent with this
|
|
170
|
-
License. However, in accepting such obligations, You may act only
|
|
171
|
-
on Your own behalf and on Your sole responsibility, not on behalf
|
|
172
|
-
of any other Contributor, and only if You agree to indemnify,
|
|
173
|
-
defend, and hold each Contributor harmless for any liability
|
|
174
|
-
incurred by, or claims asserted against, such Contributor by reason
|
|
175
|
-
of your accepting any such warranty or additional liability.
|
|
176
|
-
|
|
177
|
-
END OF TERMS AND CONDITIONS
|
|
178
|
-
|
|
179
|
-
Copyright 2024 Yein Sung
|
|
180
|
-
|
|
181
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
182
|
-
you may not use this file except in compliance with the License.
|
|
183
|
-
You may obtain a copy of the License at
|
|
184
|
-
|
|
185
|
-
http://www.apache.org/licenses/LICENSE-2.0
|
|
186
|
-
|
|
187
|
-
Unless required by applicable law or agreed to in writing, software
|
|
188
|
-
distributed under the License is distributed on an "AS IS" BASIS,
|
|
189
|
-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
190
|
-
See the License for the specific language governing permissions and
|
|
191
|
-
limitations under the License.
|
package/README.md
DELETED
|
@@ -1,182 +0,0 @@
|
|
|
1
|
-
<p align="center">
|
|
2
|
-
<img src="https://github.com/syi0808/pubm/blob/main/docs/logo.svg" height="150">
|
|
3
|
-
</p>
|
|
4
|
-
|
|
5
|
-
<p align="center">
|
|
6
|
-
<a href="https://www.npmjs.com/package/pubm">
|
|
7
|
-
<img src="https://img.shields.io/npm/v/pubm" alt="npm version" />
|
|
8
|
-
</a>
|
|
9
|
-
<a href="https://jsr.io/@pubm/pubm">
|
|
10
|
-
<img src="https://jsr.io/badges/@pubm/pubm/score" alt="jsr version" />
|
|
11
|
-
</a>
|
|
12
|
-
</p>
|
|
13
|
-
|
|
14
|
-
<h1 align="center">pubm</h1>
|
|
15
|
-
|
|
16
|
-
<p align="center">
|
|
17
|
-
A publish orchestrator for multi-registry, multi-ecosystem packages.
|
|
18
|
-
</p>
|
|
19
|
-
|
|
20
|
-
<p align="center">
|
|
21
|
-
<img src="https://github.com/syi0808/pubm/blob/main/docs/demo.gif" width="100%">
|
|
22
|
-
</p>
|
|
23
|
-
|
|
24
|
-
## Why pubm exists
|
|
25
|
-
|
|
26
|
-
It started with a simple problem: publishing a package to both npm and jsr at the same time. There was no tool that did this well. You either wrote shell scripts chaining multiple publish commands, or you cobbled together plugins on top of a release tool that was never designed for it.
|
|
27
|
-
|
|
28
|
-
But the real issue is bigger than npm + jsr. The JavaScript ecosystem now has multiple registries. Rust packages live alongside TypeScript ones in the same monorepo. A single "release" might mean publishing to npm, jsr, crates.io, and a private registry — all at once, all atomically, with proper rollback if any of them fails.
|
|
29
|
-
|
|
30
|
-
Most release tools are built around a different assumption: one package, one registry, one ecosystem. Multi-registry support, if it exists, is bolted on through plugins or post-publish scripts. That works until it doesn't — and when it breaks mid-publish, you're left in a half-released state cleaning up manually.
|
|
31
|
-
|
|
32
|
-
pubm treats multi-registry publishing as a first-class orchestration problem. Not an afterthought, not a plugin. The core pipeline is designed around the idea that a release is a transaction across multiple targets, and it should either succeed everywhere or roll back cleanly.
|
|
33
|
-
|
|
34
|
-
## What pubm does differently
|
|
35
|
-
|
|
36
|
-
### Multi-registry from the ground up
|
|
37
|
-
|
|
38
|
-
npm, jsr, crates.io, and custom npm-compatible registries are all built into the core. Publishing to multiple registries isn't a special case — it's the default path. They run concurrently where possible, sequentially where dependencies require it.
|
|
39
|
-
|
|
40
|
-
```bash
|
|
41
|
-
pubm patch --registry npm,jsr,https://registry.example.com
|
|
42
|
-
```
|
|
43
|
-
|
|
44
|
-
### Multi-ecosystem
|
|
45
|
-
|
|
46
|
-
pubm understands both JavaScript and Rust. It reads `package.json` and `Cargo.toml`, handles ecosystem-specific versioning conventions, and manages inter-crate dependencies in Rust monorepos. More ecosystems can be added through plugins.
|
|
47
|
-
|
|
48
|
-
### Safety that doesn't get in the way
|
|
49
|
-
|
|
50
|
-
Before publishing anything, pubm validates: branch rules, clean working tree, remote sync, registry availability, login status, and publish permissions. If something is going to fail, it fails before any side effects happen.
|
|
51
|
-
|
|
52
|
-
If a publish does fail partway through, pubm automatically rolls back git commits, tags, and stashes. You don't end up with a tagged commit that was never actually published.
|
|
53
|
-
|
|
54
|
-
The `--preflight` flag takes this further — it simulates your entire CI publish pipeline locally, including token validation, without actually publishing. Fix problems before you push.
|
|
55
|
-
|
|
56
|
-
```bash
|
|
57
|
-
pubm --preflight
|
|
58
|
-
```
|
|
59
|
-
|
|
60
|
-
### Interactive when you're there, headless when you're not
|
|
61
|
-
|
|
62
|
-
pubm detects whether it's running in an interactive terminal or CI. In a terminal, it prompts for version selection and OTP codes. In CI, prompts are disabled automatically and it uses `NODE_AUTH_TOKEN` with provenance publish for npm 2FA.
|
|
63
|
-
|
|
64
|
-
No flags to remember. No separate CI config. Same command, both environments.
|
|
65
|
-
|
|
66
|
-
## Quick Start
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
|
-
npm i -g pubm
|
|
70
|
-
|
|
71
|
-
# Preview what would happen
|
|
72
|
-
pubm patch --preview
|
|
73
|
-
|
|
74
|
-
# Publish for real
|
|
75
|
-
pubm patch
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
## Core Workflow
|
|
79
|
-
|
|
80
|
-
### Single package
|
|
81
|
-
|
|
82
|
-
```bash
|
|
83
|
-
# Create a changeset describing your changes
|
|
84
|
-
pubm add
|
|
85
|
-
|
|
86
|
-
# Consume changesets, bump version, generate changelog
|
|
87
|
-
pubm version
|
|
88
|
-
|
|
89
|
-
# Publish to configured registries
|
|
90
|
-
pubm patch
|
|
91
|
-
```
|
|
92
|
-
|
|
93
|
-
### Monorepo
|
|
94
|
-
|
|
95
|
-
pubm detects pnpm, yarn, and npm workspaces automatically. Packages are published in dependency order, and version bumps can be coordinated across groups.
|
|
96
|
-
|
|
97
|
-
```bash
|
|
98
|
-
# Same commands — pubm handles workspace discovery
|
|
99
|
-
pubm add
|
|
100
|
-
pubm version
|
|
101
|
-
pubm patch
|
|
102
|
-
```
|
|
103
|
-
|
|
104
|
-
### Pre-releases and snapshots
|
|
105
|
-
|
|
106
|
-
```bash
|
|
107
|
-
# Enter pre-release mode
|
|
108
|
-
pubm pre enter beta
|
|
109
|
-
pubm version # → 1.2.0-beta.0, 1.2.0-beta.1, ...
|
|
110
|
-
pubm pre exit
|
|
111
|
-
|
|
112
|
-
# One-off snapshot releases
|
|
113
|
-
pubm snapshot # → 0.0.0-snapshot-20260309T123456
|
|
114
|
-
```
|
|
115
|
-
|
|
116
|
-
## Configuration and Plugins
|
|
117
|
-
|
|
118
|
-
Configure pubm through `pubm.config.ts`:
|
|
119
|
-
|
|
120
|
-
```ts
|
|
121
|
-
import { defineConfig } from "pubm";
|
|
122
|
-
|
|
123
|
-
export default defineConfig({
|
|
124
|
-
plugins: [
|
|
125
|
-
{
|
|
126
|
-
name: "my-plugin",
|
|
127
|
-
hooks: {
|
|
128
|
-
beforePublish: async (ctx) => {
|
|
129
|
-
console.log(`Publishing v${ctx.version}...`);
|
|
130
|
-
},
|
|
131
|
-
afterPublish: async (ctx) => {
|
|
132
|
-
await notifySlack(`Released v${ctx.version}`);
|
|
133
|
-
},
|
|
134
|
-
onError: async (ctx, error) => {
|
|
135
|
-
await alertTeam(error);
|
|
136
|
-
},
|
|
137
|
-
},
|
|
138
|
-
},
|
|
139
|
-
],
|
|
140
|
-
});
|
|
141
|
-
```
|
|
142
|
-
|
|
143
|
-
Plugins can hook into any stage of the pipeline (`beforeTest`, `afterBuild`, `beforePublish`, `onRollback`, `onSuccess`, etc.) and can register custom `Registry` and `Ecosystem` implementations for additional language ecosystems.
|
|
144
|
-
|
|
145
|
-
See `pubm --help` or the [CLI reference](./docs/cli.md) for the full option list.
|
|
146
|
-
|
|
147
|
-
## Commands
|
|
148
|
-
|
|
149
|
-
| Command | Purpose |
|
|
150
|
-
|---------|---------|
|
|
151
|
-
| `pubm init` | Initialize pubm configuration |
|
|
152
|
-
| `pubm add` | Create a changeset describing your changes |
|
|
153
|
-
| `pubm version` | Consume changesets, bump versions, generate changelog |
|
|
154
|
-
| `pubm status` | Show pending changesets and their impact |
|
|
155
|
-
| `pubm pre enter/exit <tag>` | Enter or exit pre-release mode |
|
|
156
|
-
| `pubm snapshot [tag]` | Create a snapshot release |
|
|
157
|
-
| `pubm secrets sync` | Sync registry tokens to GitHub Secrets |
|
|
158
|
-
| `pubm update` | Update pubm to the latest version |
|
|
159
|
-
|
|
160
|
-
---
|
|
161
|
-
|
|
162
|
-
## FAQ
|
|
163
|
-
|
|
164
|
-
### How are registry tokens stored?
|
|
165
|
-
|
|
166
|
-
pubm stores tokens in your OS native keychain (macOS Keychain, Windows Credential Manager, Linux Secret Service) via `@napi-rs/keyring`. Environment variables always take priority over stored tokens. If the keychain is unavailable, tokens are encrypted with AES-256-CBC as a fallback.
|
|
167
|
-
|
|
168
|
-
If you prefer not to save tokens, use `--no-save-token` to be prompted each time.
|
|
169
|
-
|
|
170
|
-
---
|
|
171
|
-
|
|
172
|
-
## Contributing
|
|
173
|
-
|
|
174
|
-
Contributions are welcome. Please read the [Contributing Guide](CONTRIBUTING.md) before submitting a pull request.
|
|
175
|
-
|
|
176
|
-
## License
|
|
177
|
-
|
|
178
|
-
This project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.
|
|
179
|
-
|
|
180
|
-
## Author
|
|
181
|
-
|
|
182
|
-
**Yein Sung** — [GitHub](https://github.com/syi0808)
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,8 +0,0 @@
|
|
|
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";
|
|
@@ -1,11 +0,0 @@
|
|
|
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;
|
|
@@ -1,12 +0,0 @@
|
|
|
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;
|