Skip to content

Commit

Permalink
Updated @noble/ciphers package dependency (#791)
Browse files Browse the repository at this point in the history
* Updated @noble/ciphers package dependency
* More debugging and minor doc improvement
  • Loading branch information
thehenrytsai authored Jul 24, 2024
1 parent 80d5663 commit db65d8a
Show file tree
Hide file tree
Showing 14 changed files with 35 additions and 17 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/alpha-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ jobs:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
run: pnpm whoami

- name: Print Node.js, npm, & pnpm versions for debugging if needed
run: |
node -v
npm -v
pnpm -v
- name: Install dependencies
run: pnpm install --frozen-lockfile

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,12 @@ jobs:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm whoami

- name: Print Node.js, npm, & pnpm versions for debugging if needed
run: |
node -v
npm -v
pnpm -v
- name: Install dependencies
run: pnpm install --frozen-lockfile

Expand Down
12 changes: 9 additions & 3 deletions .github/workflows/tests-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,10 +106,16 @@ jobs:
with:
cache: "true"

- name: Print Node.js, npm, & pnpm versions for debugging if needed
run: |
node -v
npm -v
pnpm -v
- name: Install dependencies
run: pnpm install --no-frozen-lockfile

- name: Get Playwright Version (for cache)
- name: Get Playwright version referenced by DIDs package (for cache)
id: get-playwright-version
run: |
PLAYWRIGHT_VERSION=$(pnpm --filter dids ls @playwright/test | grep '@playwright/test' | awk 'NR==1{print $2}')
Expand All @@ -123,11 +129,11 @@ jobs:
path: ~/Library/Caches/ms-playwright
key: ${{ runner.os }}-playwright-${{ env.PLAYWRIGHT_VERSION }}

- name: Install Playwright Browsers (if no cache)
- name: Install Playwright browsers referenced by DIDs package (if no cache)
if: steps.cache-playwright-restore.outputs.cache-hit != 'true'
run: pnpm --filter dids exec playwright install --with-deps

- name: Build esm
- name: Build ESM
run: pnpm --recursive --stream build:esm

- name: Build browser for matrix ${{ matrix.group }}
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"@noble/ciphers": "0.4.1",
"@noble/ciphers": "0.5.3",
"@scure/bip39": "1.2.2",
"@tbd54566975/dwn-sdk-js": "0.4.4",
"@web5/common": "1.0.0",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Convert } from '@web5/common';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto/utils';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto';

import type { Jwk } from '@web5/crypto';

Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/prototyping/crypto/primitives/aes-kw.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ! TODO : Make sure I remove `@noble/ciphers` from the Agent package.json once this is moved to the `@web5/crypto` package.
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto/utils';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto';

import type { Jwk } from '@web5/crypto';

Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/prototyping/crypto/primitives/hkdf.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ! TODO : Make sure I remove `@noble/ciphers` from the Agent package.json once this is moved to the `@web5/crypto` package.
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto/utils';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto';

import { Convert } from '@web5/common';
import { DeriveKeyBytesParams } from '../types/params-direct.js';
Expand Down
2 changes: 1 addition & 1 deletion packages/agent/src/prototyping/crypto/primitives/pbkdf2.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// ! TODO : Make sure I remove `@noble/ciphers` from the Agent package.json once this is moved to the `@web5/crypto` package.
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto/utils';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto';

import type { DeriveKeyBytesParams } from '../types/params-direct.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
"node": ">=18.0.0"
},
"dependencies": {
"@noble/ciphers": "0.4.1",
"@noble/ciphers": "0.5.3",
"@noble/curves": "1.3.0",
"@noble/hashes": "1.4.0",
"@web5/common": "1.0.1"
Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/primitives/aes-ctr.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Convert } from '@web5/common';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto/utils';
import { getWebcryptoSubtle } from '@noble/ciphers/crypto';

import type { Jwk } from '../jose/jwk.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/primitives/aes-gcm.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { Convert } from '@web5/common';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto/utils';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto';

import type { Jwk } from '../jose/jwk.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/primitives/xchacha20-poly1305.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Convert } from '@web5/common';
import { xchacha20poly1305 } from '@noble/ciphers/chacha';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto/utils';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto';

import type { Jwk } from '../jose/jwk.js';

Expand Down
2 changes: 1 addition & 1 deletion packages/crypto/src/primitives/xchacha20.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { Convert } from '@web5/common';
import { xchacha20 } from '@noble/ciphers/chacha';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto/utils';
import { getWebcryptoSubtle } from '@noble/ciphers/webcrypto';

import type { Jwk } from '../jose/jwk.js';

Expand Down
8 changes: 4 additions & 4 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit db65d8a

Please sign in to comment.