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

feat: tailwind variants upgrade #4386

Open
wants to merge 5 commits into
base: canary
Choose a base branch
from

Conversation

jrgarciadev
Copy link
Member

@jrgarciadev jrgarciadev commented Dec 17, 2024

Closes #

📝 Description

  • tailwind-variants upgraded
  • tests fixed
  • react upgraded to 18.3.0
  • tsup upgrade to v8

💣 Is this a breaking change (Yes/No): No

📝 Additional Information

Summary by CodeRabbit

Release Notes

  • New Features

    • Enhanced test suites across multiple components to improve error handling and manage React warnings effectively.
    • Introduced disableAnimation prop for Dropdown and Select components to control animation behavior during tests.
  • Bug Fixes

    • Updated tests for various components to ensure they handle React warnings correctly without failing due to expected warnings.
  • Dependency Updates

    • Upgraded react and react-dom to version 18.3.0 across all packages for improved compatibility and features.
    • Added @nextui-org/test-utils as a new dependency in multiple components to enhance testing capabilities.
  • Documentation

    • Improved test structure and readability for several components, ensuring better maintainability.

@jrgarciadev jrgarciadev added this to the v2.7.0 milestone Dec 17, 2024
Copy link

vercel bot commented Dec 17, 2024

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

Name Status Preview Comments Updated (UTC)
nextui-docs-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 7:38pm
nextui-storybook-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 7:38pm

Copy link

changeset-bot bot commented Dec 17, 2024

🦋 Changeset detected

Latest commit: 584dad2

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

This PR includes changesets to release 80 packages
Name Type
@nextui-org/use-intersection-observer Patch
@nextui-org/use-data-scroll-overflow Patch
@nextui-org/use-aria-accordion-item Patch
@nextui-org/use-aria-modal-overlay Patch
@nextui-org/use-safe-layout-effect Patch
@nextui-org/use-aria-multiselect Patch
@nextui-org/use-infinite-scroll Patch
@nextui-org/use-scroll-position Patch
@nextui-org/react-rsc-utils Patch
@nextui-org/scroll-shadow Patch
@nextui-org/use-aria-accordion Patch
@nextui-org/autocomplete Patch
@nextui-org/use-update-effect Patch
@nextui-org/breadcrumbs Patch
@nextui-org/date-picker Patch
@nextui-org/use-callback-ref Patch
@nextui-org/framer-utils Patch
@nextui-org/shared-icons Patch
@nextui-org/date-input Patch
@nextui-org/pagination Patch
@nextui-org/use-aria-button Patch
@nextui-org/react-utils Patch
@nextui-org/accordion Patch
@nextui-org/input-otp Patch
@nextui-org/use-disclosure Patch
@nextui-org/use-is-mounted Patch
@nextui-org/use-pagination Patch
@nextui-org/use-real-shape Patch
@nextui-org/aria-utils Patch
@nextui-org/test-utils Patch
@nextui-org/calendar Patch
@nextui-org/checkbox Patch
@nextui-org/dropdown Patch
@nextui-org/progress Patch
@nextui-org/skeleton Patch
@nextui-org/use-aria-link Patch
@nextui-org/use-clipboard Patch
@nextui-org/use-draggable Patch
@nextui-org/use-is-mobile Patch
@nextui-org/use-ref-state Patch
@nextui-org/divider Patch
@nextui-org/listbox Patch
@nextui-org/popover Patch
@nextui-org/snippet Patch
@nextui-org/spinner Patch
@nextui-org/tooltip Patch
@nextui-org/avatar Patch
@nextui-org/button Patch
@nextui-org/drawer Patch
@nextui-org/navbar Patch
@nextui-org/ripple Patch
@nextui-org/select Patch
@nextui-org/slider Patch
@nextui-org/spacer Patch
@nextui-org/switch Patch
@nextui-org/use-measure Patch
@nextui-org/alert Patch
@nextui-org/badge Patch
@nextui-org/image Patch
@nextui-org/input Patch
@nextui-org/modal Patch
@nextui-org/radio Patch
@nextui-org/table Patch
@nextui-org/use-resize Patch
@nextui-org/card Patch
@nextui-org/chip Patch
@nextui-org/code Patch
@nextui-org/form Patch
@nextui-org/link Patch
@nextui-org/menu Patch
@nextui-org/tabs Patch
@nextui-org/user Patch
@nextui-org/system-rsc Patch
@nextui-org/use-image Patch
@nextui-org/use-theme Patch
@nextui-org/kbd Patch
@nextui-org/use-ssr Patch
@nextui-org/system Patch
@nextui-org/react Patch
@nextui-org/theme Patch

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
Contributor

coderabbitai bot commented Dec 17, 2024

Walkthrough

This pull request introduces a comprehensive update across the NextUI library, focusing on version upgrades and standardization. The primary changes include updating React and React DOM dependencies to version 18.3.0 across multiple packages, adding @nextui-org/test-utils to various component test suites, and making minor adjustments to package configurations. The updates span components, hooks, core packages, and testing utilities, ensuring consistency and compatibility throughout the library.

Changes

File/Path Change Summary
package.json Updated React and React DOM to version 18.3.0, upgraded development dependencies
apps/docs/package.json Updated React, React DOM, and Tailwind Variants versions
Multiple Component package.json files Updated React and React DOM to version 18.3.0, added @nextui-org/test-utils
Test files (e.g., dropdown.test.tsx) Added spy and shouldIgnoreReactWarning from test utils, refined error handling
packages/core/theme/src/utils/types.ts Modified SlotsToClasses type to exclude 0n values

Possibly related PRs

Suggested Labels

📋 Scope : Docs, 👀 Status: To Review

Suggested Reviewers

  • wingkwong

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>, please review it.
    • 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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 using 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.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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.

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: 10

🧹 Nitpick comments (19)
packages/core/theme/src/utils/types.ts (1)

4-7: Consider updating documentation for SlotsToClasses

The type change excludes 0n from valid class values. Consider updating the documentation comment to explain why 0n is excluded and document any migration steps if needed.

packages/components/code/__tests__/code.test.tsx (1)

3-3: Consider extracting common test utility function

The warning handling logic is duplicated across test files. Consider extracting this into a reusable test utility function to improve maintainability.

+ // @nextui-org/test-utils
+ export const verifyNoWarnings = (spy: jest.SpyInstance) => {
+   if (shouldIgnoreReactWarning(spy)) {
+     return;
+   }
+   expect(spy).toHaveBeenCalledTimes(0);
+ };

- // In test files
- if (shouldIgnoreReactWarning(spy)) {
-   return;
- }
- expect(spy).toHaveBeenCalledTimes(0);
+ verifyNoWarnings(spy);

Also applies to: 12-17

packages/hooks/use-draggable/package.json (1)

41-41: Consider using workspace-level version management

To maintain consistency across packages and simplify future updates, consider implementing one of these solutions:

  1. Use workspace-level dependencies in the root package.json
  2. Implement a version management tool like Lerna or Rush
  3. Use a custom script to sync versions across packages

This would help prevent version mismatches and reduce maintenance overhead.

Also applies to: 44-44, 41-41

packages/hooks/use-infinite-scroll/package.json (1)

44-44: Consider adding @nextui-org/test-utils as a devDependency.

While the React version upgrade looks good, this complex hook might benefit from having the test-utils package as a devDependency, similar to other NextUI packages.

Add the following to devDependencies:

   "devDependencies": {
+    "@nextui-org/test-utils": "workspace:*",
     "clean-package": "2.2.0",
     "react": "^18.3.0"
   },
packages/hooks/use-data-scroll-overflow/package.json (1)

44-44: Consider adding @nextui-org/test-utils as a devDependency.

While the React version upgrade looks good, this hook might benefit from having the test-utils package as a devDependency for consistent testing practices across NextUI packages.

Add the following to devDependencies:

   "devDependencies": {
+    "@nextui-org/test-utils": "workspace:*",
     "clean-package": "2.2.0",
     "react": "^18.3.0"
   },
packages/hooks/use-aria-accordion-item/package.json (1)

44-47: Consider adding a React version management strategy

To maintain consistency across all packages and prevent version conflicts, consider:

  1. Using a centralized version management tool like syncpack or version-sync
  2. Adding a validation step in CI to ensure all packages use consistent React versions
  3. Documenting the React version compatibility matrix for the project
packages/hooks/use-intersection-observer/package.json (1)

47-47: Consider using exact version for consistency

Other packages in the PR use exact version 18.3.0, but this package uses ^18.3.0. Consider using the exact version for consistency across the monorepo.

-    "react": "^18.3.0"
+    "react": "18.3.0"
packages/hooks/use-aria-accordion/package.json (1)

50-50: Consider using exact version for React dependency

The PR objective mentions upgrading to React 18.3.0, but this package uses ^18.3.0 which allows minor version updates. Consider using exact version 18.3.0 for consistency with other packages in the monorepo.

packages/hooks/use-aria-link/package.json (1)

49-49: Consider using exact version for React dependency

For consistency with the PR objective and other packages, consider using exact version 18.3.0 instead of ^18.3.0.

packages/components/input-otp/package.json (1)

59-61: Consider consistent version pinning strategy

While React and React DOM are pinned to exact versions, react-hook-form uses a flexible version (^7.51.3). Consider adopting a consistent versioning strategy across all dependencies.

   "devDependencies": {
     "@nextui-org/theme": "workspace:*",
     "@nextui-org/system": "workspace:*",
     "@nextui-org/button": "workspace:*",
     "clean-package": "2.2.0",
     "react": "18.3.0",
     "react-dom": "18.3.0",
-    "react-hook-form": "^7.51.3"
+    "react-hook-form": "7.51.3"
   }
packages/components/avatar/package.json (1)

56-57: Consider updating peerDependencies range

The devDependencies specify React 18.3.0, but peerDependencies allow a broader range (>=18 || >=19.0.0-rc.0). Consider tightening the peerDependencies range to ensure compatibility with the tested version.

   "peerDependencies": {
-    "react": ">=18 || >=19.0.0-rc.0",
-    "react-dom": ">=18 || >=19.0.0-rc.0",
+    "react": "^18.3.0 || >=19.0.0-rc.0",
+    "react-dom": "^18.3.0 || >=19.0.0-rc.0",
     "@nextui-org/theme": ">=2.4.0",
     "@nextui-org/system": ">=2.4.0"
   }
packages/components/link/package.json (1)

56-57: Consider impact on peer dependencies

While the devDependencies are updated to React 18.3.0, the peerDependencies remain flexible (>=18 || >=19.0.0-rc.0). This is good as it maintains compatibility with projects using different React versions.

Consider documenting the minimum tested/supported React version in the component's README to help users make informed decisions about upgrades.

packages/components/card/package.json (1)

61-65: Consider implementing automated dependency version management

To maintain version consistency across packages, consider implementing tools like Renovate or Dependabot for automated dependency updates. This would help ensure that all packages are updated simultaneously and remain in sync.

packages/components/listbox/package.json (1)

Line range hint 1-1: Consider implementing a centralized version management strategy

To maintain consistency across packages, consider:

  1. Using a tool like changesets for version management
  2. Centralizing common dependency versions in the workspace root
  3. Establishing clear guidelines for version ranges in peer vs. dev dependencies
packages/components/tooltip/__tests__/tooltip.test.tsx (1)

4-4: LGTM! Test warning handling improvement.

Good addition of the warning check utility. Consider extracting the warning check into a shared test helper for reuse across other component tests.

Consider creating a shared helper:

// test-helpers.ts
export const expectNoWarnings = (spy: jest.SpyInstance) => {
  if (!shouldIgnoreReactWarning(spy)) {
    expect(spy).toHaveBeenCalledTimes(0);
  }
};

Also applies to: 30-32

packages/components/table/package.json (1)

70-71: Consider adding test utilities

Other components like popover have added @nextui-org/test-utils. Consider adding it here for consistency in testing capabilities across components.

packages/components/accordion/package.json (1)

75-76: LGTM: Version updates align with project standards

The React version updates are consistent with other packages in the workspace.

Consider adding a root-level package.json script to help maintain version consistency across all workspace packages. This could automate the process of updating React versions across all packages simultaneously.

packages/components/navbar/__tests__/navbar.test.tsx (1)

4-4: LGTM! Consider documenting the warning handling strategy.

The addition of warning handling through shouldIgnoreReactWarning improves test reliability.

Consider adding a comment explaining the warning handling strategy:

+  // Skip assertion if the warning is expected to be ignored
   if (shouldIgnoreReactWarning(spy)) {
     return;
   }

Also applies to: 95-98

packages/components/select/__tests__/select.test.tsx (1)

69-69: Consider extracting disableAnimation to a wrapper component

The disableAnimation prop is repeated across multiple test instances. Consider creating a test wrapper component to reduce repetition and improve maintainability.

// Example wrapper
const TestSelect = (props: SelectProps) => (
  <Select disableAnimation {...props} />
);

// Usage in tests
render(
  <TestSelect aria-label="Favorite Animal" label="Favorite Animal">
    <SelectItem key="penguin">Penguin</SelectItem>
  </TestSelect>
);

Also applies to: 88-88, 99-104, 114-114, 130-135

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e15ef62 and 584dad2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (82)
  • .changeset/stupid-pants-perform.md (1 hunks)
  • apps/docs/package.json (4 hunks)
  • package.json (2 hunks)
  • packages/components/accordion/__tests__/accordion.test.tsx (2 hunks)
  • packages/components/accordion/package.json (1 hunks)
  • packages/components/alert/package.json (1 hunks)
  • packages/components/autocomplete/__tests__/autocomplete.test.tsx (2 hunks)
  • packages/components/autocomplete/package.json (1 hunks)
  • packages/components/avatar/package.json (1 hunks)
  • packages/components/badge/package.json (1 hunks)
  • packages/components/breadcrumbs/package.json (1 hunks)
  • packages/components/button/package.json (1 hunks)
  • packages/components/calendar/package.json (1 hunks)
  • packages/components/card/package.json (1 hunks)
  • packages/components/checkbox/package.json (1 hunks)
  • packages/components/chip/package.json (1 hunks)
  • packages/components/code/__tests__/code.test.tsx (2 hunks)
  • packages/components/code/package.json (1 hunks)
  • packages/components/date-input/package.json (1 hunks)
  • packages/components/date-picker/__tests__/date-picker.test.tsx (3 hunks)
  • packages/components/date-picker/package.json (1 hunks)
  • packages/components/divider/package.json (1 hunks)
  • packages/components/drawer/__tests__/drawer.test.tsx (2 hunks)
  • packages/components/drawer/package.json (1 hunks)
  • packages/components/dropdown/__tests__/dropdown.test.tsx (25 hunks)
  • packages/components/dropdown/package.json (1 hunks)
  • packages/components/form/package.json (1 hunks)
  • packages/components/image/package.json (1 hunks)
  • packages/components/input-otp/package.json (1 hunks)
  • packages/components/input/package.json (1 hunks)
  • packages/components/kbd/__tests__/kbd.test.tsx (2 hunks)
  • packages/components/kbd/package.json (1 hunks)
  • packages/components/link/package.json (1 hunks)
  • packages/components/listbox/package.json (1 hunks)
  • packages/components/menu/package.json (1 hunks)
  • packages/components/modal/__tests__/modal.test.tsx (2 hunks)
  • packages/components/modal/package.json (1 hunks)
  • packages/components/navbar/__tests__/navbar.test.tsx (3 hunks)
  • packages/components/navbar/package.json (1 hunks)
  • packages/components/pagination/__tests__/pagination.test.tsx (2 hunks)
  • packages/components/pagination/package.json (1 hunks)
  • packages/components/popover/__tests__/popover.test.tsx (2 hunks)
  • packages/components/popover/package.json (1 hunks)
  • packages/components/progress/package.json (1 hunks)
  • packages/components/radio/package.json (1 hunks)
  • packages/components/ripple/package.json (1 hunks)
  • packages/components/scroll-shadow/package.json (1 hunks)
  • packages/components/select/__tests__/select.test.tsx (42 hunks)
  • packages/components/select/package.json (1 hunks)
  • packages/components/skeleton/package.json (1 hunks)
  • packages/components/slider/package.json (1 hunks)
  • packages/components/snippet/package.json (1 hunks)
  • packages/components/spacer/__tests__/spacer.test.tsx (2 hunks)
  • packages/components/spacer/package.json (1 hunks)
  • packages/components/spinner/package.json (1 hunks)
  • packages/components/switch/package.json (1 hunks)
  • packages/components/table/package.json (1 hunks)
  • packages/components/tabs/__tests__/tabs.test.tsx (2 hunks)
  • packages/components/tabs/package.json (1 hunks)
  • packages/components/tooltip/__tests__/tooltip.test.tsx (2 hunks)
  • packages/components/tooltip/package.json (1 hunks)
  • packages/components/user/package.json (1 hunks)
  • packages/core/react/package.json (1 hunks)
  • packages/core/system-rsc/package.json (1 hunks)
  • packages/core/system/package.json (1 hunks)
  • packages/core/theme/package.json (1 hunks)
  • packages/core/theme/src/utils/types.ts (1 hunks)
  • packages/hooks/use-aria-accordion-item/package.json (1 hunks)
  • packages/hooks/use-aria-accordion/package.json (1 hunks)
  • packages/hooks/use-aria-button/package.json (1 hunks)
  • packages/hooks/use-aria-link/package.json (1 hunks)
  • packages/hooks/use-aria-modal-overlay/package.json (1 hunks)
  • packages/hooks/use-aria-multiselect/package.json (1 hunks)
  • packages/hooks/use-callback-ref/package.json (1 hunks)
  • packages/hooks/use-clipboard/package.json (1 hunks)
  • packages/hooks/use-data-scroll-overflow/package.json (1 hunks)
  • packages/hooks/use-disclosure/package.json (1 hunks)
  • packages/hooks/use-draggable/package.json (1 hunks)
  • packages/hooks/use-image/package.json (1 hunks)
  • packages/hooks/use-infinite-scroll/package.json (1 hunks)
  • packages/hooks/use-intersection-observer/package.json (1 hunks)
  • packages/hooks/use-is-mobile/package.json (1 hunks)
⛔ Files not processed due to max files limit (22)
  • packages/hooks/use-is-mounted/package.json
  • packages/hooks/use-measure/package.json
  • packages/hooks/use-pagination/package.json
  • packages/hooks/use-real-shape/package.json
  • packages/hooks/use-ref-state/package.json
  • packages/hooks/use-resize/package.json
  • packages/hooks/use-safe-layout-effect/package.json
  • packages/hooks/use-scroll-position/package.json
  • packages/hooks/use-ssr/package.json
  • packages/hooks/use-theme/package.json
  • packages/hooks/use-update-effect/package.json
  • packages/storybook/package.json
  • packages/utilities/aria-utils/package.json
  • packages/utilities/framer-utils/package.json
  • packages/utilities/react-rsc-utils/package.json
  • packages/utilities/react-utils/package.json
  • packages/utilities/shared-icons/package.json
  • packages/utilities/test-utils/src/index.ts
  • packages/utilities/test-utils/src/spy.ts
  • plop/component/package.json.hbs
  • plop/hook/package.json.hbs
  • scripts/setup-test.ts
🔇 Additional comments (85)
packages/components/pagination/__tests__/pagination.test.tsx (2)

3-3: LGTM: Test utility import aligns with the PR objectives.

The addition of spy and shouldIgnoreReactWarning from @nextui-org/test-utils is consistent with the PR's goal of fixing tests across components.


12-17: Verify the impact of skipping assertions.

The early return condition could potentially skip the important assertion that verifies the spy hasn't been called. This might hide React warnings that should be addressed.

Let's check if this pattern is consistently applied across other component tests:

packages/core/theme/src/utils/types.ts (1)

7-7: Verify compatibility with existing code using SlotsToClasses

The type change from ClassValue to Exclude<ClassValue, 0n> might affect existing code. While excluding 0n seems reasonable for class values, we should verify existing usage.

packages/components/spacer/__tests__/spacer.test.tsx (1)

3-3: Verify test coverage with early return

The addition of shouldIgnoreReactWarning introduces an early return path that skips the spy assertion. While this helps handle React warnings gracefully, we should ensure test coverage remains adequate.

Also applies to: 12-17

✅ Verification successful

Early return with shouldIgnoreReactWarning is correctly implemented

The implementation in the Spacer component test follows the established pattern seen across the codebase. The early return with shouldIgnoreReactWarning is used to handle React warnings without compromising test coverage because:

  1. The main assertion expect(() => wrapper.unmount()).not.toThrow() is always executed before the conditional block
  2. The spy assertion is only skipped when React warnings need to be ignored, which is the intended behavior
  3. This pattern is consistently implemented in other component tests (e.g., Tabs, Tooltip) in the same way
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for consistent implementation across other test files
fd -e test.tsx -x grep -l "shouldIgnoreReactWarning" {} \; | wc -l

# Look for any test files that might be missing this pattern
fd -e test.tsx -x grep -L "shouldIgnoreReactWarning" {} \;

Length of output: 2501


Script:

#!/bin/bash
# Let's check the actual implementation of shouldIgnoreReactWarning in test-utils
rg -A 5 "export const shouldIgnoreReactWarning" 

# Check the specific test implementation in spacer.test.tsx
cat packages/components/spacer/__tests__/spacer.test.tsx

Length of output: 737


Script:

#!/bin/bash
# Let's check a few other test files that do use shouldIgnoreReactWarning to understand the pattern
fd -e test.tsx -x grep -l "shouldIgnoreReactWarning" {} \; | head -n 3 | xargs cat

# Also check if there are any test files with spy usage but without shouldIgnoreReactWarning
rg "import.*spy.*from.*test-utils" -l | grep "test.tsx" | grep -v -f <(fd -e test.tsx -x grep -l "shouldIgnoreReactWarning" {} \;)

Length of output: 14939

packages/hooks/use-is-mobile/package.json (1)

44-44: Verify compatibility with @react-aria/ssr

Let's ensure that @react-aria/ssr 3.9.7 is compatible with React 18.3.0.

✅ Verification successful

React 18.3.0 is compatible with @react-aria/ssr 3.9.7

The peer dependency specification for @react-aria/ssr 3.9.7 (^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1) explicitly includes React 18.x versions, making it compatible with React 18.3.0. Additionally, no issues were found regarding compatibility between these specific versions.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check @react-aria/ssr package.json for React version compatibility
curl -s "https://registry.npmjs.org/@react-aria/ssr/3.9.7" | jq '.peerDependencies'

# Check if there are any reported issues with this combination
gh api graphql -f query='
{
  search(query: "repo:adobe/react-spectrum @react-aria/ssr React 18.3", type: ISSUE, first: 5) {
    nodes {
      ... on Issue {
        title
        url
        state
      }
    }
  }
}'

Length of output: 403

packages/hooks/use-draggable/package.json (1)

41-41: Verify compatibility with @react-aria/interactions

Let's ensure that @react-aria/interactions 3.22.5 is compatible with React 18.3.0.

✅ Verification successful

@react-aria/interactions 3.22.5 is compatible with React 18.3.0

The package's peer dependencies explicitly support React versions from 16.8.0 up to 19.0.0-rc.1 (^16.8.0 || ^17.0.0-rc.1 || ^18.0.0 || ^19.0.0-rc.1), which includes React 18.3.0. Additionally, no compatibility issues were found in the react-spectrum repository.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check @react-aria/interactions package.json for React version compatibility
curl -s "https://registry.npmjs.org/@react-aria/interactions/3.22.5" | jq '.peerDependencies'

# Check if there are any reported issues with this combination
gh api graphql -f query='
{
  search(query: "repo:adobe/react-spectrum @react-aria/interactions React 18.3", type: ISSUE, first: 5) {
    nodes {
      ... on Issue {
        title
        url
        state
      }
    }
  }
}'

Length of output: 422

packages/hooks/use-image/package.json (1)

45-45: LGTM! Verify test coverage with the new React version.

The React version upgrade to 18.3.0 aligns with the PR objectives and maintains compatibility with the peerDependencies range.

Let's verify the test coverage with the new React version:

✅ Verification successful

Tests are well-covered and compatible with React 18.3.0

The test suite uses @testing-library/react with renderHook and properly tests all states of the image loading hook (pending, loading, loaded, failed). The tests are implementation-agnostic and focus on behavior, which means they'll work correctly with React 18.3.0.

  • Tests cover all possible states of the hook
  • Uses modern React Testing Library patterns
  • No React version-specific APIs are being tested
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if there are any React-specific tests that might need updates
rg -l "react" packages/hooks/use-image/src/__tests__/

Length of output: 133


Script:

#!/bin/bash
# Let's first find the test files for this package
fd -t f "test|spec" packages/hooks/use-image/

# Then check the content of package.json to understand test setup
cat packages/hooks/use-image/package.json

Length of output: 1455


Script:

#!/bin/bash
# Let's check the content of the test file to verify React-specific tests
cat packages/hooks/use-image/__tests__/use-image.test.tsx

# Also check if there are any React-specific test utilities being used
rg -l "@testing-library/react" packages/hooks/use-image/__tests__/

Length of output: 1232

packages/hooks/use-callback-ref/package.json (1)

44-44: Verify workspace dependency compatibility

The React version upgrade looks good. However, we should ensure that the workspace dependency @nextui-org/use-safe-layout-effect is also compatible with React 18.3.0.

✅ Verification successful

React version compatibility verified across workspace dependencies

The workspace dependency @nextui-org/use-safe-layout-effect is properly aligned with the React version update, having the same devDependency (^18.3.0) and compatible peer dependencies (>=18 || >=19.0.0-rc.0).

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check the React version in use-safe-layout-effect package
cat packages/hooks/use-safe-layout-effect/package.json | jq '.devDependencies.react, .peerDependencies.react'

Length of output: 145

packages/hooks/use-disclosure/package.json (1)

46-46: Verify compatibility with fixed version dependencies

While the React upgrade looks good, we should verify compatibility with:

  1. Fixed version dependencies:
    • @react-aria/utils@3.26.0
    • @react-stately/utils@3.10.5
  2. Workspace dependency:
    • @nextui-org/use-callback-ref
✅ Verification successful

Based on the results, I can generate the final response as the verification is complete:

Dependencies are compatible with React 18.3.0

The verification shows:

  • @react-aria/utils and @react-stately/utils have no peer dependencies, indicating no compatibility issues
  • The workspace dependency @nextui-org/use-callback-ref is already aligned with React 18.3.0 in devDependencies and has a compatible peer dependency range of ">=18 || >=19.0.0-rc.0"
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check package.json files for all dependencies
echo "Checking @react-aria/utils..."
curl -s https://registry.npmjs.org/@react-aria/utils/3.26.0/package.json | jq '.peerDependencies'

echo "Checking @react-stately/utils..."
curl -s https://registry.npmjs.org/@react-stately/utils/3.10.5/package.json | jq '.peerDependencies'

echo "Checking workspace dependency..."
cat packages/hooks/use-callback-ref/package.json | jq '.devDependencies.react, .peerDependencies.react'

Length of output: 567

packages/hooks/use-aria-accordion-item/package.json (1)

47-47: Verify compatibility with React ecosystem dependencies

The React upgrade looks good. However, we should verify compatibility with all fixed version dependencies:

  • @react-aria/button@3.11.0
  • @react-aria/focus@3.19.0
  • @react-stately/tree@3.8.6
  • @react-types/shared@3.26.0
packages/components/code/package.json (2)

48-48: LGTM: Test utilities addition

Adding test utilities as a dev dependency aligns with the project's goal of improving test coverage.


50-51: Verify React 18.3.0 compatibility with dependencies

While the update to React 18.3.0 aligns with the PR objectives, we should verify compatibility with other dependencies, particularly @nextui-org/system-rsc and other workspace dependencies.

✅ Verification successful

React 18.3.0 is compatible with workspace dependencies

The workspace packages specify peer dependencies for React as ">=18 || >=19.0.0-rc.0", which means React 18.3.0 is fully compatible with all NextUI components and utilities. The version upgrade from React 18.2.0 to 18.3.0 is a minor version bump that maintains backward compatibility within the React 18.x series.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any React version constraints in workspace dependencies
fd -e json -x cat {} \; | jq 'select(.peerDependencies.react != null) | {name: .name, react: .peerDependencies.react}'

Length of output: 2900


Script:

#!/bin/bash
# Let's check package.json files specifically in the workspace packages
fd "package.json" "packages/" -x cat {} \; | jq -c 'select(.peerDependencies != null) | {name: .name, react: .peerDependencies.react}' 2>/dev/null

# Also check for direct dependencies on React in workspace packages
fd "package.json" "packages/" -x cat {} \; | jq -c 'select(.dependencies != null) | {name: .name, react: .dependencies.react}' 2>/dev/null

Length of output: 8619

packages/components/image/package.json (1)

51-52: Ensure version alignment with use-image hook

The React version update looks good, but we should verify that the workspace dependency @nextui-org/use-image is compatible with React 18.3.0.

packages/hooks/use-intersection-observer/package.json (1)

Line range hint 39-42: Verify @react-aria dependencies compatibility

The package uses specific versions of @react-aria utilities. We should verify their compatibility with React 18.3.0.

✅ Verification successful

@react-aria dependencies are compatible with React 18.3.0

The peer dependencies for all @react-aria packages show compatibility with React versions ranging from ^16.8.0 to ^19.0.0-rc.1, which includes React 18.3.0. No compatibility issues are expected.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check @react-aria packages' peer dependencies
curl -s "https://registry.npmjs.org/@react-aria/utils/3.26.0" | jq '.peerDependencies'
curl -s "https://registry.npmjs.org/@react-aria/ssr/3.9.7" | jq '.peerDependencies'
curl -s "https://registry.npmjs.org/@react-aria/interactions/3.22.5" | jq '.peerDependencies'

Length of output: 462

packages/components/spinner/package.json (1)

51-52: LGTM! Version updates are consistent

The React dependency updates match the project-wide upgrade pattern.

packages/core/system-rsc/package.json (1)

42-42: Verify tailwind-variants compatibility

The upgrade from ^0.1.20 to ^0.3.0 is significant as 0.x versions can include breaking changes.

✅ Verification successful

Based on the search results, I can see that the codebase extensively uses the tv() function from tailwind-variants with a consistent API pattern across all components. The usage follows the standard pattern of defining variants, slots, and base styles, which has remained stable across versions. Looking at the actual usage patterns, there's no indication of using deprecated or changed APIs.

Upgrade to tailwind-variants ^0.3.0 appears safe

The codebase's usage of tailwind-variants follows a stable pattern that's compatible with the 0.3.0 version:

  • All components use the standard tv() function with proper slots and variants
  • No deprecated or changed API patterns were found
  • The upgrade primarily brings new features rather than breaking changes
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for breaking changes in tailwind-variants
gh api repos/nextui-org/nextui/pulls/4386/files | jq -r '.[] | select(.filename | contains("tailwind-variants"))' | grep '^[+-]'

# Search for tailwind-variants usage patterns that might need updates
rg -l 'tailwind-variants' | xargs rg 'tv\(' -A 3

Length of output: 18850

packages/hooks/use-aria-modal-overlay/package.json (1)

48-49: LGTM! React dependency updates are consistent.

The pinned React versions in devDependencies while maintaining flexible peerDependencies is the correct approach.

packages/components/kbd/package.json (1)

49-52: LGTM! Verify test-utils integration.

The changes align with the project-wide updates:

  • Test utilities addition supports improved testing capabilities
  • React version updates match other packages

Let's verify the test-utils integration across components:

✅ Verification successful

Test-utils integration verified and properly utilized

The test-utils package is correctly integrated and being used in the kbd component's tests. The implementation shows proper usage of the spy and shouldIgnoreReactWarning utilities from @nextui-org/test-utils in the test suite.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check test-utils adoption across component packages
# Look for components that might be missing the test utilities

echo "Checking test-utils adoption..."
find ./packages/components -name "package.json" -type f -exec jq -r '. | select(.devDependencies["@nextui-org/test-utils"] == null) | .name' {} \;

Length of output: 669


Script:

#!/bin/bash
# Let's check if test-utils is being used in the kbd component's tests
echo "Checking test-utils usage in kbd component..."
rg -l "@nextui-org/test-utils" ./packages/components/kbd/

# Let's also check the test files to understand the testing setup
echo -e "\nListing test files in kbd component..."
fd -e test.tsx -e test.ts -e spec.tsx -e spec.ts . ./packages/components/kbd/

Length of output: 468


Script:

#!/bin/bash
# Let's check how test-utils is being used in the kbd test file
echo "Checking test-utils usage in kbd.test.tsx..."
cat ./packages/components/kbd/__tests__/kbd.test.tsx

Length of output: 1711

packages/components/skeleton/package.json (1)

52-53: LGTM! Verify workspace dependency compatibility

The React version updates look good. Since this package depends on several workspace packages (@nextui-org/theme, @nextui-org/system, etc.), ensure they are all compatible with React 18.3.0.

✅ Verification successful

React 18.3.0 is compatible with workspace dependencies

All workspace dependencies specify peer dependency ranges (>=18 || >=19.0.0-rc.0 or >=18) that are compatible with React 18.3.0. The changes to the skeleton package's React version are safe to proceed with.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version compatibility across workspace dependencies

# Find all package.json files in workspace packages
fd package.json packages/ -x jq -r '. | select(.peerDependencies.react) | "\(.name): React peer dependency: \(.peerDependencies.react)"'

Length of output: 5485

packages/hooks/use-aria-button/package.json (1)

49-49: LGTM! Verify version consistency across workspace.

The React version update to ^18.3.0 aligns with the PR objectives while maintaining compatibility with the peer dependency range.

✅ Verification successful

React version is consistent across workspace packages

All packages in the workspace are using React version 18.3.0, with some using the exact version and others using the caret (^) notation. This is consistent with the change in use-aria-button package.json.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify React version consistency across workspace packages
fd package.json -x jq -r '. | select(.devDependencies.react != null) | "\(.name): \(.devDependencies.react)"'

Length of output: 2616

packages/components/scroll-shadow/package.json (1)

52-53: Same version specifier inconsistency as user package.

Similar to the user package, consider using ^18.3.0 for consistency with other workspace packages.

packages/components/kbd/__tests__/kbd.test.tsx (2)

3-3: LGTM: Test utilities import added

The addition of test utilities aligns with the standardization of testing practices across components.


12-17: Verify the warning suppression implementation

The warning handling logic looks correct, but let's verify this pattern is consistently implemented across other component tests.

✅ Verification successful

Warning suppression pattern is consistently implemented

The warning handling pattern using shouldIgnoreReactWarning is consistently implemented across multiple component test files in the codebase. The implementation in the kbd component follows the same pattern used in other components like accordion, autocomplete, code, dropdown, modal, navbar, popover, tabs, and others. The utility is properly imported from @nextui-org/test-utils and used in the same way across all test files.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for similar warning handling patterns in other test files
rg -l "shouldIgnoreReactWarning\(spy\)" "packages/components/**/__tests__/*.test.tsx"

Length of output: 171


Script:

#!/bin/bash
# First, let's find all test files
fd ".test.tsx$" packages/components

# Then, let's search for any warning suppression patterns
rg -A 2 "shouldIgnoreReactWarning" 

Length of output: 11233

packages/components/ripple/package.json (1)

53-54: Verify dependency compatibility

The React upgrade looks good. Let's verify compatibility between the fixed React version and other peer dependencies, particularly framer-motion.

✅ Verification successful

Dependencies are compatible with React 18.3.0

The fixed React version (18.3.0) is within the peer dependency range (>=18) specified in the package. The framer-motion peer dependency range (>=11.5.6 || >=12.0.0-alpha.1) is also compatible with the current setup, and all other dependencies are properly aligned through workspace references.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check peer dependency ranges across packages
fd package.json packages/ -x jq -r '. | select(.peerDependencies != null) | [.name, .peerDependencies.react, .peerDependencies["react-dom"], .peerDependencies["framer-motion"]] | @tsv'

Length of output: 5415


Script:

#!/bin/bash
# Check ripple package's dependencies and peerDependencies
fd package.json packages/components/ripple/ -x jq -r '.dependencies, .peerDependencies'

Length of output: 426

packages/components/form/package.json (1)

55-56: LGTM: React dependency updates are consistent

The React and ReactDOM updates to 18.3.0 align with the PR objectives while maintaining compatibility with the peerDependencies range.

packages/core/theme/package.json (2)

50-50: LGTM: Minor version updates look safe

The updates to color2k, @types/color, and tailwindcss are minor version bumps that should maintain backward compatibility.

Also applies to: 62-62, 64-64


54-55: Verify breaking changes in tailwind-variants upgrade

The update from ^0.1.20 to 0.3.0 is significant. Although the PR states no breaking changes, let's verify the changelog.

✅ Verification successful

Based on the release notes from v0.3.0, I can now generate the final response:

No breaking changes found in tailwind-variants upgrade

The update from ^0.1.20 to 0.3.0 contains only bug fixes and improvements:

  • Fixed merge objects order
  • Fixed responsive variants for base when slots are present
  • Fixed compound variants behavior with undefined values
  • Added transformer config type improvements
  • Updated tailwind-merge dependency
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check tailwind-variants changelog for breaking changes

# Fetch the changelog or releases page
gh api repos/nextui-org/tailwind-variants/releases | jq -r '.[].body' | grep -i "breaking"

# Check for any issues mentioning migration
gh search issues "tailwind-variants migration 0.3.0" --repo nextui-org/nextui

Length of output: 195


Script:

#!/bin/bash
# Let's get more context about the breaking changes by fetching full release notes
gh api repos/nextui-org/tailwind-variants/releases | jq -r '.[] | "Version: \(.tag_name)\n\(.body)\n---"'

# Also check usage patterns in the codebase
rg -A 3 "from 'tailwind-variants'" 

Length of output: 16038


Script:

#!/bin/bash
# Let's check how tailwind-variants is used in the codebase
rg -A 3 "from ['\"]tailwind-variants['\"]"

# Also check for tv function usage
ast-grep --pattern 'tv({$$$})'

Length of output: 67105

packages/components/chip/package.json (1)

56-57: LGTM: React dependency updates are consistent

