mirror of
https://github.com/emn178/js-sha3.git
synced 2026-08-12 19:41:36 +08:00
### Added
- GitHub Actions CI across Node.js 18, 20, 22, and 24 against the packed npm artifact - GitHub Actions publish workflow on release with npm trusted publishing - `prepack` script to build distributions before `npm pack` / `npm publish` ### Changed - Replace Travis CI with GitHub Actions - Update README badges to GitHub Actions, npm, and jsDelivr - Upgrade mocha and pin vulnerable transitive dependencies via npm overrides
This commit is contained in:
@@ -0,0 +1,77 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- master
|
||||
pull_request:
|
||||
branches:
|
||||
- master
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node 24
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24.x
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Pack npm package
|
||||
run: |
|
||||
mkdir -p package-artifact
|
||||
npm pack --pack-destination package-artifact
|
||||
|
||||
- name: Upload package artifact
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: package-node-24
|
||||
path: package-artifact/*.tgz
|
||||
if-no-files-found: error
|
||||
|
||||
runtime-test:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [18.x, 20.x, 22.x, 24.x]
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Download package artifact
|
||||
uses: actions/download-artifact@v4
|
||||
with:
|
||||
name: package-node-24
|
||||
path: package-artifact
|
||||
|
||||
- name: Extract package artifact
|
||||
run: tar -xzf package-artifact/*.tgz --strip-components=1 -C .
|
||||
|
||||
- name: Run runtime tests
|
||||
if: matrix.node-version != '24.x'
|
||||
run: npm run test:runtime
|
||||
|
||||
- name: Run runtime tests with coverage
|
||||
if: matrix.node-version == '24.x'
|
||||
run: npm run test:coverage
|
||||
|
||||
- name: Upload to coveralls
|
||||
if: matrix.node-version == '24.x'
|
||||
uses: coverallsapp/github-action@v2
|
||||
with:
|
||||
file: ./coverage/lcov.info
|
||||
@@ -0,0 +1,32 @@
|
||||
name: Publish
|
||||
|
||||
on:
|
||||
release:
|
||||
types: [published]
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
id-token: write
|
||||
|
||||
jobs:
|
||||
publish:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 24.x
|
||||
registry-url: https://registry.npmjs.org
|
||||
package-manager-cache: false
|
||||
|
||||
- run: npm ci
|
||||
|
||||
- name: Verify release version
|
||||
run: |
|
||||
PACKAGE_VERSION=$(node -p "require('./package.json').version")
|
||||
test "$GITHUB_REF_NAME" = "v$PACKAGE_VERSION"
|
||||
|
||||
- run: npm run build
|
||||
- run: npm test
|
||||
- run: npm publish
|
||||
@@ -2,6 +2,5 @@
|
||||
/coverage/
|
||||
/.nyc_output/
|
||||
/tests/
|
||||
.travis.yml
|
||||
.npmignore
|
||||
bower.json
|
||||
|
||||
-10
@@ -1,10 +0,0 @@
|
||||
language: node_js
|
||||
node_js:
|
||||
- "6.11.4"
|
||||
- "8.6.0"
|
||||
before_install:
|
||||
- npm install coveralls
|
||||
after_success: npm run coveralls
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
@@ -3,6 +3,14 @@
|
||||
## v0.13.0 / 2026-08-07
|
||||
### Added
|
||||
- ParallelHash128, ParallelHash256, ParallelHashXOF128, and ParallelHashXOF256 (NIST SP 800-185)
|
||||
- GitHub Actions CI across Node.js 18, 20, 22, and 24 against the packed npm artifact
|
||||
- GitHub Actions publish workflow on release with npm trusted publishing
|
||||
- `prepack` script to build distributions before `npm pack` / `npm publish`
|
||||
|
||||
### Changed
|
||||
- Replace Travis CI with GitHub Actions
|
||||
- Update README badges to GitHub Actions, npm, and jsDelivr
|
||||
- Upgrade mocha and pin vulnerable transitive dependencies via npm overrides
|
||||
|
||||
## v0.12.0 / 2026-07-18
|
||||
### Added
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
# js-sha3
|
||||
|
||||
[](https://travis-ci.org/emn178/js-sha3)
|
||||
[](https://coveralls.io/r/emn178/js-sha3?branch=master)
|
||||
[](https://nodei.co/npm/js-sha3/)
|
||||
[](https://github.com/emn178/js-sha3/actions/workflows/ci.yml)
|
||||
[](https://coveralls.io/r/emn178/js-sha3?branch=master)
|
||||
[](https://www.npmjs.com/package/js-sha3)
|
||||
[](https://www.jsdelivr.com/package/npm/js-sha3)
|
||||
|
||||
A simple SHA-3 / Keccak / SHAKE / cSHAKE / KMAC / TupleHash / ParallelHash hash function for JavaScript supports UTF-8 encoding.
|
||||
|
||||
|
||||
Generated
+942
-1118
File diff suppressed because it is too large
Load Diff
+11
-4
@@ -22,17 +22,20 @@
|
||||
"@rollup/plugin-commonjs": "^28.0.5",
|
||||
"@rollup/plugin-terser": "^1.0.0",
|
||||
"expect.js": "~0.3.1",
|
||||
"mocha": "^11.7.6",
|
||||
"nyc": "^15.1.0",
|
||||
"mocha": "^11.8.0",
|
||||
"nyc": "^18.0.0",
|
||||
"rollup": "^4.43.0",
|
||||
"tiny-worker": "^2.3.0",
|
||||
"uglify-js": "^3.1.9"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "nyc mocha tests/node-test.js",
|
||||
"test": "npm run build && npm run test:coverage",
|
||||
"test:runtime": "mocha tests/node-test.js",
|
||||
"test:coverage": "nyc --reporter=text --reporter=html --reporter=lcov mocha tests/node-test.js",
|
||||
"report": "nyc --reporter=html --reporter=text mocha tests/node-test.js",
|
||||
"coveralls": "nyc report --reporter=text-lcov | coveralls",
|
||||
"build": "rollup -c && uglifyjs src/sha3.js -c -m --comments --output build/sha3.min.js"
|
||||
"build": "rollup -c && uglifyjs src/sha3.js -c -m --comments --output build/sha3.min.js",
|
||||
"prepack": "npm run build"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
@@ -61,5 +64,9 @@
|
||||
"exclude": [
|
||||
"tests"
|
||||
]
|
||||
},
|
||||
"overrides": {
|
||||
"diff": "^8.0.3",
|
||||
"serialize-javascript": "^7.0.7"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user