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: access arweave at different levels of default for esm bundle compat PE-7069 #206

Merged
merged 2 commits into from
Nov 5, 2024

Conversation

fedellen
Copy link
Collaborator

@fedellen fedellen commented Nov 5, 2024

No description provided.

@fedellen fedellen requested a review from a team as a code owner November 5, 2024 16:21
@fedellen fedellen self-assigned this Nov 5, 2024
Copy link

codecov bot commented Nov 5, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.60%. Comparing base (944849d) to head (172fe9d).
Report is 4 commits behind head on alpha.

Additional details and impacted files
@@           Coverage Diff           @@
##            alpha     #206   +/-   ##
=======================================
  Coverage   93.60%   93.60%           
=======================================
  Files          25       25           
  Lines        3486     3486           
  Branches      159      159           
=======================================
  Hits         3263     3263           
  Misses        223      223           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

src/common/token/arweave.ts Outdated Show resolved Hide resolved
@fedellen fedellen merged commit d0d99c6 into alpha Nov 5, 2024
6 checks passed
@fedellen fedellen deleted the PE-7069-arweave-import-fix branch November 5, 2024 16:30
@dtfiedler
Copy link
Collaborator

🎉 This PR is included in version 1.20.1-alpha.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Comment on lines +30 to +33
const ArweaveClass =
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore -- Access the correct class constructor for Arweave
ArweaveModule.default?.default || ArweaveModule.default || ArweaveModule;
Copy link
Collaborator

Choose a reason for hiding this comment

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

nit: consider making this an export and using it where we want to use Arweave

Copy link
Collaborator Author

@fedellen fedellen Nov 5, 2024

Choose a reason for hiding this comment

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

right now we just access it here and then in test env. using this exported version in our test env just causes compiler issues due to this being a const. as arweave-js exports right now, it seems like we need this pattern in each non-test file that we try to access init or new

@dtfiedler
Copy link
Collaborator

🎉 This PR is included in version 1.20.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants