Skip to content
This repository was archived by the owner on Mar 5, 2025. It is now read-only.

Conversation

@Muhammad-Altabba
Copy link
Contributor

Description

Fixes #(5196)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)

Checklist:

  • I have selected the correct base branch.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have made corresponding changes to the documentation.
  • My changes generate no new warnings.
  • Any dependent changes have been merged and published in downstream modules.
  • I ran npm run dtslint with success and extended the tests and types if necessary.
  • I ran npm run test:cov and my test cases cover all the lines and branches of the added code.
  • I ran yarn run build with success.
  • I have tested the built dist/web3.min.js in a browser.
  • I have tested my code on the live network.
  • I have checked the Deploy Preview and it looks correct.
  • I have updated the CHANGELOG.md file in the root folder.

@Muhammad-Altabba Muhammad-Altabba added the 4.x 4.0 related label Jul 7, 2022
@Muhammad-Altabba Muhammad-Altabba marked this pull request as draft July 7, 2022 22:28
Copy link
Contributor

@nazarhussain nazarhussain left a comment

Choose a reason for hiding this comment

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

Please make this change to every default export in all the packages.

@Muhammad-Altabba
Copy link
Contributor Author

With the last commit, the export and import behaves exactly as it was in version 1.x (this is as far as I know. And let me know if this is not true) 😄

However, this also means that the types inside web3 package are no longer exported. So, I recommend having a follow-up task to put those types possibly at web3-core. This can be done perhaps in beta or at a later version. And this could be done along with the refactoring proposed at #5223, or separately.

@Muhammad-Altabba Muhammad-Altabba marked this pull request as ready for review July 13, 2022 18:26
@Muhammad-Altabba Muhammad-Altabba dismissed nazarhussain’s stale review July 13, 2022 19:42

The line, where the comment was on, has been deleted

Copy link
Contributor

@nazarhussain nazarhussain left a comment

Choose a reason for hiding this comment

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

Apart form the mentioned change, we need to apply same changes to all packages which are using export default.

@Muhammad-Altabba Muhammad-Altabba force-pushed the fix/5196/fix-web3-default-import-with-js branch from 0f6ca5a to 071959c Compare July 14, 2022 15:18
@jdevcs
Copy link
Contributor

jdevcs commented Jul 18, 2022

lgtm, plus we should add simplest blackbox tests as well #5261 as part of new PR

@Muhammad-Altabba Muhammad-Altabba force-pushed the fix/5196/fix-web3-default-import-with-js branch 3 times, most recently from 4028893 to 18078f3 Compare July 19, 2022 08:42
@Muhammad-Altabba Muhammad-Altabba force-pushed the fix/5196/fix-web3-default-import-with-js branch from 7e83fa3 to b2c957f Compare July 19, 2022 09:54
Signed-off-by: Muhammad-Altabba <[email protected]>
@Muhammad-Altabba Muhammad-Altabba force-pushed the fix/5196/fix-web3-default-import-with-js branch from b2c957f to 603d525 Compare July 19, 2022 10:01
@Muhammad-Altabba Muhammad-Altabba merged commit 85a86d2 into 4.x Jul 19, 2022
@Muhammad-Altabba Muhammad-Altabba deleted the fix/5196/fix-web3-default-import-with-js branch July 19, 2022 11:41
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

4.x 4.0 related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants