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
8 changes: 6 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,17 @@ on:
push:
branches:
- master
pull_request:
branches:
- master

jobs:
test:
name: Test
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [18.x, 20.x]
node-version: [22.x]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
Expand All @@ -26,7 +29,8 @@ jobs:
run: npm run build

- name: Release
run: npx semantic-release@19.0.5 --branches master
if: github.event_name == 'push'
run: npx semantic-release@25.0.3 --branches master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
18
22
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

React components abstracting the communication with `TrustVC` decentralized renderer. More information on this:

- [TrustVC Decentralized Renderer](https://docs.tradetrust.io/docs/tutorial/decentralised-renderer)
- [TrustVC Decentralized Renderer](https://docs.tradetrust.io/docs/tutorial/decentralized-renderer)

## Features

Expand Down
2 changes: 1 addition & 1 deletion example/application/fixtures/v2/opencerts.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { OpencertsDocuments } from "../../../types";
import { SchemaId, v2, WrappedDocument } from "@tradetrust-tt/tradetrust";
import { SchemaId, v2, WrappedDocument } from "@trustvc/trustvc";

export const rawOpencerts: OpencertsDocuments = {
id: "53b75bbe",
Expand Down
2 changes: 1 addition & 1 deletion example/application/fixtures/v3/driverLicense.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { v3 } from "@tradetrust-tt/tradetrust";
import { v3 } from "@trustvc/trustvc";

export interface DriverLicense extends v3.OpenAttestationDocument {
name: string;
Expand Down
1 change: 1 addition & 0 deletions example/application/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ module.exports = {
plugins: [
new webpack.ProvidePlugin({
process: "process/browser",
Buffer: ["buffer", "Buffer"],
}),
new webpack.ContextReplacementPlugin(
/(@mattrglobal\/node-bbs-signatures)/,
Expand Down
1 change: 1 addition & 0 deletions example/decentralized-renderer/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module.exports = {
plugins: [
new webpack.ProvidePlugin({
process: "process/browser",
Buffer: ["buffer", "Buffer"],
}),
new webpack.ContextReplacementPlugin(
/(@mattrglobal\/node-bbs-signatures)/,
Expand Down
2 changes: 1 addition & 1 deletion example/types.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { v2 } from "@tradetrust-tt/tradetrust";
import { v2 } from "@trustvc/trustvc";

// sample example should ideally be extracted from opencerts schema
export interface OpencertsDocuments extends v2.OpenAttestationDocument {
Expand Down
2 changes: 1 addition & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
const config = {
verbose: true,
coverageDirectory: "coverage",
setupFiles: ["<rootDir>/jest.setup.ts"],
setupFiles: ["dotenv/config", "<rootDir>/jest.setup.ts"],
setupFilesAfterEnv: ["<rootDir>/src/jest.setup.ts"],
testEnvironment: "jsdom",
testMatch: ["**/?(*.)test.[jt]s?(x)"],
Expand Down
5 changes: 5 additions & 0 deletions jest.setup.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { Crypto } from "@peculiar/webcrypto";
import { TextEncoder, TextDecoder } from "util";
import { ReadableStream as NodeReadableStream } from "stream/web";

Object.assign(global, {
TextDecoder,
Expand All @@ -8,6 +9,10 @@ Object.assign(global, {
window.alert = jest.fn();
window.fetch = jest.fn();

if (typeof global.ReadableStream === "undefined") {
(global as any).ReadableStream = NodeReadableStream;
}

// Polyfill Web Crypto
const cryptoInstance = new Crypto();
(globalThis as any).crypto = cryptoInstance;
Expand Down
Loading