@dk/hipp 0.1.22 â 0.1.24
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 +12 -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.24
|
|
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.24",
|
|
248
|
+
"revision": "5e933090af3b384fe51e114207ea240f0124d0a1",
|
|
249
|
+
"hash": "588c38d438bdc3aa7e8ffa9f5805b4542e65789daa113d8c7f78c3ecc31884fc",
|
|
250
|
+
"signature": "LGsyEmAATa79Z8TbPl5xjGMUBTJO7A1jpq+2/XvO8M6u/RNdUGntfb03T8jjc/l9K0XxNCaVmC/pYIZhBB8rDQ==",
|
|
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,13 @@ 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
|
+
const displayHipp = hippVer === '0.0.0' ? tagVersion : hippVer;
|
|
579
|
+
if (hippVer) parts.push(`hipp: ${displayHipp}`);
|
|
580
|
+
if (npmVer) parts.push(`npm: ${npmVer}`);
|
|
581
|
+
if (nodeVer) parts.push(`node: ${nodeVer}`);
|
|
582
|
+
log.info(`âšī¸ ${parts.join(' | ')}`);
|
|
578
583
|
}
|
|
579
584
|
} finally {
|
|
580
585
|
fs.rmSync(tmpDir, { recursive: true, force: true });
|
|
@@ -677,6 +682,9 @@ async function run() {
|
|
|
677
682
|
const revision = refInfo.head;
|
|
678
683
|
const npmVersion = runCmd('npm', ['--version']).stdout.trim();
|
|
679
684
|
const nodeVersion = process.version;
|
|
685
|
+
const hippPkgPath = path.join(path.dirname(process.argv[1]), 'package.json');
|
|
686
|
+
const hippPkg = JSON.parse(fs.readFileSync(hippPkgPath, 'utf8'));
|
|
687
|
+
const hippVersion = hippPkg.version;
|
|
680
688
|
const originUrl = provenance.remoteUrl;
|
|
681
689
|
const dataToSign = buildSignData(tarballHash, originUrl, rawTag, revision, name, email);
|
|
682
690
|
const signature = signContent(dataToSign, privateKey);
|
|
@@ -691,6 +699,7 @@ async function run() {
|
|
|
691
699
|
email: email,
|
|
692
700
|
npm: npmVersion,
|
|
693
701
|
node: nodeVersion,
|
|
702
|
+
hipp: hippVersion,
|
|
694
703
|
};
|
|
695
704
|
|
|
696
705
|
stagedReadme = stagedReadme.trimEnd() + '\n\n## Verify\n\n' +
|