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: up packages #1464

Merged
merged 4 commits into from
Aug 7, 2024
Merged

chore: up packages #1464

merged 4 commits into from
Aug 7, 2024

Conversation

SutuSebastian
Copy link
Collaborator

@SutuSebastian SutuSebastian commented Aug 6, 2024

Summary by CodeRabbit

  • New Features

    • Updated to the latest versions of several dependencies, improving overall performance and functionality across the application.
  • Bug Fixes

    • Enhanced accessibility and correctness in test cases for various components, ensuring better compliance and reliability.
  • Refactor

    • Streamlined test structures and logic for improved readability and maintenance.
  • Chores

    • Upgraded the version of Bun in the GitHub Actions workflow.
    • Updated development dependencies in the package.json for better stability and functionality.

fix(ui): broken tests after upgrade
fix(docs): mdx imports
@SutuSebastian SutuSebastian self-assigned this Aug 6, 2024
Copy link

changeset-bot bot commented Aug 6, 2024

⚠️ No Changeset found

Latest commit: 805d35f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

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

Click here to learn what changesets are, and how to add one.

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

Copy link

vercel bot commented Aug 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
flowbite-react ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2024 8:51am
flowbite-react-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Aug 7, 2024 8:51am

Copy link
Contributor

coderabbitai bot commented Aug 6, 2024

Walkthrough

This update focuses on upgrading various dependencies across applications, enhancing their performance and compatibility. Significant changes include adjustments to TypeScript type definitions for improved flexibility, as well as enhancements to the test structures of UI components for better readability. Overall, these updates aim to streamline the codebase and leverage the latest features and fixes in the libraries used.

Changes

Files Change Summary
.github/actions/setup/action.yml Updated Bun version from 1.1.14 to 1.1.21 to incorporate enhancements and fixes.
apps/storybook/package.json Incremented versions for dependencies (e.g., autoprefixer, postcss, tailwindcss, typescript, and vite) to their latest stable releases for improved functionality.
apps/web/package.json Updated multiple dependencies, including contentlayer2, tailwind-merge, and next, to enhance compatibility and performance.
packages/ui/package.json Upgraded dependencies such as @floating-ui/core, flowbite, and TypeScript, improving overall package performance and security.
packages/ui/src/helpers/generic-as-prop.ts Modified type definitions for PolymorphicComponentProp and PolymorphicComponentPropWithRef to use object instead of {}, enhancing type flexibility.
packages/ui/src/components/*.spec.tsx Various test files updated for better readability and structure, including replacing describe.concurrent with describe and enhancing assertions.
package.json Upgraded multiple devDependencies including @changesets/cli, prettier, and rimraf, and updated the packageManager from [email protected] to [email protected].

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant App
    participant DependencyManager

    User->>App: Request feature
    App->>DependencyManager: Check for updates
    DependencyManager-->>App: Fetch latest dependencies
    App->>User: Respond with updated functionality
Loading

🐰 In a patch where the carrots grow,
New updates leap in, bringing a glow!
With packages fresh and tests that shine,
Each little change makes our code divine!
Let's hop with joy, for progress is near,
Together we code, spreading cheer! 🌼✨


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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

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

CodeRabbit Configuration 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.

@SutuSebastian
Copy link
Collaborator Author

@coderabbitai review

Copy link
Contributor

coderabbitai bot commented Aug 6, 2024

Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

Copy link
Contributor

@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 c47d3a8 and e7260ba.

Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
Files selected for processing (19)
  • .github/actions/setup/action.yml (1 hunks)
  • apps/storybook/package.json (1 hunks)
  • apps/web/components/mdx.tsx (2 hunks)
  • apps/web/content/docs/customize/theme.mdx (1 hunks)
  • apps/web/package.json (2 hunks)
  • package.json (1 hunks)
  • packages/cli/package.json (1 hunks)
  • packages/ui/.eslintrc.cjs (2 hunks)
  • packages/ui/package.json (1 hunks)
  • packages/ui/src/components/Button/ButtonGroup.spec.tsx (2 hunks)
  • packages/ui/src/components/Checkbox/Checkbox.spec.tsx (2 hunks)
  • packages/ui/src/components/Datepicker/Datepicker.spec.tsx (6 hunks)
  • packages/ui/src/components/Label/Label.spec.tsx (1 hunks)
  • packages/ui/src/components/List/List.spec.tsx (1 hunks)
  • packages/ui/src/components/ListGroup/ListGroup.spec.tsx (1 hunks)
  • packages/ui/src/components/Navbar/Navbar.spec.tsx (1 hunks)
  • packages/ui/src/components/Radio/Radio.spec.tsx (2 hunks)
  • packages/ui/src/components/Sidebar/Sidebar.spec.tsx (2 hunks)
  • packages/ui/src/helpers/generic-as-prop.ts (1 hunks)
Files skipped from review due to trivial changes (9)
  • apps/storybook/package.json
  • apps/web/content/docs/customize/theme.mdx
  • apps/web/package.json
  • packages/cli/package.json
  • packages/ui/package.json
  • packages/ui/src/components/Button/ButtonGroup.spec.tsx
  • packages/ui/src/components/List/List.spec.tsx
  • packages/ui/src/components/ListGroup/ListGroup.spec.tsx
  • packages/ui/src/components/Sidebar/Sidebar.spec.tsx
Additional comments not posted (23)
.github/actions/setup/action.yml (1)

10-10: LGTM! But verify the compatibility of the new Bun version.

The Bun version has been updated from 1.1.14 to 1.1.21. Ensure that the new version is compatible with the rest of the workflow and dependencies.

packages/ui/src/helpers/generic-as-prop.ts (2)

9-9: LGTM!

The default type parameter for Props has been changed from {} to object, enhancing flexibility in type usage.


14-14: LGTM!

The default type parameter for Props has been changed from {} to object, enhancing flexibility in type usage.

packages/ui/src/components/Radio/Radio.spec.tsx (3)

6-6: LGTM!

The test suite has been updated to use describe instead of describe.concurrent, improving readability and debugging.


9-10: LGTM!

The test code has been simplified by directly using screen.getByRole("radio"), enhancing clarity.


31-31: LGTM!

The test code has been simplified by directly using screen.getByRole("radio"), enhancing clarity.

packages/ui/src/components/Checkbox/Checkbox.spec.tsx (2)

6-6: Verify the impact of replacing describe.concurrent with describe.

Ensure that replacing describe.concurrent with describe does not negatively impact the test execution, especially in terms of performance and concurrency.


31-31: LGTM!

The changes enhance readability by consolidating the rendering and querying steps. The functionality remains intact.

packages/ui/.eslintrc.cjs (3)

24-24: Verify the alignment with the project's coding standards.

Ensure that setting @typescript-eslint/no-unused-expressions to "off" aligns with the project's coding standards and does not introduce potential issues.


25-33: LGTM! But verify the appropriateness of the exceptions.

The changes enhance the linting process by promoting cleaner code while accommodating certain variable naming conventions. Ensure that the exceptions (variables starting with an underscore) are appropriate and do not overlook potential issues.


54-54: Ensure consistency with TypeScript-specific rules.

The general no-unused-vars rule has been turned off, aligning with the specific handling of unused variables defined under the TypeScript ESLint rules. Ensure that this change maintains consistency with TypeScript-specific rules and does not introduce potential issues.

package.json (1)

34-49: Verify the compatibility of the updated versions.

Ensure that the updated versions of the packages are compatible with the project and do not introduce breaking changes.

packages/ui/src/components/Navbar/Navbar.spec.tsx (2)

7-14: LGTM! Simplified test structure.

The replacement of describe.concurrent with describe enhances readability and maintainability. The accessibility test is correctly implemented.


16-35: LGTM! Updated interaction test.

The test accurately verifies the visibility of the Navbar.Menu when the toggle is clicked. The use of userEvent for simulating clicks is appropriate.

apps/web/components/mdx.tsx (1)

Line range hint 1-12:
LGTM! Added Alert component.

The addition of the Alert component from the flowbite-react library enhances the functionality of the MDX components by allowing the use of alert notifications. The structure of the component declarations remains intact.

packages/ui/src/components/Label/Label.spec.tsx (3)

16-35: LGTM! Simplified test structure and enhanced accessibility test.

The replacement of describe.concurrent with describe enhances readability and maintainability. The accessibility test is correctly implemented, and the use of screen.getByLabelText aligns with best practices.


37-53: LGTM! Updated theme test.

The addition of the data-testid attribute allows for more precise targeting of the component in assertions. The test is correctly implemented.


Line range hint 55-105:
LGTM! Well-structured TestForm component.

The TestForm component is well-structured and correctly used in the accessibility test. No issues are found.

packages/ui/src/components/Datepicker/Datepicker.spec.tsx (5)

110-110: LGTM!

The change aligns the assertion method with the recommended practices of the testing library.


127-127: LGTM!

The change aligns the assertion method with the recommended practices of the testing library.


144-144: LGTM!

The change aligns the assertion method with the recommended practices of the testing library.


161-161: LGTM!

The change aligns the assertion method with the recommended practices of the testing library.


27-27: LGTM! Ensure the input element is always present.

The change makes the code more straightforward by removing the optional chaining operator.

Ensure that the input element is always present when this check is performed.

Verification successful

Verification Successful!

The input element is consistently present and accessed throughout the Datepicker.spec.tsx file, ensuring that the value check is performed correctly.

  • Instances of screen.getByRole("textbox") have been found multiple times, confirming the presence of the input element.
Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify the presence of the input element before performing the value check.

# Test: Search for the presence of the input element. Expect: The input element is always present.
rg --type python -A 5 $'screen.getByRole("textbox")'

Length of output: 84


Script:

#!/bin/bash
# Description: Verify the presence of the input element before performing the value check.

# Test: Search for the presence of the input element. Expect: The input element is always present.
rg --type tsx -A 5 $'screen.getByRole("textbox")'

Length of output: 78


Script:

#!/bin/bash
# Description: Verify the presence of the input element before performing the value check.

# Test: Search for the presence of the input element. Expect: The input element is always present.
rg -A 5 $'screen.getByRole("textbox")'

Length of output: 39


Script:

#!/bin/bash
# Description: Verify the presence of the input element before performing the value check in the Datepicker.spec.tsx file.

# Test: Search for the presence of the input element in the Datepicker.spec.tsx file. Expect: The input element is always present.
rg 'screen.getByRole("textbox")' packages/ui/src/components/Datepicker/Datepicker.spec.tsx

Length of output: 92


Script:

#!/bin/bash
# Description: Verify the presence of the input element before performing the value check in the Datepicker.spec.tsx file.

# Test: Search for related patterns indicating the presence of the input element in the Datepicker.spec.tsx file.
rg 'getByRole' packages/ui/src/components/Datepicker/Datepicker.spec.tsx

Length of output: 977

Copy link
Contributor

@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 e7260ba and 805d35f.

Files ignored due to path filters (1)
  • bun.lockb is excluded by !**/bun.lockb
Files selected for processing (1)
  • package.json (1 hunks)
Files skipped from review due to trivial changes (1)
  • package.json

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