The React and ReactDOM updates to 18.3.0 align with the PR objectives while maintaining compatibility with the peerDependencies range, which is properly configured to support both React 18 and future React 19.

packages/core/system/package.json (1)

44-45: Verify React 18.3.0 compatibility and stability

The change from flexible versioning (^18.0.0) to fixed version (18.3.0) ensures consistency but requires verification of version stability.

packages/components/progress/package.json (1)

57-58: Ensure version consistency across workspace packages

The React version update to 18.3.0 should be consistent across all NextUI packages to prevent potential compatibility issues.

✅ Verification successful

React version is consistent across workspace packages

All NextUI packages are using React version 18.3.0, with some packages using the exact version (18.3.0) and others using the compatible caret version (^18.3.0). Both notations are semantically equivalent for ensuring version consistency, as ^18.3.0 allows patches and minor updates while maintaining compatibility with 18.3.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version consistency across workspace packages

# Find all package.json files and check React versions
echo "Checking React versions across workspace packages..."
fd package.json packages/ -x jq -r '. | select(.devDependencies.react != null) | "\(.name): React \(.devDependencies.react)"'

Length of output: 3121

packages/components/snippet/package.json (1)

58-59: LGTM! Version update aligns with project objectives.

The update to React 18.3.0 is consistent with the PR objectives while maintaining compatibility through flexible peer dependencies.

Let's verify the version compatibility across the workspace:

✅ Verification successful

React version 18.3.0 update is consistent across the workspace

The verification confirms:

  • All packages in the workspace are aligned with React 18.3.0 (either exact or ^18.3.0)
  • The version satisfies all peer dependency requirements (>=18 || >=19.0.0-rc.0)
  • No version conflicts or inconsistencies found
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version consistency across workspace
# and verify compatibility with peer dependencies

# Check React versions across all package.json files
echo "Checking React versions across workspace:"
fd package.json$ | xargs jq -r '. | select(.devDependencies.react) | "\(.name): React \(.devDependencies.react)"'

# Verify peer dependency ranges
echo -e "\nVerifying peer dependency ranges:"
fd package.json$ | xargs jq -r '. | select(.peerDependencies.react) | "\(.name): \(.peerDependencies.react)"'

Length of output: 6861

packages/components/slider/package.json (1)

60-61: LGTM! Version update is consistent.

The React version update matches the project-wide upgrade strategy.

packages/components/breadcrumbs/package.json (1)

59-60: LGTM! Version update maintains consistency.

The React version update aligns with the project-wide upgrade strategy.

packages/components/switch/package.json (1)

59-60: Verify React version compatibility with peer dependencies

The change from ^18.0.0 to 18.3.0 makes the development environment more strict, while the peer dependencies remain flexible (>=18 || >=19.0.0-rc.0). This is good practice as it ensures consistent development while maintaining broad compatibility for end users.

✅ Verification successful

React version configuration is correctly aligned

The package configuration is well-structured with:

  • Development dependencies fixed at React 18.3.0 for consistent development environment
  • Peer dependencies allowing both React 18 and 19 (>=18 || >=19.0.0-rc.0)
  • Consistent peer dependency ranges across the NextUI ecosystem as verified from other packages
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify React version compatibility across workspace packages
# Check if any packages have conflicting React peer dependency ranges

fd -e json -x jq -r '. | select(.peerDependencies != null) | select(.peerDependencies.react != null) | "\(.name): \(.peerDependencies.react)"' {} \;

Length of output: 5374


Script:

#!/bin/bash
# Let's check the specific package.json for switch component to verify its peer and dev dependencies
cat packages/components/switch/package.json

Length of output: 1911

packages/hooks/use-aria-multiselect/package.json (1)

58-59: Verify React Aria dependencies compatibility

The update to React 18.3.0 requires verification of compatibility with the various React Aria dependencies (e.g., @react-aria/i18n@3.12.4, @react-aria/interactions@3.22.5).

✅ Verification successful

React 18.3.0 is compatible with the React Aria dependencies

Looking at the package.json, we can see that:

  1. The React Aria dependencies are fixed to specific versions that are known to work together
  2. The peerDependencies specify React ">=18 || >=19.0.0-rc.0", which means React 18.3.0 is fully supported
  3. All React Aria packages used are from the same major version (3.x.x), ensuring internal compatibility
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React Aria dependencies compatibility
# Look for any compatibility notes or issues in package.json files of React Aria dependencies

# Search for React version requirements in React Aria packages
fd -e json -x jq -r '. | select(.name | startswith("@react-aria")) | select(.peerDependencies != null) | "\(.name): \(.peerDependencies | tostring)"' {} \;

Length of output: 8427


Script:

#!/bin/bash
# Let's try a different approach to check React Aria dependencies
# First, let's check the package.json of the use-aria-multiselect package
cat packages/hooks/use-aria-multiselect/package.json

# Then, let's check the installed versions of React Aria packages in the root package.json
cat package.json | jq '.dependencies | with_entries(select(.key | startswith("@react-aria")))'

Length of output: 2069

packages/components/date-input/package.json (2)

60-61: Verify internationalization dependencies compatibility

The update to React 18.3.0 should be verified for compatibility with @internationalized/date@3.6.0 and related internationalization dependencies.

✅ Verification successful

React 18.3.0 is compatible with the internationalization dependencies

The package.json shows that:

  • The peerDependencies for React are very flexible: ">=18 || >=19.0.0-rc.0"
  • @internationalized/date is at version 3.6.0 and has no direct React version requirements
  • All React Aria dependencies (@react-aria/*) are at recent versions that support React 18
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check internationalization dependencies compatibility
# Look for any compatibility requirements in internationalization packages

# Search for React version requirements in internationalization packages
fd -e json -x jq -r '. | select(.name | startswith("@internationalized")) | select(.peerDependencies != null) | "\(.name): \(.peerDependencies | tostring)"' {} \;

Length of output: 8434


Script:

#!/bin/bash
# Let's try a different approach to check the package.json of @internationalized/date
# First, find the exact path of the package.json
fd -t f "package.json" -x grep -l "@internationalized/date" {}

# Then let's examine the content of the date-input's package.json
cat packages/components/date-input/package.json

Length of output: 2176


58-61: Consider workspace-wide React version management

The update to React 18.3.0 across multiple packages suggests a coordinated upgrade. Consider:

  1. Using workspace-level version management for consistent React versioning
  2. Documenting any potential breaking changes or migration steps
  3. Adding integration tests to verify cross-package compatibility

Also applies to: 58-59, 60-61

✅ Verification successful

Let me check the actual React version requirements across all dependency types to ensure we have a complete picture of version management in the workspace.


React version configuration is correctly managed

The workspace already implements a robust version management strategy:

  • All components declare flexible peer dependencies (>=18 || >=19.0.0-rc.0) allowing compatibility with both React 18 and upcoming React 19
  • Development dependencies are consistently set to 18.3.0 across packages
  • The setup allows for both development stability and production flexibility
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version consistency across workspace
# Verify that all packages use the same React version

# List all React versions in use
fd -e json -x jq -r '. | select(.devDependencies != null) | select(.devDependencies.react != null) | "\(.name): \(.devDependencies.react)"' {} \;

Length of output: 4250


Script:

#!/bin/bash
# Check React versions in dependencies and peerDependencies
fd -e json -x jq -r '
  if (.dependencies.react != null) then
    "\(.name) deps: \(.dependencies.react)"
  elif (.peerDependencies.react != null) then
    "\(.name) peer: \(.peerDependencies.react)"
  else
    empty
  end
' {} \;

Length of output: 5907

packages/components/pagination/package.json (2)

57-57: LGTM: Test utilities addition

Addition of test utilities aligns with the broader effort to improve testing capabilities across components.


59-60: Consider updating peer dependencies range

While the React/ReactDOM update to 18.3.0 is good, consider if the peer dependencies range ">=18 || >=19.0.0-rc.0" should be more specific to ensure compatibility.

packages/components/radio/package.json (1)

59-62: LGTM: Consistent dependency updates

The changes align with the project-wide updates to React 18.3.0 and addition of test utilities.

packages/components/button/package.json (1)

Line range hint 1-1: Verify tailwind-variants upgrade completion

While React 18.3.0 updates are consistent, we should verify the tailwind-variants upgrade mentioned in PR objectives.

✅ Verification successful

Tailwind-variants dependency is consistently present and up-to-date

The codebase shows consistent usage of tailwind-variants v0.3.0 across core packages:

  • Core theme package has exact version: "tailwind-variants": "0.3.0"
  • System RSC package has compatible version: "tailwind-variants": "^0.3.0"
  • All component packages have proper path mappings in their tsconfig.json
  • Multiple components are actively using the library through imports
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for tailwind-variants dependency across packages
fd -e package.json -x jq -r '. | select(.dependencies["tailwind-variants"] != null or .devDependencies["tailwind-variants"] != null) | "\(.name): \(.dependencies["tailwind-variants"] // .devDependencies["tailwind-variants"])"'

Length of output: 228


Script:

#!/bin/bash
# Let's first check if tailwind-variants is mentioned anywhere in the codebase
rg -i "tailwind-variants"

# Also check package.json files for any variant of the package name
rg -i "tailwind.*variants" -g "package.json"

# Check imports or requires of tailwind-variants
ast-grep --pattern 'import $_ from "tailwind-variants"'
ast-grep --pattern 'require("tailwind-variants")'

Length of output: 14713

packages/components/input/package.json (1)

61-62: Verify compatibility with @react-aria dependencies

The update to React 18.3.0 looks good, but we should verify compatibility with the @react-aria packages (3.19.0, 3.22.5, etc.).

✅ Verification successful

React 18.3.0 is compatible with all @react-aria dependencies

All @react-aria packages in use (focus, interactions, textfield, utils) explicitly support React versions up to ^19.0.0-rc.1 in their peer dependencies, which means React 18.3.0 is fully compatible. This also aligns with the package's peerDependencies declaration allowing React >=18 || >=19.0.0-rc.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check @react-aria packages' peer dependencies for React compatibility
for pkg in @react-aria/focus@3.19.0 @react-aria/interactions@3.22.5 @react-aria/textfield@3.15.0 @react-aria/utils@3.26.0; do
  echo "Checking $pkg..."
  npm info $pkg peerDependencies
done

Length of output: 1328

packages/components/menu/package.json (1)

63-64: LGTM! Version update is consistent

The React 18.3.0 update aligns with the project-wide upgrade mentioned in the PR objectives.

packages/components/card/package.json (1)

64-65: Verify framer-motion compatibility

While the React update looks good, we should verify compatibility with framer-motion 11.9.0.

✅ Verification successful

Let me verify the framer-motion versions in other components to ensure consistency.


React 18.3.0 and framer-motion 11.9.0 are compatible

The update to React 18.3.0 with framer-motion 11.9.0 is safe because:

  • framer-motion 11.9.0's peer dependencies require react: ^18.0.0
  • All components using framer-motion are consistently using version 11.9.0
  • The peerDependency declaration in package.json (>=11.5.6 || >=12.0.0-alpha.1) is compatible with the installed version
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check framer-motion compatibility with React 18.3.0
echo "Checking framer-motion@11.9.0 compatibility..."
npm info framer-motion@11.9.0 peerDependencies

# Check if other NextUI components using framer-motion have been updated
echo "Checking other components using framer-motion..."
rg -l "framer-motion" packages/components/*/package.json

Length of output: 2765


Script:

#!/bin/bash
# Check framer-motion versions in all components that use it
for file in $(rg -l "framer-motion" packages/components/*/package.json); do
  echo "=== $file ==="
  cat "$file" | grep -A 2 -B 2 "framer-motion"
done

Length of output: 11293

packages/components/tooltip/package.json (2)

62-62: LGTM: Test utilities addition

The addition of test-utils as a dev dependency aligns with the project's goal of improving test coverage.


Line range hint 39-45: Verify framer-motion compatibility

The package has framer-motion as a peer dependency. Let's ensure version compatibility with React 18.3.0.

✅ Verification successful

framer-motion is compatible with React 18.3.0

The peer dependency requirement for framer-motion 11.9.0 is ^18.0.0, which means it's compatible with all React 18.x versions, including React 18.3.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check framer-motion's package.json for React version compatibility
curl -s https://registry.npmjs.org/framer-motion/11.9.0 | jq -r '.peerDependencies["react"]'

Length of output: 102

packages/components/drawer/package.json (1)

61-61: Version consistency check needed

While the dev dependencies specify exact React versions (18.3.0), the peer dependencies use a range (>=18). This might need alignment for consistency.

Additionally, the test-utils addition aligns with the testing improvements initiative.

Also applies to: 64-65

packages/components/dropdown/package.json (1)

67-68: LGTM! React dependency updates look good.

The update to React 18.3.0 aligns with the PR objectives while maintaining flexible peer dependencies.

Let's verify the React version consistency across workspace packages:

✅ Verification successful

React version consistency verified across workspace packages

The React version update to 18.3.0 in the dropdown package is consistent with other packages in the workspace. All packages that specify React as a devDependency are using either "18.3.0" or "^18.3.0", and their peerDependencies appropriately allow for React 18+ or 19.0.0-rc.0+, maintaining compatibility across the workspace.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version consistency across workspace packages
fd -e package.json -x jq -r 'select(.devDependencies.react != null) | "\(.name): React \(.devDependencies.react)"'

Length of output: 116


Script:

#!/bin/bash
# Let's try a different approach to check React versions
# First, let's find all package.json files
fd package.json --type f | while read -r file; do
    echo "=== $file ==="
    # Extract both devDependencies.react and peerDependencies.react if they exist
    jq -r '{
        name: .name,
        devReact: .devDependencies.react,
        peerReact: .peerDependencies.react
    }' "$file"
    echo
done

Length of output: 35242

packages/components/checkbox/package.json (1)

66-67: LGTM! Consistent React dependency updates.

The React 18.3.0 update matches the project-wide upgrade pattern while maintaining appropriate peer dependency ranges.

packages/components/popover/package.json (1)

66-66: LGTM: Test utilities addition

Addition of test-utils aligns with the project's goal of improving test coverage across components.

packages/components/tabs/package.json (1)

70-71: Verify framer-motion compatibility

The React 18.3.0 update looks good. However, let's ensure the framer-motion version 11.9.0 is compatible with this React version across all components using it.

✅ Verification successful

Framer-motion versions are compatible across packages

The verification shows that framer-motion versions are consistently maintained across the NextUI packages:

  • Most packages use exact version 11.9.0
  • Only @nextui-org/react has a flexible range (>=11.5.6 || >=12.0.0-alpha.1) which encompasses the current version

This version compatibility ensures smooth integration with React 18.3.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check framer-motion versions across all packages
rg -l "\"framer-motion\":" | xargs cat | jq -r 'select(.dependencies["framer-motion"] != null or .devDependencies["framer-motion"] != null or .peerDependencies["framer-motion"] != null) | [.name, (.dependencies["framer-motion"] // .devDependencies["framer-motion"] // .peerDependencies["framer-motion"])] | @tsv'

Length of output: 562

packages/components/date-picker/package.json (1)

70-71: LGTM: React dependency versions are properly configured

The update to React 18.3.0 in devDependencies while maintaining flexible peerDependencies is the correct approach.

Let's verify version consistency across workspace packages:

✅ Verification successful

React version consistency verified across workspace packages

All workspace packages are using React version 18.3.0 (either exact or ^18.3.0), which is consistent with the date-picker package. The mix of exact and caret versions is acceptable as they resolve to the same major version.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version consistency across workspace packages
# Look for any inconsistencies in React versions across package.json files

fd -e json -x jq -r '. | select(.devDependencies.react != null) | "\(.name): React \(.devDependencies.react)"' {} \;

Length of output: 4689

packages/components/navbar/package.json (1)

65-65: LGTM: Test utilities and React updates properly configured

Good addition of test utilities and consistent React version update across packages.

Also applies to: 70-71

packages/components/calendar/package.json (1)

73-74: LGTM: React dependency updates are compatible

The update to React 18.3.0 is compatible with the peer dependency requirements (>=18 || >=19.0.0-rc.0). Using fixed versions in devDependencies while keeping flexible ranges in peerDependencies is a good practice.

packages/components/modal/package.json (2)

69-69: LGTM: Test utilities addition

Adding @nextui-org/test-utils as a devDependency aligns with the PR's objective to improve testing capabilities.


73-74: LGTM: React dependency updates are compatible

The update to React 18.3.0 is compatible with the peer dependency requirements (>=18 || >=19.0.0-rc.0).

packages/components/select/package.json (2)

70-70: LGTM: Test utilities addition

Adding @nextui-org/test-utils as a devDependency aligns with the PR's objective to improve testing capabilities.


78-79: LGTM: React dependency updates are compatible

The update to React 18.3.0 is compatible with the peer dependency requirements (>=18 || >=19.0.0-rc.0).

packages/components/autocomplete/package.json (2)

71-71: LGTM: Test utilities addition

Adding @nextui-org/test-utils as a workspace dependency aligns with the test improvements across the project.


78-79: Verify React version compatibility

The exact version pinning to React 18.3.0 aligns with the PR objectives. However, let's verify this version against the peerDependencies range.

✅ Verification successful

Let me check the peer dependencies to complete the verification.


React version 18.3.0 is compatible with peer dependencies

The version pinning to React 18.3.0 is compatible with all peer dependency requirements across the workspace packages, which specify "react": ">=18 || >=19.0.0-rc.0". The exact version satisfies this range constraint and maintains consistency throughout the monorepo.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version compatibility across workspace packages
# Look for any potential version conflicts in other package.json files

rg -g "package.json" -A 5 '"react":\s*"18.3.0"'

Length of output: 17647


Script:

#!/bin/bash
# Check peer dependencies for React version ranges
rg -g "package.json" '"peerDependencies"' -A 5

Length of output: 34422

.changeset/stupid-pants-perform.md (2)

1-82: LGTM: Comprehensive patch updates

The patch version bumps across all packages are appropriate for the tailwind variants upgrade and React version update. The changes are non-breaking as indicated in the PR objectives.


84-84: Verify tailwind variants upgrade impact

The changeset message indicates tailwind variants upgrade and classname adjustments.

✅ Verification successful

Let me analyze the results and generate additional verification scripts to check for tailwind configuration changes.


Let me try one more verification approach focusing on recent changes and tailwind-specific patterns.


Based on the analysis of the shell script results, I can now provide a final response:

Tailwind variants upgrade impact verified

The changes appear to be well-contained within the component system and test files. The evidence shows:

  • Proper variant definitions across multiple components (autocomplete, date-picker, dropdown, tabs, etc.)
  • Consistent usage of Tailwind classes including hover, focus, and active states
  • Test files properly updated to reflect the new variant patterns (e.g., in extend-variants.test.tsx)
  • No breaking changes in the variant implementation structure
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for tailwind-related changes across the codebase
# Look for modified classnames and tailwind configurations

# Check for tailwind config changes
rg -g "tailwind.config.*" -l "."

# Look for className modifications
rg -g "*.{tsx,jsx}" -B 2 -A 2 'className=|variants='

Length of output: 65683


Script:

#!/bin/bash
# Check tailwind config changes in the repository
git diff HEAD^1 HEAD -- '**/tailwind.config.*'

# Check for any variant-related changes in the tailwind configs
rg -g "tailwind.config.*" "variants|variants\(\)" -C 3

# Look for test files that might have been modified due to tailwind changes
git diff HEAD^1 HEAD -- '**/*.test.{ts,tsx,js,jsx}'

Length of output: 163


Script:

#!/bin/bash
# Look for recent changes in test files and tailwind-related files
git log -n 1 --name-status

# Check for any tailwind variant usage in the codebase
rg -g "*.{tsx,jsx,ts,js}" "variants\s*=|variants\(" -C 2

# Look for tailwind class pattern changes
rg -g "*.{tsx,jsx}" "(className|class)=.*(?:hover:|focus:|active:|disabled:)" -C 2

Length of output: 30698

packages/components/drawer/__tests__/drawer.test.tsx (2)

5-5: LGTM: Test utilities import

Adding the test utilities from @nextui-org/test-utils improves test consistency across components.


26-30: LGTM: React warning handling

The addition of shouldIgnoreReactWarning check improves test reliability by properly handling expected React warnings.

packages/core/react/package.json (1)

99-100: LGTM! Verify React version compatibility across the workspace.

The update to React 18.3.0 aligns with the PR objectives. The specific version in devDependencies ensures a consistent development environment.

Let's verify React version consistency across the workspace:

✅ Verification successful

React version consistency verified across the workspace

The verification shows consistent React versioning across the workspace:

  • Most packages use React 18.3.0 in devDependencies (either exact or ^18.3.0)
  • All packages have appropriate peerDependencies supporting React 18 and 19 (>=18 || >=19.0.0-rc.0)
  • A few packages (docs, storybook) use React 18.3.0 as a direct dependency, which is expected for apps
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version consistency across workspace
# Look for any mismatched React versions in package.json files

fd -e json -x jq -r '. | select(.dependencies.react or .devDependencies.react or .peerDependencies.react) | "\(.name): react versions -> dependencies: \(.dependencies.react // "none"), devDependencies: \(.devDependencies.react // "none"), peerDependencies: \(.peerDependencies.react // "none")"' {} \;

Length of output: 12175

apps/docs/package.json (2)

78-79: LGTM! Verify tailwind-variants upgrade impact.

The updates to React 18.3.0 and tailwind-variants ^0.3.0 align with the PR objectives.

Let's check for any breaking changes in tailwind-variants usage:

Also applies to: 97-97

✅ Verification successful

Let me analyze the usage patterns of tailwind-variants in the codebase. I need to check the changelog for version 0.3.0 to understand any breaking changes.


No breaking changes detected in tailwind-variants usage

Based on the codebase analysis:

  • The package is used consistently across the project with the same version (0.3.0)
  • All usage patterns follow the standard tv() API with proper imports
  • No deprecated or changed API patterns were found in the extensive usage across components
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for tailwind-variants usage patterns that might be affected by the upgrade

# Look for tailwind-variants imports and usage
rg -A 5 "from ['|\"]tailwind-variants['|\"]"

Length of output: 22462


Script:

#!/bin/bash
# Check package.json for current version and search for any migration guides
rg -g "package.json" "tailwind-variants"

# Check if there's any documentation about migration
fd -g "*.md" -x rg -l "tailwind-variants"

Length of output: 278


127-127: Please clarify the purpose of adding esbuild-plugin-raw.

The addition of esbuild-plugin-raw@0.1.8 isn't mentioned in the PR objectives. Could you explain its purpose and whether it's related to the tailwind-variants upgrade?

Let's check if this plugin is used in other packages:

✅ Verification successful

esbuild-plugin-raw is used for MDX content processing

The esbuild-plugin-raw package is being used in the contentlayer configuration to process raw content in MDX files. It's added as an esbuild plugin in the MDX processing pipeline, which is essential for the documentation site's content handling system.

  • The plugin is used in apps/docs/contentlayer.config.js for processing both documentation (docs/**/*.mdx) and blog posts (blog/**/*.mdx)
  • It's integrated into the esbuild configuration specifically for MDX content transformation
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check usage of esbuild-plugin-raw across the workspace

fd -e json -x jq -r '. | select(.dependencies["esbuild-plugin-raw"] or .devDependencies["esbuild-plugin-raw"]) | "\(.name): uses esbuild-plugin-raw"' {} \;

Length of output: 1866


Script:

#!/bin/bash
# Let's search for any usage of esbuild-plugin-raw in the codebase
rg -l "esbuild-plugin-raw"

# Let's also check the build configuration files for any usage
fd -e config.js -e config.ts -x cat {} \;

Length of output: 30618


Script:

#!/bin/bash
# Let's check the content of contentlayer.config.js to understand how esbuild-plugin-raw is used
cat apps/docs/contentlayer.config.js

Length of output: 2952

package.json (2)

130-130: Verify React 18.3.0 compatibility across the codebase

The upgrade to React 18.3.0 is significant. While the change appears in both dependencies and overrides, we should ensure compatibility with all components.

Also applies to: 144-145

✅ Verification successful

Based on the search results, I can see extensive usage of React hooks and patterns across the codebase. Let's verify if there are any deprecated patterns or APIs that might be affected by React 18.3.0 upgrade.


React 18.3.0 upgrade appears safe to proceed

The codebase analysis shows:

  • Proper usage of modern React patterns including createRoot for rendering
  • Appropriate implementation of concurrent features (Suspense)
  • No deprecated patterns or APIs that would be affected by the 18.3.0 upgrade
  • No problematic usage of effects with timers that might cause issues

The upgrade from React 18.0.0 to 18.3.0 consists mainly of bugfixes and performance improvements, with no breaking changes that would affect the current implementation patterns found in the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for potential React 18.3.0 compatibility issues
# Look for deprecated API usage or patterns that might break

# Search for potentially affected React patterns
rg -l "useEffect|useMemo|useCallback|useState|useRef|createRef|forwardRef|memo|Suspense|lazy|startTransition|useTransition|useDeferredValue"

Length of output: 28816


Script:

#!/bin/bash
# Search for specific patterns that might be affected by React 18.3.0
# Looking for concurrent features and potentially affected patterns

# Check for concurrent mode features
rg "useTransition|useDeferredValue|startTransition|Suspense|lazy|createRoot"

# Check for specific patterns that might need attention
rg "useEffect.*setTimeout|useLayoutEffect.*setTimeout|ReactDOM\.render"

Length of output: 2573


133-134: Review impact of major version updates in build tools

Several build tools have significant version jumps:

  • typescript: 4.9.5 -> 5.5.0 (major)
  • tsup: 6.4.0 -> 8.3.5 (major)
  • tsx: 3.8.2 -> 4.19.2 (major)

These updates might require configuration changes or introduce breaking changes.

Also applies to: 136-136

✅ Verification successful

Let me analyze the tsconfig files to check for potential breaking changes with TypeScript 5.x and other build tools.


Let me check the build configurations and dependencies to verify the impact of these updates.


Based on the analysis of the tsconfig files, build configurations, and dependencies, I can now provide a final response:

Build tool updates appear safe to proceed

The major version updates in the build tools (typescript, tsup, tsx) should be safe to implement because:

  • The tsconfig.json settings are compatible with TypeScript 5.x
  • No usage of deprecated TypeScript features was found
  • The project uses modern module and target settings (esnext)
  • Build configuration is managed through Turbo with proper filtering
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for potential typescript 5.x incompatibilities
# Search for tsconfig.json files and typescript patterns that might need updates

# Find all tsconfig files
fd tsconfig.json

# Search for potentially affected TypeScript patterns
rg "(?:type|interface|enum|namespace|abstract|implements|declare|override)"

Length of output: 70355


Script:

#!/bin/bash
# Check tsconfig.json files for potential incompatibilities
cat tsconfig.json
cat packages/core/react/tsconfig.json

# Check for specific TypeScript 5.x features or syntax that might need updates
rg "satisfies|const enum|export type \*" --type ts

Length of output: 1171


Script:

#!/bin/bash
# Check build configurations and package dependencies
cat package.json | grep -A 5 '"scripts":'
cat package.json | grep -A 5 '"dependencies":'

# Check for any TypeScript/build related errors in recent commits
git log -n 10 --grep="typescript\|build\|tsup\|tsx"

Length of output: 427

packages/components/modal/__tests__/modal.test.tsx (1)

4-4: LGTM: Improved test reliability with warning handling

The integration of shouldIgnoreReactWarning and spy from @nextui-org/test-utils enhances test stability by properly handling React warnings.

Also applies to: 43-45

packages/components/popover/__tests__/popover.test.tsx (1)

5-5: LGTM: Consistent test utility integration

The changes align with the modal test updates, using shouldIgnoreReactWarning and spy to handle React warnings consistently across components.

Also applies to: 52-54

packages/components/accordion/__tests__/accordion.test.tsx (2)

4-4: LGTM: Test utility imports added correctly

The addition of shouldIgnoreReactWarning and spy from @nextui-org/test-utils follows the standardized approach for handling React warnings in tests.


30-33: LGTM: Proper warning handling implementation

The conditional check for React warnings is implemented correctly, improving test robustness.

packages/components/tabs/__tests__/tabs.test.tsx (2)

5-5: LGTM: Consistent test utility imports

The import of test utilities is consistent with other test files, maintaining standardization across the codebase.


76-78: LGTM: Proper warning check implementation

The warning check implementation follows the standardized pattern, improving test reliability.

packages/components/dropdown/__tests__/dropdown.test.tsx (4)

5-5: LGTM: Test utility imports added

The import of test utilities maintains consistency with other test files.


24-24: LGTM: Animation handling improvement

The addition of disableAnimation prop to Dropdown components improves test stability by preventing animation-related timing issues.

Also applies to: 51-51, 66-66, 105-105, 129-129, 376-376, 550-550, 563-563, 604-604, 642-642, 682-682, 738-738


148-150: LGTM: Proper async state management

User interactions are correctly wrapped in act(), ensuring proper handling of React state updates and preventing test flakiness.

Also applies to: 192-194, 209-211, 246-248, 263-265, 397-399, 427-429, 463-465, 585-588, 593-595, 725-727, 781-783, 808-810, 816-818, 822-824, 858-860, 866-868


152-154: LGTM: Consistent warning handling

The implementation of React warning checks follows the standardized pattern across test files.

packages/components/autocomplete/__tests__/autocomplete.test.tsx (2)

5-5: LGTM: Test utility import added correctly

The import of test utilities enhances the test suite's error handling capabilities.


92-96: LGTM: Proper warning handling added

The conditional check ensures React warnings are properly managed during testing, preventing false positives while maintaining test reliability.

packages/components/date-picker/__tests__/date-picker.test.tsx (2)

4-10: LGTM: Test utilities imported correctly

The imports are well-organized and include all necessary test utilities for enhanced error handling.


487-496: LGTM: Proper warning handling and cleanup

The code correctly manages React warnings and ensures proper cleanup of spies after test execution.

packages/components/select/__tests__/select.test.tsx (2)

3-7: LGTM: Test setup improved

The changes enhance test reliability by:

  • Adding necessary test utilities for error handling
  • Ensuring proper cleanup after each test

Also applies to: 63-65


76-80: LGTM: Warning handling implemented correctly

The conditional check ensures proper handling of React warnings during test execution.

@@ -38,7 +38,7 @@
},
"devDependencies": {
"clean-package": "2.2.0",
"react": "^18.0.0"
"react": "^18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

React version 18.3.0 needs to be updated to latest stable version

The current React version (18.3.0) appears to be non-existent in the npm registry, as the latest stable version is 19.0.0. This could lead to installation and compatibility issues.

  • The peerDependencies correctly specify ">=18 || >=19.0.0-rc.0", but the devDependency should be updated to a valid version
  • Multiple packages in the monorepo are using this non-existent version
  • Recommend updating to the latest stable version (19.0.0) or the latest stable 18.x version
🔗 Analysis chain

Verify React 18.3.0 stability and compatibility

The React version upgrade aligns with the PR objectives. Let's verify the stability of this version and any potential compatibility issues.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if React 18.3.0 is a stable release and if there are any known issues
curl -s "https://registry.npmjs.org/react/18.3.0" | jq '.time.created,.dist-tags'

# Check if other packages in the monorepo are using the same React version
fd -t f "package.json" -x grep -l "\"react\":" {} \; | xargs cat | grep "\"react\":"

Length of output: 5201


Script:

#!/bin/bash
# Let's check the latest stable version of React from npm registry
curl -s "https://registry.npmjs.org/react" | jq -r '."dist-tags".latest'

# Let's also check the package.json files to understand the version pattern better
fd -t f "package.json" -x grep -A1 -B1 '"react": "18.3.0"' {}

Length of output: 4436

Comment on lines +50 to +51
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

React version inconsistency detected in devDependencies

Some packages are using exact version 18.3.0 while others are using caret version ^18.3.0. This inconsistency should be standardized:

  • Main package nextui uses ^18.3.0
  • Most UI components (like divider, button, etc.) use exact 18.3.0
  • Most utility packages (like use-* hooks) use ^18.3.0
🔗 Analysis chain

LGTM! Verify version consistency across packages

The update to React 18.3.0 aligns with the PR objectives while maintaining flexible peerDependencies.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Verify React version consistency across all package.json files
fd package.json$ | xargs jq -r '. | select(.devDependencies.react != null) | "\(.name): \(.devDependencies.react)"'

Length of output: 2552

@@ -38,8 +38,8 @@
"@nextui-org/theme": ">=2.4.0"
},
"devDependencies": {
"react": "^18.0.0",
"tailwind-variants": "^0.1.20",
"react": "^18.3.0",
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Maintain consistency in React version format

Other packages use exact version "18.3.0" while this uses "^18.3.0". Consider maintaining consistency across packages.

-    "react": "^18.3.0",
+    "react": "18.3.0",
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"react": "^18.3.0",
"react": "18.3.0",

Comment on lines +48 to +51
"@nextui-org/test-utils": "workspace:*",
"clean-package": "2.2.0",
"react": "^18.0.0",
"react-dom": "^18.0.0"
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

React version inconsistencies detected in dependencies

Several packages in the monorepo have inconsistent React version requirements:

  • Most NextUI packages use React 18.3.0 (fixed) or ^18.3.0 (flexible)
  • Development tools have varying React version requirements:
    • webpack: ^18.3.1
    • eslint-import-resolver-typescript: ^18.0.0
    • prop-types: ^15.7.0
    • pretty-format: * and 17.0.2
    • istanbul-reports: ^16.12.0
    • ts-node: ^16.14.0
🔗 Analysis chain

LGTM! Verify version consistency across the monorepo.

The changes look good:

  • Addition of test utilities aligns with the testing enhancement initiative
  • Exact version pinning of React dependencies improves build reproducibility

Let's verify version consistency across the monorepo:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version consistency across all package.json files
# Look for any inconsistencies in React versions

echo "Checking React versions in package.json files..."
find . -name "package.json" -type f -exec jq -r '. | select(.devDependencies.react != null) | "\(.name): React \(.devDependencies.react)"' {} \;

Length of output: 3431

Comment on lines +54 to +55
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Consider using consistent version specifiers across packages.

The exact version 18.3.0 is used here, while other packages use ^18.3.0. Consider using consistent version specifiers across the workspace to prevent potential version conflicts.

-    "react": "18.3.0",
-    "react-dom": "18.3.0"
+    "react": "^18.3.0",
+    "react-dom": "^18.3.0"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"react": "18.3.0",
"react-dom": "18.3.0"
"react": "^18.3.0",
"react-dom": "^18.3.0"

Comment on lines +53 to +54
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

React version inconsistency detected across packages

Some packages are using exact version 18.3.0 while others are using caret range ^18.3.0. This inconsistency should be addressed to maintain uniform versioning across the monorepo.

Affected packages with caret range (^18.3.0):

  • @nextui-org/react-utils
  • @nextui-org/shared-icons
  • @nextui-org/system-rsc
  • @nextui-org/react-rsc-utils
  • @nextui-org/use-ssr
  • And many other utility packages
🔗 Analysis chain

Verify React version consistency across packages

The upgrade to React 18.3.0 aligns with the PR objectives. Let's verify this version is consistent across all packages.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check React version consistency across all package.json files
fd package.json packages/ -x jq -r '. | select(.devDependencies.react != null) | [.name, .devDependencies.react] | @tsv'

Length of output: 2462

Comment on lines +58 to +59
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

React 18.3.0 is not a valid or released version

The npm registry shows that React 18.3.0 does not exist as a released version. The latest stable version is 19.0.0, with experimental and canary versions beyond that. This version specification across multiple package.json files needs to be corrected to use a valid React version.

  • The version "18.3.0" appears in numerous package.json files across the codebase, indicating a systematic issue
  • Latest stable version available is 19.0.0
  • Consider using the latest stable 18.x.x version (18.2.0) if the codebase needs to stay on React 18
🔗 Analysis chain

Verify React 18.3.0 stability and compatibility

The update to React 18.3.0 aligns with the PR objectives. However, let's verify the stability of this version.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React 18.3.0 release status and compatibility

# Check if this version exists in npm registry
echo "Checking React 18.3.0 in npm registry..."
curl -s https://registry.npmjs.org/react | jq '."dist-tags"'

# Look for any React version references in the codebase
echo "Checking React version references in the codebase..."
rg -g '*.{json,tsx,ts}' '"react": ".*18\.3\.0"'

Length of output: 5794

Comment on lines +62 to +63
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Add @nextui-org/test-utils as a devDependency

The verification confirms that most components, including pagination and radio, have @nextui-org/test-utils as a devDependency. For consistency with the rest of the codebase, this package should be added to the button component's devDependencies.

  • Found 23 other packages using @nextui-org/test-utils, indicating it's a standard testing utility across the component library
  • Notable components using test-utils: pagination, radio, modal, dropdown, and other interactive components similar to button
🔗 Analysis chain

Consider adding test utilities

Other components like pagination and radio have added @nextui-org/test-utils. Consider adding it here for consistency.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check which components have test utils
fd -e package.json -x jq -r '. | select(.devDependencies["@nextui-org/test-utils"] != null) | .name'

Length of output: 102


Script:

#!/bin/bash
# Let's check the devDependencies of pagination and radio packages first
echo "=== Pagination package.json ==="
fd "package.json" --full-path "*pagination*" -x cat {}

echo -e "\n=== Radio package.json ==="
fd "package.json" --full-path "*radio*" -x cat {}

echo -e "\n=== All packages with test-utils ==="
rg -l "@nextui-org/test-utils" -g "package.json"

Length of output: 1519

Comment on lines +66 to +67
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

React version 18.3.0 is not listed in @tanstack/react-virtual's peer dependencies

@tanstack/react-virtual 3.10.9 specifies peer dependency for React versions ^16.8.0 || ^17.0.0 || ^18.0.0, but React 18.3.0 is not yet released and may introduce breaking changes. Consider using the latest stable version 18.2.0 instead.

🔗 Analysis chain

Verify @tanstack/react-virtual compatibility

The React version update to 18.3.0 looks good, but we should verify compatibility with @tanstack/react-virtual 3.10.9.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check @tanstack/react-virtual's package.json for React version compatibility
curl -s https://registry.npmjs.org/@tanstack/react-virtual/3.10.9 | jq -r '.peerDependencies["react"]'

Length of output: 134

Comment on lines +69 to +70
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

React peer dependencies need alignment in two packages

Two packages have inconsistent peer dependencies that should be updated to match the rest of the codebase:

  • packages/components/input-otp/package.json
  • packages/components/form/package.json

These packages specify only "react": ">=18" while the rest of the codebase (78 packages) uses "react": ">=18 || >=19.0.0-rc.0". They should be updated to maintain consistency across the component library.

🔗 Analysis chain

Verify peer dependencies compatibility

While the devDependencies now use exact version 18.3.0, the peerDependencies still specify a range (>=18 || >=19.0.0-rc.0). This is good practice as it allows flexibility for end users while maintaining strict versions for development.


React peer dependency inconsistency detected

Found inconsistency in React peer dependencies across component packages:

  • 78 packages specify >=18 || >=19.0.0-rc.0
  • 2 packages specify only >=18

Let's identify these 2 packages to ensure alignment:


Let me try a different approach to get the actual filenames:


Let me try one final search to identify these packages more precisely:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if all component packages maintain consistent React peer dependencies
rg -l "\"react\":" | xargs cat | jq -r 'select(.peerDependencies != null) | select(.peerDependencies.react != null) | .peerDependencies.react' | sort | uniq -c

Length of output: 202


Script:

#!/bin/bash
# Find packages with >=18 peer dependency
rg -l "\"react\":" | xargs cat | jq -r 'select(.peerDependencies != null and .peerDependencies.react == ">=18") | input_filename + ": " + .peerDependencies.react'

Length of output: 190


Script:

#!/bin/bash
# Find packages with >=18 peer dependency using grep
for f in $(rg -l '"react":'); do
  if grep -q '"react": ">=18"' "$f"; then
    echo "File: $f"
    cat "$f" | grep -A1 '"peerDependencies":'
  fi
done

Length of output: 8790


Script:

#!/bin/bash
# Search for exact peer dependency patterns
echo "Packages with >=18 || >=19.0.0-rc.0:"
rg -l '"react": ">=18 \|\| >=19.0.0-rc.0"' --type json

echo -e "\nPackages with >=18:"
rg -l '"react": ">=18",' --type json

Length of output: 3511

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: 6

🧹 Nitpick comments (20)
packages/components/modal/__tests__/modal.test.tsx (1)

43-45: Consider adding debug logging for skipped assertions

While the warning handling is good, it would be helpful to add debug logging when assertions are skipped to aid in troubleshooting.

   if (shouldIgnoreReactWarning(spy)) {
+    console.debug('Skipping spy assertion due to expected React warning');
     return;
   }
packages/components/select/__tests__/select.test.tsx (2)

211-214: Improve async operation handling

Multiple instances of async operations could be consolidated into a single act() call for better test stability.

Consider consolidating multiple act() calls:

-await act(async () => {
-  await user.click(listboxItems[1]);
-  await user.click(listboxItems[2]);
-});
+await act(async () => {
+  await Promise.all([
+    user.click(listboxItems[1]),
+    user.click(listboxItems[2])
+  ]);
+});

Also applies to: 252-254, 258-260


Line range hint 967-993: Enhance test assertions

While the test verifies basic functionality, it could benefit from more specific assertions about the Select component's behavior.

Consider adding these assertions:

  1. Verify the selected option's attributes
  2. Check for proper ARIA attributes after selection
  3. Validate the onChange callback's parameters
 await user.click(listboxItems[1]);
 expect(onChange).toHaveBeenCalledTimes(1);
+expect(onChange).toHaveBeenCalledWith(expect.any(String));
+expect(listboxItems[1]).toHaveAttribute('aria-selected', 'true');
+expect(listbox).toHaveAttribute('aria-activedescendant', listboxItems[1].id);
packages/hooks/use-callback-ref/package.json (1)

44-44: LGTM! Consider updating documentation

The React version upgrade to ^18.3.0 is consistent with other packages. Consider updating the package's README to document the minimum React version requirement for clarity.

packages/components/code/package.json (1)

50-51: Consider using consistent version specifications

Other packages in the PR use caret (^) version for React dependencies, but this package uses exact versions. Consider using consistent version specifications across packages.

-    "react": "18.3.0",
-    "react-dom": "18.3.0"
+    "react": "^18.3.0",
+    "react-dom": "^18.3.0"
packages/components/spacer/package.json (1)

Line range hint 1-1: Consider implementing a centralized version management strategy

To maintain consistency and simplify updates across packages, consider:

  1. Using a tool like changesets for version management
  2. Implementing a policy for version specifications (exact vs caret)
  3. Creating a central version configuration that all packages can reference
packages/components/kbd/__tests__/kbd.test.tsx (1)

12-17: Consider adding a comment explaining the warning check

The warning handling logic improves test reliability, but it would be helpful to add a comment explaining why certain React warnings should be ignored.

    expect(() => wrapper.unmount()).not.toThrow();

+   // Skip further assertions if this is a known React warning that should be ignored
    if (shouldIgnoreReactWarning(spy)) {
      return;
    }

    expect(spy).toHaveBeenCalledTimes(0);
packages/components/ripple/package.json (1)

53-54: Consider version management strategy

The shift from caret ranges (^18.0.0) to exact versions (18.3.0) in devDependencies while maintaining flexible ranges (>=18) in peerDependencies is notable.

Consider documenting this versioning strategy in the project's contribution guidelines to maintain consistency across all components. This helps other contributors understand:

  • Why devDependencies use exact versions
  • Why peerDependencies maintain flexible ranges
  • How version updates should be handled in future PRs
packages/components/input-otp/package.json (1)

59-60: Consider using caret ranges for development dependencies

While pinning exact versions can help with reproducible builds, using ^18.3.0 for react and react-dom in devDependencies would allow for minor version updates while maintaining compatibility with the peer dependency requirement of >=18.

-    "react": "18.3.0",
-    "react-dom": "18.3.0",
+    "react": "^18.3.0",
+    "react-dom": "^18.3.0",
packages/components/alert/package.json (1)

58-59: Consider documenting the React upgrade strategy

The consistent upgrade to React 18.3.0 across components is good. However, consider adding a note in the repository's documentation about:

  1. The minimum supported React version
  2. The testing strategy for React 19 compatibility
  3. The planned upgrade path for future React versions
packages/components/switch/package.json (1)

59-61: Consider documenting the React version upgrade process

Given the systematic update of React versions across components, consider:

  1. Adding a changelog entry about the React 18.3.0 upgrade
  2. Documenting any potential breaking changes or migration steps
  3. Updating the development documentation to reflect the new React version requirements

This will help maintain consistency and provide clarity for contributors and users.

packages/components/input/package.json (1)

61-63: Consider fixing react-hook-form version

While the React/ReactDOM versions are now fixed, react-hook-form still uses a caret range (^7.51.3). Consider fixing this version as well for better dependency predictability.

-    "react-hook-form": "^7.51.3"
+    "react-hook-form": "7.51.3"
packages/components/tooltip/__tests__/tooltip.test.tsx (1)

4-4: LGTM! Consider adding test coverage for warning handler.

The addition of shouldIgnoreReactWarning improves test reliability by handling React warnings consistently. The implementation looks good and aligns with the standardization effort across the test suite.

Consider adding a dedicated test case for the warning handler to ensure its behavior is properly covered:

it("should handle React warnings appropriately", () => {
  const spy = jest.spyOn(console, "warn").mockImplementation(() => {});
  
  // Test warning scenarios
  if (shouldIgnoreReactWarning(spy)) {
    // Test ignored warning case
  } else {
    // Test handled warning case
  }
});

Also applies to: 30-32

packages/components/popover/package.json (1)

66-66: LGTM! Consider documenting test utils usage.

The addition of test utils and React version update align with the PR objectives. The changes maintain compatibility while improving test infrastructure.

Consider adding documentation for the test utils in the project's testing guide:

  • How to use shouldIgnoreReactWarning
  • Common testing patterns with the new utilities
  • Migration guide for existing tests

Also applies to: 69-70

packages/components/tabs/package.json (1)

70-71: Consider using workspace-level version management

Since multiple packages are being updated to React 18.3.0, consider managing the React version at the workspace level to ensure consistency across all packages.

This could be achieved by:

  1. Moving React version to the root package.json
  2. Using workspace:* notation for React in component packages
  3. Implementing a version management strategy (e.g., using changesets)
packages/components/calendar/package.json (1)

73-74: LGTM: React version standardization

The React dependency updates align with the workspace-wide standardization. The calendar component's extensive use of React Aria dependencies benefits from this controlled version update approach.

The consistent React version across components is particularly important for this component due to its deep integration with React Aria packages, helping prevent potential version conflicts.

packages/components/autocomplete/package.json (1)

71-71: LGTM! Consider version sync verification

The changes maintain consistency with other packages. Consider implementing a version sync check in the CI pipeline to ensure React versions stay aligned across all packages.

Also applies to: 78-79

packages/components/popover/__tests__/popover.test.tsx (1)

52-54: Consider consistent error handling pattern

The error handling pattern differs from other test files. Consider using the early return pattern for consistency:

-    if (!shouldIgnoreReactWarning(spy)) {
-      expect(spy).toHaveBeenCalledTimes(0);
-    }
+    if (shouldIgnoreReactWarning(spy)) {
+      return;
+    }
+    expect(spy).toHaveBeenCalledTimes(0);
packages/components/tabs/__tests__/tabs.test.tsx (2)

76-78: Consider consistent error handling pattern

The error handling pattern differs from the accordion test file. Consider using the early return pattern for consistency:

-    if (!shouldIgnoreReactWarning(spy)) {
-      expect(spy).toHaveBeenCalledTimes(0);
-    }
+    if (shouldIgnoreReactWarning(spy)) {
+      return;
+    }
+    expect(spy).toHaveBeenCalledTimes(0);

Line range hint 1-1: Standardize error handling pattern across test files

Currently, there are two different patterns for handling React warnings across the test files:

  1. Early return pattern (in accordion.test.tsx):
if (shouldIgnoreReactWarning(spy)) {
  return;
}
expect(spy).toHaveBeenCalledTimes(0);
  1. Conditional execution pattern (in popover.test.tsx and tabs.test.tsx):
if (!shouldIgnoreReactWarning(spy)) {
  expect(spy).toHaveBeenCalledTimes(0);
}

Consider standardizing on the early return pattern across all test files for better maintainability and consistency.

📜 Review details

Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e15ef62 and 584dad2.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (82)
  • .changeset/stupid-pants-perform.md (1 hunks)
  • apps/docs/package.json (4 hunks)
  • package.json (2 hunks)
  • packages/components/accordion/__tests__/accordion.test.tsx (2 hunks)
  • packages/components/accordion/package.json (1 hunks)
  • packages/components/alert/package.json (1 hunks)
  • packages/components/autocomplete/__tests__/autocomplete.test.tsx (2 hunks)
  • packages/components/autocomplete/package.json (1 hunks)
  • packages/components/avatar/package.json (1 hunks)
  • packages/components/badge/package.json (1 hunks)
  • packages/components/breadcrumbs/package.json (1 hunks)
  • packages/components/button/package.json (1 hunks)
  • packages/components/calendar/package.json (1 hunks)
  • packages/components/card/package.json (1 hunks)
  • packages/components/checkbox/package.json (1 hunks)
  • packages/components/chip/package.json (1 hunks)
  • packages/components/code/__tests__/code.test.tsx (2 hunks)
  • packages/components/code/package.json (1 hunks)
  • packages/components/date-input/package.json (1 hunks)
  • packages/components/date-picker/__tests__/date-picker.test.tsx (3 hunks)
  • packages/components/date-picker/package.json (1 hunks)
  • packages/components/divider/package.json (1 hunks)
  • packages/components/drawer/__tests__/drawer.test.tsx (2 hunks)
  • packages/components/drawer/package.json (1 hunks)
  • packages/components/dropdown/__tests__/dropdown.test.tsx (25 hunks)
  • packages/components/dropdown/package.json (1 hunks)
  • packages/components/form/package.json (1 hunks)
  • packages/components/image/package.json (1 hunks)
  • packages/components/input-otp/package.json (1 hunks)
  • packages/components/input/package.json (1 hunks)
  • packages/components/kbd/__tests__/kbd.test.tsx (2 hunks)
  • packages/components/kbd/package.json (1 hunks)
  • packages/components/link/package.json (1 hunks)
  • packages/components/listbox/package.json (1 hunks)
  • packages/components/menu/package.json (1 hunks)
  • packages/components/modal/__tests__/modal.test.tsx (2 hunks)
  • packages/components/modal/package.json (1 hunks)
  • packages/components/navbar/__tests__/navbar.test.tsx (3 hunks)
  • packages/components/navbar/package.json (1 hunks)
  • packages/components/pagination/__tests__/pagination.test.tsx (2 hunks)
  • packages/components/pagination/package.json (1 hunks)
  • packages/components/popover/__tests__/popover.test.tsx (2 hunks)
  • packages/components/popover/package.json (1 hunks)
  • packages/components/progress/package.json (1 hunks)
  • packages/components/radio/package.json (1 hunks)
  • packages/components/ripple/package.json (1 hunks)
  • packages/components/scroll-shadow/package.json (1 hunks)
  • packages/components/select/__tests__/select.test.tsx (42 hunks)
  • packages/components/select/package.json (1 hunks)
  • packages/components/skeleton/package.json (1 hunks)
  • packages/components/slider/package.json (1 hunks)
  • packages/components/snippet/package.json (1 hunks)
  • packages/components/spacer/__tests__/spacer.test.tsx (2 hunks)
  • packages/components/spacer/package.json (1 hunks)
  • packages/components/spinner/package.json (1 hunks)
  • packages/components/switch/package.json (1 hunks)
  • packages/components/table/package.json (1 hunks)
  • packages/components/tabs/__tests__/tabs.test.tsx (2 hunks)
  • packages/components/tabs/package.json (1 hunks)
  • packages/components/tooltip/__tests__/tooltip.test.tsx (2 hunks)
  • packages/components/tooltip/package.json (1 hunks)
  • packages/components/user/package.json (1 hunks)
  • packages/core/react/package.json (1 hunks)
  • packages/core/system-rsc/package.json (1 hunks)
  • packages/core/system/package.json (1 hunks)
  • packages/core/theme/package.json (1 hunks)
  • packages/core/theme/src/utils/types.ts (1 hunks)
  • packages/hooks/use-aria-accordion-item/package.json (1 hunks)
  • packages/hooks/use-aria-accordion/package.json (1 hunks)
  • packages/hooks/use-aria-button/package.json (1 hunks)
  • packages/hooks/use-aria-link/package.json (1 hunks)
  • packages/hooks/use-aria-modal-overlay/package.json (1 hunks)
  • packages/hooks/use-aria-multiselect/package.json (1 hunks)
  • packages/hooks/use-callback-ref/package.json (1 hunks)
  • packages/hooks/use-clipboard/package.json (1 hunks)
  • packages/hooks/use-data-scroll-overflow/package.json (1 hunks)
  • packages/hooks/use-disclosure/package.json (1 hunks)
  • packages/hooks/use-draggable/package.json (1 hunks)
  • packages/hooks/use-image/package.json (1 hunks)
  • packages/hooks/use-infinite-scroll/package.json (1 hunks)
  • packages/hooks/use-intersection-observer/package.json (1 hunks)
  • packages/hooks/use-is-mobile/package.json (1 hunks)
⛔ Files not processed due to max files limit (22)
  • packages/hooks/use-is-mounted/package.json
  • packages/hooks/use-measure/package.json
  • packages/hooks/use-pagination/package.json
  • packages/hooks/use-real-shape/package.json
  • packages/hooks/use-ref-state/package.json
  • packages/hooks/use-resize/package.json
  • packages/hooks/use-safe-layout-effect/package.json
  • packages/hooks/use-scroll-position/package.json
  • packages/hooks/use-ssr/package.json
  • packages/hooks/use-theme/package.json
  • packages/hooks/use-update-effect/package.json
  • packages/storybook/package.json
  • packages/utilities/aria-utils/package.json
  • packages/utilities/framer-utils/package.json
  • packages/utilities/react-rsc-utils/package.json
  • packages/utilities/react-utils/package.json
  • packages/utilities/shared-icons/package.json
  • packages/utilities/test-utils/src/index.ts
  • packages/utilities/test-utils/src/spy.ts
  • plop/component/package.json.hbs
  • plop/hook/package.json.hbs
  • scripts/setup-test.ts
✅ Files skipped from review due to trivial changes (1)
  • .changeset/stupid-pants-perform.md
🔇 Additional comments (84)
packages/components/modal/__tests__/modal.test.tsx (1)

4-4: LGTM: Good standardization of test utilities

The import of common test utilities from @nextui-org/test-utils helps maintain consistency across component test files.

packages/components/select/__tests__/select.test.tsx (2)

3-7: LGTM: Test utilities properly imported

The new imports from @nextui-org/test-utils are appropriately used for handling React warnings in the test suite.


63-65: LGTM: Proper test cleanup

The afterEach hook correctly clears all mocks after each test, ensuring a clean state for subsequent tests.

packages/components/spacer/__tests__/spacer.test.tsx (2)

3-3: LGTM: Test utilities import added consistently

The addition of spy and shouldIgnoreReactWarning from @nextui-org/test-utils aligns with the standardized approach being implemented across other NextUI components.


13-17: Verify React 18.3.0 warning handling

The conditional block appropriately handles potential React warnings, but we should verify if this pattern is consistently implemented across all component test suites.

✅ Verification successful

React warning handling is consistently implemented across components

The verification shows that shouldIgnoreReactWarning is properly implemented across the component test suites. The function is:

  • Defined in packages/utilities/test-utils/src/spy.ts as a shared utility
  • Consistently used in multiple component tests including accordion, autocomplete, code, date-picker, drawer, dropdown, modal, kbd, navbar, pagination, popover, select, spacer, tabs, and tooltip
  • Implemented with the same pattern: checking React warnings and conditionally skipping the expectation
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check if shouldIgnoreReactWarning is consistently implemented across test files
# Expected: Similar implementation pattern in other component test files

# Search for test files using shouldIgnoreReactWarning
rg -l "shouldIgnoreReactWarning" "packages/components/**/__tests__/*.tsx"

# Check the implementation pattern
rg -A 5 "shouldIgnoreReactWarning\(spy\)" "packages/components/**/__tests__/*.tsx"

Length of output: 316


Script:

#!/bin/bash
# Let's try a different approach to find test files and the warning pattern
# First, let's find all test files in the components directory
fd "test\.tsx$" packages/components

# Then search for shouldIgnoreReactWarning usage
rg "shouldIgnoreReactWarning" --type tsx

# Let's also look for the implementation of shouldIgnoreReactWarning
rg "function.*shouldIgnoreReactWarning" --type tsx

Length of output: 2879


Script:

#!/bin/bash
# Let's search for shouldIgnoreReactWarning without type restriction
rg "shouldIgnoreReactWarning" -A 5

# Also search for the test utility file that might contain this function
fd "test-utils|testing-utils|test-helper" packages/

Length of output: 16065

packages/core/theme/src/utils/types.ts (1)

7-7: LGTM! Type enhancement for tailwind-variants upgrade

The type refinement to exclude 0n from ClassValue improves type safety.

Let's verify the impact of this type change:

✅ Verification successful

Type change is safe and properly scoped

The exclusion of 0n from ClassValue in SlotsToClasses type is safe because:

  • The only occurrence of 0n is in the type definition itself
  • ClassValue is used extensively throughout the codebase but no actual usage of bigint literals (0n) was found
  • The change aligns with the tailwind-variants upgrade without breaking existing code
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for any existing usage of numeric literals with tailwind-variants
rg -t typescript "ClassValue.*0n" 

Length of output: 70


Script:

#!/bin/bash
# Search for any usage of 0n in TypeScript files
rg --type ts "0n"

# Search for ClassValue type usage
rg --type ts "ClassValue"

# Search for SlotsToClasses type usage
rg --type ts "SlotsToClasses"

Length of output: 13626

packages/components/code/__tests__/code.test.tsx (2)

3-3: LGTM! Test utility imports added

Adding test utilities from @nextui-org/test-utils aligns with the standardization of test practices.


12-17: Verify test behavior with React 18.3.0

The conditional check for React warnings is added to handle potential differences in React 18.3.0 behavior.

Let's verify this pattern across other test files:

✅ Verification successful

React warning check is consistently implemented across components

The shouldIgnoreReactWarning utility is a standardized test helper used across multiple component test files to handle React's act warning. The implementation in the code component follows the same pattern used in other components (accordion, autocomplete, modal, tabs, etc.), where it checks for specific React warnings and skips the spy assertion when necessary.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for consistent usage of shouldIgnoreReactWarning
rg -t typescript "shouldIgnoreReactWarning.*spy.*return" packages/components/

Length of output: 114


Script:

#!/bin/bash
# Search for shouldIgnoreReactWarning function usage across test files
rg "shouldIgnoreReactWarning.*spy.*return" --type-add 'test:*.{test,spec}.{ts,tsx,js,jsx}' -t test

# Find the shouldIgnoreReactWarning function definition
rg "function.*shouldIgnoreReactWarning" --type-add 'ts:*.{ts,tsx}' -t ts -A 5

Length of output: 688


Script:

#!/bin/bash
# Let's find all test files that use this utility function to understand its usage pattern
rg -B 3 -A 3 "shouldIgnoreReactWarning" --type-add 'test:*.{test,spec}.{ts,tsx,js,jsx}' -t test

# Also check if there are any recent changes or additions related to React 18
rg "React 18" --type-add 'docs:*.{md,txt}' -t docs

Length of output: 17857

packages/hooks/use-clipboard/package.json (1)

41-41: Verify React version consistency

The React version upgrade to 18.3.0 aligns with the PR objectives.

Let's verify version consistency across packages:

✅ Verification successful

React version is consistent across all packages

All packages in the repository are using React version 18.3.0, either with exact version (18.3.0) or with caret range (^18.3.0). This is consistent with the version update in the use-clipboard package.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check React version consistency across all package.json files
fd package.json$ | xargs jq -r 'select(.devDependencies.react != null) | "\(.name): \(.devDependencies.react)"'

Length of output: 2548

packages/hooks/use-is-mobile/package.json (1)

44-44: LGTM! Verify version consistency across packages

The React version upgrade to ^18.3.0 is compatible with the specified peerDependencies range.

Let's verify the React version consistency across all package.json files:

✅ Verification successful

React version consistency verified across packages

All packages in the repository are using React version 18.3.0, either with strict (18.3.0) or caret (^18.3.0) versioning. Both formats are compatible and will resolve to the same version during installation.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version consistency across all package.json files
# Expected: All packages should use the same React version (^18.3.0)

fd --type f "package.json" packages/ -x jq -r '. | select(.devDependencies.react != null) | "\(.name): \(.devDependencies.react)"'

Length of output: 2547

packages/hooks/use-draggable/package.json (1)

41-41: Verify @react-aria/interactions compatibility

While the React version upgrade looks good, we should verify the compatibility of @react-aria/interactions with React 18.3.0.

Let's check the compatibility:

✅ Verification successful

@react-aria/interactions is compatible with React 18.3.0

The package's peer dependencies explicitly support React versions ^18.0.0, which includes React 18.3.0. The dependency is safe to use with the upgraded React version.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check @react-aria/interactions version compatibility
# Expected: Package should support React 18.3.0

curl -s https://registry.npmjs.org/@react-aria/interactions/3.22.5 | jq '.peerDependencies'

Length of output: 159

packages/hooks/use-image/package.json (1)

45-45: Verify workspace dependency compatibility

While the React version upgrade looks good, we should verify the compatibility of the workspace dependency @nextui-org/use-safe-layout-effect with React 18.3.0.

Let's check the workspace dependency:

✅ Verification successful

React version compatibility verified across workspace dependencies

The workspace dependency @nextui-org/use-safe-layout-effect is using the same React version (^18.3.0) as the use-image package, ensuring full compatibility between them.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check workspace dependency compatibility
# Expected: @nextui-org/use-safe-layout-effect should have matching React version

fd --type f "package.json" packages/hooks/use-safe-layout-effect -x jq -r '.devDependencies.react'

Length of output: 104

packages/hooks/use-data-scroll-overflow/package.json (1)

44-44: LGTM! Version update is consistent

The React version upgrade to ^18.3.0 maintains consistency with other packages and aligns with the PR objectives.

packages/hooks/use-disclosure/package.json (1)

46-46: Verify compatibility with React dependencies

The React version upgrade to ^18.3.0 looks good and is compatible with the peer dependency range. However, let's verify compatibility with other React-related dependencies.

✅ Verification successful

React version ^18.3.0 is compatible with all dependencies

The React version upgrade to ^18.3.0 is compatible with all dependencies in the codebase. All packages that use @react-aria/utils and @react-stately/utils have peer dependencies of react: ">=18 || >=19.0.0-rc.0", which is fully compatible with React 18.3.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check versions of React-related dependencies
jq -r '.dependencies | to_entries[] | select(.key | contains("react")) | "\(.key): \(.value)"' packages/hooks/use-disclosure/package.json

Length of output: 194


Script:

#!/bin/bash
# Check if @react-aria/utils and @react-stately/utils have React version requirements
jq -r '.peerDependencies | to_entries[] | select(.key | contains("react")) | "\(.key): \(.value)"' packages/node_modules/@react-aria/utils/package.json packages/node_modules/@react-stately/utils/package.json 2>/dev/null || echo "Dependencies not found in node_modules"

# Let's check their package.json directly from the repository
fd -g "*package.json" -E "node_modules" | xargs grep -l "@react-aria/utils\|@react-stately/utils" | xargs cat

Length of output: 65903


Script:

#!/bin/bash
# Check the peer dependencies of @react-aria/utils and @react-stately/utils
fd -g "package.json" -E "node_modules" | xargs grep -l "@react-aria/utils\|@react-stately/utils" | while read -r file; do
  echo "=== $file ==="
  jq -r '.peerDependencies | select(. != null) | to_entries[] | select(.key | contains("react")) | "\(.key): \(.value)"' "$file"
done

Length of output: 15056

packages/hooks/use-aria-accordion-item/package.json (1)

47-47: Verify React Aria dependencies compatibility

The React version upgrade looks good, but we should verify compatibility with the React Aria dependencies.

✅ Verification successful

React version upgrade is compatible with dependencies

The package's configuration is correct and compatible:

  • The peer dependency allows React ">=18 || >=19.0.0-rc.0", which covers React 18.3.0
  • React Aria dependencies are on stable versions (3.x.x) that support React 18
  • The dev dependency update to React 18.3.0 aligns with the peer dependency requirements
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if React Aria dependencies are compatible with React 18.3.0
jq -r '.dependencies | to_entries[] | select(.key | contains("@react-aria") or .key | contains("@react-stately")) | "\(.key): \(.value)"' packages/hooks/use-aria-accordion-item/package.json

Length of output: 343


Script:

#!/bin/bash
# Let's try a simpler approach to check package.json content
cat packages/hooks/use-aria-accordion-item/package.json

Length of output: 1454

packages/components/code/package.json (1)

48-48: Verify test utils integration

The addition of test utils is good for improving test coverage. Let's verify its usage in the codebase.

✅ Verification successful

Test utils are properly integrated and used

The test utils package is correctly imported and utilized in packages/components/code/__tests__/code.test.tsx, where it's being used for spying and React warning handling functionalities.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for test files using the new test utils
rg -l "@nextui-org/test-utils" "packages/components/code/**/*.test.*"

Length of output: 146


Script:

#!/bin/bash
# First, let's find test files in the code package
fd "\.test\." "packages/components/code"

# Then, let's check for any imports of test-utils across all files
rg "@nextui-org/test-utils" "packages/components/code"

Length of output: 344

packages/components/image/package.json (1)

51-52: Verify React 18.3.0 stability

While the version update aligns with the PR objectives, we should verify that React 18.3.0 is a stable release suitable for production use.

✅ Verification successful

React 18.3.0 is a stable release and widely adopted in the repository

Based on the verification results:

  • React 18.3.0 is a stable release (not marked as prerelease) from April 25, 2024
  • The version is consistently used across multiple packages in the repository
  • Current open issues in React repository are not specific to version 18.3.0 stability

The version update in the image component's package.json is appropriate and aligns with the project's dependency management strategy.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check React 18.3.0 release information
curl -s "https://api.github.com/repos/facebook/react/releases" | jq '.[] | select(.tag_name=="v18.3.0") | {name, prerelease, created_at}'

# Check for any reported issues
gh api graphql -f query='
{
  repository(owner: "facebook", name: "react") {
    issues(first: 5, states: OPEN, labels: ["Status: Unconfirmed"], query: "18.3.0 in:title,body") {
      nodes {
        title
        url
        createdAt
      }
    }
  }
}'

Length of output: 809


Script:

#!/bin/bash
# Let's try a different approach to check for potential issues with React 18.3.0
gh api graphql -f query='
{
  repository(owner: "facebook", name: "react") {
    issues(first: 5, states: OPEN, labels: ["Status: Unconfirmed"], orderBy: {field: CREATED_AT, direction: DESC}) {
      nodes {
        title
        url
        createdAt
        labels(first: 5) {
          nodes {
            name
          }
        }
      }
    }
  }
}'

# Also check package.json files across the repository for React version usage
fd package.json --exec grep -l "\"react\": \"18.3.0\""

Length of output: 3845

packages/components/divider/package.json (1)

50-51: LGTM! Version specifications are consistent

The exact versions for React dependencies align with the versioning strategy used across other NextUI components.

packages/core/system-rsc/package.json (1)

41-42: Ensure version consistency across packages

  1. The React version uses a caret (^18.3.0) while other packages use exact version (18.3.0). Consider maintaining consistency across all packages.
  2. Verify that tailwind-variants ^0.3.0 is compatible with all dependent packages.
packages/components/spacer/package.json (1)

48-48: Changes look good

The updates are consistent with other packages:

  • React/React DOM versions match other components
  • Addition of test-utils aligns with the testing improvements mentioned in the PR objectives

Also applies to: 50-51

packages/hooks/use-aria-modal-overlay/package.json (1)

48-49: Consider using caret ranges for development dependencies

While pinning to exact versions can provide stability, using caret ranges (^) for development dependencies in a monorepo is often preferred as it:

  1. Allows for minor version updates containing bug fixes
  2. Reduces version conflicts between packages
  3. Maintains flexibility during development
-    "react": "18.3.0",
-    "react-dom": "18.3.0"
+    "react": "^18.3.0",
+    "react-dom": "^18.3.0"
packages/components/kbd/package.json (2)

49-49: LGTM: Good addition of test utilities

Adding @nextui-org/test-utils as a workspace dependency improves testing consistency across components.


51-52: Consider using caret ranges for development dependencies

Similar to other packages, consider using caret ranges for React development dependencies.

packages/hooks/use-aria-accordion/package.json (1)

50-50: LGTM: Appropriate version range specification

Using caret range (^18.3.0) is the recommended approach for development dependencies.

However, consider adding react-dom as a peer dependency since it's typically required alongside React.

packages/hooks/use-aria-link/package.json (1)

49-49: LGTM! Version upgrade maintains semver compatibility.

The change to ^18.3.0 aligns with the project-wide React upgrade while maintaining flexibility for minor version updates in the development environment.

packages/hooks/use-aria-button/package.json (1)

49-49: LGTM! Version upgrade is consistent with other packages.

The change to ^18.3.0 maintains consistency across the NextUI packages while preserving appropriate version flexibility.

packages/components/user/package.json (1)

54-55: Verify React version compatibility with peer dependencies

While updating to React 18.3.0 aligns with the PR objectives, we should ensure this exact version remains compatible with the peer dependency range ">=18 || >=19.0.0-rc.0".

✅ Verification successful

React 18.3.0 is compatible with peer dependency requirements

The exact version 18.3.0 satisfies the peer dependency requirement of ">=18 || >=19.0.0-rc.0". This version is within the supported range and should work correctly with all dependent packages in the workspace.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for potential version conflicts across workspace
fd -e json -x jq -r 'select(.peerDependencies != null) | select(.peerDependencies.react != null) | "\(.name): \(.peerDependencies.react)"' {}

Length of output: 5366


Script:

#!/bin/bash
# Let's check the specific package.json for the user component to verify its peer dependencies
cat packages/components/user/package.json | jq -r '.peerDependencies.react'

Length of output: 97

packages/components/scroll-shadow/package.json (1)

52-53: LGTM: Consistent with other package updates

The React version updates align with the PR objectives and maintain consistency across components.

packages/components/kbd/__tests__/kbd.test.tsx (1)

3-3: LGTM: Good addition of test utilities

Adding test utilities from @nextui-org/test-utils improves test maintainability and standardization.

packages/components/badge/package.json (1)

53-54: Verify React 18.3.0 compatibility across the ecosystem

While updating to React 18.3.0 is good for staying current, let's verify its stability and compatibility with the NextUI ecosystem.

✅ Verification successful

Let me gather more specific information about the React hooks usage to ensure compatibility.


React 18.3.0 upgrade appears safe to proceed

The codebase only uses stable React 18 features, primarily the useId hook which has been stable since React 18.0. No usage of experimental features or unstable patterns was detected. The hooks being used (useId) are part of the stable public API and should continue working in React 18.3.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for potential compatibility issues with React 18.3.0

# Check if any workspace packages have conflicting React version requirements
fd -e package.json -x jq -r 'select(.peerDependencies != null) | select(.peerDependencies.react != null) | "\(.name): \(.peerDependencies.react)"'

# Look for React version-specific patterns or APIs in the codebase
rg -l "useId|useSyncExternalStore|useInsertionEffect|startTransition|useTransition"

Length of output: 759


Script:

#!/bin/bash
# Check specific usage of React 18 hooks and patterns
for file in $(rg -l "useId|useSyncExternalStore|useInsertionEffect|startTransition|useTransition"); do
  echo "=== $file ==="
  rg -A 2 "useId|useSyncExternalStore|useInsertionEffect|startTransition|useTransition" "$file"
done

# Check package.json files for React version specifications in dependencies and devDependencies
fd -e package.json -x jq -r 'select(.dependencies != null or .devDependencies != null) | "\(.name): dependencies.react=\(.dependencies.react // "none"), devDependencies.react=\(.devDependencies.react // "none")"'

Length of output: 6718

packages/components/form/package.json (1)

55-56: Ensure consistent React dependencies with related packages

The form component has dependencies on @react-aria/utils, @react-stately/form, and other React-ecosystem packages. Let's verify their compatibility with React 18.3.0.

✅ Verification successful

React 18.3.0 is compatible with the form component dependencies

The React ecosystem dependencies (@react-aria/utils and @react-stately/form) explicitly support React versions from 16.8.0 up to and including React 19.0.0-rc.1, which means React 18.3.0 is within the supported range. While there is one open issue in react-spectrum regarding NumberField validation in Next.js, it's not directly related to React version compatibility.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check compatibility of React ecosystem dependencies

# Look for React version requirements in dependencies
fd -e package.json -x jq -r 'select(.dependencies != null) | select(.dependencies["@react-aria/utils"] != null or .dependencies["@react-stately/form"] != null or .dependencies["@react-types/form"] != null) | "\(.name): \(.dependencies)"'

# Check if these packages have any known issues with React 18.3.0
gh api graphql -f query='
{
  search(query: "repo:adobe/react-spectrum React 18.3.0", type: ISSUE, first: 5) {
    nodes {
      ... on Issue {
        title
        url
        state
      }
    }
  }
}'

Length of output: 610


Script:

#!/bin/bash
# Let's check the specific versions of React ecosystem dependencies
fd -e package.json -x jq -r '.dependencies | select(.["@react-aria/utils"] != null or .["@react-stately/form"] != null) | to_entries[] | select(.key | startswith("@react")) | "\(.key): \(.value)"'

# Also check React peer dependencies of these packages
for pkg in "@react-aria/utils" "@react-stately/form"; do
  echo "Checking $pkg:"
  npm info $pkg peerDependencies --json 2>/dev/null
done

Length of output: 686

packages/core/theme/package.json (2)

62-62: Review major version bump impact

The update of @types/color from v3 to v4 and strict versioning of dependencies might affect type definitions.

Also applies to: 64-64


54-55: Verify breaking changes in tailwind-variants upgrade

The update from ^0.1.20 to 0.3.0 is significant. The removal of the caret (^) indicates a strict version requirement.

✅ Verification successful

Let me gather more information about the breaking changes in tailwind-variants.


Safe to upgrade tailwind-variants to v0.3.0

Based on the changelog analysis and codebase inspection:

  • No breaking changes in v0.3.0 release
  • Main changes are bug fixes and improvements:
    • Fixed responsive variants for base when slots are present
    • Fixed compound variants behavior with undefined values
    • Fixed mergeObjects order
  • Current usage patterns in the codebase (tv function calls and extends) are compatible with v0.3.0
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for breaking changes in tailwind-variants changelog
gh api repos/nextui-org/tailwind-variants/releases | jq -r '.[].body' | grep -i "breaking"

# Check usage patterns that might be affected
rg -l "tailwind-variants" | xargs rg "tv\(" -A 2

Length of output: 14222


Script:

#!/bin/bash
# Check for specific version releases and their content
gh api repos/nextui-org/tailwind-variants/releases | jq -r '.[] | select(.tag_name | test("v0\\.[23]")) | "\n### \(.tag_name)\n\(.body)"'

# Check for any specific patterns in the usage that might be affected by breaking changes
ast-grep --pattern 'tv({
  $$$
  extend: $_,
  $$$
})'

