Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
5249ea2
chore: esm setup
TimoGlastra Oct 7, 2025
5562c6d
chore: better type imports
TimoGlastra Oct 7, 2025
bf787d9
chore: remove exports.ts
TimoGlastra Oct 7, 2025
5b3f843
chore: better type imports
TimoGlastra Oct 7, 2025
0ad57ec
chore: build working
TimoGlastra Oct 7, 2025
5cf60d3
chore: test setup
TimoGlastra Oct 8, 2025
4015774
chore: fixed all type issues
TimoGlastra Oct 8, 2025
1c816ef
clean up typescript configs
TimoGlastra Oct 8, 2025
c13fb40
chore: fix build
TimoGlastra Oct 9, 2025
874eec0
build and test fixes
TimoGlastra Oct 9, 2025
c501734
fix ci script
TimoGlastra Oct 9, 2025
693e6df
test cheqd
TimoGlastra Oct 9, 2025
813b84d
add coverage lib
TimoGlastra Oct 9, 2025
fac0bf1
make main package module
TimoGlastra Oct 9, 2025
e6d2cdf
ensure tsdown works in node 22
TimoGlastra Oct 9, 2025
9ce4343
unit tests working
TimoGlastra Oct 9, 2025
79bc067
e2e tests working
TimoGlastra Oct 9, 2025
7aeda47
Merge remote-tracking branch 'upstream/main' into feat/esm
TimoGlastra Oct 9, 2025
c18571e
style: formatting
TimoGlastra Oct 9, 2025
e4b35f1
chore: update lockfile
TimoGlastra Oct 9, 2025
d03ae09
fix type issues
TimoGlastra Oct 9, 2025
6ae1b92
reduce shards, remove test fix for jest
TimoGlastra Oct 9, 2025
8f8cf47
docs(changeset): feat: support ESM
TimoGlastra Oct 9, 2025
e393d0d
cleanup script
TimoGlastra Oct 9, 2025
4981d7f
fix: import at top
TimoGlastra Oct 9, 2025
4a32bb2
fix: zod import issue
TimoGlastra Oct 9, 2025
2b2fefa
fix: core bundle entry
TimoGlastra Oct 9, 2025
27dba67
it works again
TimoGlastra Oct 9, 2025
303e7ef
fix: circular dependencies
TimoGlastra Oct 9, 2025
66a4d98
fix: react native issues
TimoGlastra Oct 10, 2025
257aa80
fix: react native issues
TimoGlastra Oct 10, 2025
a3c9ab8
esm deps
TimoGlastra Oct 10, 2025
cf77387
Merge branch 'main' into feat/esm
TimoGlastra Oct 10, 2025
eefe8fa
Merge branch 'main' into feat/esm
TimoGlastra Oct 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
11 changes: 3 additions & 8 deletions .changeset/commit.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { execSync } = require('node:child_process')
import { execSync } from 'node:child_process'

const getSignedOffBy = () => {
const gitUserName = execSync('git config user.name').toString('utf-8').trim()
Expand All @@ -7,18 +7,13 @@ const getSignedOffBy = () => {
return `Signed-off-by: ${gitUserName} <${gitEmail}>`
}

const getAddMessage = async (changeset) => {
export const getAddMessage = async (changeset) => {
return `docs(changeset): ${changeset.summary}\n\n${getSignedOffBy()}\n`
}

const getVersionMessage = async (releasePlan) => {
export const getVersionMessage = async (releasePlan) => {
const publishableReleases = releasePlan.releases.filter((release) => release.type !== 'none')
const releasedVersion = publishableReleases[0].newVersion

return `chore(release): version ${releasedVersion}\n\n${getSignedOffBy()}\n`
}

module.exports = {
getAddMessage,
getVersionMessage,
}
27 changes: 27 additions & 0 deletions .changeset/tricky-readers-relax.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
---
"@credo-ts/askar-to-drizzle-storage-migration": minor
"@credo-ts/indy-sdk-to-askar-migration": minor
"@credo-ts/drizzle-storage": minor
"@credo-ts/question-answer": minor
"@credo-ts/react-native": minor
"@credo-ts/action-menu": minor
"@credo-ts/redis-cache": minor
"@credo-ts/anoncreds": minor
"@credo-ts/openid4vc": minor
"@credo-ts/indy-vdr": minor
"@credo-ts/didcomm": minor
"@credo-ts/tenants": minor
"@credo-ts/hedera": minor
"@credo-ts/askar": minor
"@credo-ts/cheqd": minor
"@credo-ts/webvh": minor
"@credo-ts/core": minor
"@credo-ts/drpc": minor
"@credo-ts/node": minor
---

Add support for both CJS and ESM module syntax.

- Use `tsdown` to bundle for both CJS and ESM (bridge period) -> tsdown is based on rust, so it should help with performance
- Update to `vitest` since jest doesn't work well with ESM -> this should also help with performance
- Simplify type checking -> just a single type check script instead of one for all packages. This should help with performance.
31 changes: 5 additions & 26 deletions .github/workflows/continuous-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
- name: Check Types
run: pnpm types:check

- name: Compile
- name: Build
run: pnpm build

unit-tests:
Expand All @@ -59,7 +59,7 @@ jobs:
# Each shard runs a set of the tests
# Make sure to UPDATE THE TEST command with the total length of
# the shards if you change this!!
shard: [1, 2, 3]
shard: [1, 2]

steps:
- uses: actions/checkout@v5
Expand Down Expand Up @@ -88,15 +88,8 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

# Issue with node 22 starting 22.18
# https://github.com/nodejs/node/issues/59364
- name: Run tests
run: NODE_OPTIONS="$NODE_OPTIONS --no-experimental-strip-types" pnpm test:unit --coverage --forceExit --shard=${{ matrix.shard }}/3
if: matrix.node-version == 22

- name: Run tests
run: pnpm test:unit --coverage --forceExit --shard=${{ matrix.shard }}/3
if: matrix.node-version != 22
run: pnpm test:unit --coverage --shard=${{ matrix.shard }}/2

# Upload coverage for shard
- run: mv coverage/coverage-final.json coverage/${{ matrix.shard }}.json
Expand Down Expand Up @@ -148,15 +141,8 @@ jobs:
- name: Install dependencies
run: pnpm install --frozen-lockfile

# Issue with node 22 starting 22.18
# https://github.com/nodejs/node/issues/59364
- name: Run tests
run: NODE_OPTIONS="$NODE_OPTIONS --no-experimental-strip-types" pnpm test:e2e --coverage --forceExit
if: matrix.node-version == 22

- name: Run tests
run: pnpm test:e2e --coverage --forceExit
if: matrix.node-version != 22
run: pnpm test:e2e --coverage

# Upload coverage for e2e
- run: mv coverage/coverage-final.json coverage/e2e.json
Expand Down Expand Up @@ -212,15 +198,8 @@ jobs:
- name: Build drizzle package
run: pnpm --filter @credo-ts/drizzle-storage run build

# Issue with node 22 starting 22.18
# https://github.com/nodejs/node/issues/59364
- name: Run tests
run: NODE_OPTIONS="$NODE_OPTIONS --no-experimental-strip-types" pnpm test:drizzle --coverage --forceExit
if: matrix.node-version == 22

- name: Run tests
run: pnpm test:drizzle --coverage --forceExit
if: matrix.node-version != 22
run: pnpm test:drizzle --coverage

# Upload coverage for e2e
- run: mv coverage/coverage-final.json coverage/drizzle.json
Expand Down
4 changes: 3 additions & 1 deletion DEVREADME.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,9 @@ GENESIS_TXN_PATH=/work/network/genesis/local-genesis.txn

## Running tests

Test are executed using jest. E2E tests (ending in `.e2e.test.ts`) require the **indy ledger**, **cheqd ledger**, **postgres database**, or **redis** to be running.
Test are executed using vitest. E2E tests (ending in `.e2e.test.ts`) require the **indy ledger**, **cheqd ledger**, **postgres database**, or **redis** to be running. Drizzle tests (ending in `drizzle.e2e.test.ts`) require the **postgres database** to be running.

NOTE: when running the Drizzle tests, you must first run `pnpm build`, as the CLI requires the built packages.

When running tests that require a connection to the indy ledger pool, you can set the `TEST_AGENT_PUBLIC_DID_SEED`, `ENDORSER_AGENT_PUBLIC_DID_SEED` and `GENESIS_TXN_PATH` environment variables.

Expand Down
4 changes: 2 additions & 2 deletions biome.json
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@
},
"overrides": [
{
"include": ["jest.config.ts", "./scripts/**"],
"include": ["./scripts/**"],
"linter": {
"rules": {
"correctness": {
Expand All @@ -105,7 +105,7 @@
"include": [
"*.test.ts",
"**/__tests__/**",
"jest.*.ts",
"vitest.*.ts",
"samples/**",
"demo/**",
"demo-openid/**",
Expand Down
7 changes: 3 additions & 4 deletions demo-openid/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
},
"license": "Apache-2.0",
"scripts": {
"issuer": "ts-node src/IssuerInquirer.ts",
"issuer": "vite-node src/IssuerInquirer.ts",
"provider": "tsx src/Provider.js",
"holder": "ts-node src/HolderInquirer.ts",
"verifier": "ts-node src/VerifierInquirer.ts",
"holder": "vite-node src/HolderInquirer.ts",
"verifier": "vite-node src/VerifierInquirer.ts",
"proxies": "ngrok --config ngrok.yml,ngrok.auth.yml start provider issuer verifier"
},
"dependencies": {
Expand All @@ -36,7 +36,6 @@
"@types/oidc-provider": "^8.8.1",
"clear": "^0.1.0",
"figlet": "^1.5.2",
"ts-node": "catalog:",
"tsx": "^4.19.4"
}
}
6 changes: 3 additions & 3 deletions demo-openid/src/Holder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ import { AskarModule } from '@credo-ts/askar'
import {
DidJwk,
DidKey,
JwkDidCreateOptions,
KeyDidCreateOptions,
type JwkDidCreateOptions,
type KeyDidCreateOptions,
Kms,
Mdoc,
W3cJsonLdVerifiableCredential,
Expand All @@ -26,7 +26,7 @@ import {
} from '@credo-ts/openid4vc'
import { askar } from '@openwallet-foundation/askar-nodejs'

import { AskarModuleConfigStoreOptions } from '@credo-ts/askar'
import type { AskarModuleConfigStoreOptions } from '@credo-ts/askar'
import { BaseAgent } from './BaseAgent'
import { Output, greenText } from './OutputClass'

Expand Down
16 changes: 8 additions & 8 deletions demo-openid/src/Issuer.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
import type { DidKey, X509Certificate } from '@credo-ts/core'
import {
OpenId4VcIssuerModuleConfigOptions,
type OpenId4VcIssuerModuleConfigOptions,
OpenId4VcIssuerRecord,
OpenId4VcModule,
OpenId4VcVerifierModuleConfigOptions,
type OpenId4VcVerifierModuleConfigOptions,
OpenId4VcVerifierRecord,
OpenId4VciCredentialConfigurationsSupportedWithFormats,
OpenId4VciCredentialRequestToCredentialMapper,
OpenId4VciSignMdocCredentials,
OpenId4VciSignSdJwtCredentials,
OpenId4VciSignW3cCredentials,
VerifiedOpenId4VcCredentialHolderBinding,
type OpenId4VciCredentialConfigurationsSupportedWithFormats,
type OpenId4VciCredentialRequestToCredentialMapper,
type OpenId4VciSignMdocCredentials,
type OpenId4VciSignSdJwtCredentials,
type OpenId4VciSignW3cCredentials,
type VerifiedOpenId4VcCredentialHolderBinding,
} from '@credo-ts/openid4vc'

import { AskarModule, transformSeedToPrivateJwk } from '@credo-ts/askar'
Expand Down
6 changes: 0 additions & 6 deletions demo-openid/tsconfig.json

This file was deleted.

7 changes: 3 additions & 4 deletions demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
},
"license": "Apache-2.0",
"scripts": {
"alice": "ts-node src/AliceInquirer.ts",
"faber": "ts-node src/FaberInquirer.ts"
"alice": "vite-node src/AliceInquirer.ts",
"faber": "vite-node src/FaberInquirer.ts"
},
"dependencies": {
"@hyperledger/anoncreds-nodejs": "catalog:",
Expand All @@ -31,7 +31,6 @@
"@types/figlet": "^1.5.4",
"@types/inquirer": "^8.2.6",
"clear": "^0.1.0",
"figlet": "^1.5.2",
"ts-node": "catalog:"
"figlet": "^1.5.2"
}
}
4 changes: 2 additions & 2 deletions demo/src/BaseAgent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,12 +29,12 @@ import {
} from '@credo-ts/didcomm'
import { IndyVdrAnonCredsRegistry, IndyVdrIndyDidResolver, IndyVdrModule } from '@credo-ts/indy-vdr'
import { DidCommHttpInboundTransport, agentDependencies } from '@credo-ts/node'
import { HederaNetwork } from '@hiero-did-sdk/client'
import type { HederaNetwork } from '@hiero-did-sdk/client'
import { anoncreds } from '@hyperledger/anoncreds-nodejs'
import { indyVdr } from '@hyperledger/indy-vdr-nodejs'
import { askar } from '@openwallet-foundation/askar-nodejs'

import { AskarModuleConfigStoreOptions } from '@credo-ts/askar'
import type { AskarModuleConfigStoreOptions } from '@credo-ts/askar'
import { HederaAnonCredsRegistry, HederaDidRegistrar, HederaDidResolver, HederaModule } from '@credo-ts/hedera'
import { greenText } from './OutputClass'

Expand Down
6 changes: 0 additions & 6 deletions demo/tsconfig.json

This file was deleted.

21 changes: 0 additions & 21 deletions jest.config.base.ts

This file was deleted.

19 changes: 0 additions & 19 deletions jest.config.ts

This file was deleted.

Loading