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

chore(deps): update all dependencies #176

Merged
merged 1 commit into from
May 11, 2024
Merged

Conversation

mheob
Copy link
Owner

@mheob mheob commented May 11, 2024

User description

📚 Summary

Just update all dependencies


PR Type

enhancement, bug_fix


Description

  • Updated import regex patterns in packages/eslint-config/src/base.ts using String.raw for better clarity and correctness.
  • Refactored path import and usage in packages/commitlint-config/src/index.ts to use default import syntax.
  • Updated various dependencies across multiple package.json files, including major packages like typescript, @commitlint/cli, and pnpm.
  • Enhanced clarity and maintainability of the codebase with these changes.

Changes walkthrough 📝

Relevant files
Enhancement
base.ts
Update Import Regex Patterns in ESLint Config                       

packages/eslint-config/src/base.ts

  • Updated import regex patterns using String.raw for clarity and
    correctness.
  • +5/-5     
    index.ts
    Refactor Path Import and Usage in Commitlint Config           

    packages/commitlint-config/src/index.ts

  • Changed import of path to use default import syntax.
  • Updated path resolution to use the new import.
  • +2/-2     
    Dependencies
    package.json
    Update Project Dependencies and Package Manager                   

    package.json

  • Updated various dependencies including @commitlint/cli, @types/node,
    cz-git, turbo, and typescript.
  • Updated pnpm package manager version with new hash.
  • +6/-6     
    package.json
    Update ESLint Config Package Dependencies                               

    packages/eslint-config/package.json

    • Updated dependencies for ESLint related packages.
    +8/-8     
    package.json
    Update Commitlint Config Package Dependencies                       

    packages/commitlint-config/package.json

    • Updated @commitlint/cli and cz-git versions.
    +3/-3     
    package.json
    Update Prettier Config TypeScript Dependency                         

    packages/prettier-config/package.json

    • Updated TypeScript version.
    +1/-1     

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

    Summary by CodeRabbit

    • Chores
      • Updated development dependencies across various packages to improve reliability and compatibility.
    • Refactor
      • Adjusted import handling in the commitlint-config package for enhanced path resolution.
      • Updated regular expressions in eslint-config for more precise import grouping.

    @mheob mheob added dependencies Pull requests that update a dependency file javascript Pull requests that update Javascript code labels May 11, 2024
    Copy link

    changeset-bot bot commented May 11, 2024

    🦋 Changeset detected

    Latest commit: bbfa8ae

    The changes in this PR will be included in the next version bump.

    This PR includes changesets to release 0 packages

    When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

    Not sure what this means? Click here to learn what changesets are.

    Click here if you're a maintainer who wants to add another changeset to this PR

    Copy link

    coderabbitai bot commented May 11, 2024

    Warning

    Rate Limit Exceeded

    @mheob has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 1 minutes and 33 seconds before requesting another review.

    How to resolve this issue?

    After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

    We recommend that you space out your commits to avoid hitting the rate limit.

    How do rate limits work?

    CodeRabbit enforces hourly rate limits for each developer per organization.
    Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.
    Please see our FAQ for further information.

    Commits Files that changed from the base of the PR and between b55f84f and bbfa8ae.

    Walkthrough

    The update encompasses version upgrades across dependencies in various packages, aiming to enhance compatibility, performance, and security. Notable changes include updates to TypeScript, @commitlint/cli, and cz-git. Additionally, there are modifications in import syntax in commitlint-configand adjustments to regular expression patterns ineslint-config` for better clarity and accuracy.

    Changes

    File/Directory Path Change Summary
    package.json, packages/.../package.json Updated versions for @commitlint/cli, cz-git, typescript, and pnpm.
    packages/commitlint-config/src/index.ts Updated import syntax from resolve to nodePath.resolve.
    packages/eslint-config/src/base.ts Adjusted regular expression patterns for import sorting.

    🐰✨📜
    Oh hark! A change doth come our way,
    With bumps and tweaks in grand array.
    TypeScript shines, a version new,
    In paths and patterns, changes brew.
    Rejoice, for code is neat and spry,
    Under the watchful coder's eye. 🌟🐇


    Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

    Share
    Tips

    Chat

    There are 3 ways to chat with CodeRabbit:

    • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
      • I pushed a fix in commit <commit_id>.
      • Generate unit testing code for this file.
      • Open a follow-up GitHub issue for this discussion.
    • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
      • @coderabbitai generate unit testing code for this file.
      • @coderabbitai modularize this function.
    • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
      • @coderabbitai generate interesting stats about this repository and render them as a table.
      • @coderabbitai show all the console.log statements in this repository.
      • @coderabbitai read src/utils.ts and generate unit testing code.
      • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

    Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

    CodeRabbit Commands (invoked as PR comments)

    • @coderabbitai pause to pause the reviews on a PR.
    • @coderabbitai resume to resume the paused reviews.
    • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
    • @coderabbitai resolve resolve all the CodeRabbit review comments.
    • @coderabbitai help to get help.

    Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

    CodeRabbit Configration File (.coderabbit.yaml)

    • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
    • Please see the configuration documentation for more information.
    • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

    Documentation and Community

    • Visit our Documentation for detailed information on how to use CodeRabbit.
    • Join our Discord Community to get help, request features, and share feedback.
    • Follow us on X/Twitter for updates and announcements.

    @github-actions github-actions bot added enhancement New feature or request bug_fix labels May 11, 2024
    Copy link
    Contributor

    PR Description updated to latest commit (bfcea0c)

    Copy link
    Contributor

    PR Review 🔍

    ⏱️ Estimated effort to review [1-5]

    2, because the changes are mostly straightforward dependency updates and minor code refactoring, which are generally easy to verify but require careful attention to ensure compatibility and correctness.

    🧪 Relevant tests

    No

    ⚡ Possible issues

    Possible Bug: The refactoring in packages/commitlint-config/src/index.ts reuses the variable name packages for both the array of package directories and the result of readdirSync, which could lead to unexpected behavior or bugs.

    🔒 Security concerns

    No

    Code feedback:
    relevant filepackages/commitlint-config/src/index.ts
    suggestion      

    Consider renaming one of the packages variables to avoid shadowing and potential bugs. For example, rename the inner variable to directoryPackages. [important]

    relevant lineconst packages = readdirSync(path);

    Copy link
    Contributor

    PR Code Suggestions ✨

    CategorySuggestions                                                                                                                                                       
    Bug
    Rename the inner scope variable to avoid shadowing the outer scope variable.

    Avoid redeclaring the variable packages inside the loop as it shadows the outer scope
    variable packages, which can lead to unexpected behavior. Instead, use a different
    variable name for the inner scope or consider restructuring the code to avoid shadowing.

    packages/commitlint-config/src/index.ts [19-20]

    -const packages = readdirSync(path);
    -packages.push(...packages);
    +const directoryPackages = readdirSync(path);
    +packages.push(...directoryPackages);
     
    Possible issue
    Correct the regex patterns for import sorting to ensure they are properly escaped.

    Ensure that the regex patterns used in import sorting are correctly escaped. The current
    use of String.raw might not be necessary and could lead to incorrect behavior if the
    intention was to treat the patterns as regular expressions.

    packages/eslint-config/src/base.ts [27-39]

    -[String.raw`^\u0000`],
    -[String.raw`^@?\w`],
    -[String.raw`^@/?\w`],
    -[String.raw`^\.`],
    -[String.raw`^.+\.s?css$`],
    +['^\\u0000'],
    +['^@?\\w'],
    +['^@/?\\w'],
    +['^\\.'],
    +['^.+\\.s?css$'],
     
    Enhancement
    Use destructuring for importing resolve to enhance code consistency and readability.

    Use destructuring to import resolve from node:path directly, which can make the import
    statements cleaner and more consistent with existing code style.

    packages/commitlint-config/src/index.ts [3-17]

    -import nodePath from 'node:path';
    -const path = nodePath.resolve(process.cwd(), directoryPath);
    +import { resolve } from 'node:path';
    +const path = resolve(process.cwd(), directoryPath);
     
    Best practice
    Update the peer dependency version to match the new dependency version for better compatibility.

    Ensure that the version ranges for peer dependencies are updated to reflect the new
    versions used in dependencies to avoid potential conflicts and ensure compatibility.

    packages/eslint-config/package.json [72]

     "peerDependencies": {
    -    "eslint": "^8.56.0",
    +    "eslint": "^8.57.0",
     }
     
    Maintainability
    Use a stable version of the package manager to ensure reproducible builds.

    Consider using a more stable version of the package manager in the packageManager field to
    avoid potential issues with non-reproducible builds due to the use of a commit hash.

    package.json [46]

    -"packageManager": "[email protected]+sha512.67f5879916a9293e5cf059c23853d571beaf4f753c707f40cb22bed5fb1578c6aad3b6c4107ccb3ba0b35be003eb621a16471ac836c87beb53f9d54bb4612724"
    +"packageManager": "[email protected]"
     

    @mheob mheob force-pushed the chore/update-dependencies branch from bfcea0c to b55f84f Compare May 11, 2024 13:17
    Copy link

    @coderabbitai coderabbitai bot left a comment

    Choose a reason for hiding this comment

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

    Actionable comments posted: 0

    Review Details

    Configuration used: CodeRabbit UI
    Review profile: CHILL

    Commits Files that changed from the base of the PR and between bfcea0c and b55f84f.
    Files ignored due to path filters (1)
    • pnpm-lock.yaml is excluded by !pnpm-lock.yaml
    Files selected for processing (6)
    • package.json (1 hunks)
    • packages/commitlint-config/package.json (1 hunks)
    • packages/commitlint-config/src/index.ts (2 hunks)
    • packages/eslint-config/package.json (1 hunks)
    • packages/eslint-config/src/base.ts (1 hunks)
    • packages/prettier-config/package.json (1 hunks)
    Files skipped from review as they are similar to previous changes (6)
    • package.json
    • packages/commitlint-config/package.json
    • packages/commitlint-config/src/index.ts
    • packages/eslint-config/package.json
    • packages/eslint-config/src/base.ts
    • packages/prettier-config/package.json

    @mheob mheob force-pushed the chore/update-dependencies branch from b55f84f to 04880c5 Compare May 11, 2024 13:41
    @mheob mheob force-pushed the chore/update-dependencies branch from 04880c5 to bbfa8ae Compare May 11, 2024 13:43
    Copy link

    sonarcloud bot commented May 11, 2024

    Quality Gate Passed Quality Gate passed

    Issues
    0 New issues
    0 Accepted issues

    Measures
    0 Security Hotspots
    No data about Coverage
    0.0% Duplication on New Code

    See analysis details on SonarCloud

    @mheob mheob merged commit 7b4cba9 into main May 11, 2024
    6 of 8 checks passed
    @mheob mheob deleted the chore/update-dependencies branch May 11, 2024 13:44
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    bug_fix dependencies Pull requests that update a dependency file enhancement New feature or request javascript Pull requests that update Javascript code Review effort [1-5]: 2
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    1 participant