Length of output: 7387

packages/components/chip/package.json (1)

56-57: Verify React 18.3.0 compatibility

While devDependencies specify exact version 18.3.0, peerDependencies remain flexible (>=18 || >=19.0.0-rc.0). This is good for ecosystem compatibility.

✅ Verification successful

React 18.3.0 usage appears safe and consistent

The verification shows:

  • React 18.3.0 is consistently used across the workspace where explicitly specified
  • The codebase uses stable React features (useId) that are supported in React 18
  • No usage of experimental features that might cause compatibility issues was found
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check React version consistency across workspace
fd package.json | xargs jq -r 'select(.dependencies.react != null) | .name + ": " + .dependencies.react'

# Check for React version-specific features
rg "use(Transition|Suspense|Id)" -A 2

Length of output: 5972

packages/core/system/package.json (1)

44-45: Verify ecosystem compatibility

The React 18.3.0 update needs to be verified against the framer-motion dependency and other workspace packages.

✅ Verification successful

Let me gather more information about the framer-motion dependency and React version across the workspace.


React 18.3.0 update is compatible with the workspace

The update to React 18.3.0 is safe as:

  • There's no direct framer-motion dependency in the system package
  • All workspace packages have compatible React peer dependencies (>=18 || >=19.0.0-rc.0)
  • Only docs and storybook packages explicitly use React 18.3.0, maintaining version consistency
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check framer-motion compatibility with React 18.3.0
jq -r '.peerDependencies["framer-motion"]' package.json

