Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,22 +3,22 @@ name: Node.js CI
on: [push]

jobs:
# test-node:
# runs-on: ubuntu-latest
# strategy:
# matrix:
# node-version: [18.x]
# steps:
# - uses: actions/checkout@v2
# - name: Use Node.js ${{ matrix.node-version }}
# uses: actions/setup-node@v1
# with:
# node-version: ${{ matrix.node-version }}
# - run: npm install
# - name: Run test with Node.js ${{ matrix.node-version }}
# run: npm run test-node
# env:
# CI: true
test-node:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- run: npm install
- name: Run test with Node.js ${{ matrix.node-version }}
run: npm run test-node
env:
CI: true
lint:
runs-on: ubuntu-latest
strategy:
Expand Down
14 changes: 9 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
"prepare": "npm run build",
"rebuild": "npm run clear && npm run build",
"test": "npm run lint && npm run test-node",
"test-node": "npx tsx --test test/*.spec.ts"
"test-node": "tsc -p tsconfig.spec.json && mocha \"dist/test/**/*.spec.js\""
},
"homepage": "https://github.com/digitalcredentials/bnid",
"repository": {
Expand Down Expand Up @@ -45,9 +45,9 @@
"@types/mocha": "^10.0.1",
"@types/node": "^22.14.1",
"cross-env": "^7.0.3",
"mocha": "^10.2.0",
"mocha": "^11.7.2",
"rimraf": "^3.0.2",
"ts-node": "^10.9.1",
"ts-node": "^10.9.2",
"ts-standard": "^12.0.2",
"typescript": "^5.8.3",
"tsx": "^4.19.4"
Expand All @@ -74,12 +74,16 @@
"node": ">=18"
},
"ts-standard": {
"env": [ "mocha" ],
"env": [
"mocha"
],
"ignore": [
"dist",
"test"
],
"globals": [ "it"]
"globals": [
"it"
]
},
"keywords": [
"id",
Expand Down
4 changes: 4 additions & 0 deletions src/declarations.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,5 @@
declare module 'chai'
declare module 'assert'
declare module 'assert/strict'
declare module 'node:assert'
declare module 'node:assert/strict'
4 changes: 2 additions & 2 deletions src/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ export function bytesToHex (bytes: Uint8Array): string {
return Buffer.from(bytes).toString('hex')
}

export function bytesFromHex (hex: string): Buffer {
return Buffer.from(hex, 'hex')
export function bytesFromHex (hex: string): Uint8Array {
return new Uint8Array(Buffer.from(hex, 'hex'))
}
Loading