@dk/hipp 0.1.22 â 0.1.23
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/README.md +26 -7
- package/hipp.js +11 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -44,10 +44,27 @@ stays clean, and your registry package is guaranteed to match your Git tag.
|
|
|
44
44
|
### Tag and Publish
|
|
45
45
|
|
|
46
46
|
```bash
|
|
47
|
+
git commit -m "Release"
|
|
47
48
|
git tag v1.0.0
|
|
49
|
+
git push origin main --tags
|
|
48
50
|
npx @dk/hipp
|
|
49
51
|
```
|
|
50
52
|
|
|
53
|
+
The tag and commit **must be pushed to origin** before running HIPP. HIPP verifies the
|
|
54
|
+
tag exists on the remote and that HEAD matches the upstream branch.
|
|
55
|
+
|
|
56
|
+
Use `-y` to skip confirmation (for CI):
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
npx @dk/hipp --yes
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Pass npm options via `--`:
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
npx @dk/hipp -- --access public --tag beta
|
|
66
|
+
```
|
|
67
|
+
|
|
51
68
|
HIPP will:
|
|
52
69
|
|
|
53
70
|
1. **Key Generation**: Generate Ed25519 signing keys if needed (`hipp.priv`, `hipp.pub`)
|
|
@@ -115,7 +132,8 @@ The manifest contains:
|
|
|
115
132
|
"name": "Jane Developer",
|
|
116
133
|
"email": "jane@example.com",
|
|
117
134
|
"npm": "10.2.4",
|
|
118
|
-
"node": "v20.11.0"
|
|
135
|
+
"node": "v20.11.0",
|
|
136
|
+
"hipp": "0.1.22"
|
|
119
137
|
}
|
|
120
138
|
```
|
|
121
139
|
|
|
@@ -220,19 +238,20 @@ PERFORMANCE OF THIS SOFTWARE.
|
|
|
220
238
|
Verify this package with [@dk/hipp](https://www.npmjs.com/package/@dk/hipp):
|
|
221
239
|
|
|
222
240
|
```bash
|
|
223
|
-
npx @dk/hipp verify @dk/hipp@0.1.
|
|
241
|
+
npx @dk/hipp verify @dk/hipp@0.1.23
|
|
224
242
|
```
|
|
225
243
|
|
|
226
244
|
```json
|
|
227
245
|
{
|
|
228
246
|
"origin": "git@github.com:dmytri/hipp.git",
|
|
229
|
-
"tag": "v0.1.
|
|
230
|
-
"revision": "
|
|
231
|
-
"hash": "
|
|
232
|
-
"signature": "
|
|
247
|
+
"tag": "v0.1.23",
|
|
248
|
+
"revision": "5f94c47e1a6858a6e74ae10c0727cd481e22fb04",
|
|
249
|
+
"hash": "2945f93a1fb565f0806a4f924cfeb8509e5dd9714f814eaa22e763ac8d3d3935",
|
|
250
|
+
"signature": "KfyYgmbwMWesEXaTxRydY+9P96rjfCLU+H9B3bVmJ4to3oGsioYeVLDG2B4GYiJRRh49bSwh8MnRoHfpF/s8DA==",
|
|
233
251
|
"name": "Dmytri Kleiner",
|
|
234
252
|
"email": "dev@dmytri.to",
|
|
235
253
|
"npm": "11.12.1",
|
|
236
|
-
"node": "v25.8.2"
|
|
254
|
+
"node": "v25.8.2",
|
|
255
|
+
"hipp": "0.0.0"
|
|
237
256
|
}
|
|
238
257
|
```
|
package/hipp.js
CHANGED
|
@@ -483,7 +483,7 @@ async function runVerify(packageSpec) {
|
|
|
483
483
|
fail(`â Manifest not found or invalid in README`);
|
|
484
484
|
}
|
|
485
485
|
|
|
486
|
-
const { origin: originUrl, tag, revision, signature, name, email, npm: npmVer, node: nodeVer } = manifest;
|
|
486
|
+
const { origin: originUrl, tag, revision, signature, name, email, npm: npmVer, node: nodeVer, hipp: hippVer } = manifest;
|
|
487
487
|
|
|
488
488
|
log.info(`đŋ Cloning git origin at tag ${tag}...`);
|
|
489
489
|
const tmpDir = fs.mkdtempSync(path.join(os.tmpdir(), `hipp-verify-git-`));
|
|
@@ -573,8 +573,12 @@ async function runVerify(packageSpec) {
|
|
|
573
573
|
log.info(`đ Publisher: ${name} <${email}>`);
|
|
574
574
|
log.info(`đ Origin: ${originUrl}`);
|
|
575
575
|
log.info(`đ Tag: ${tag}`);
|
|
576
|
-
if (npmVer
|
|
577
|
-
|
|
576
|
+
if (npmVer || nodeVer || hippVer) {
|
|
577
|
+
const parts = [];
|
|
578
|
+
if (hippVer) parts.push(`hipp: ${hippVer}`);
|
|
579
|
+
if (npmVer) parts.push(`npm: ${npmVer}`);
|
|
580
|
+
if (nodeVer) parts.push(`node: ${nodeVer}`);
|
|
581
|
+
log.info(`âšī¸ ${parts.join(' | ')}`);
|
|
578
582
|
}
|
|
579
583
|
} finally {
|
|
580
584
|
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
@@ -677,6 +681,9 @@ async function run() {
|
|
|
677
681
|
const revision = refInfo.head;
|
|
678
682
|
const npmVersion = runCmd('npm', ['--version']).stdout.trim();
|
|
679
683
|
const nodeVersion = process.version;
|
|
684
|
+
const hippPkgPath = path.join(path.dirname(process.argv[1]), 'package.json');
|
|
685
|
+
const hippPkg = JSON.parse(fs.readFileSync(hippPkgPath, 'utf8'));
|
|
686
|
+
const hippVersion = hippPkg.version;
|
|
680
687
|
const originUrl = provenance.remoteUrl;
|
|
681
688
|
const dataToSign = buildSignData(tarballHash, originUrl, rawTag, revision, name, email);
|
|
682
689
|
const signature = signContent(dataToSign, privateKey);
|
|
@@ -691,6 +698,7 @@ async function run() {
|
|
|
691
698
|
email: email,
|
|
692
699
|
npm: npmVersion,
|
|
693
700
|
node: nodeVersion,
|
|
701
|
+
hipp: hippVersion,
|
|
694
702
|
};
|
|
695
703
|
|
|
696
704
|
stagedReadme = stagedReadme.trimEnd() + '\n\n## Verify\n\n' +
|