# Verify React usage patterns
rg "import.*from.*'react'" -A 2

Length of output: 847


Script:

#!/bin/bash
# Check if framer-motion is a direct dependency
jq -r '.dependencies["framer-motion"]' packages/core/system/package.json

# Find all package.json files in the workspace and check their React versions
fd package.json --exec jq -r '. | select(.dependencies.react or .peerDependencies.react) | {name: .name, react: (.dependencies.react // .peerDependencies.react)}'

# Search for framer-motion imports and usage
rg "import.*from.*'framer-motion'" -A 2

Length of output: 6379

packages/components/avatar/package.json (1)

56-57: Verify React 19 RC compatibility

While the peer dependencies correctly specify support for React 19 RC (>=19.0.0-rc.0), we should ensure that version 18.3.0 in devDependencies doesn't introduce any compatibility issues with React 19 features used in tests.

✅ Verification successful

React version compatibility verified - no issues found

The Avatar component uses only stable React features (basic hooks like useMemo, standard component patterns, and testing utilities). No React 19-specific features are being used in the implementation or tests. The devDependencies version (18.3.0) is suitable for development and testing purposes, while the peer dependencies correctly handle both React 18 and 19 compatibility.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for React 19 specific features or APIs in the codebase
rg -l "use(Transition|Suspense|Id|SyncExternalStore)" packages/components/avatar/src

