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

fix: export module classes from framework root #315

Merged

Conversation

TimoGlastra
Copy link
Contributor

Exports the module classes from the framework root. We've noticed that you oftentimes need the classes, with either dependency injection, or as TS type.

I know you've pushed back on this before @jakubkoci, but currently we need to import like this:

import { ConnectionsModule } from 'aries-framework/build/src/modules/connections/ConnectionsModule.ts`

@TimoGlastra TimoGlastra requested a review from a team as a code owner June 9, 2021 13:28
@codecov-commenter
Copy link

codecov-commenter commented Jun 9, 2021

Codecov Report

Merging #315 (33bae07) into main (8693c49) will increase coverage by 0.19%.
The diff coverage is 92.92%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #315      +/-   ##
==========================================
+ Coverage   88.07%   88.27%   +0.19%     
==========================================
  Files         218      221       +3     
  Lines        3926     4008      +82     
  Branches      452      464      +12     
==========================================
+ Hits         3458     3538      +80     
- Misses        468      470       +2     
Impacted Files Coverage Δ
src/agent/AgentConfig.ts 100.00% <ø> (+4.25%) ⬆️
src/decorators/attachment/Attachment.ts 100.00% <ø> (ø)
src/modules/credentials/CredentialsModule.ts 86.66% <0.00%> (ø)
src/modules/credentials/models/Credential.ts 75.00% <0.00%> (ø)
...c/modules/credentials/models/IndyCredentialInfo.ts 60.00% <0.00%> (ø)
src/modules/proofs/ProofsModule.ts 88.00% <0.00%> (ø)
src/types.ts 100.00% <ø> (ø)
src/utils/BufferEncoder.ts 84.61% <50.00%> (-15.39%) ⬇️
src/index.ts 100.00% <100.00%> (ø)
src/modules/basic-messages/index.ts 100.00% <100.00%> (ø)
... and 19 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update cba4be1...33bae07. Read the comment docs.

Copy link
Contributor

@jakubkoci jakubkoci left a comment

Choose a reason for hiding this comment

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

I'm good with this 👍 It makes sense because it's part of the framework's public API. I'm just against exporting everything from everything :)

I'm also not sure if it's good to import one XxxModule class from another. But if it's called from outside of the framework, definitely all good.

@TimoGlastra
Copy link
Contributor Author

Yeah I agree, I'll see if I can maybe go over all exports an do more specific exports instead of * from.

@TimoGlastra TimoGlastra merged commit a41cc75 into openwallet-foundation:main Jun 10, 2021
@TimoGlastra TimoGlastra deleted the fix/export-module-classes branch June 10, 2021 08:48
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.

3 participants