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

graphql as Direct Dependency of data Package #550

Closed
wants to merge 1 commit into from

Conversation

bh2smith
Copy link
Contributor

@bh2smith bh2smith commented Oct 21, 2024

User description

Ideally this resolve the missing peer dependency issue experienced in bh2smith/neareth-tunnel#10

Closes #549


PR Type

enhancement, dependencies


Description

  • Added graphql as a direct dependency to resolve missing peer dependency issues.
  • Updated @mintbase-js/sdk from version 0.6.2 to 0.6.5 to ensure compatibility and improvements.
  • Introduced several new dependencies including @lerna/package, @lerna/project, and @testing-library/dom to support development and testing.
  • Updated graphql version from 16.8.1 to 16.9.0 for better performance and features.

Changes walkthrough 📝

Relevant files
Dependencies
package-lock.json
Update dependencies and add `graphql` as a direct dependency

package-lock.json

  • Added graphql as a direct dependency.
  • Updated @mintbase-js/sdk from version 0.6.2 to 0.6.5.
  • Added several new dependencies including @lerna/package,
    @lerna/project, and @testing-library/dom.
  • Updated graphql version from 16.8.1 to 16.9.0.
  • +353/-15
    package.json
    Add `graphql` as a direct dependency in package.json         

    packages/data/package.json

  • Added graphql as a direct dependency.
  • Updated @mintbase-js/sdk from version 0.6.2 to 0.6.5.
  • +2/-1     

    💡 PR-Agent usage:
    Comment /help on the PR to get a list of all available PR-Agent tools and their descriptions

    @mintbase-codium-pr-agent
    Copy link

    PR Reviewer Guide 🔍

    ⏱️ Estimated effort to review: 4 🔵🔵🔵🔵⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Key issues to review

    Deprecated Packages
    Several packages such as @lerna/package, @lerna/project, and @lerna/validation-error are marked as deprecated. Using deprecated packages can lead to future compatibility issues and lack of support. Consider finding alternatives or updating to supported versions if available.

    Engine Restrictions
    Some packages have specific engine restrictions, such as node_modules/@testing-library/dom which requires node version >=18. This could potentially limit the project's compatibility with certain Node.js versions. Ensure that these restrictions align with the project's deployment environments.

    Peer Dependencies
    Multiple packages have been added with the peer: true flag, indicating they are peer dependencies. This setup requires the consuming projects to have these dependencies installed. It's crucial to document these requirements or reconsider if they should be direct dependencies instead.

    @mintbase-codium-pr-agent
    Copy link

    PR Code Suggestions ✨

    CategorySuggestion                                                                                                                                    Score
    Possible issue
    Replace deprecated package with a supported alternative

    It's recommended to avoid using deprecated packages as they may not receive updates
    or security patches. The package @lerna/package is marked as deprecated. Consider
    finding an alternative package or verify if a newer, supported version is available.

    package-lock.json [4041]

    -"deprecated": "Package no longer supported. Contact Support at https://www.npmjs.com/support for more info."
    +"deprecated": false
     
    Suggestion importance[1-10]: 8

    Why: The suggestion correctly identifies the use of a deprecated package, which is a significant issue as it may not receive updates or security patches. Replacing it with a supported alternative is important for maintaining the security and stability of the project.

    8
    Ensure correct setting of the dev property for production dependencies

    The dev property is set to true for the @lerna/project package, which might not be
    intended for production dependencies. If this package is required for production,
    consider setting dev to false.

    package-lock.json [4059]

    -"dev": true
    +"dev": false
     
    Suggestion importance[1-10]: 7

    Why: The suggestion addresses a potential issue where a package might be incorrectly marked as a development dependency. Ensuring the correct setting of the dev property is important for proper dependency management, especially in production environments.

    7
    Enhancement
    Broaden the node version compatibility in the engines field

    The engines field for @testing-library/dom specifies a node version that is too
    restrictive ("node": ">=18"). This could lead to compatibility issues with projects
    using an earlier version of node. Consider supporting a wider range of node
    versions.

    package-lock.json [7800]

    -"node": ">=18"
    +"node": ">=12"
     
    Suggestion importance[1-10]: 6

    Why: The suggestion to broaden the node version compatibility is valid as it can prevent compatibility issues for users with earlier node versions. However, the decision to support older versions should be balanced with the need for newer features and security updates.

    6
    Best practice
    Pin the graphql dependency to an exact version to ensure stability

    The version of graphql added is specified with a caret (^), which allows minor
    updates. Given the critical nature of this dependency, consider pinning it to an
    exact version to avoid unexpected issues from automatic updates.

    packages/data/package.json [26]

    -"graphql": "^16.9.0"
    +"graphql": "16.9.0"
     
    Suggestion importance[1-10]: 5

    Why: Pinning the graphql dependency to an exact version can help avoid unexpected issues from automatic updates. However, this suggestion is more of a best practice rather than a critical change, as it limits the ability to receive minor updates that may include important fixes.

    5

    @bh2smith
    Copy link
    Contributor Author

    Closing in favour of #551 because of the failed build that appears to be due to the branch name:

    https://github.com/Mintbase/mintbase-js/actions/runs/11435344310

    @bh2smith bh2smith closed this Oct 21, 2024
    @bh2smith bh2smith deleted the 549/undeclared-dep branch November 19, 2024 14:09
    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.

    Possible Undelcared Dependency
    1 participant