Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): Bump @biomejs/biome from 1.6.4 to 1.7.0 #204

Merged
merged 5 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
4 changes: 2 additions & 2 deletions .github/workflows/build-test-publish-on-push-cached.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
- uses: pnpm/action-setup@v3
with:
version: 8
- run: pnpm add -g pnpm
- run: pnpm add -g pnpm@8.15.7
lukasjhan marked this conversation as resolved.
Show resolved Hide resolved
- name: 'Restore build output'
uses: actions/cache/restore@v4
with:
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
node-version: 20
cache: 'pnpm'
# we are not using the github action for biome, but the package.json script. this makes sure we are using the same versions.
- name: Run Biome
- name: Run Biome
run: pnpm run biome:ci

# Only run this job when the push is on main
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/test/index.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const nodeVersionMajor = Number.parseInt(
10,
);

export const createSignerVerifier = () => {
const createSignerVerifier = () => {
const { privateKey, publicKey } = Crypto.generateKeyPairSync('ed25519');
const signer: Signer = async (data: string) => {
const sig = Crypto.sign(null, Buffer.from(data), privateKey);
Expand Down
2 changes: 1 addition & 1 deletion packages/core/test/app-e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import path from 'node:path';
import { describe, expect, test } from 'vitest';
import { digest, generateSalt } from '@sd-jwt/crypto-nodejs';

export const createSignerVerifier = () => {
const createSignerVerifier = () => {
const { privateKey, publicKey } = Crypto.generateKeyPairSync('ed25519');
const signer: Signer = async (data: string) => {
const sig = Crypto.sign(null, Buffer.from(data), privateKey);
Expand Down
21 changes: 19 additions & 2 deletions packages/sd-jwt-vc/src/test/index.spec.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,31 @@
import { digest, generateSalt } from '@sd-jwt/crypto-nodejs';
import type { DisclosureFrame } from '@sd-jwt/types';
import type { DisclosureFrame, Signer, Verifier } from '@sd-jwt/types';
import { describe, test, expect } from 'vitest';
import { SDJwtVcInstance } from '..';
import { createSignerVerifier } from '../../test/app-e2e.spec';
import type { SdJwtVcPayload } from '../sd-jwt-vc-payload';
import Crypto from 'node:crypto';

const iss = 'ExampleIssuer';
const vct = 'https://example.com/schema/1';
const iat = new Date().getTime() / 1000;

const createSignerVerifier = () => {
const { privateKey, publicKey } = Crypto.generateKeyPairSync('ed25519');
const signer: Signer = async (data: string) => {
const sig = Crypto.sign(null, Buffer.from(data), privateKey);
return Buffer.from(sig).toString('base64url');
};
const verifier: Verifier = async (data: string, sig: string) => {
return Crypto.verify(
null,
Buffer.from(data),
publicKey,
Buffer.from(sig, 'base64url'),
);
};
return { signer, verifier };
};

describe('App', () => {
test('Example', async () => {
const { signer, verifier } = createSignerVerifier();
Expand Down
2 changes: 1 addition & 1 deletion packages/sd-jwt-vc/test/app-e2e.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import path from 'node:path';
import { describe, expect, test } from 'vitest';
import { digest, generateSalt } from '@sd-jwt/crypto-nodejs';

export const createSignerVerifier = () => {
const createSignerVerifier = () => {
const { privateKey, publicKey } = Crypto.generateKeyPairSync('ed25519');
const signer: Signer = async (data: string) => {
const sig = Crypto.sign(null, Buffer.from(data), privateKey);
Expand Down
58 changes: 29 additions & 29 deletions pnpm-lock.yaml

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