Skip to content

Commit 61ee3ad

Browse files
update readme
1 parent 9183ab0 commit 61ee3ad

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,35 @@ Zstandard compression library for Node.js
1010
npm install @mongodb-js/zstd
1111
```
1212

13+
### Release Integrity
14+
15+
Releases are created automatically and signed using the [Node team's GPG key](https://pgp.mongodb.com/node-driver.asc). This applies to the git tag as well as all release packages provided as part of a GitHub release. To verify the provided packages, download the key and import it using gpg:
16+
17+
```
18+
gpg --import node-driver.asc
19+
```
20+
21+
The GitHub release contains a detached signature file for the NPM package (named
22+
`mongodb-js-zstd-X.Y.Z.tgz.sig`).
23+
24+
The following command returns the link npm package.
25+
```shell
26+
npm view @mongodb-js/zstd@vX.Y.Z dist.tarball
27+
```
28+
29+
Using the result of the above command, a `curl` command can return the official npm package for the release.
30+
31+
To verify the integrity of the downloaded package, run the following command:
32+
```shell
33+
gpg --verify mongodb-js-zstd-X.Y.Z.tgz.sig mongodb-js-zstd-X.Y.Z.tgz
34+
```
35+
36+
>[!Note]
37+
No verification is done when using npm to install the package. The contents of the Github tarball and npm's tarball are identical.
38+
39+
To verify the native `.node` packages, follow the same steps as above using `mongodb-js-zstd-X.Y.Z-platform.tgz` and the corresponding `.sig` file.
40+
41+
1342
## OS Support matrix
1443

1544
| | node12 | node14 | node16 | node18 | node20 |
@@ -72,6 +101,11 @@ import { compress, decompress } from '@mongodb-js/zstd';
72101

73102
## Running Tests
74103

104+
First, install and build the zstd library:
105+
106+
`npm run install-zstd`
107+
108+
Then:
75109
`npm test`
76110

77111
## Releasing

0 commit comments

Comments
 (0)