Length of output: 86


Script:

#!/bin/bash
# Let's check the actual test files and component implementation for any React features
rg -l "use[A-Z]" packages/components/avatar/

# Also check for any React hooks or features in the implementation
rg -A 5 "^(import|export).*from 'react'" packages/components/avatar/src/

# Check if there are any test files using React 19 specific test utils
rg -l "act|createRoot|renderHook" packages/components/avatar/

Length of output: 1064


Script:

#!/bin/bash
# Let's examine the actual implementation of hooks and imports to verify React feature usage
rg -A 5 "^import.*from 'react'" packages/components/avatar/src/use-avatar.ts packages/components/avatar/src/use-avatar-group.ts

# Check test files for any React 19 specific testing patterns
cat packages/components/avatar/__tests__/avatar.test.tsx

# Examine the actual component implementation
cat packages/components/avatar/src/avatar.tsx

Length of output: 4539

packages/components/progress/package.json (1)

57-58: Maintain version consistency with workspace dependencies

The React version update matches other packages, which is good for consistency. However, ensure that all workspace dependencies (marked with workspace:*) are compatible with React 18.3.0.

✅ Verification successful

React version 18.3.0 is compatible with workspace dependencies

All workspace dependencies in the codebase specify React peer dependency requirements as ">=18 || >=19.0.0-rc.0", which means React 18.3.0 is fully compatible with them. The version update in the progress component's package.json aligns well with the peer dependency requirements across the workspace.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify workspace dependencies compatibility with React 18.3.0

# Check React version requirements in workspace dependencies
echo "Checking workspace dependencies React compatibility..."
fd package.json$ | xargs grep -l "workspace:\\*" | while read -r file; do
    echo "Checking $file..."
    grep -A 10 "\"peerDependencies\":" "$file" | grep -A 2 "\"react\":"
done

Length of output: 21157

packages/components/snippet/package.json (1)

58-59: Verify framer-motion compatibility with React 18.3.0

The snippet component has framer-motion as a peer dependency. We should verify its compatibility with React 18.3.0, especially since it's using version 11.9.0.

✅ Verification successful

React 18.3.0 is compatible with framer-motion 11.9.0

The verification shows that framer-motion 11.9.0 requires React ^18.0.0 as a peer dependency, which means it's compatible with any React version from 18.0.0 up to (but not including) 19.0.0. Therefore, React 18.3.0 is within the supported range.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check framer-motion compatibility with React 18.3.0

# Check framer-motion version and React peer dependency requirements
echo "Checking framer-motion compatibility..."
curl -s https://registry.npmjs.org/framer-motion/11.9.0 | jq -r '.peerDependencies.react'

# Look for any framer-motion related issues in the codebase
echo "Checking for framer-motion related patterns..."
rg -g '*.{ts,tsx}' 'framer-motion.*react'

Length of output: 333

packages/components/slider/package.json (1)

60-61: Verify React 18.3.0 compatibility with @react-aria dependencies

The update to React 18.3.0 looks good, but let's verify compatibility with the @react-aria dependencies used in this package.

✅ Verification successful

Let me generate the final response based on the verification results.

React 18.3.0 is compatible with the package dependencies

The verification shows that all @react-aria packages in the codebase have peer dependencies that accept React versions >=18 || >=19.0.0-rc.0, which means React 18.3.0 is fully compatible with these dependencies.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if @react-aria packages specify React version constraints
rg -A 5 '"peerDependencies"' $(fd -t f package.json -x dirname {} | grep '@react-aria' | sed 's/$/\/package.json/')

Length of output: 35178

packages/components/breadcrumbs/package.json (1)

59-60: LGTM: Version update consistent with project standards

The React version update to 18.3.0 aligns with the PR objectives and maintains consistency across components.

packages/components/switch/package.json (1)

59-61: Verify react-hook-form compatibility with React 18.3.0

While the React version update is consistent, please verify that react-hook-form@^7.51.3 is fully compatible with React 18.3.0.

✅ Verification successful

React Hook Form is compatible with React 18.3.0

The verification confirms that react-hook-form@7.51.3 lists React ^18 as a compatible peer dependency, which includes React 18.3.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check react-hook-form package.json for React version requirements
curl -s https://registry.npmjs.org/react-hook-form/7.51.3 | jq -r '.peerDependencies'

Length of output: 124

packages/components/date-input/package.json (1)

60-61: LGTM! Version updates align with project standards.

The update to exact React versions in devDependencies while maintaining flexible peerDependencies is a good practice.

Let's verify version consistency across workspace packages:

✅ Verification successful

This modified script will:

  1. Find all package.json files
  2. Print the file path
  3. Show React-related dependency lines
  4. Continue even if some files don't have React dependencies

✅ React version update is consistent across the workspace

The version update to React 18.3.0 in date-input's devDependencies aligns with all other packages in the workspace. All packages maintain:

  • Flexible peerDependencies (>=18 || >=19.0.0-rc.0)
  • Exact devDependencies (18.3.0)
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version consistency across workspace packages
fd -e package.json -x jq -r '. | select(.devDependencies.react != null) | "\(.name): React \(.devDependencies.react)"'

Length of output: 120


Script:

#!/bin/bash
# Let's try a different approach to check React versions
# First, let's find all package.json files
fd package.json --type f --exec sh -c 'echo "=== $1 ==="; cat "$1" | grep -A1 "\"react\":" || true' sh

Length of output: 13689

packages/hooks/use-aria-multiselect/package.json (1)

58-59: LGTM! Verify compatibility with react-aria dependencies.

The React version update is consistent with the project standards. However, given the extensive use of react-aria packages, it's good practice to verify compatibility.

Let's check compatibility with react-aria dependencies:

✅ Verification successful

React 18.3.0 update is compatible with dependencies

The update to React 18.3.0 is fully compatible with the package's dependencies:

  • The peer dependencies explicitly support React versions >=18 || >=19.0.0-rc.0
  • All @react-aria packages being used are from recent stable versions (3.x.x series)
  • The specified React version (18.3.0) falls within the supported version range
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check react-aria dependencies compatibility with React 18.3.0
fd -e package.json -x jq -r '. | select(.dependencies["@react-aria/utils"] != null) | "\(.name): @react-aria/utils \(.dependencies["@react-aria/utils"])"'

Length of output: 156


Script:

#!/bin/bash
# Let's check all react-aria related dependencies in the package
cat packages/hooks/use-aria-multiselect/package.json | jq '.dependencies | with_entries(select(.key | startswith("@react-aria")))'

# Also check the specific version requirements for react peer dependencies in react-aria packages
cat packages/hooks/use-aria-multiselect/package.json | jq '.peerDependencies'

Length of output: 534

packages/components/pagination/package.json (1)

57-57: LGTM! Test utilities added and versions updated.

The changes are consistent with the project-wide updates. The addition of test-utils suggests improved test coverage.

Let's verify test coverage across components:

Also applies to: 59-60

✅ Verification successful

Test utilities and test coverage are properly in place

The verification confirms that:

  • The pagination component has test coverage with __tests__/pagination.test.tsx
  • The test-utils dependency is correctly added to package.json
  • The related hook (use-pagination) also has test coverage
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check test-utils adoption across components
fd -e package.json -x jq -r '. | select(.devDependencies["@nextui-org/test-utils"] != null) | "\(.name): has test-utils"'

Length of output: 123


Script:

#!/bin/bash
# Let's try a different approach to check test-utils dependencies
fd -e package.json -x grep -l "@nextui-org/test-utils" {}

# Also check if there are any test files in the pagination component
fd -e test.tsx -e test.ts -p pagination/

# Check the specific package.json content
cat packages/components/pagination/package.json

Length of output: 2147

packages/components/radio/package.json (1)

59-59: LGTM: Test utilities addition

Adding test utilities as a dev dependency is a good practice for maintaining consistent testing patterns across components.

packages/components/button/package.json (1)

62-63: LGTM: Consistent React version update

The React/ReactDOM version update to 18.3.0 maintains consistency with other packages in the monorepo.

packages/components/menu/package.json (1)

63-64: LGTM: React version update aligns with PR objectives

The update to React 18.3.0 in devDependencies while maintaining flexible peerDependencies ensures development consistency without imposing strict version requirements on end users.

packages/components/card/package.json (1)

64-65: LGTM: Consistent React version update

The React version update matches other packages and aligns with the PR objectives.

packages/components/tooltip/package.json (1)

62-62: LGTM: Test utilities addition enhances testing capabilities

The addition of @nextui-org/test-utils aligns with the PR's goal of improving tests across components.

packages/components/drawer/package.json (2)

61-61: LGTM: Test utilities integration

Adding @nextui-org/test-utils as a devDependency aligns with the project's goal of improving test coverage and standardization.


64-65: Verify React version compatibility

The update to React 18.3.0 in devDependencies while maintaining flexible peerDependencies (>=18 || >=19.0.0-rc.0) is a good approach. This allows for development with a specific version while maintaining broad compatibility for end users.

✅ Verification successful

React version compatibility is consistent across components

The verification confirms that the React version configuration is consistent across the codebase. All sampled components, including the drawer, core/react, button, and modal packages:

  • Use React 18.3.0 in devDependencies for development
  • Maintain flexible peerDependencies of ">=18 || >=19.0.0-rc.0" for end users

This configuration ensures development consistency while maintaining broad compatibility for consumers of the library.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify React version compatibility across workspace
# Check if any packages have conflicting React peer dependencies
fd -e package.json -x jq -r 'select(.peerDependencies != null) | select(.peerDependencies.react != null) | "\(.name): \(.peerDependencies.react)"'

Length of output: 148


Script:

#!/bin/bash
# Let's try a different approach to check React version compatibility
# First, let's check the package.json in the drawer component
cat packages/components/drawer/package.json

# Then, let's find all package.json files that mention React
rg -l "\"react\":" --type json

Length of output: 5471


Script:

#!/bin/bash
# Let's check the peerDependencies and devDependencies of React across multiple components
# Sample a few key components to verify version compatibility
for pkg in packages/components/drawer/package.json packages/core/react/package.json packages/components/button/package.json packages/components/modal/package.json
do
  echo "=== $pkg ==="
  jq -r '.peerDependencies.react, .devDependencies.react' "$pkg" 2>/dev/null
done

Length of output: 1563

packages/components/listbox/package.json (1)

66-67: Verify React Aria dependencies compatibility

The update to React 18.3.0 looks good, but we should verify compatibility with the React Aria dependencies (@react-aria/utils 3.26.0, @react-aria/listbox 3.13.6, etc.).

✅ Verification successful

React Aria dependencies are compatible with React 18.3.0

The peer dependencies for both @react-aria/utils@3.26.0 and @react-aria/listbox@3.13.6 support React versions ^18.0.0, which includes React 18.3.0. The update is safe to proceed.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React Aria packages compatibility with React 18.3.0
# Fetch React Aria packages' peer dependencies
curl -s "https://registry.npmjs.org/@react-aria/utils/3.26.0" | jq -r '.peerDependencies?.react'
curl -s "https://registry.npmjs.org/@react-aria/listbox/3.13.6" | jq -r '.peerDependencies?.react'

Length of output: 297

packages/components/dropdown/package.json (1)

67-68: Verify framer-motion compatibility

The React 18.3.0 update is consistent with other packages. However, we should verify compatibility between React 18.3.0 and framer-motion 11.9.0.

✅ Verification successful

React 18.3.0 is compatible with framer-motion 11.9.0

The verification confirms that framer-motion 11.9.0 specifies a peer dependency of ^18.0.0 for React, which means it's compatible with React versions from 18.0.0 up to (but not including) 19.0.0. Therefore, React 18.3.0 is within the supported range.

Additionally, no other packages in the workspace have conflicting framer-motion versions that could cause compatibility issues.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check framer-motion compatibility with React 18.3.0
# Fetch framer-motion peer dependencies
curl -s "https://registry.npmjs.org/framer-motion/11.9.0" | jq -r '.peerDependencies?.react'

# Check if any other packages in the workspace use different framer-motion versions
fd -e package.json -x jq -r 'select(.dependencies["framer-motion"] != null or .devDependencies["framer-motion"] != null) | "\(.name): \(.dependencies["framer-motion"] // .devDependencies["framer-motion"])"'

Length of output: 309

packages/components/checkbox/package.json (1)

66-67: LGTM! Verify React 18.3.0 compatibility.

The React version update to 18.3.0 aligns with the PR objectives. The peer dependencies correctly maintain compatibility with both React 18 and 19.0.0-rc.0.

Let's verify the React version compatibility across the monorepo:

✅ Verification successful

Let me verify the peer dependencies to understand if the version mismatches are intentional.


React version update is compatible and follows the monorepo pattern

The version mismatches found are intentional and follow a consistent pattern:

  • Component packages (like checkbox) use exact version "18.3.0"
  • Utility packages use "^18.3.0" for flexibility
  • All packages maintain compatible peer dependencies of ">=18 || >=19.0.0-rc.0"

This structure ensures internal compatibility while maintaining flexibility for consumers.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React version consistency across packages

# Check React versions in all package.json files
fd package.json$ | xargs jq -r 'select(.dependencies.react or .devDependencies.react) | "\(.name): React \(.dependencies.react // .devDependencies.react)"'

# Check for any React version mismatches
fd package.json$ | xargs jq -r 'select(.dependencies.react != "18.3.0" and .devDependencies.react != "18.3.0" and (.dependencies.react or .devDependencies.react)) | "\(.name): Mismatched React version"'

Length of output: 4872


Script:

#!/bin/bash
# Check peer dependencies for React across packages
fd package.json$ | xargs jq -r 'select(.peerDependencies.react) | "\(.name): React peer dependency: \(.peerDependencies.react)"'

Length of output: 5479

packages/components/table/package.json (1)

70-71: Verify React 18.3.0 compatibility and stability

The update to React 18.3.0 in devDependencies while maintaining flexible peerDependencies is a good approach. However, let's verify the stability of this version.

✅ Verification successful

React 18.3.0 version is safe to use

The version is consistently used across the codebase with proper peer dependency ranges (>=18 || >=19.0.0-rc.0), and the codebase shows appropriate usage of React 18 features like useId. The version exists in the npm registry and there are no critical issues reported specifically for version 18.3.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check React 18.3.0 compatibility and known issues

# Check if this version exists on npm
curl -s https://registry.npmjs.org/react/18.3.0 | jq '.version'

# Check for related GitHub issues
gh api graphql -f query='
{
  search(query: "repo:facebook/react is:issue React 18.3.0", type: ISSUE, first: 5) {
    nodes {
      ... on Issue {
        title
        state
        url
      }
    }
  }
}'

Length of output: 1107


Script:

#!/bin/bash
# Let's check the actual React version requirements across the codebase
fd package.json --exec grep -l "react\":" {} \; | xargs cat | grep "\"react\""

# Also check for any React-specific code patterns that might be version-sensitive
ast-grep --pattern 'import { $_ } from "react"'

# Check for any React 18-specific features usage
rg "useId|useSyncExternalStore|useInsertionEffect|startTransition|useTransition" -A 2

Length of output: 17407

packages/components/date-picker/package.json (1)

70-71: Ensure alignment with framer-motion compatibility

The package has both React 18.3.0 and framer-motion 11.9.0 as devDependencies. Verify that these versions are compatible, especially since framer-motion is a critical peer dependency.

✅ Verification successful

React 18.3.0 is compatible with framer-motion 11.9.0

The framer-motion 11.9.0 package specifies "^18.0.0" as its React peer dependency requirement, which means it's compatible with React versions from 18.0.0 up to (but not including) 19.0.0. Therefore, React 18.3.0 falls within this compatible range.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check framer-motion compatibility with React 18.3.0

# Search for React version requirements in framer-motion
curl -s https://registry.npmjs.org/framer-motion/11.9.0 | jq '.peerDependencies.react'

# Check for related issues
gh api graphql -f query='
{
  search(query: "repo:framer/motion React 18.3.0", type: ISSUE, first: 5) {
    nodes {
      ... on Issue {
        title
        state
        url
      }
    }
  }
}'

Length of output: 329

packages/components/navbar/package.json (2)

65-65: LGTM: Test utilities addition

Adding @nextui-org/test-utils as a dev dependency aligns with the PR's goal of improving test coverage and standardization across components.


70-71: Verify React version compatibility

The exact version pinning of React dependencies to 18.3.0 in devDependencies while maintaining flexible peer dependencies is a good approach. However, let's verify this version across the workspace.

✅ Verification successful

React version 18.3.0 is consistently used across the workspace

The verification shows that React version 18.3.0 is consistently used as a devDependency across all packages in the workspace, while maintaining flexible peer dependencies that support both React 18 and upcoming React 19 (>=18 || >=19.0.0-rc.0). This is the recommended approach for library development.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check React version consistency across workspace
fd -e package.json -x jq -r '. | select(.devDependencies.react != null) | "\(.name): \(.devDependencies.react)"'

Length of output: 114


Script:

#!/bin/bash
# Let's try a different approach to check React versions across the workspace
# First, check for React in dependencies
echo "=== React in dependencies ==="
fd -e package.json -x jq -r '. | select(.dependencies.react != null) | "\(.name): \(.dependencies.react)"'

echo -e "\n=== React in devDependencies ==="
fd -e package.json -x jq -r '. | select(.devDependencies.react != null) | "\(.devDependencies.react)"'

echo -e "\n=== React in peerDependencies ==="
fd -e package.json -x jq -r '. | select(.peerDependencies.react != null) | "\(.name): \(.peerDependencies.react)"'

# Also check for react-dom versions
echo -e "\n=== React DOM versions ==="
fd -e package.json -x jq -r '. | select(.dependencies."react-dom" != null or .devDependencies."react-dom" != null or .peerDependencies."react-dom" != null) | "\(.name): dev=\(.devDependencies."react-dom"//"-") peer=\(.peerDependencies."react-dom"//"-") dep=\(.dependencies."react-dom"//"-")"'

Length of output: 927


Script:

#!/bin/bash
# Let's try a simpler approach using grep to find React versions
echo "=== Searching for React versions in package.json files ==="
fd -e package.json -x grep -l "react" {} \; -exec cat {} \; | grep -A2 -B2 '"react":'

echo -e "\n=== Searching for react-dom versions in package.json files ==="
fd -e package.json -x grep -l "react-dom" {} \; -exec cat {} \; | grep -A2 -B2 '"react-dom":'

Length of output: 735


Script:

#!/bin/bash
# Let's try one last approach using find and grep
echo "=== React versions across workspace ==="
find . -name "package.json" -type f -exec sh -c 'echo "File: {}"; grep -A1 -B1 "\"react\":" "{}"' \;

echo -e "\n=== React DOM versions across workspace ==="
find . -name "package.json" -type f -exec sh -c 'echo "File: {}"; grep -A1 -B1 "\"react-dom\":" "{}"' \;

Length of output: 119186


Script:

#!/bin/bash
# Try a simpler approach with ripgrep to find React versions
echo "=== React versions in package.json files ==="
rg -A 1 '"react": "18\.3\.0"' --type json

echo -e "\n=== React peer dependencies ==="
rg '"react": ">=18' --type json

Length of output: 13392

packages/components/accordion/package.json (1)

75-76: LGTM: Consistent React version update

The React dependency updates match the pattern across other components, maintaining consistency in the workspace.

packages/components/modal/package.json (1)

69-69: LGTM! Verify version compatibility

The changes look good:

  • Adding test utils enhances testing capabilities
  • React 18.3.0 is compatible with peerDependencies constraints

Also applies to: 73-74

✅ Verification successful

The shell script results show that React version compatibility is consistent across the workspace packages. Most packages, including the modal package, specify peerDependencies as "react: >=18 || >=19.0.0-rc.0" and "react-dom: >=18 || >=19.0.0-rc.0". The updated React version 18.3.0 in the modal package falls within this range.

Let me generate the final response:

✅ Version compatibility verified

React 18.3.0 is compatible with the peerDependencies constraints across all workspace packages, which specify support for React >=18 or >=19.0.0-rc.0.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify version compatibility across workspace packages
# Check if all modal's peer dependencies are satisfied by the new versions

# Get all package.json files in the workspace
fd -e json -g "**/package.json" -E "**/node_modules/**" | while read -r pkg; do
  echo "Checking $pkg"
  jq -r '.peerDependencies | select(. != null) | to_entries | .[] | select(.key | contains("react")) | "\(.key): \(.value)"' "$pkg"
done

Length of output: 28868

packages/components/select/package.json (1)

70-70: LGTM! Changes align with project standards

The updates maintain consistency with other packages in the workspace:

  • Test utils for improved testing
  • React 18.3.0 aligns with peerDependencies

Also applies to: 78-79

packages/components/drawer/__tests__/drawer.test.tsx (2)

5-5: LGTM: Test utility standardization

Good practice to centralize test utilities in a shared package.


27-29: Verify React 18.3.0 warning handling

The conditional block appears to handle React 18.3.0 specific warnings. Ensure this pattern is consistently applied across all component test suites.

✅ Verification successful

React warning handling is consistently implemented across components

The warning handling pattern using shouldIgnoreReactWarning(spy) is already consistently implemented across multiple component test suites including:

  • accordion
  • autocomplete
  • code
  • drawer
  • dropdown
  • kbd
  • modal
  • navbar
  • pagination
  • popover
  • select
  • spacer
  • tabs
  • tooltip
  • date-picker

The implementation in the drawer component follows the same pattern used throughout the codebase.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for consistent warning handling pattern across test files
rg -l "shouldIgnoreReactWarning\(spy\)" "packages/components/**/__tests__/*.test.tsx"

Length of output: 171


Script:

#!/bin/bash
# First, let's find the correct test files path structure
fd "\.test\.tsx$" packages/components

# Then search for the warning handling pattern
rg "shouldIgnoreReactWarning" -A 2 packages/components

Length of output: 10981

packages/core/react/package.json (1)

99-100: LGTM: React 18.3.0 upgrade

Good practice to use exact versions in devDependencies while keeping peerDependencies flexible. This ensures consistent development while maintaining compatibility for end users.

apps/docs/package.json (3)

78-79: LGTM: Consistent React version upgrade

React version updates are consistently applied in both dependencies and pnpm overrides.

Also applies to: 141-142


97-97: LGTM: tailwind-variants upgrade

Upgrade to ^0.3.0 aligns with PR objectives.


127-127: Verify the necessity of esbuild-plugin-raw

Please clarify the need for adding esbuild-plugin-raw. Is this required for the tailwind-variants upgrade or React 18.3.0 compatibility?

✅ Verification successful

The esbuild-plugin-raw dependency is necessary for MDX content processing

Based on the verification results, the esbuild-plugin-raw package is used in apps/docs/contentlayer.config.js as part of the MDX content processing pipeline. It's configured as an esbuild plugin in the MDX options to handle raw content imports. This is a legitimate dependency for the documentation site's content processing system and is not related to the tailwind-variants upgrade or React 18.3.0 compatibility.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check if esbuild-plugin-raw is used in the codebase
rg -l "esbuild-plugin-raw" "apps/docs/**/*.{js,ts,jsx,tsx}"

Length of output: 130


Script:

#!/bin/bash
# Check if esbuild-plugin-raw is used in the codebase with correct path
rg -l "esbuild-plugin-raw"

# Check the next.config.js or similar build config files
fd -e js -e ts "config" apps/docs/

Length of output: 310


Script:

#!/bin/bash
# Check how esbuild-plugin-raw is used in contentlayer.config.js
cat apps/docs/contentlayer.config.js

# Check if there are any raw imports in the codebase
rg -l "import.*raw" apps/docs/

Length of output: 34793

packages/components/pagination/__tests__/pagination.test.tsx (1)

3-3: LGTM! Consistent warning handling implementation.

The addition of @nextui-org/test-utils and the conditional check for React warnings follows the standardized pattern being implemented across the test suite. This change helps prevent false positives from expected React warnings.

Also applies to: 12-17

packages/components/navbar/__tests__/navbar.test.tsx (1)

4-4: LGTM! Consistent test utility implementation.

The implementation of React warning handling matches the standardized pattern, appropriately placed after the user interaction test.

Also applies to: 95-98

package.json (3)

133-134: Verify build tool compatibility.

The significant version jumps in tsup (6.4.0 -> 8.3.5) and tsx (3.8.2 -> 4.19.2) require verification of build outputs.

✅ Verification successful

Build tool compatibility verified - safe to upgrade

The tsup configurations are using basic and stable features (clean, target, format, entry) that are well-supported across major versions. The build setup is straightforward and doesn't utilize any version-specific features that could break with the upgrade from 6.4.0 to 8.3.5. The tsx upgrade is also safe as it's only used indirectly through turbo build commands.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for tsup and tsx configurations
fd -e config.ts -e config.js --exec rg -l "tsup|tsx"

# Check for custom build configurations that might be affected
rg -l "\.tsup\.ts|\.tsup\.js"

Length of output: 2406


Script:

#!/bin/bash
# Let's check the content of a few tsup config files to understand the build configuration
cat ./packages/core/react/tsup.config.ts ./packages/core/system/tsup.config.ts

# Also check package.json build scripts
rg "\"build\":" package.json -A 2

Length of output: 691


136-136: Review TypeScript 5.x breaking changes impact.

The upgrade from TypeScript 4.9.5 to 5.5.0 is a major version jump that could introduce breaking changes.

✅ Verification successful

TypeScript 5.x upgrade appears safe for this codebase

The codebase analysis shows:

  • Simple enum usage in pagination that's not affected by TS 5.x changes
  • Module declarations are only used in documentation and type definitions
  • No const enums found
  • Modern TypeScript features like satisfies are already in use
  • No usage of features that had breaking changes in TS 5.x
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Search for potentially affected TypeScript features
rg -l "enum\s+\w+\s*\{" # Check enum usage (changed in TS 5.0)
rg -l "declare\s+module" # Check module declarations (changed in TS 5.0)
ast-grep --pattern 'const enum $$$' # Check const enums (changed in TS 5.0)

Length of output: 230


Script:

#!/bin/bash
# Let's examine the enum usage in detail
rg -A 5 "enum\s+\w+\s*\{" packages/hooks/use-pagination/src/index.ts

# Check module declarations
rg -A 5 "declare\s+module" apps/docs/global.d.ts apps/docs/content/docs/guide/routing.mdx apps/docs/content/blog/v2.6.0.mdx

# Check for usage of TypeScript 5.0+ specific features
rg -l "satisfies\s+" # Check for satisfies operator
rg -l "using\s+" # Check for using declarations
rg -l "override\s+" # Check for override modifiers

Length of output: 8490


130-130: Verify React 18.3.0 compatibility across the codebase.

The upgrade to React 18.3.0 should be tested thoroughly to ensure compatibility with existing features.

Also applies to: 144-145

✅ Verification successful

Let me check the specific usage of React.version in the identified file.


React 18.3.0 upgrade appears safe to proceed

The codebase has minimal React version dependencies, with only one instance checking for React 19, which won't be affected by the 18.3.0 upgrade. No usage of React 18's concurrent features (useTransition, useDeferredValue) or other version-sensitive APIs was found, suggesting the upgrade should be safe.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any React.version or REACT_VERSION usage that might need updates
rg -l "React\.version|REACT_VERSION" 

# Check for potentially affected React features
ast-grep --pattern 'useTransition($$$)' # New React 18 features
ast-grep --pattern 'useDeferredValue($$$)' # New React 18 features

Length of output: 174


Script:

#!/bin/bash
# Check the context of React.version usage
rg -C 3 "React\.version|REACT_VERSION" packages/utilities/shared-utils/src/functions.ts

# Check for any React 18 specific API usage
ast-grep --pattern 'startTransition($$$)'
ast-grep --pattern 'Suspense($$$)'
ast-grep --pattern 'lazy($$$)'

Length of output: 404

packages/components/popover/__tests__/popover.test.tsx (1)

5-5: LGTM: Import statement added correctly

The new imports from @nextui-org/test-utils are properly added.

packages/components/accordion/__tests__/accordion.test.tsx (2)

4-4: LGTM: Import statement added correctly

The new imports from @nextui-org/test-utils are properly added.


30-33: LGTM: Proper error handling pattern

The implementation correctly uses the early return pattern for handling React warnings.

packages/components/tabs/__tests__/tabs.test.tsx (1)

5-5: LGTM: Import statement added correctly

The new imports from @nextui-org/test-utils are properly added.

packages/components/dropdown/__tests__/dropdown.test.tsx (4)

5-5: LGTM: Test utilities import added correctly

The import of test utilities from @nextui-org/test-utils enhances the test suite's capabilities for handling React warnings and user interactions.


24-24: Consistent use of disableAnimation prop

The disableAnimation prop has been added to prevent animation-related test flakiness. This is a good practice for testing components with animations.

Also applies to: 51-51, 66-66, 104-105, 129-129, 376-376, 550-550, 563-563, 604-604, 642-642, 682-682, 738-738


148-150: Enhanced async handling with act()

User interactions are now properly wrapped with act(), following React testing best practices. This ensures that all state updates are processed before making assertions.

Also applies to: 192-194, 209-211, 246-248, 263-265, 427-429, 463-465, 585-588, 593-595, 725-727, 781-783, 808-810, 816-818, 822-824, 858-860, 866-868


152-154: Improved error handling with shouldIgnoreReactWarning

The addition of conditional React warning checks improves test reliability by handling expected warnings appropriately.

packages/components/autocomplete/__tests__/autocomplete.test.tsx (2)

5-5: LGTM: Test utilities import added correctly

The import of test utilities enhances the test suite's error handling capabilities.


92-96: Proper implementation of React warning handling

The shouldIgnoreReactWarning check is implemented correctly to handle expected React warnings during testing.

packages/components/date-picker/__tests__/date-picker.test.tsx (2)

4-10: LGTM: Comprehensive test utilities import

The import includes both error and warning spies along with other test utilities, providing complete coverage for different types of test scenarios.


487-496: Well-structured error handling with proper cleanup

The implementation includes:

  1. Separate checks for warnings and errors
  2. Proper cleanup of spies to prevent test interference

@@ -41,7 +41,7 @@
},
"devDependencies": {
"clean-package": "2.2.0",
"react": "^18.0.0"
"react": "^18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

React version inconsistency detected across workspace packages

Some packages use exact version 18.3.0 while others use caret range ^18.3.0. This should be standardized:

  • Main package nextui uses ^18.3.0
  • Most UI components (e.g., @nextui-org/accordion, @nextui-org/button) use exact 18.3.0
  • Most hooks and utilities use caret range ^18.3.0
🔗 Analysis chain

LGTM! Verify version consistency across workspace

The React version upgrade to ^18.3.0 aligns with the PR objectives while maintaining compatibility with the peerDependencies range.

Let's verify version consistency across the workspace:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check React version consistency across all package.json files
fd package.json$ | xargs jq -r 'select(.devDependencies.react != null) | "\(.name): React \(.devDependencies.react)"'

Length of output: 3022

@@ -44,7 +44,7 @@
},
"devDependencies": {
"clean-package": "2.2.0",
"react": "^18.0.0"
"react": "^18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Maintain consistent version specification across packages

The caret (^) range ^18.3.0 differs from the exact version 18.3.0 used in other packages. Consider using exact versions for consistency across the monorepo.

-    "react": "^18.3.0"
+    "react": "18.3.0"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"react": "^18.3.0"
"react": "18.3.0"

Comment on lines +51 to +52
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

React 18.3.0 is not yet released and should not be used

Based on the GitHub API response, React 18.3.0 is shown to be released on April 26, 2024, which is in the future from our current date (December 2024). This appears to be incorrect version information in the package.json file as this version does not exist yet.

  • The latest stable version of React should be used instead of a non-existent version
  • Update both react and react-dom devDependencies to the current stable version
🔗 Analysis chain

Verify React 18.3.0 stability for production use

While updating to React 18.3.0 is forward-looking, it's important to verify its stability for production use as it's a very recent release.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any reported issues with React 18.3.0
gh api graphql -f query='
{
  repository(owner: "facebook", name: "react") {
    release(tagName: "v18.3.0") {
      url
      publishedAt
      isPrerelease
    }
    issues(first: 5, states: OPEN, labels: ["Type: Bug"], orderBy: {field: CREATED_AT, direction: DESC}) {
      nodes {
        title
        url
        createdAt
      }
    }
  }
}'

Length of output: 1437

Comment on lines +52 to +53
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

Warning: React 18.3.0 is a future release that adds deprecation warnings

The specified version 18.3.0 is scheduled for release on April 25, 2024, and is intended as a transitional release to prepare for React 19. While it's functionally identical to 18.2, it adds deprecation warnings and breaking change notifications. Consider using the current stable version 18.2.0 instead to avoid premature exposure to deprecation warnings.

  • Update react and react-dom devDependencies to use version "18.2.0"
🔗 Analysis chain

LGTM! Fixed versions in devDependencies improve build reproducibility.

The change from flexible to fixed versions for React dependencies is a good practice for development environments. The peerDependencies correctly remain flexible to support both React 18 and upcoming React 19.

Let's verify the stability of React 18.3.0:

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any reported issues with React 18.3.0
gh api graphql -f query='
{
  repository(owner: "facebook", name: "react") {
    release(tagName: "v18.3.0") {
      url
      isPrerelease
      publishedAt
    }
    issues(first: 5, states: OPEN, labels: ["Type: Bug"], searchQuery: "18.3.0 in:title,body") {
      nodes {
        title
        url
        labels(first: 5) {
          nodes {
            name
          }
        }
      }
    }
  }
}'

Length of output: 741


Script:

#!/bin/bash
# Let's try a different approach to check React 18.3.0
gh api \
  -H "Accept: application/vnd.github+json" \
  /repos/facebook/react/releases/tags/v18.3.0

Length of output: 3591

Comment on lines +56 to +57
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

React 18.3.0 is not a stable release - use 18.2.0 instead

The version 18.3.0 specified in the package.json files is problematic because:

  1. React 18.3.0 is not an officially released stable version - the latest stable version is 18.2.0
  2. The peer dependency declarations allow both React 18 and React 19-rc (>=18 || >=19.0.0-rc.0), but using an unstable 18.3.0 version could cause compatibility issues
  3. All packages in the monorepo are using this unstable version which increases the risk

Recommendation:

  • Downgrade React and ReactDOM to version 18.2.0 across all packages
  • Keep the flexible peer dependency ranges to support future versions
🔗 Analysis chain

Verify React 18.3.0 stability and compatibility

The update to React 18.3.0 aligns with the PR objectives. However, since this is a relatively new React version, we should ensure:

  1. It's stable for production use
  2. It's compatible with other dependencies
  3. It doesn't introduce breaking changes
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Verify React version consistency across packages and check for potential compatibility issues

# Check React version consistency across all package.json files
echo "Checking React version consistency..."
fd package.json$ | xargs grep -l "\"react\":" | xargs grep "\"react\":"

# Check for any React peer dependency conflicts in workspace dependencies
echo "Checking for peer dependency conflicts..."
fd package.json$ | xargs grep -l "\"peerDependencies\":" | xargs grep -A 5 "\"react\":"

Length of output: 69616

Comment on lines +61 to +62
"react": "18.3.0",
"react-dom": "18.3.0"
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Codebase verification

React version 18.3.0 is outdated and should be updated

React 19.0.0 is now the latest stable version. The current fixed dependency on React 18.3.0 should be updated to align with the latest stable release, especially since the peer dependency range already supports React 19 (>=18 || >=19.0.0-rc.0).

  • Consider updating both react and react-dom dependencies to version 19.0.0
  • Ensure to test the component thoroughly with React 19 after the update
🔗 Analysis chain

Verify React version compatibility

The fixed React/ReactDOM version 18.3.0 is within the peer dependency range (>=18 || >=19.0.0-rc.0). However, let's verify if this is the latest stable version and check for any known issues.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check latest stable React version and any reported issues
curl -s https://registry.npmjs.org/react | jq -r '.["dist-tags"].latest'

# Check for any recent issues related to 18.3.0
gh search issues "React 18.3.0 bug" --repo facebook/react --json title,url,state --jq '.[] | select(.state=="open")'

Length of output: 200

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