Skip to content

fix: upgrade node version and consolidate trustvc package#5

Merged
RishabhS7 merged 5 commits into
masterfrom
fix/upgrade
Feb 5, 2026
Merged

fix: upgrade node version and consolidate trustvc package#5
RishabhS7 merged 5 commits into
masterfrom
fix/upgrade

Conversation

@rongquan1

@rongquan1 rongquan1 commented Feb 5, 2026

Copy link
Copy Markdown

Summary by CodeRabbit

  • Chores

    • Bumped minimum Node.js to 22 and updated CI to test Node 22; release step now runs only on push.
  • Tests

    • Test setup now loads environment variables and adds runtime polyfills for streams and setImmediate; Jest config updated.
  • Documentation

    • Updated README link spelling to "decentralized".
  • Examples

    • Example fixtures and story sources updated to use the new package/source and template URLs; build examples expose Buffer globally.

@coderabbitai

coderabbitai Bot commented Feb 5, 2026

Copy link
Copy Markdown
📝 Walkthrough

Walkthrough

Replaces imports and dependency from @tradetrust-tt to @trustvc, bumps Node.js target to 22 (CI, .nvmrc, package.json), updates CI release condition, adds dotenv to Jest setup and runtime polyfills, updates README/link and example story URLs, and adds Buffer ProvidePlugin entries in example webpack configs.

Changes

Cohort / File(s) Summary
CI & Node runtime
​.github/workflows/ci.yml, .nvmrc, package.json
Added pull_request trigger on master, updated CI Node matrix to 22.x, conditional release step for push events and upgraded semantic-release, updated .nvmrc to 22, and raised engines.node to >=22 in package.json.
Dependency updates
package.json
Removed @tradetrust-tt/tradetrust, upgraded @trustvc/trustvc to ^2.5.2, added devDependency dotenv@^17.2.3, and bumped semantic-release.
Import migration
Examples: example/application/fixtures/v2/opencerts.tsx, example/application/fixtures/v3/driverLicense.tsx, example/types.ts
Src: src/components/frame/host.actions.ts, src/components/renderer/FramedDocumentRenderer.tsx, src/types.ts, src/utils.ts, src/utils.test.tsx
Replaced imports from @tradetrust-tt/tradetrust with @trustvc/trustvc; consolidated import statements and added SignedVerifiableCredential where applicable.
Jest & runtime polyfills
jest.config.js, jest.setup.ts
Prepended dotenv/config to setupFiles; added ReadableStream alias from stream/web and a setImmediate fallback in jest.setup.ts.
Docs & stories
README.md, src/components/frame/FrameConnector.stories.js
Updated README link text (decentraliseddecentralized) and changed story source URLs from https://opencerts.io to https://generic-templates.tradetrust.io.
Example webpack configs
example/application/webpack.config.js, example/decentralized-renderer/webpack.config.js
Added Buffer via webpack.ProvidePlugin (Buffer: ["buffer","Buffer"]) alongside existing process/browser provide mappings.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 I hopped through imports, light and quick,
Swapped TradeTrust paws for TrustVC's trick,
Node climbed up to version twenty-two,
Polyfills, Buffer — stitched in a few,
A little hop, the repo feels new. ✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Description check ⚠️ Warning The pull request lacks a description following the required template with Summary, Changes, and Issues sections. Add a pull request description following the template: include background/summary, list specific changes made, and reference related issues or stories.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately captures the main changes: upgrading Node.js version and consolidating the trustvc package imports across the codebase.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/upgrade

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
jest.config.js (1)

6-35: ⚠️ Potential issue | 🟠 Major

Add @trustvc to Jest's transform whitelist.

The project uses @trustvc/trustvc and related packages as direct dependencies (e.g., @trustvc/trustvc@^2.5.2), imported in both source files and tests (e.g., src/utils.test.tsx, src/utils.ts, src/types.ts). However, the current transformIgnorePatterns only whitelists @tradetrust-tt packages. Jest will skip transforming @trustvc/* packages, which can break tests if they contain TypeScript or ESM code that requires transformation.

Suggested update
-  transformIgnorePatterns: ["node_modules/?!(`@tradetrust-tt`).*/"],
+  transformIgnorePatterns: ["node_modules/?!(`@trustvc`|@tradetrust-tt).*/"],

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
.github/workflows/ci.yml (1)

16-21: ⚠️ Potential issue | 🔴 Critical

Upgrade actions/setup-node@v3 to v4 — v3 is incompatible with current GitHub-hosted runners.

actions/setup-node@v3 runs as a Node16-based action, which was removed from GitHub-hosted runners on November 12, 2024. The workflow will fail on hosted runners. Upgrade to actions/setup-node@v4 (Node20-based) to support Node 24.x.

Required update
-      - uses: actions/setup-node@v3
+      - uses: actions/setup-node@v4
         with:
           node-version: ${{ matrix.node-version }}
🤖 Fix all issues with AI agents
In @.github/workflows/ci.yml:
- Around line 31-33: The Release step currently runs npx semantic-release@19.0.5
which is incompatible with Node 22/24; update the command in the Release step
(the line invoking "npx semantic-release@19.0.5 --branches master") to use
semantic-release v25.0.0 or later (e.g., npx semantic-release@^25.0.0) and
ensure the workflow sets up a compatible Node runtime by adding/updating an
actions/setup-node step to use Node >=22.14.0 (for Node 22) or >=24.10.0 (for
Node 24).

Comment thread .github/workflows/ci.yml Outdated
@rongquan1 rongquan1 requested a review from RishabhS7 February 5, 2026 08:21
@RishabhS7 RishabhS7 merged commit 69c6413 into master Feb 5, 2026
5 checks passed
@RishabhS7 RishabhS7 deleted the fix/upgrade branch February 5, 2026 08:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants