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

[Action required] Converting Veramo packages from CommonJS to ESM #1103

Merged
merged 1 commit into from
Jan 30, 2023

Conversation

mirceanis
Copy link
Member

@mirceanis mirceanis commented Jan 19, 2023

What issue is this PR fixing

closes #1000
closes #1004
fixes #997

What is being changed

This PR is another go at converting the build outputs to ESM instead of CommonJS.
This is a BREAKING CHANGE, as the @veramo/* packages will have to be loaded differently.

This PR also changes the packager tool from yarn to pnpm.

We will be releasing this into the unstable dist-tag, so you should be able to test this next iteration of Veramo soon by installing all packages as @veramo/*@unstable.
This is a major change. We need your feedback!

Quality

Check all that apply:

  • I want these changes to be integrated
  • I successfully ran pnpm i, pnpm build, pnpm test, pnpm test:browser locally.
  • I allow my PR to be updated by the reviewers (to speed up the review process).
  • I added unit tests.
  • I added integration tests.
  • I did not add automated tests because _________, and I am aware that a PR without tests will likely get rejected.

Details

If applicable, add screen captures, error messages or stack traces to help explain your problem.

@codecov
Copy link

codecov bot commented Jan 20, 2023

Codecov Report

Base: 80.25% // Head: 85.13% // Increases project coverage by +4.88% 🎉

Coverage data is based on head (245e60a) compared to base (125bf42).
Patch coverage: 83.62% of modified lines in pull request are covered.

Additional details and impacted files
@@            Coverage Diff             @@
##             next    #1103      +/-   ##
==========================================
+ Coverage   80.25%   85.13%   +4.88%     
==========================================
  Files         118      140      +22     
  Lines        4056    14024    +9968     
  Branches      875     1422     +547     
==========================================
+ Hits         3255    11939    +8684     
- Misses        798     2085    +1287     
+ Partials        3        0       -3     
Impacted Files Coverage Δ
...s/credential-ld/src/module-types/jsonld/index.d.ts 0.00% <0.00%> (ø)
packages/remote-client/src/client.ts 100.00% <ø> (ø)
packages/test-react-app/src/global.ts 0.00% <ø> (ø)
packages/test-react-app/src/veramo/setup.ts 0.00% <ø> (ø)
...s/credential-ld/src/suites/Ed25519Signature2020.ts 15.00% <15.00%> (ø)
packages/did-provider-ethr/src/kms-eth-signer.ts 69.73% <28.57%> (-8.05%) ⬇️
...s/credential-ld/src/suites/JsonWebSignature2020.ts 29.41% <29.41%> (ø)
packages/core/src/validator.ts 63.21% <75.00%> (+2.61%) ⬆️
packages/did-comm/src/didcomm.ts 80.09% <75.00%> (+6.95%) ⬆️
...es/message-handler/src/abstract-message-handler.ts 44.44% <75.00%> (+22.22%) ⬆️
... and 213 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

BREAKING CHANGE: this is a breaking change as modules will have to be loaded differently.

test(ci): re-enable coverage reporting on CI
chore(ci): fix docs command on ci script
test(did-provider-ion): skip a couple of tests that fail with unreasonable errors
chore(ci): use ubuntu-latest on CI
test: revert some changes in browser tests
fix: temporarily remove puppeteer tests
fix: partial fix for jest puppeteer
fix: progress on test-react-app browser tests
fix: use craco for test-react-app to enable babel config
test: fix unit and integration tests (browser tests still broken)
test: fix most tests for esm
fix(build): fix some build issues that prevented tests from working
fix: missing deps
chore: Migrate esm branch from yarn to pnpm (#1099)
chore: wip migrate to pnpm
fix: remove schemas
fix: pnpm-lock.yaml
fix: types in findSigningKeyWithId
fix: use requireCjs for importing JSON files
fix: use local veramo cli in CI scripts
fix: fix api-extractor and schema generation scripts
fix: esm objectCreator
fix: import / export
fix: cors import
fix: fix imports in data-store
fix: ignore types in schema generation
fix: requireCjs
fix: broken package.json
refactor: convert all modules to ESM. build:js works here
@mirceanis mirceanis merged commit b5cea3c into next Jan 30, 2023
@mirceanis mirceanis deleted the esm branch January 30, 2023 16:05
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.

Refactor Veramo to ESM
3 participants