Skip to content

Commit 4d7b22f

Browse files
committed
Switch from terser to esbuild for build:release
1 parent 3a797ca commit 4d7b22f

File tree

5 files changed

+499
-14
lines changed

5 files changed

+499
-14
lines changed

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@ on:
44
types: [created]
55
jobs:
66
release-js:
7-
name: "jsbt v0.3.1" # Should match commit below
8-
uses: paulmillr/jsbt/.github/workflows/release.yml@c45f03360e0171b138f04568d2fdd35d7bbc0d35
7+
name: "jsbt v0.3.3" # Should match commit below
8+
uses: paulmillr/jsbt/.github/workflows/release.yml@c9a9f2cd6b4841aa3117b174e9ea468b1650e5ea
99
secrets:
1010
NPM_PUBLISH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN }}
1111
permissions:
1212
contents: write
1313
id-token: write
14+
attestations: write

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,8 @@ Use low-level libraries & languages.
278278

279279
- **Commits** are signed with PGP keys, to prevent forgery. Make sure to verify commit signatures
280280
- **Releases** are transparent and built on GitHub CI. Make sure to verify [provenance](https://docs.npmjs.com/generating-provenance-statements) logs
281+
- Use GitHub CLI to verify single-file builds:
282+
`gh attestation verify --owner paulmillr noble-secp256k1.js`
281283
- **Rare releasing** is followed to ensure less re-audit need for end-users
282284
- **Dependencies** are minimized and locked-down: any dependency could get hacked and users will be downloading malware with every install.
283285
- We make sure to use as few dependencies as possible

package.json

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,8 @@
1414
"sideEffects": false,
1515
"scripts": {
1616
"build": "tsc",
17-
"build:min": "cd test/build; npm install; npm run terser",
18-
"build:mingz": "npm run --silent build:min | gzip -c8",
19-
"build:release": "npm run --silent build:min > test/build/noble-secp256k1.min.js; npm run --silent build:mingz > test/build/noble-secp256k1.min.js.gz",
17+
"build:release": "npx jsbt esbuild test/build",
18+
"build:smaller": "cd test/build; npm install terser@5.29.2; terser --ecma 2020 -m -c < ../../index.js",
2019
"test": "node test/index.js",
2120
"test:bun": "bun test/index.js",
2221
"test:deno": "deno --allow-env --allow-read test/index.js",

0 commit comments

Comments
 (0)