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

update imports for [email protected] #188

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

ivegabr
Copy link
Collaborator

@ivegabr ivegabr commented Jan 3, 2025

Description:

This task involves updating the import statements in the rsk-explorer-api project to use the updated [email protected] library. The new version introduces support for both ESM and CommonJS modules and follows modern best practices for module exports. As a result, direct imports from the dist folder are no longer supported or recommended.

The update ensures compatibility with the new version of rsk-utils and aligns with the library's improved structure and API. Once the imports are updated, all functionalities depending on rsk-utils must be thoroughly tested to confirm everything works as expected.

Steps:

  1. Replace all instances of direct imports from the dist folder (e.g., @rsksmart/rsk-utils/dist/addresses) with proper imports from the library's public API.

  2. Ensure all imports follow the recommended structure, such as:

    import { isAddress } from '@rsksmart/rsk-utils';

  3. Test all features and modules in rsk-explorer-api that depend on rsk-utils to verify functionality after the update.

  4. Resolve any issues or incompatibilities arising from the library upgrade.

Acceptance Criteria:

  • All instances of direct imports from dist in the rsk-explorer-api codebase are replaced with imports from the public API of rsk-utils.
  • All features and modules in rsk-explorer-api dependent on rsk-utils are tested and verified to work as expected.
  • Unit tests and integration tests pass successfully.
  • Code changes align with the updated module system of [email protected].
  • Documentation and any relevant comments in the code are updated to reflect the changes.

Impact:

This task ensures that the rsk-explorer-api project uses the latest version of rsk-utils without relying on deprecated or unsupported import paths, improving maintainability and compatibility.

@ivegabr ivegabr requested a review from nicov-iov January 3, 2025 11:02
Copy link

github-actions bot commented Jan 3, 2025

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@rsksmart/rsk-utils ^2.0.5 🟢 8.7
Details
CheckScoreReason
Binary-Artifacts🟢 10no binaries found in the repo
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
CI-Tests🟢 918 out of 19 merged PRs checked by a CI test -- score normalized to 9
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Code-Review🟢 9Found 11/12 approved changesets -- score normalized to 9
Contributors🟢 6project has 2 contributing companies or organizations -- score normalized to 6
Dangerous-Workflow🟢 10no dangerous workflow patterns detected
Dependency-Update-Tool🟢 10update tool detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Maintained🟢 1029 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 10
Packaging🟢 10packaging workflow detected
Pinned-Dependencies🟢 6dependency not pinned by hash detected -- score normalized to 6
SAST🟢 9SAST tool detected but not run on all commits
Security-Policy🟢 10security policy file detected
Signed-Releases⚠️ -1no releases found
Token-Permissions🟢 10GitHub workflow tokens follow principle of least privilege
Vulnerabilities🟢 100 existing vulnerabilities detected

Scanned Files

  • package.json

@ivegabr
Copy link
Collaborator Author

ivegabr commented Jan 3, 2025

do not merge until [email protected] is published.

@ivegabr
Copy link
Collaborator Author

ivegabr commented Jan 3, 2025

image

@ivegabr ivegabr requested a review from leandroefron January 3, 2025 11:12
@ivegabr ivegabr force-pushed the feat/DV-642-update-rsk-utils branch from 8d76151 to 5480534 Compare January 14, 2025 10:06
@ivegabr ivegabr marked this pull request as ready for review January 14, 2025 10:13
@ivegabr ivegabr marked this pull request as draft January 21, 2025 17:43
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.

1 participant