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

The following issues were found:
  • ✅ 0 vulnerable package(s)
  • ✅ 0 package(s) with incompatible licenses
  • ✅ 0 package(s) with invalid SPDX license definitions
  • ✅ 0 package(s) with unknown licenses.
  • ⚠️ 1 packages with OpenSSF Scorecard issues.
See the Details below.

OpenSSF Scorecard

PackageVersionScoreDetails
npm/@rsksmart/rsk-utils ^2.0.0 ⚠️ 2
Details
CheckScoreReason
Code-Review⚠️ 0Found 0/22 approved changesets -- score normalized to 0
Dangerous-Workflow⚠️ -1no workflows found
Token-Permissions⚠️ -1No tokens found
Packaging⚠️ -1packaging workflow not detected
SAST⚠️ 0no SAST tool detected
Binary-Artifacts🟢 10no binaries found in the repo
Maintained⚠️ 00 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Pinned-Dependencies⚠️ -1no dependencies found
CII-Best-Practices⚠️ 0no effort to earn an OpenSSF best practices badge detected
Security-Policy⚠️ 0security policy file not detected
Fuzzing⚠️ 0project is not fuzzed
License🟢 10license file detected
Signed-Releases⚠️ -1no releases found
Branch-Protection⚠️ -1internal error: error during branchesHandler.setup: internal error: githubv4.Query: Resource not accessible by integration
Vulnerabilities⚠️ 065 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
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