@gonkagate/claude-code 0.2.0 → 0.2.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.
- package/CHANGELOG.md +11 -0
- package/package.json +1 -1
- package/scripts/publish-alias-package.mjs +51 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
## Unreleased
|
|
4
4
|
|
|
5
|
+
- Made local alias package bootstrap publish without npm provenance because provenance requires a supported CI/OIDC provider.
|
|
6
|
+
- Made alias package publishing skip cleanly until `@gonkagate/claude-code-setup` is bootstrapped on npm, with an explicit override for the first package publish.
|
|
5
7
|
- Added `@gonkagate/claude-code-setup` as a setup-style alias for the existing Claude Code installer.
|
|
6
8
|
- Improved npm package metadata and README copy for better package-page clarity, discovery, and onboarding.
|
|
7
9
|
- Added a curated model registry and model picker to the public installer flow.
|
|
@@ -18,6 +20,15 @@
|
|
|
18
20
|
- Restored automated npm publish dispatch after Release Please creates a new release tag.
|
|
19
21
|
- Made publish reruns skip versions that are already present on npm instead of failing with a duplicate-version error.
|
|
20
22
|
|
|
23
|
+
## [0.2.1](https://github.com/GonkaGate/gonkagate-claude-code/compare/v0.2.0...v0.2.1) (2026-04-13)
|
|
24
|
+
|
|
25
|
+
|
|
26
|
+
### Bug Fixes
|
|
27
|
+
|
|
28
|
+
* allow alias publish bootstrap override ([423e3b3](https://github.com/GonkaGate/gonkagate-claude-code/commit/423e3b32e9d604586624296848db3ea1923a7110))
|
|
29
|
+
* omit provenance for local alias bootstrap ([9529587](https://github.com/GonkaGate/gonkagate-claude-code/commit/95295871b2b37f2742fbe76af3193c1ee8cd2e2f))
|
|
30
|
+
* skip alias publish before npm bootstrap ([f4c4c2a](https://github.com/GonkaGate/gonkagate-claude-code/commit/f4c4c2aaad7cf1c0584d5bcd88751e63e2ffb8da))
|
|
31
|
+
|
|
21
32
|
## [0.2.0](https://github.com/GonkaGate/gonkagate-claude-code/compare/v0.1.3...v0.2.0) (2026-04-13)
|
|
22
33
|
|
|
23
34
|
|
package/package.json
CHANGED
|
@@ -8,6 +8,14 @@ import { fileURLToPath } from "node:url";
|
|
|
8
8
|
const ALIAS_PACKAGE_NAME = "@gonkagate/claude-code-setup";
|
|
9
9
|
const ALIAS_BIN_NAME = "claude-code-setup";
|
|
10
10
|
const dryRun = process.argv.includes("--dry-run");
|
|
11
|
+
const allowCreatePackage = process.argv.includes("--allow-create-package")
|
|
12
|
+
|| process.env.ALLOW_ALIAS_PACKAGE_CREATE === "1";
|
|
13
|
+
const requireExistingPackage = process.argv.includes("--require-package")
|
|
14
|
+
|| process.env.REQUIRE_ALIAS_PACKAGE === "1";
|
|
15
|
+
const disableProvenance = process.argv.includes("--no-provenance")
|
|
16
|
+
|| process.env.DISABLE_ALIAS_PACKAGE_PROVENANCE === "1";
|
|
17
|
+
const canUseGitHubActionsProvenance = process.env.GITHUB_ACTIONS === "true"
|
|
18
|
+
&& process.env.ACTIONS_ID_TOKEN_REQUEST_TOKEN !== undefined;
|
|
11
19
|
|
|
12
20
|
const scriptDir = dirname(fileURLToPath(import.meta.url));
|
|
13
21
|
const repoRoot = resolve(scriptDir, "..");
|
|
@@ -28,20 +36,30 @@ function run(command, args, options = {}) {
|
|
|
28
36
|
}
|
|
29
37
|
}
|
|
30
38
|
|
|
31
|
-
function
|
|
32
|
-
|
|
39
|
+
function isNpmNotFound(output) {
|
|
40
|
+
return output.includes("E404") || output.includes("404 Not Found");
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function npmView(args) {
|
|
44
|
+
const result = spawnSync("npm", ["view", ...args], {
|
|
33
45
|
cwd: repoRoot,
|
|
34
46
|
encoding: "utf8",
|
|
35
47
|
stdio: ["ignore", "pipe", "pipe"]
|
|
36
48
|
});
|
|
37
49
|
|
|
38
50
|
if (result.status === 0) {
|
|
39
|
-
return
|
|
51
|
+
return {
|
|
52
|
+
exists: true,
|
|
53
|
+
output: result.stdout
|
|
54
|
+
};
|
|
40
55
|
}
|
|
41
56
|
|
|
42
57
|
const output = `${result.stdout}\n${result.stderr}`;
|
|
43
|
-
if (
|
|
44
|
-
return
|
|
58
|
+
if (isNpmNotFound(output)) {
|
|
59
|
+
return {
|
|
60
|
+
exists: false,
|
|
61
|
+
output
|
|
62
|
+
};
|
|
45
63
|
}
|
|
46
64
|
|
|
47
65
|
process.stdout.write(result.stdout);
|
|
@@ -49,6 +67,14 @@ function isPublished(packageName, version) {
|
|
|
49
67
|
process.exit(result.status ?? 1);
|
|
50
68
|
}
|
|
51
69
|
|
|
70
|
+
function canViewPackage(packageName) {
|
|
71
|
+
return npmView([packageName, "name"]).exists;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
function isVersionPublished(packageName, version) {
|
|
75
|
+
return npmView([`${packageName}@${version}`, "version"]).exists;
|
|
76
|
+
}
|
|
77
|
+
|
|
52
78
|
async function assertExists(path) {
|
|
53
79
|
await access(path, fsConstants.R_OK);
|
|
54
80
|
}
|
|
@@ -56,7 +82,23 @@ async function assertExists(path) {
|
|
|
56
82
|
const rootPackage = JSON.parse(await readFile(join(repoRoot, "package.json"), "utf8"));
|
|
57
83
|
const packageVersion = rootPackage.version;
|
|
58
84
|
|
|
59
|
-
if (!dryRun &&
|
|
85
|
+
if (!dryRun && !canViewPackage(ALIAS_PACKAGE_NAME)) {
|
|
86
|
+
console.warn(`${ALIAS_PACKAGE_NAME} is not visible on npm yet, or this publisher cannot access it.`);
|
|
87
|
+
|
|
88
|
+
if (allowCreatePackage) {
|
|
89
|
+
console.warn("Attempting first publish because alias package creation was explicitly allowed.");
|
|
90
|
+
} else if (requireExistingPackage) {
|
|
91
|
+
console.warn(`Bootstrap ${ALIAS_PACKAGE_NAME} on npm and configure Trusted Publishing for this workflow, then rerun npm run publish:alias.`);
|
|
92
|
+
console.warn("Alias package publishing is required for this run, so failing now.");
|
|
93
|
+
process.exit(1);
|
|
94
|
+
} else {
|
|
95
|
+
console.warn(`Bootstrap ${ALIAS_PACKAGE_NAME} on npm and configure Trusted Publishing for this workflow, then rerun npm run publish:alias.`);
|
|
96
|
+
console.warn("Skipping alias publish so the primary @gonkagate/claude-code release can complete.");
|
|
97
|
+
process.exit(0);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
if (!dryRun && isVersionPublished(ALIAS_PACKAGE_NAME, packageVersion)) {
|
|
60
102
|
console.log(`${ALIAS_PACKAGE_NAME}@${packageVersion} is already published; skipping alias publish.`);
|
|
61
103
|
process.exit(0);
|
|
62
104
|
}
|
|
@@ -98,8 +140,10 @@ try {
|
|
|
98
140
|
const publishArgs = ["publish", "--access", "public"];
|
|
99
141
|
if (dryRun) {
|
|
100
142
|
publishArgs.push("--dry-run");
|
|
101
|
-
} else {
|
|
143
|
+
} else if (canUseGitHubActionsProvenance && !disableProvenance) {
|
|
102
144
|
publishArgs.push("--provenance");
|
|
145
|
+
} else {
|
|
146
|
+
console.warn("Publishing without provenance because this is not a GitHub Actions OIDC environment.");
|
|
103
147
|
}
|
|
104
148
|
|
|
105
149
|
run("npm", publishArgs, { cwd: packageRoot });
|