Skip to content
Open
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
11 changes: 6 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,22 +4,23 @@ on:
release:
types:
- published

permissions:
contents: read
jobs:
release:
if: ${{ github.repository_owner == 'cloudflare' }}
name: Publishing to npmjs registry
runs-on: ubuntu-latest
steps:
- name: Checking out
uses: actions/checkout@v4
uses: actions/checkout@v5
with:
fetch-depth: 0

- name: Use Node.js v20
uses: actions/setup-node@v4
- name: Use Node.js v22
uses: actions/setup-node@v6
with:
node-version: 20
node-version: 22
# registry-url is required to correctly setup authentication per https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages#publishing-packages-to-the-npm-registry
registry-url: 'https://registry.npmjs.org'
cache: 'npm'
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/semgrep.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ on:
schedule:
- cron: '0 0 * * *'
name: Semgrep config
permissions:
contents: read
jobs:
semgrep:
name: semgrep/ci
Expand All @@ -20,5 +22,5 @@ jobs:
container:
image: returntocorp/semgrep
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5
- run: semgrep ci --verbose
15 changes: 8 additions & 7 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ on:
pull_request:
branches:
- main

permissions:
contents: read
jobs:
testing:
name: Testing on Node v${{ matrix.node }} / CRYPTO_PROVIDER_ARG_REQUIRED=${{ matrix.crypto_arg_required }}
Expand All @@ -18,10 +19,10 @@ jobs:
crypto_arg_required: [ true, false ]
steps:
- name: Checking out
uses: actions/checkout@v4
uses: actions/checkout@v5

- name: Use Node.js v${{ matrix.node }}
uses: actions/setup-node@v4
uses: actions/setup-node@v6
with:
node-version: ${{ matrix.node }}
cache: 'npm'
Expand Down Expand Up @@ -59,12 +60,12 @@ jobs:
security-events: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
uses: actions/checkout@v5
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@v4
with:
languages: javascript-typescript
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@v4
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@v4
2 changes: 1 addition & 1 deletion bench/group.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import type Benchmark from 'benchmark'
import type { CryptoProvider } from '../src/cryptoTypes.js'

function asyncFn(call: CallableFunction) {
function asyncFn(call: () => Promise<unknown>) {
return {
defer: true,
async fn(df: Benchmark.Deferred) {
Expand Down
4 changes: 2 additions & 2 deletions bench/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@ async function bench(provider: CryptoProvider) {

return new Promise<unknown>((resolve, reject) => {
bs.on('cycle', (ev: Benchmark.Event) => {
console.log(`${provider.id}/${String(ev.target)}`)
console.log(`${provider.id}/${String(ev.target.name)}`)
})
bs.on('error', (event: Benchmark.Event) => {
bs.abort()
reject(new Error(`error: ${String(event.target)}`))
reject(new Error(`error: ${String(event.target.name)}`))
})
bs.on('complete', resolve)

Expand Down
2 changes: 1 addition & 1 deletion bench/oprf.bench.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {

import type Benchmark from 'benchmark'

function asyncFn(call: CallableFunction) {
function asyncFn(call: () => Promise<unknown>) {
return {
defer: true,
async fn(df: Benchmark.Deferred) {
Expand Down
Loading