-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Add form component #3036
base: canary
Are you sure you want to change the base?
Add form component #3036
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
🦋 Changeset detectedLatest commit: 7b6ec0b The changes in this PR will be included in the next version bump. 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 |
WalkthroughThis pull request includes extensive updates to the Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant DatePicker
participant Form
User->>Form: Submit with DatePicker
Form->>DatePicker: Validate input
DatePicker-->>Form: Return validation result
Form-->>User: Display validation feedback
Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
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? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
Documentation and Community
|
@ryo-manba please pull the changes from canary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 15
🧹 Outside diff range and nitpick comments (5)
packages/hooks/use-aria-toggle-button/package.json (1)
Line range hint
1-65
: Consider adding lock file to ensure consistent installations.While the package.json updates look good, it's recommended to include package-lock.json or yarn.lock in the repository to ensure consistent dependency installations across different environments.
packages/components/switch/package.json (1)
Line range hint
38-52
: Consider adding @nextui-org/form as a peer dependency.Since other NextUI components are adding the Form component as a dependency, and the Switch component could be used within forms, consider adding
@nextui-org/form
as a peer dependency to ensure version consistency when used together."peerDependencies": { "react": ">=18", "react-dom": ">=18", "@nextui-org/theme": ">=2.1.0", - "@nextui-org/system": ">=2.0.0" + "@nextui-org/system": ">=2.0.0", + "@nextui-org/form": ">=2.0.0" },packages/components/autocomplete/package.json (1)
74-74
: Consider documenting React Hook Form integration.The addition of
react-hook-form
as a dev dependency suggests form validation capabilities. This aligns with the PR's form functionality goals, but it would be beneficial to document the integration approach.Would you like me to help create documentation for the React Hook Form integration with the new Form component?
Also applies to: 82-82
packages/components/autocomplete/__tests__/autocomplete.test.tsx (2)
607-607
: Remove redundantuserEvent.setup()
callsThe
user
variable is already initialized in thebeforeEach
hook at the beginning of the test suite. Re-initializing it inside individual test cases is unnecessary and can be removed to avoid redundancy.Apply this diff to remove the redundant initializations:
At line 607:
- const user = userEvent.setup();
At line 631:
- const user = userEvent.setup();
Also applies to: 631-631
592-620
: Refactor duplicate test cases to enhance maintainabilityThe test cases
"should work when key equals textValue"
(lines 592-620) and"should work when key equals textValue (controlled)"
(lines 622-644) have similar structures and logic. To reduce code duplication and improve maintainability, consider abstracting the common logic into a shared helper function or parameterizing the test cases.Also applies to: 622-644
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (56)
apps/docs/package.json
(1 hunks)package.json
(1 hunks)packages/components/accordion/package.json
(1 hunks)packages/components/alert/package.json
(1 hunks)packages/components/autocomplete/__tests__/autocomplete.test.tsx
(5 hunks)packages/components/autocomplete/package.json
(3 hunks)packages/components/avatar/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
(2 hunks)packages/components/chip/package.json
(1 hunks)packages/components/date-input/package.json
(2 hunks)packages/components/date-picker/package.json
(1 hunks)packages/components/date-picker/stories/date-range-picker.stories.tsx
(3 hunks)packages/components/divider/package.json
(1 hunks)packages/components/dropdown/__tests__/dropdown.test.tsx
(1 hunks)packages/components/dropdown/package.json
(2 hunks)packages/components/input/package.json
(1 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/package.json
(1 hunks)packages/components/navbar/package.json
(1 hunks)packages/components/pagination/package.json
(1 hunks)packages/components/popover/package.json
(1 hunks)packages/components/progress/package.json
(1 hunks)packages/components/radio/package.json
(2 hunks)packages/components/select/package.json
(2 hunks)packages/components/slider/package.json
(1 hunks)packages/components/snippet/package.json
(2 hunks)packages/components/switch/package.json
(1 hunks)packages/components/table/package.json
(2 hunks)packages/components/tabs/package.json
(1 hunks)packages/components/tooltip/package.json
(1 hunks)packages/components/user/package.json
(1 hunks)packages/core/react/package.json
(2 hunks)packages/core/react/src/index.ts
(1 hunks)packages/core/system-rsc/package.json
(1 hunks)packages/core/system/package.json
(1 hunks)packages/hooks/use-aria-accordion-item/package.json
(2 hunks)packages/hooks/use-aria-accordion/package.json
(2 hunks)packages/hooks/use-aria-button/package.json
(2 hunks)packages/hooks/use-aria-link/package.json
(2 hunks)packages/hooks/use-aria-menu/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-aria-toggle-button/package.json
(1 hunks)packages/hooks/use-disclosure/package.json
(1 hunks)packages/hooks/use-draggable/package.json
(1 hunks)packages/hooks/use-intersection-observer/package.json
(1 hunks)packages/hooks/use-is-mobile/package.json
(1 hunks)packages/hooks/use-pagination/package.json
(1 hunks)packages/utilities/aria-utils/package.json
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- packages/components/snippet/package.json
- packages/hooks/use-disclosure/package.json
🚧 Files skipped from review as they are similar to previous changes (7)
- apps/docs/package.json
- package.json
- packages/components/checkbox/package.json
- packages/components/date-picker/package.json
- packages/core/react/package.json
- packages/core/react/src/index.ts
- packages/core/system/package.json
🔇 Additional comments (61)
packages/hooks/use-is-mobile/package.json (1)
37-37
: LGTM: Patch version bump of @react-aria/ssr
The update from 3.9.5 to 3.9.6 aligns with the PR's objective to upgrade react-aria dependencies.
packages/hooks/use-draggable/package.json (2)
53-53
: Verify if Form-related features are needed.
Since this PR primarily introduces Form functionality, verify if this package requires the new Form-related features from the updated @react-aria/interactions version.
53-53
: LGTM! Verify type compatibility after the upgrade.
The version bump from ^3.21.1 to ^3.22.4 is appropriate for resolving type-checking errors. Since this is part of a coordinated upgrade across multiple packages, this change maintains consistency.
Let's verify if there are any type-related files that might need attention:
✅ Verification successful
Version update is safe and compatible
The code inspection shows that the package uses only stable APIs from @react-aria/interactions:
- Types:
MoveMoveEvent
,MoveResult
- Hook:
useMove
These are core dragging functionalities that are unlikely to have breaking changes in a minor version update. The usage is straightforward and doesn't involve any complex type interactions that could be affected by the version bump.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for type definition files and type imports from @react-aria/interactions
# Expected: No type errors or inconsistencies
# Search for type imports from @react-aria/interactions
rg -t typescript "import.*from.*@react-aria/interactions.*" packages/hooks/use-draggable/src
Length of output: 129
Script:
#!/bin/bash
# Let's try different approaches to find relevant files and imports
# Find all JavaScript/TypeScript files in the package
fd "\.(js|jsx|ts|tsx)$" packages/hooks/use-draggable/src
# Search for imports from react-aria/interactions without file type restriction
rg "from ['|\"]@react-aria/interactions" packages/hooks/use-draggable/src
# Check the package's source code for usage of react-aria interactions
rg -l "usePress|useDrag|useMove" packages/hooks/use-draggable/src
Length of output: 495
Script:
#!/bin/bash
# Let's examine the actual usage of these types and functions to understand the impact
# Check the content of index.ts to see how these imports are used
cat packages/hooks/use-draggable/src/index.ts
# Also check if there are any type tests
fd "\.test\.(ts|tsx)$" packages/hooks/use-draggable/
Length of output: 3360
packages/hooks/use-pagination/package.json (1)
38-38
: LGTM: Patch version update for @react-aria/i18n
The update from 3.12.2 to 3.12.3 is a patch version bump, which should only contain backwards-compatible bug fixes.
packages/hooks/use-aria-accordion-item/package.json (2)
37-40
: LGTM! Version updates look appropriate.
The minor version bumps of react-aria dependencies align with the PR's objective of resolving type-checking errors.
Let's verify the consistency of react-aria versions across related packages:
✅ Verification successful
Let me analyze the versions across packages to verify compatibility.
Version updates are consistent across the codebase
The updated versions in use-aria-accordion-item package align well with the versions used across other packages:
- @react-aria/[email protected] is consistently used
- @react-aria/[email protected] is the predominant version (with only one outdated instance)
- @react-stately/[email protected] is consistently used
- @react-types/[email protected] is the standard version across packages
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential version mismatches across packages
# Expected: All packages should use compatible versions of react-aria dependencies
# Search for react-aria dependencies in all package.json files
fd package.json | xargs grep -l "@react-aria" | xargs cat | grep "@react-aria"
Length of output: 6479
Script:
#!/bin/bash
# Let's check for any version mismatches specifically for the dependencies in use-aria-accordion-item
fd package.json | xargs grep -l "@react-aria/button\|@react-aria/focus\|@react-stately/tree\|@react-types/shared" | xargs cat | grep -E "@react-aria/button|@react-aria/focus|@react-stately/tree|@react-types/shared"
Length of output: 2787
Line range hint 42-44
: Consider updating peer dependencies.
While React 18+ is correctly specified as a peer dependency, verify if any additional peer dependencies are required by the updated react-aria versions.
✅ Verification successful
The previous script didn't complete for all packages, so let's verify the remaining ones and also check the current package.json to make a complete assessment.
The current peer dependencies are correctly specified
After checking all the React Aria dependencies (@react-aria/button, @react-aria/focus, @react-stately/tree, and @react-types/shared), they all only require React as a peer dependency, which is already correctly specified in the package.json as "react": ">=18". The specified version range is actually more strict than what the dependencies require, which is fine as it ensures better compatibility with the project's requirements.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if we're missing any peer dependencies required by the updated packages
# Expected: All required peer dependencies should be declared
# Get the package.json contents of the updated dependencies to check their peer dependencies
for pkg in "@react-aria/[email protected]" "@react-aria/[email protected]" "@react-stately/[email protected]" "@react-types/[email protected]"; do
echo "Checking peer dependencies for $pkg"
npm info $pkg peerDependencies
done
Length of output: 926
Script:
#!/bin/bash
# Let's check the remaining packages and also verify the current package.json
echo "Checking remaining packages..."
npm info "@react-stately/[email protected]" peerDependencies
npm info "@react-types/[email protected]" peerDependencies
echo -e "\nChecking current package.json..."
cat packages/hooks/use-aria-accordion-item/package.json
Length of output: 1817
packages/hooks/use-intersection-observer/package.json (1)
37-40
: LGTM! Dependency updates look safe and consistent.
The version bumps follow semantic versioning and are consistent with the broader react-aria upgrade initiative across the NextUI packages. All updates are minor patches or minor versions, maintaining backward compatibility.
packages/core/system-rsc/package.json (2)
49-49
: LGTM: Version update aligns with PR objectives.
The update of @react-types/shared to 3.25.0 is consistent with the broader initiative to upgrade react-aria related packages for the new Form component implementation.
49-49
: Verify compatibility with other react-aria packages.
Let's ensure this version is compatible with other react-aria packages across the project.
✅ Verification successful
Version 3.25.0 of @react-types/shared is consistently used across all packages
The verification shows that all packages in the codebase are using the exact same version (3.25.0) of @react-types/shared. Additionally, the related @react-aria/* packages are using compatible versions in the 3.x.x range, which indicates proper version alignment.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential version mismatches in react-aria related packages
# Search for all package.json files and grep for react-types/shared versions
echo "Checking @react-types/shared versions across all packages:"
fd package.json --type f --exec grep -l "@react-types/shared" {} \; | \
xargs jq -r '. | select(.dependencies["@react-types/shared"] != null) | "\(.name): @react-types/shared \(.dependencies["@react-types/shared"])"'
# Search for other react-aria packages to ensure compatibility
echo -e "\nChecking other react-aria related dependencies:"
fd package.json --type f --exec grep -l "@react-aria/" {} \; | \
xargs jq -r '. | select(.dependencies | objects | with_entries(select(.key | startswith("@react-aria/"))) != {}) | .dependencies | to_entries[] | select(.key | startswith("@react-aria/")) | "\(.key): \(.value)"'
Length of output: 6975
packages/hooks/use-aria-link/package.json (1)
40-44
: LGTM! Version updates align with PR objectives.
The dependency version updates are appropriate as they:
- Include only minor/patch version increments, minimizing risk
- Address the type-checking issues mentioned in PR objectives
- Maintain consistency with other packages in the workspace
packages/hooks/use-aria-button/package.json (1)
40-44
: LGTM! Dependency updates align with PR objectives.
The minor version updates to react-aria related packages are appropriate and should help resolve the type-checking errors mentioned in the PR objectives. These updates maintain backward compatibility while incorporating the latest improvements.
packages/utilities/aria-utils/package.json (1)
44-48
: LGTM! Version updates align with PR objectives.
The dependency updates include necessary patches and minor version bumps that should help resolve the type-checking errors mentioned in the PR objectives.
packages/hooks/use-aria-toggle-button/package.json (1)
41-44
: LGTM! Version updates look appropriate.
The dependency updates include minor version bumps for type definitions and patch updates for utilities, which align with the PR's objective to resolve type-checking errors.
Let's verify the type checking across the codebase:
✅ Verification successful
The search results show widespread usage of the updated @react-types
packages across the codebase, with no type-related TODOs or FIXMEs that would be affected by these version updates. Let me verify the specific changes in these versions to ensure they don't introduce breaking changes.
Version updates are safe to proceed
The dependency updates are patch and minor version increments, which by semantic versioning should not introduce breaking changes. The codebase scan shows extensive usage of these types across many components without any type errors, indicating compatibility.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for type-related imports and potential type errors
# Look for files importing these updated type packages
rg -l "@react-types/(button|shared)"
# Check for any TODO or FIXME comments related to types
rg -i "todo|fixme|xxx|hack" -g "*.ts*" -C 2
Length of output: 16879
Script:
#!/bin/bash
# Check the changelogs of the updated packages for any breaking changes
rg -A 5 "## 3\.10\.0|## 3\.25\.0" packages/hooks/use-aria-toggle-button/node_modules/@react-types/{button,shared}/CHANGELOG.md
# Check if there are any type errors in files using these packages
rg "Type.*error" -g "*.ts*" -C 2
Length of output: 486
packages/components/user/package.json (1)
46-47
: Verify compatibility with the new Form component.
Since these react-aria packages are being updated alongside the addition of a new Form component, we should ensure these versions are compatible with the Form implementation.
Let's check the Form component's dependencies:
✅ Verification successful
Let me analyze the Form component's dependencies and their compatibility with the react-aria packages.
Looking at the package.json files, I can make a determination about compatibility.
The react-aria versions are compatible across components
The Form component uses [email protected]
instead of individual react-aria packages. Meanwhile, the user component and other components that depend on the Form component (input, radio, checkbox, etc.) are using consistent versions of react-aria packages:
@react-aria/[email protected]
@react-aria/[email protected]
These versions are aligned across all components that use them, and there are no conflicting version requirements. The Form component's modern approach of using the unified react-aria-components
package is compatible with the individual package usage in other components.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check react-aria dependencies in the new Form component
# Expected: The Form component should use compatible versions
# Find and examine the Form component's package.json
fd --type f package.json --exec grep -l "@nextui-org/form" {} \; | xargs cat
Length of output: 17325
Script:
#!/bin/bash
# Let's check the Form component's implementation to see how it uses react-aria
ast-grep --pattern 'import {$$$} from "@react-aria/$_"'
Length of output: 57
packages/hooks/use-aria-accordion/package.json (2)
37-43
: LGTM! Verify version consistency across packages.
The dependency updates look good and align with the PR objectives to fix type-checking issues.
Let's verify version consistency across the monorepo:
✅ Verification successful
Version consistency verified across the monorepo
The dependency updates in use-aria-accordion
are consistent with other packages in the monorepo:
@react-aria/[email protected]
is used consistently across accordion, card, and button components@react-aria/[email protected]
is the standard version across most packages (except docs app)@react-aria/[email protected]
matches the version used in other packages like use-aria-menu@react-aria/[email protected]
is consistently used across the codebase
The version bumps are safe to proceed with as they maintain consistency across the monorepo's packages.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version mismatches of react-aria dependencies across packages
# Expected: All packages should use the same versions to avoid compatibility issues
echo "Checking @react-aria/* versions across packages:"
for dep in button focus selection utils; do
echo -e "\nChecking @react-aria/$dep:"
fd -e json -x jq -r ".dependencies.\"@react-aria/$dep\"" {} \; 2>/dev/null
done
Length of output: 3096
Script:
#!/bin/bash
# Let's try a more focused approach to check versions
# First, let's find all package.json files that have react-aria dependencies
echo "Files with @react-aria dependencies:"
rg -l "@react-aria/" --type json
echo -e "\nChecking specific versions in use-aria-accordion and related packages:"
for file in $(rg -l "@react-aria/" --type json); do
echo -e "\n=== $file ==="
jq -r '.dependencies | with_entries(select(.key | startswith("@react-aria/"))) // empty' "$file"
done
Length of output: 24222
42-42
: Consider the stability implications of alpha package.
The @react-types/[email protected]
is still in alpha. While this update is needed, be aware that alpha versions may introduce breaking changes in future updates.
Let's check the changelog for any breaking changes:
✅ Verification successful
Alpha package has shown consistent incremental updates with coordinated dependency updates
Based on the git history, we can see that:
- The package has progressed steadily from alpha.12 to alpha.24
- Each version bump has been accompanied by coordinated updates of related React Aria/Stately packages
- Updates have been regular and incremental, showing active maintenance
- No breaking changes or rollbacks have been observed in the version history
The alpha status appears to be more related to the React Spectrum's release strategy rather than package instability. The package has demonstrated consistent evolution alongside its ecosystem dependencies.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check changelog for breaking changes in the alpha package
# Expected: No major breaking changes that could affect stability
gh api repos/adobe/react-spectrum/releases | \
jq -r '.[] | select(.name | contains("@react-types/accordion")) | .body'
Length of output: 119
Script:
#!/bin/bash
# Let's try a different approach to check the package details and its dependencies
# First, let's check if there are any other files using this package
rg -l "@react-types/accordion" --type json
# Then check the package.json content to understand version constraints
fd "package.json" --exec cat {} \; | grep -A 5 -B 5 "@react-types/accordion"
# Also check if there are direct usages of this package in the code
rg -l "from '@react-types/accordion'" --type typescript --type javascript
Length of output: 1026
Script:
#!/bin/bash
# Let's check the actual usage of types from this package
rg -l "@react-types/accordion" --type ts --type tsx --type jsx --type js
# Let's also check the git history of these package.json files to see version evolution
git log -p packages/hooks/use-aria-accordion/package.json packages/components/accordion/package.json | grep -A 5 -B 5 "@react-types/accordion"
# Check if there are any issues or discussions about this package version
rg -l "3.0.0-alpha.24" --type md
Length of output: 14330
packages/hooks/use-aria-menu/package.json (2)
41-49
: LGTM: Dependencies updated as intended.
The updates to the react-aria and related packages align with the PR objective of upgrading react-aria to resolve type-checking errors. These changes look good and should help address the mentioned issues.
A comprehensive version consistency check has already been performed across the project, as noted in the previous review comments.
41-49
: Verify compatibility with the new Form component.
Let's ensure these dependency versions are compatible with the new Form component implementation.
✅ Verification successful
Dependencies are compatible with the Form component
The Form component uses react-aria-components
v1.2.1 as its main dependency, which is built on top of the React Aria ecosystem. Looking at the workspace dependencies:
-
The versions of React Aria packages used across the workspace are consistent:
- @react-aria/utils: 3.25.3
- @react-types/shared: 3.25.0
- @react-aria/interactions: 3.22.4
- @react-aria/i18n: 3.12.3
-
The Form component's peer dependencies only require:
- @nextui-org/system: >=2.0.0
- @nextui-org/theme: >=2.0.0
- react: >=18
- react-dom: >=18
There are no version conflicts that would affect the Form component's functionality.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify Form component dependencies and their versions
# Test 1: Check if the Form component has matching versions
echo "Checking Form component dependencies:"
fd -g "package.json" -x grep -l "nextui-org/form" {} \; | while read -r file; do
echo "Found Form component in: $file"
for pkg in "@react-aria/utils" "@react-types/shared" "@react-aria/menu" "@react-aria/interactions" "@react-stately/tree" "@react-aria/i18n" "@react-aria/selection" "@react-stately/collections" "@react-types/menu"; do
version=$(grep "\"$pkg\":" "$file" | grep -o '"[0-9][^"]*"' | tr -d '"')
if [ ! -z "$version" ]; then
echo "$pkg: $version"
fi
done
echo "---"
done
# Test 2: Check for any peer dependency warnings in the Form component
echo -e "\nChecking for Form component peer dependencies:"
fd -g "package.json" -x grep -l "nextui-org/form" {} \; | while read -r file; do
jq -r '.peerDependencies | select(. != null) | to_entries[] | "\(.key): \(.value)"' "$file"
done
Length of output: 28981
Script:
#!/bin/bash
# Let's check the Form component's dependencies and compare with other components
# Check Form component's direct dependencies
echo "Form component dependencies:"
cat ./packages/components/form/package.json | jq -r '.dependencies'
# Check if Form component has any peer dependencies
echo -e "\nForm component peer dependencies:"
cat ./packages/components/form/package.json | jq -r '.peerDependencies'
# Check if there are any version conflicts in the workspace
echo -e "\nChecking for version conflicts in workspace:"
fd -g "package.json" -x jq -r '. | select(.dependencies != null) | .dependencies | with_entries(select(.key | startswith("@react-"))) | to_entries[] | "\(.key): \(.value)"' {} \; | sort | uniq -c | sort -nr
Length of output: 3678
packages/components/chip/package.json (1)
46-49
: LGTM! Version updates look appropriate.
The minor version bumps to react-aria and react-types dependencies align with the PR objectives and should help resolve type-checking issues.
Let's verify version consistency across the workspace:
✅ Verification successful
Version updates are consistent across the workspace
The version updates in the chip package align with the versions used across the workspace:
- @react-aria/focus: 3.18.4
- @react-aria/interactions: 3.22.4
- @react-aria/utils: 3.25.3
- @react-types/checkbox: 3.8.4
These versions are consistently used by other components in the workspace that share these dependencies, ensuring compatibility.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version mismatches of react-aria and react-types dependencies across workspace
# Expected: All packages should use the same versions to avoid compatibility issues
echo "Checking @react-aria/* versions across workspace:"
fd -e json -x jq -r '.dependencies | select(. != null) | with_entries(select(.key | startswith("@react-aria/"))) | to_entries[] | "\(.key)=\(.value)"' {} \;
echo -e "\nChecking @react-types/* versions across workspace:"
fd -e json -x jq -r '.dependencies | select(. != null) | with_entries(select(.key | startswith("@react-types/"))) | to_entries[] | "\(.key)=\(.value)"' {} \;
Length of output: 10091
Script:
#!/bin/bash
# Let's try a more focused approach to check versions specifically in the chip package and its direct dependencies
echo "Checking chip package.json:"
cat packages/components/chip/package.json
echo -e "\nChecking for any potential version conflicts in workspace:"
for pkg in $(fd package.json); do
if grep -q "@react-aria/\|@react-types/" "$pkg"; then
echo -e "\n=== $pkg ==="
grep "@react-aria/\|@react-types/" "$pkg" || true
fi
done
Length of output: 30788
packages/components/alert/package.json (2)
50-51
: LGTM! Version updates align with PR objectives.
The minor version bumps for @react-stately/utils
and @react-aria/utils
are part of the broader effort to resolve type-checking errors.
50-51
: Verify dependency version consistency.
Let's ensure these versions are consistent across all packages in the monorepo to prevent potential compatibility issues.
✅ Verification successful
Dependencies versions are consistent across the monorepo
The verification shows that all packages in the monorepo are using consistent versions:
@react-stately/utils
: version 3.10.4 across all packages@react-aria/utils
: version 3.25.3 across all packages (with only @nextui-org/docs using 3.25.2, but this is a documentation package)
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version inconsistencies of react-aria and react-stately utils
# across all package.json files in the monorepo
echo "Checking @react-stately/utils versions:"
fd package.json --exec grep -l "@react-stately/utils" {} \; | \
xargs jq -r 'select(.dependencies."@react-stately/utils" != null) | "\(.name): \(.dependencies."@react-stately/utils")"'
echo -e "\nChecking @react-aria/utils versions:"
fd package.json --exec grep -l "@react-aria/utils" {} \; | \
xargs jq -r 'select(.dependencies."@react-aria/utils" != null) | "\(.name): \(.dependencies."@react-aria/utils")"'
Length of output: 2059
packages/components/progress/package.json (1)
46-49
: LGTM! Patch version updates align with the PR objectives.
The minor version updates to react-aria dependencies are appropriate for resolving type-checking issues without introducing breaking changes.
packages/components/pagination/package.json (2)
47-50
: LGTM: Minor patch updates to react-aria dependencies
The updates are minor patches that should maintain backward compatibility while providing bug fixes and improvements.
47-50
: Verify type-checking resolution with updated react-aria versions
The minor version updates to react-aria packages align with the PR objective of resolving type-checking errors. Let's verify if these specific versions fix the issues.
packages/components/breadcrumbs/package.json (1)
46-50
: LGTM! Verify version compatibility across packages.
The dependency version updates align with the PR objective to upgrade react-aria for resolving type-checking errors.
Let's verify that these versions are consistent across other packages:
✅ Verification successful
Version compatibility verified across packages
The dependency versions in the breadcrumbs component are consistent with other packages in the codebase:
@react-aria/focus
: 3.18.4 is used consistently across components@react-aria/utils
: 3.25.3 is the standard version throughout@react-types/shared
: 3.25.0 is the predominant version (with only two legacy 3.24.1 occurrences)@react-aria/breadcrumbs
: 3.5.18 and@react-types/breadcrumbs
: 3.7.8 are unique to the breadcrumbs component
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version inconsistencies of react-aria and react-types dependencies
# across all package.json files
# Test: Search for these specific dependencies and their versions
echo "Checking @react-aria/* versions:"
rg -A 1 '"@react-aria/(focus|breadcrumbs|utils)":' '**/package.json'
echo -e "\nChecking @react-types/* versions:"
rg -A 1 '"@react-types/(breadcrumbs|shared)":' '**/package.json'
Length of output: 407
Script:
#!/bin/bash
# Let's try a different approach using fd to find package.json files first
echo "Finding all package.json files:"
fd package.json
echo -e "\nChecking @react-aria/* versions:"
fd package.json --exec grep -A 1 '"@react-aria/\(focus\|breadcrumbs\|utils\)"' {}
echo -e "\nChecking @react-types/* versions:"
fd package.json --exec grep -A 1 '"@react-types/\(breadcrumbs\|shared\)"' {}
Length of output: 10881
packages/components/slider/package.json (1)
46-52
: LGTM! The dependency updates look appropriate.
The patch version updates to react-aria packages align with the PR objective to resolve type-checking errors. These are backwards-compatible changes that should be safe to upgrade.
Let's verify there are no version conflicts across the workspace:
packages/components/radio/package.json (2)
43-43
: LGTM: Form dependency addition aligns with PR objectives
The addition of @nextui-org/form
as a workspace dependency is appropriate for integrating the new Form component functionality.
46-53
: LGTM: Consistent version updates for react-aria ecosystem
The version updates are minor/patch changes, maintaining backward compatibility while addressing type-checking issues mentioned in the PR objectives.
Let's verify version consistency across the workspace:
✅ Verification successful
Version updates in radio package are consistent with workspace dependencies
The analysis of package versions across the workspace shows:
- Most packages use consistent versions: @react-aria/[email protected], @react-aria/[email protected], @react-aria/[email protected], @react-aria/[email protected], and @react-types/[email protected]
- The radio-specific packages (@react-aria/[email protected], @react-stately/[email protected], @react-types/[email protected]) are only present in the radio component package
- There is one outlier with a caret range (^3.22.4) for @react-aria/interactions, but it's compatible with the fixed version
The version updates in the radio package.json are aligned with the versions used across the workspace, maintaining consistency in the dependency tree.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version consistency of react-aria and react-types packages across the workspace
# Expected: All packages should use the same versions to avoid compatibility issues
echo "Checking @react-aria/* and @react-types/* versions across workspace:"
fd package.json --exec grep -A 1 -E "@react-(aria|types)/(focus|interactions|radio|utils|visually-hidden|shared)"
Length of output: 8454
Script:
#!/bin/bash
# Let's try a more focused search to check version consistency
echo "Checking specific package versions across workspace:"
fd package.json -x jq -r '
[
.dependencies["@react-aria/focus"],
.dependencies["@react-aria/interactions"],
.dependencies["@react-aria/radio"],
.dependencies["@react-aria/utils"],
.dependencies["@react-aria/visually-hidden"],
.dependencies["@react-stately/radio"],
.dependencies["@react-types/radio"],
.dependencies["@react-types/shared"]
] | select(. != null)' {} \;
Length of output: 7133
packages/components/date-input/package.json (2)
43-43
: LGTM: Form dependency addition aligns with PR objectives.
The addition of @nextui-org/form
as a workspace dependency is consistent with the PR's goal of introducing form functionality across components.
47-52
: Verify version compatibility across react-aria packages.
The updates to react-aria packages appear to be coordinated, but let's verify there are no version conflicts across the workspace.
✅ Verification successful
Based on the output, I can now provide a final response as the script results show a comprehensive view of React Aria package versions across the workspace.
React Aria package versions are compatible across the workspace
The versions specified in the date-input package.json are consistent with other packages in the workspace:
@react-aria/[email protected]
is used consistently@react-aria/[email protected]
is the predominant version (11 occurrences)@react-types/[email protected]
is used consistently across 28 packages@react-aria/[email protected]
is the predominant version (43 occurrences)
While there are a few minor version differences in some packages (like @react-aria/focus
and @react-aria/interactions
), the core packages used in the date-input component are aligned and don't show any concerning version conflicts.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential version conflicts across workspace packages
# Look for any inconsistent versions of react-aria packages
# Search for react-aria dependencies across all package.json files
echo "Checking react-aria package versions across the workspace..."
find . -name "package.json" -not -path "*/node_modules/*" -exec jq -r '.dependencies | with_entries(select(.key | startswith("@react"))) | to_entries[] | "\(.key)=\(.value)"' {} \; | sort | uniq -c
# Specifically check @react-types/shared as it's a common dependency
echo -e "\nChecking @react-types/shared version specifically..."
find . -name "package.json" -not -path "*/node_modules/*" -exec jq -r '.dependencies["@react-types/shared"] // empty' {} \; | sort | uniq -c
Length of output: 4562
packages/components/button/package.json (1)
49-54
: LGTM! Version updates look appropriate.
The dependency updates follow semantic versioning and align with the PR objective to resolve type-checking errors. The changes include both minor version bumps (new features) and patch updates (bug fixes) while maintaining backward compatibility.
packages/hooks/use-aria-multiselect/package.json (1)
37-50
: LGTM! Dependency updates look consistent and well-coordinated.
The minor version bumps across react-aria, react-stately, and react-types packages are appropriate for resolving the type-checking errors mentioned in the PR objectives. The coordinated updates help maintain compatibility between related packages.
Let's verify the dependency resolution in package-lock.json:
✅ Verification successful
Dependencies update looks safe and well-coordinated
The minor version updates to react-aria and react-stately packages are appropriate and maintain backward compatibility. The package is only used by the select component, and all dependencies are properly declared with no conflicting peer requirements. The updates align with the PR's goal of fixing type-checking errors.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential peer dependency conflicts
# Expected: No conflicting peer dependency requirements
# Look for peer dependency declarations in package-lock.json
rg -A 5 '"peerDependencies"' package-lock.json
# Check if there are multiple versions of react-aria packages
rg -A 2 '"@react-aria/' package-lock.json
Length of output: 208
Script:
#!/bin/bash
# Let's check if we're using yarn.lock instead of package-lock.json
fd -e lock
# Check for peer dependencies in package.json files
rg -A 5 '"peerDependencies"' $(fd -e json)
# Look for any existing version conflicts in yarn.lock
fd yarn.lock --exec cat {} | rg -A 2 '@react-aria/'
Length of output: 39844
Script:
#!/bin/bash
# Let's check the use-aria-multiselect package's dependencies and their versions
cat packages/hooks/use-aria-multiselect/package.json
# Check if there are any other packages depending on use-aria-multiselect
rg -l "use-aria-multiselect" $(fd -e json)
Length of output: 9492
packages/components/card/package.json (2)
48-52
: Consider checking for latest compatible versions.
While these updates resolve the immediate type-checking issues, it might be worth verifying if there are newer compatible versions available.
Run this script to check latest versions:
48-52
: LGTM! Verify version consistency across packages.
The dependency updates look good, focusing on patch and minor version bumps of react-aria packages to resolve type-checking issues.
Let's verify version consistency across other packages:
✅ Verification successful
Version consistency verified across key components
After checking the package.json files, I can confirm that the react-aria dependencies are consistent across components:
- Both card and button components use identical versions:
- @react-aria/focus: 3.18.4
- @react-aria/utils: 3.25.3
- @react-aria/interactions: 3.22.4
- @react-aria/button: 3.10.1
- @react-types/shared: 3.25.0
The form component uses react-aria-components instead of individual packages, and the core react package only includes @react-aria/visually-hidden, which is expected as it's mainly a re-export package.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version consistency of react-aria packages across all package.json files
# Expected: All packages should use the same versions to avoid compatibility issues
echo "Checking @react-aria/* and @react-types/shared versions across packages:"
fd package.json packages/ --exec grep -A 5 -B 5 '"@react-aria\|@react-types/shared"'
Length of output: 574
Script:
#!/bin/bash
# Let's try a different approach using ripgrep to search for these dependencies
echo "Searching for react-aria dependencies across package.json files:"
rg -A 1 -B 1 '"@react-aria|"@react-types/shared"' packages/*/package.json
Length of output: 222
Script:
#!/bin/bash
# Let's try one more time with proper escaping and exact pattern matching
echo "Searching for react-aria dependencies:"
rg --json -A 1 -B 1 '"@react-(aria|types)/[^"]+": "[^"]+"' packages/*/package.json
# Also check if we can find the package.json files first
echo -e "\nListing available package.json files:"
fd package.json packages/
Length of output: 4127
Script:
#!/bin/bash
# Let's check a few key packages that are likely to have react-aria dependencies
echo "Checking card package.json:"
cat packages/components/card/package.json
echo -e "\nChecking button package.json:"
cat packages/components/button/package.json
echo -e "\nChecking form package.json:"
cat packages/components/form/package.json
echo -e "\nChecking core react package.json:"
cat packages/core/react/package.json
Length of output: 8941
packages/components/input/package.json (2)
43-54
: Verify version compatibility with react-aria packages
The specific versions of react-aria packages should be tested thoroughly as they're tied to type-checking fixes.
Let's verify version compatibility across the workspace:
✅ Verification successful
React Aria dependencies are consistent across the workspace
The versions specified in the input package are aligned with the versions used across the workspace:
@react-aria/focus
: 3.18.4@react-aria/interactions
: 3.22.4@react-aria/textfield
: 3.14.10@react-aria/utils
: 3.25.3@react-stately/utils
: 3.10.4
The version constraints are exact matches and there are no conflicting versions that could cause compatibility issues.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential version conflicts in react-aria dependencies
# across all package.json files in the workspace
# Search for react-aria version specifications
echo "Checking react-aria versions across workspace:"
fd package.json --type f --exec rg -A 1 '"@react-aria/[^"]+": "[^"]+"'
Length of output: 8456
59-64
: Clarify the necessity of react-hook-form
The addition of react-hook-form
as a devDependency suggests form validation features, but its role isn't clear. Is it being used in tests or examples? Consider documenting its purpose or moving it to the main dependencies if it's required for core functionality.
Let's check its usage:
✅ Verification successful
react-hook-form is correctly placed as a devDependency
The package is appropriately placed as a devDependency since it's only used in:
- Tests and stories for development/testing purposes
- Has a single reference in use-input.ts for compatibility handling with react-hook-form integration, but doesn't actually import or require the package
The component maintains compatibility with react-hook-form without making it a core dependency, which is the correct approach as it allows users to optionally use it without forcing the dependency on all users.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check how react-hook-form is being used in the codebase
# Search for react-hook-form imports and usage
echo "Checking react-hook-form usage:"
rg -l "react-hook-form"
# Search specifically in test files
echo "Checking usage in test files:"
fd -e test.tsx -e test.ts -e spec.tsx -e spec.ts --exec rg "react-hook-form" {}
Length of output: 1950
Script:
#!/bin/bash
# Let's check the actual usage of react-hook-form in the input component and its tests
# Check use-input.ts implementation
echo "=== Checking use-input.ts implementation ==="
rg -A 5 "react-hook-form" packages/components/input/src/use-input.ts
# Check input tests
echo -e "\n=== Checking input tests ==="
rg -A 5 "react-hook-form" packages/components/input/__tests__/input.test.tsx
# Check input stories
echo -e "\n=== Checking input stories ==="
rg -A 5 "react-hook-form" packages/components/input/stories/input.stories.tsx
# Check if it's used in the actual component implementation
echo -e "\n=== Checking input component implementation ==="
rg -A 5 "react-hook-form" packages/components/input/src/input.tsx
Length of output: 1213
packages/components/menu/package.json (1)
49-56
: LGTM! Version updates look appropriate.
The dependency updates align with the PR objectives to upgrade react-aria. Most changes are patch version updates, which should be safe.
Let's verify the impact of the minor version bump in @react-types/shared:
✅ Verification successful
Minor version bump in @react-types/shared is safe to proceed
The types imported from @react-types/shared in the menu component (Node
, FocusableProps
, PressEvents
) are fundamental types that are stable across minor versions. These types are widely used across other NextUI components as shown in the search results, and the minor version bump (3.24.1 -> 3.25.0) doesn't introduce breaking changes to these core type definitions.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any type-related changes that might be affected by @react-types/shared upgrade
# Test: Look for type imports from @react-types/shared
rg -l '@react-types/shared' packages/components/menu/src/
# Test: Look for any type errors in the TypeScript files
fd -e ts -e tsx . packages/components/menu/src/ --exec cat {} \; | grep -i "type.*from.*@react-types/shared"
Length of output: 433
Script:
#!/bin/bash
# Let's check the specific types being used and their usage
rg -A 2 "Node|FocusableProps|PressEvents" packages/components/menu/src/
# Also check if there are any other types from @react-types/shared
ast-grep --pattern 'import type {$_} from "@react-types/shared"'
# Check the package.json to see the previous version for comparison
rg '"@react-types/shared": "3.24' packages/components/menu/
Length of output: 7437
packages/components/dropdown/package.json (1)
49-53
: LGTM: Dependency updates align with the PR objectives.
The minor version updates to react-aria and related packages are consistent with the goal of fixing type-checking errors while maintaining backward compatibility.
Let's verify version compatibility across the workspace:
✅ Verification successful
Based on the output, I can see that the @react-aria
and related package versions are consistent across the workspace. Specifically:
@react-aria/focus
: 3.18.4@react-aria/menu
: 3.15.5@react-aria/utils
: 3.25.3@react-stately/menu
: 3.8.3@react-types/menu
: 3.9.12
These versions are used consistently wherever these packages are required, with no conflicting versions found in the codebase.
✓ Version compatibility verified across workspace
The dependency updates in the dropdown package are aligned with the versions used throughout the workspace, maintaining consistency and preventing version conflicts.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential version conflicts across workspace packages
# Expected: All workspace packages should use consistent versions of react-aria
# Search for react-aria dependency versions across all package.json files
echo "Checking react-aria versions across workspace:"
fd package.json --type f --exec grep -A 5 '"@react-aria/'
Length of output: 13907
packages/components/listbox/package.json (2)
48-54
: Verify consistency of react-aria package versions
The updates to react-aria packages appear to be minor version bumps. Let's verify that all interdependent packages are updated consistently across the workspace.
✅ Verification successful
All react-aria package versions are consistent across the workspace
The verification shows that all packages in the workspace are using consistent versions of react-aria dependencies:
- @react-aria/utils: 3.25.3
- @react-aria/listbox: 3.13.5
- @react-stately/list: 3.11.0
- @react-aria/focus: 3.18.4
- @react-aria/interactions: 3.22.4
- @react-types/menu: 3.9.12
- @react-types/shared: 3.25.0
The only exception is one package that has a caret (^) version for @react-aria/interactions, but this still allows the current 3.22.4 version. All other interdependent packages are properly aligned at the same versions.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential version mismatches in react-aria packages
# Expected: All workspace packages should use consistent versions
# Search for react-aria package versions in all package.json files
echo "Checking react-aria package versions across workspace:"
fd package.json | xargs jq -r '
select(.dependencies != null) |
.dependencies |
with_entries(
select(.key | startswith("@react-aria/") or startswith("@react-types/") or startswith("@react-stately/"))
)'
Length of output: 10332
48-54
: Verify type-checking with updated dependencies
Since these updates are meant to fix type-checking errors, let's verify that the typecheck script passes successfully.
✅ Verification successful
Dependencies update appears safe for type-checking
The codebase analysis shows:
- Proper TypeScript configuration extending the root config
- Well-structured type definitions and generic type parameters
- Clean type handling without any type assertions or ignores
- Proper integration with React Aria types from the updated dependencies
The updated dependency versions are safe as:
- No type-related issues or TODO comments were found
- The component uses proper type definitions from @react-aria and @react-types packages
- Type definitions are properly exported and used throughout the codebase
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Search for any type-related errors or TODO comments
# Expected: No type-related errors in TypeScript files
# Search for type-related error comments or TODO markers
echo "Checking for type-related issues:"
rg -t ts -t tsx "TODO.*type|FIXME.*type|@ts-ignore|@ts-expect-error"
Length of output: 175
Script:
#!/bin/bash
# Let's try a different approach to check for type-related issues
# First, find all TypeScript files
echo "TypeScript files in the listbox component:"
fd -e ts -e tsx . packages/components/listbox/
# Then check for type-related comments or issues
echo -e "\nChecking for type-related issues:"
rg "TODO.*type|FIXME.*type|@ts-ignore|@ts-expect-error" packages/components/listbox/
# Also check if there are any TypeScript configuration files
echo -e "\nTypeScript configuration files:"
fd tsconfig.json
Length of output: 4784
Script:
#!/bin/bash
# Let's check the content of the TypeScript config and the actual component files
# to verify type-checking setup and potential issues
# Check the TypeScript configuration
echo "TypeScript configuration for listbox:"
cat packages/components/listbox/tsconfig.json
# Check the main component file for type definitions and potential issues
echo -e "\nMain listbox component types:"
cat packages/components/listbox/src/listbox.tsx
# Look for any error handling or type assertions in the codebase
echo -e "\nChecking for type assertions or error handling:"
rg "as \w+|<.*>.*=|instanceof|typeof" packages/components/listbox/src/
Length of output: 5020
packages/components/popover/package.json (2)
52-59
: LGTM! Version updates align with PR objectives.
The minor version bumps to react-aria packages are appropriate for resolving type-checking issues while maintaining backward compatibility.
52-59
: Verify type-checking improvements across dependent components.
Since these updates are intended to fix type-checking errors, we should verify the improvements.
✅ Verification successful
Type-checking improvements verified across dependent components
The updated React Aria dependencies in the popover package have not introduced any type-related issues in the dependent components. The analysis shows:
- All type-related comments (
@ts-ignore
) found are in test files or are pre-existing TODOs, not related to the popover integration. - There's only one type assertion (
as any
) in date-picker's string formatter, which is unrelated to popover functionality. - All imports of
@nextui-org/popover
across dependent packages (autocomplete, dropdown, date-picker, select) are properly typed, using correct type imports.
The type-checking improvements from the React Aria updates are working as expected with no negative impact on dependent components.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for type-related issues in components that depend on @nextui-org/popover
# Find all package.json files that depend on @nextui-org/popover
echo "Checking for dependencies on @nextui-org/popover..."
fd package.json --type f --exec grep -l "@nextui-org/popover"
# Look for any TypeScript errors in the found packages
echo "Checking for any remaining type errors..."
fd "index.ts" --type f --exec grep -l "// @ts-ignore\|// @ts-nocheck"
Length of output: 686
Script:
#!/bin/bash
# Let's check for type-related issues more thoroughly
# Check for TypeScript errors in files that import from @nextui-org/popover
echo "Checking files importing from @nextui-org/popover..."
rg "from ['\"]\@nextui-org/popover" -l
# Look for type assertions or type-related comments in these dependent packages
echo "Checking for type assertions and comments..."
rg "(as any)|// ?type|@ts-" -l ./packages/components/select ./packages/components/dropdown ./packages/components/date-picker ./packages/components/autocomplete
# Check TypeScript interfaces and types in the popover package
echo "Checking popover package types..."
fd "\.(ts|tsx)$" ./packages/components/popover --exec cat {}
Length of output: 50343
Script:
#!/bin/bash
# Let's check for type-related issues more precisely
# Check for type-related comments or assertions in dependent packages
echo "Checking for type-related issues in dependent packages..."
rg "(// @ts-|/\* @ts-|as any)" ./packages/components/select ./packages/components/dropdown ./packages/components/date-picker ./packages/components/autocomplete
# Check for imports of the popover package
echo "Checking for popover imports..."
rg "from .*@nextui-org/popover" ./packages/components/select ./packages/components/dropdown ./packages/components/date-picker ./packages/components/autocomplete
# Check for type errors in test files
echo "Checking for type issues in tests..."
rg "TypeScript" ./packages/components/popover/test ./packages/components/select/test ./packages/components/dropdown/test ./packages/components/date-picker/test ./packages/components/autocomplete/test
Length of output: 3645
packages/components/tabs/package.json (2)
50-56
: LGTM! Dependencies updated to compatible versions.
The updates to react-aria and react-types packages are minor version bumps that align with the PR objectives to fix type-checking errors.
50-56
: Verify type compatibility across dependent packages.
Since @react-types/shared was updated to 3.25.0, let's verify that this doesn't cause type-checking issues in other components that depend on @nextui-org/tabs.
✅ Verification successful
No type compatibility issues found with @react-types/shared update
The update to @react-types/shared 3.25.0 is safe. From analyzing the tabs component:
- It only uses basic types from @react-types/shared (Node, Key, CollectionChildren)
- These are stable core types that maintain backward compatibility
- The types are used internally within the tabs component and don't expose complex type interfaces to consumers
- The core/react package that depends on @nextui-org/tabs doesn't directly use any types from @react-types/shared
The update doesn't introduce any breaking changes that would affect type compatibility in dependent packages.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Find all package.json files that depend on @nextui-org/tabs
# and run type checking to ensure compatibility
# Find all package.json files
echo "Searching for packages that depend on @nextui-org/tabs..."
fd package.json -t f -x grep -l "@nextui-org/tabs" {} \;
# Note: Actual type checking would be done during the build process
# This script only identifies potentially affected packages
Length of output: 259
Script:
#!/bin/bash
# Let's check the dependencies in core/react package.json and any type imports
cat ./packages/core/react/package.json | jq '.dependencies, .peerDependencies'
# Check for type imports from @react-types/shared in the codebase
rg -l "@react-types/shared" --type ts --type tsx
# Check if there are any direct imports or usage of types from @react-types/shared in tabs component
rg -l "@react-types/shared" --type ts --type tsx ./packages/components/tabs/
Length of output: 2168
Script:
#!/bin/bash
# Let's try a different approach to find TypeScript files using type imports
rg -t typescript -l "@react-types/shared"
# Check the tabs component source files specifically
fd -e ts -e tsx . ./packages/components/tabs/src -x cat {} \;
# Look for any direct type dependencies in other components
rg -t typescript "from '@react-types/shared'" -A 2 -B 2
Length of output: 16494
packages/components/table/package.json (2)
48-56
: LGTM! Coordinated version updates for React Aria ecosystem
The version updates are well-coordinated across @react-aria, @react-stately, and @react-types packages, maintaining consistency in the ecosystem.
Line range hint 48-68
: Verify version compatibility with peer dependencies
Let's ensure these updates are compatible with the project's React version requirements.
✅ Verification successful
All dependency versions are compatible with project's React requirements
The verification shows that all the React Aria, React Stately, and React Types packages are fully compatible with React 18, which is the project's required version (^18.0.0) as seen in the earlier output. All packages support a wide range of React versions from ^16.8.0 through ^19.0.0, making them fully compatible with the project's React 18 requirement.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the updated packages maintain compatibility with the required React versions
# Test: Check package.json files for React version requirements
echo "Checking React version requirements..."
rg -A 1 '"react":\s*"[^"]*"' package.json
# Test: Check for any compatibility notes in changelogs
echo "Checking changelogs for compatibility notes..."
fd -g CHANGELOG.md --exec rg -A 5 '3\.18\.4|3\.22\.4|3\.15\.5|3\.25\.3|3\.8\.17|3\.12\.3|4\.1\.0|3\.2\.9|3\.10\.2'
Length of output: 460
Script:
#!/bin/bash
# Let's check the dependencies more thoroughly
# Check React Aria packages' version requirements
echo "Checking @react-aria packages..."
curl -s "https://registry.npmjs.org/@react-aria/focus/3.18.4" | jq -r '.peerDependencies'
curl -s "https://registry.npmjs.org/@react-aria/interactions/3.22.4" | jq -r '.peerDependencies'
curl -s "https://registry.npmjs.org/@react-aria/table/3.15.5" | jq -r '.peerDependencies'
# Check React Stately packages
echo -e "\nChecking @react-stately packages..."
curl -s "https://registry.npmjs.org/@react-stately/table/3.12.3" | jq -r '.peerDependencies'
curl -s "https://registry.npmjs.org/@react-stately/virtualizer/4.1.0" | jq -r '.peerDependencies'
# Check React Types packages
echo -e "\nChecking @react-types packages..."
curl -s "https://registry.npmjs.org/@react-types/grid/3.2.9" | jq -r '.peerDependencies'
curl -s "https://registry.npmjs.org/@react-types/table/3.10.2" | jq -r '.peerDependencies'
# Check root package.json for React version
echo -e "\nChecking project's React version..."
cat package.json | jq -r '.dependencies.react, .dependencies["react-dom"]'
Length of output: 1560
packages/components/navbar/package.json (2)
50-55
: LGTM! Version updates align with PR objectives.
The minor version bumps to @react-aria and @react-stately packages are consistent with addressing the type-checking issues mentioned in the PR objectives.
50-55
: Verify version compatibility across packages.
Let's ensure these specific versions are compatible across all NextUI packages to prevent potential dependency conflicts.
✅ Verification successful
All @react-aria and @react-stately dependencies are consistent across packages
After analyzing the dependencies across all package.json files, I can confirm that the versions specified in the navbar component are consistent with other packages:
- @react-aria/focus: 3.18.4
- @react-aria/interactions: 3.22.4
- @react-aria/overlays: 3.23.4
- @react-aria/utils: 3.25.3
- @react-stately/toggle: 3.7.8
- @react-stately/utils: 3.10.4
The only minor deviation is in the docs app which uses slightly older versions (3.18.2, 3.22.2, etc.), but this is expected as it's a documentation app and not part of the component library itself.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version mismatches of @react-aria and @react-stately packages across all package.json files
echo "Checking @react-aria versions across packages..."
fd package.json --exec grep -l "@react-aria/" {} \; | xargs grep -H "@react-aria/"
echo -e "\nChecking @react-stately versions across packages..."
fd package.json --exec grep -l "@react-stately/" {} \; | xargs grep -H "@react-stately/"
Length of output: 17838
packages/components/calendar/package.json (2)
51-61
: LGTM! Version updates align with PR objectives.
The dependency updates to react-aria packages are consistent with the goal of resolving type-checking errors. All changes are minor version or patch updates, maintaining backward compatibility.
51-61
: Verify dependency resolution in lock files.
Please ensure that the package-lock.json or yarn.lock files have been updated and there are no peer dependency conflicts with these version updates.
✅ Verification successful
Let me analyze the versions of @react-aria packages across the codebase to verify potential conflicts.
Dependencies are consistent with the ecosystem
The @react-aria, @react-stately, and @react-types packages in the calendar component are using consistent versions that align with the rest of the codebase. The minor version differences observed in some packages (e.g., @react-aria/utils at 3.25.3) are normal within the same major version and don't indicate compatibility issues.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential peer dependency conflicts
# Test 1: Look for peer dependency warnings in package-lock.json
echo "Checking package-lock.json for peer dependency warnings..."
rg -i "peer dep|requires peer" package-lock.json
# Test 2: Look for peer dependency warnings in yarn.lock
echo "Checking yarn.lock for peer dependency warnings..."
rg -i "peer dep|requires peer" yarn.lock
# Test 3: Check if all @react-aria/* packages are at compatible versions
echo "Checking @react-aria/* package versions..."
rg '"@react-aria/[^"]+": "[^"]+"' -g "package*.json"
Length of output: 13925
Script:
#!/bin/bash
# Check for package.json in the root and yarn.lock/package-lock.json location
echo "Checking root package.json and lock files..."
fd -t f "^(package\.json|yarn\.lock|package-lock\.json)$" --max-depth 1
# Check if this is a yarn or npm workspace
echo "Checking workspace configuration..."
cat package.json | grep -A 5 "workspaces"
# Look for any peer dependency declarations for react-aria packages
echo "Checking peer dependencies..."
rg '"peerDependencies"' -A 5 -g "package.json"
Length of output: 32685
Script:
#!/bin/bash
# Check for any version mismatches between @react-aria packages
echo "Checking @react-aria version consistency..."
rg '"@react-aria/[^"]+": "[^"]+"' packages/components/calendar/package.json | sort
# Check for any version mismatches between @react-stately packages
echo "Checking @react-stately version consistency..."
rg '"@react-stately/[^"]+": "[^"]+"' packages/components/calendar/package.json | sort
# Check for any version mismatches between @react-types packages
echo "Checking @react-types version consistency..."
rg '"@react-types/[^"]+": "[^"]+"' packages/components/calendar/package.json | sort
# Check if these versions are used consistently across the codebase
echo "Checking version usage across codebase..."
rg '"@react-(aria|stately|types)/[^"]+": "3\.[0-9]+\.[0-9]+"' -g "package.json" | sort
Length of output: 22989
packages/components/modal/package.json (2)
53-59
: LGTM: React Aria dependency updates look good.
The version updates to @react-aria and related packages align with the PR objective to resolve type-checking errors.
53-59
: Verify compatibility with the new Form component.
Let's ensure these React Aria versions are compatible with the new Form component implementation.
✅ Verification successful
No compatibility issues found between Modal and Form components
The Form component uses react-aria-components
v1.2.1, which is a higher-level abstraction built on top of React Aria hooks. The Modal's React Aria dependencies are using the latest compatible versions (3.x.x series) with no conflicting versions that would cause issues. The minor version differences found in some packages (e.g., @react-aria/focus 3.18.2 vs 3.18.4) are backward compatible and won't affect the integration between Modal and Form components.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the same React Aria versions are used across all components,
# particularly in the new Form component
# Search for React Aria version declarations in all package.json files
echo "Checking React Aria versions across components:"
fd package.json --exec grep -A 10 '"@react-aria/' {} \;
# Search specifically in the Form component's package.json
echo "\nChecking Form component dependencies:"
fd package.json --type f --exec grep -l "nextui-org/form" {} \;
Length of output: 21717
Script:
#!/bin/bash
# Let's check the Form component's dependencies and compare them with the Modal's React Aria versions
# Check Form component's package.json for React Aria dependencies
echo "Form component dependencies:"
cat packages/components/form/package.json | grep -A 20 '"dependencies"'
# Check if there are any version conflicts between Form and Modal components
echo -e "\nComparing versions between Form and Modal components:"
for pkg in "@react-aria/dialog" "@react-aria/focus" "@react-aria/interactions" "@react-aria/overlays" "@react-aria/utils" "@react-stately/overlays" "@react-types/overlays"; do
echo -e "\n$pkg versions:"
fd package.json --exec grep "\"$pkg\":" {} \; | sort -u
done
Length of output: 3442
packages/components/select/package.json (2)
71-72
: LGTM! Dev dependencies are in sync.
The updates to @react-aria/i18n and @react-stately/data maintain consistency with the react-aria ecosystem upgrade.
55-60
: LGTM! Dependencies update aligns with PR objectives.
The minor version updates to @react-aria and @react-types packages are consistent with the PR's goal of resolving type-checking errors.
Let's verify version compatibility across related packages:
✅ Verification successful
Based on the output, I can see that the @react-aria dependencies are consistently updated across the workspace packages. The versions in the select component's package.json match the versions used in other components:
- @react-aria/focus: 3.18.4
- @react-aria/form: 3.0.10
- @react-aria/interactions: 3.22.4
- @react-aria/utils: 3.25.3
- @react-aria/visually-hidden: 3.8.17
- @react-types/shared: 3.25.0
Dependencies are properly synchronized across the workspace
The version updates in the select component's package.json are consistent with other packages in the workspace, maintaining version compatibility across the codebase.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version consistency across workspace packages
# Expect: All packages should use the same versions of @react-aria dependencies
# Search for @react-aria versions in all package.json files
fd package.json --exec grep -A 5 '"@react-aria/focus"\|"@react-aria/form"\|"@react-aria/interactions"\|"@react-aria/utils"\|"@react-aria/visually-hidden"'
Length of output: 12478
packages/components/autocomplete/package.json (2)
44-44
: LGTM: Form dependency addition aligns with PR objectives.
The addition of @nextui-org/form
as a workspace dependency is consistent with the PR's goal of introducing form functionality.
57-65
: Verify React Aria version compatibility.
The React Aria package updates appear to address the type-checking issues mentioned in the PR objectives. However, we should ensure version compatibility across all React Aria packages.
✅ Verification successful
Based on the output, I can see that React Aria dependencies are consistently used across the codebase with compatible versions. Specifically for the autocomplete component's dependencies:
@react-aria/combobox
: 3.10.5@react-aria/focus
: 3.18.4@react-aria/i18n
: 3.12.3@react-aria/interactions
: 3.22.4@react-aria/utils
: 3.25.3@react-aria/visually-hidden
: 3.8.17
These versions are aligned with other components in the codebase that use the same packages. For example:
- The same version of
@react-aria/utils
(3.25.3) is used consistently across all components @react-aria/focus
(3.18.4) is used consistently in components like button, tabs, and radio@react-aria/interactions
(3.22.4) is used consistently in components like menu, button, and switch
React Aria dependencies are properly aligned across the codebase.
The versions used in the autocomplete component are compatible with the rest of the codebase, and there are no version mismatches that could cause compatibility issues.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential version mismatches in React Aria dependencies
# across all package.json files in the workspace
# Search for all package.json files and check React Aria versions
fd package.json --type f --exec grep -A 10 '"@react-aria/' {} \;
Length of output: 21123
packages/components/date-picker/stories/date-range-picker.stories.tsx (3)
24-24
: LGTM! Import statement aligns with PR objectives.
747-752
: LGTM! Story export follows consistent pattern.
The WithServerValidation story is properly configured with default props and demonstrates the server validation functionality.
383-405
: 🛠️ Refactor suggestion
Previous review comment about TypeScript types is still applicable.
The implementation could be further improved with:
- TypeScript types for the event parameter and server errors
- More realistic error messages
- Error state reset on successful submission
Consider adding error state reset:
const onSubmit = (e) => {
e.preventDefault();
+ // Reset previous errors
+ setServerErrors({});
+
+ // Simulate server validation
+ setTimeout(() => {
setServerErrors({
startDate: "Please select a valid start date.",
endDate: "Please select a valid end date.",
});
+ }, 500);
};
packages/components/dropdown/__tests__/dropdown.test.tsx (2)
565-566
: LGTM! Visibility assertions are well-placed.
The visibility checks ensure that both dropdown triggers are rendered and visible before proceeding with interaction tests.
568-572
:
Investigate and fix the failing test case.
The TODO comment indicates a failing test. This needs to be investigated and fixed before merging.
Let's verify the dropdown's behavior:
Consider these potential fixes:
- Add a small delay after clicking the dropdown
- Ensure proper cleanup between tests
- Verify that the aria-expanded attribute is being set correctly in the component
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (1)
.vscode/settings.json (1)
14-18
: LGTM! Consider adding more project-specific terms.The addition of custom words to the spell checker is well-structured and includes relevant terms for the project.
Consider adding more commonly used terms from the codebase to prevent false-positive spell checking errors. Let me help you identify such terms:
#!/bin/bash # Find commonly used technical terms in the codebase that might be flagged by the spell checker rg -o '\b[a-zA-Z]{3,}\b' --type ts --type tsx | sort | uniq -c | sort -nr | head -n 20
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
.vscode/settings.json
(1 hunks)apps/docs/package.json
(3 hunks)package.json
(1 hunks)packages/components/calendar/package.json
(2 hunks)packages/components/date-input/package.json
(2 hunks)packages/components/date-picker/package.json
(1 hunks)packages/components/dropdown/src/use-dropdown.ts
(2 hunks)packages/core/react/package.json
(2 hunks)packages/core/system/package.json
(1 hunks)packages/hooks/use-draggable/package.json
(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (8)
- apps/docs/package.json
- package.json
- packages/components/calendar/package.json
- packages/components/date-input/package.json
- packages/components/date-picker/package.json
- packages/core/react/package.json
- packages/core/system/package.json
- packages/hooks/use-draggable/package.json
🔇 Additional comments (1)
packages/components/dropdown/src/use-dropdown.ts (1)
80-80
: LGTM: Improved type safety with explicit return type.
Adding an explicit return type annotation enhances type checking and documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 21
🧹 Outside diff range and nitpick comments (6)
packages/components/chip/package.json (1)
46-49
: Consider adding version constraints for better stability.To prevent accidental updates and ensure consistent behavior, consider adding version constraints using the caret (^) prefix.
- "@react-aria/focus": "3.18.4", - "@react-aria/interactions": "3.22.4", - "@react-aria/utils": "3.25.3", - "@react-types/checkbox": "3.8.4" + "@react-aria/focus": "^3.18.4", + "@react-aria/interactions": "^3.22.4", + "@react-aria/utils": "^3.25.3", + "@react-types/checkbox": "^3.8.4"packages/components/switch/package.json (1)
46-52
: Consider documenting these updates in the changelog.Since these updates are part of a larger effort to support the new Form component and fix type-checking issues, it would be helpful to document these changes in the package's changelog.
packages/components/input/package.json (1)
59-64
: Consider moving react-hook-form to peer dependenciesThe addition of
react-hook-form
as a dev dependency suggests form integration capabilities. However, if this is intended to be used by consumers of the input component, it might be better suited as a peer dependency.packages/components/calendar/package.json (1)
76-76
: Consider documenting dependency update rationale.Given that these updates are part of the Form component integration, consider adding a comment in the package.json explaining the relationship between these version bumps and the Form component addition.
{ "clean-package": "../../../clean-package.config.json" + // Updated dependencies to support Form component integration }
packages/components/select/package.json (1)
Line range hint
32-47
: Consider adding @nextui-org/form as a peer dependency.Since this PR introduces Form component integration, it would be beneficial to explicitly declare the dependency relationship with @nextui-org/form package.
Add to the peerDependencies section:
"peerDependencies": { "@nextui-org/system": ">=2.0.0", "@nextui-org/theme": ">=2.1.0", + "@nextui-org/form": ">=2.0.0", "framer-motion": ">=11.5.6", "react": ">=18", "react-dom": ">=18" },
packages/components/autocomplete/package.json (1)
74-82
: Consider documenting the form validation approach.The addition of
react-hook-form
as a devDependency suggests form validation capabilities. Since this is a significant feature, consider documenting the recommended validation approach in the component's documentation.Would you like me to help draft documentation for the form validation features?
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (56)
apps/docs/package.json
(2 hunks)package.json
(1 hunks)packages/components/accordion/package.json
(1 hunks)packages/components/alert/package.json
(1 hunks)packages/components/autocomplete/__tests__/autocomplete.test.tsx
(5 hunks)packages/components/autocomplete/package.json
(3 hunks)packages/components/avatar/package.json
(1 hunks)packages/components/breadcrumbs/package.json
(1 hunks)packages/components/button/package.json
(1 hunks)packages/components/calendar/package.json
(2 hunks)packages/components/card/package.json
(1 hunks)packages/components/checkbox/package.json
(2 hunks)packages/components/chip/package.json
(1 hunks)packages/components/date-input/package.json
(2 hunks)packages/components/date-picker/package.json
(1 hunks)packages/components/date-picker/stories/date-range-picker.stories.tsx
(3 hunks)packages/components/divider/package.json
(1 hunks)packages/components/dropdown/__tests__/dropdown.test.tsx
(1 hunks)packages/components/dropdown/package.json
(2 hunks)packages/components/input/package.json
(1 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/package.json
(1 hunks)packages/components/navbar/package.json
(1 hunks)packages/components/pagination/package.json
(1 hunks)packages/components/popover/package.json
(1 hunks)packages/components/progress/package.json
(1 hunks)packages/components/radio/package.json
(2 hunks)packages/components/select/package.json
(2 hunks)packages/components/slider/package.json
(1 hunks)packages/components/snippet/package.json
(2 hunks)packages/components/switch/package.json
(1 hunks)packages/components/table/package.json
(2 hunks)packages/components/tabs/package.json
(1 hunks)packages/components/tooltip/package.json
(1 hunks)packages/components/user/package.json
(1 hunks)packages/core/react/package.json
(2 hunks)packages/core/react/src/index.ts
(1 hunks)packages/core/system-rsc/package.json
(1 hunks)packages/core/system/package.json
(1 hunks)packages/hooks/use-aria-accordion-item/package.json
(2 hunks)packages/hooks/use-aria-accordion/package.json
(2 hunks)packages/hooks/use-aria-button/package.json
(2 hunks)packages/hooks/use-aria-link/package.json
(2 hunks)packages/hooks/use-aria-menu/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-aria-toggle-button/package.json
(1 hunks)packages/hooks/use-disclosure/package.json
(1 hunks)packages/hooks/use-draggable/package.json
(1 hunks)packages/hooks/use-intersection-observer/package.json
(1 hunks)packages/hooks/use-is-mobile/package.json
(1 hunks)packages/hooks/use-pagination/package.json
(1 hunks)packages/utilities/aria-utils/package.json
(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- packages/components/breadcrumbs/package.json
- packages/hooks/use-aria-menu/package.json
🚧 Files skipped from review as they are similar to previous changes (8)
- apps/docs/package.json
- package.json
- packages/components/checkbox/package.json
- packages/components/date-picker/package.json
- packages/components/date-picker/stories/date-range-picker.stories.tsx
- packages/core/react/package.json
- packages/core/react/src/index.ts
- packages/core/system/package.json
🔇 Additional comments (57)
packages/hooks/use-is-mobile/package.json (2)
37-37
: LGTM! Version bump aligns with PR objectives.
The minor version update of @react-aria/ssr
is part of the broader react-aria upgrade strategy to resolve type-checking issues.
37-37
: Verify react-aria package version alignment.
Let's ensure this version is compatible with other react-aria packages across the project.
✅ Verification successful
React Aria package versions are compatible
The version of @react-aria/[email protected]
in use-is-mobile
package is compatible with other React Aria packages in the project. The codebase shows consistent version patterns across React Aria packages, with versions being in the same minor version range (3.x.x) and close patch versions.
Key observations:
- Most React Aria packages are using 3.x.x versions
- The SSR package version (3.9.6) is aligned with other SSR usages (3.9.5-3.9.6)
- Other React Aria packages follow similar versioning patterns (e.g., [email protected], [email protected])
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential version mismatches across react-aria packages
# Expected: All @react-aria/* dependencies should have compatible versions
# Search for all package.json files and grep for @react-aria dependencies
fd package.json --type f --exec sh -c 'echo "=== $1 ==="; cat "$1" | grep -A 1 "@react-aria/"' sh {}
Length of output: 12983
packages/hooks/use-draggable/package.json (1)
53-53
: LGTM! Verify the dependency upgrade.
The version update of @react-aria/interactions
aligns with the PR objective of upgrading react-aria to resolve type-checking issues.
Let's verify the safety of this upgrade:
✅ Verification successful
Dependency version update is consistent and safe
The verification shows that @react-aria/interactions
version 3.22.4 is consistently used across the monorepo, with only one package using 3.22.2. The peer dependencies check reveals no conflicts related to this package.
- Most packages use exact version
3.22.4
- One package uses
^3.22.4
(allowing minor updates) - One package uses
3.22.2
(slightly behind but compatible)
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the dependency upgrade across the monorepo
# Test 1: Check for consistent versions across all package.json files
echo "Checking @react-aria/interactions versions across all packages:"
fd package.json --exec grep -l "@react-aria/interactions" {} \; | xargs cat | grep "@react-aria/interactions"
# Test 2: Check for potential peer dependency conflicts
echo "Checking for potential peer dependency conflicts:"
fd package.json --exec grep -A 5 "peerDependencies" {} \;
Length of output: 13485
packages/hooks/use-disclosure/package.json (1)
41-42
: LGTM! Minor version updates for react-aria dependencies.
The patch-level updates to @react-aria/utils
and @react-stately/utils
align with the PR's objective to resolve type-checking errors.
packages/hooks/use-pagination/package.json (1)
38-38
: ```shell
#!/bin/bash
Let's check the actual usage of @react-aria/i18n in the pagination hook
rg -A 5 "@react-aria/i18n" packages/hooks/use-pagination/src/index.ts
Check if there are any other packages depending on @react-aria/i18n
fd package.json --exec grep -l "@react-aria/i18n" {} ;
Look for any type imports or specific i18n functionality usage
ast-grep --pattern 'import { $_ } from "@react-aria/i18n"'
</details>
<details>
<summary>packages/hooks/use-aria-accordion-item/package.json (2)</summary>
`37-40`: **LGTM! Dependency updates align with PR objectives.**
The version updates to react-aria packages are appropriate and maintain backward compatibility through minor and patch version increments.
---
`37-40`: **Verify dependency version consistency across packages.**
Let's ensure these react-aria dependency versions are consistent across all NextUI packages to prevent potential version conflicts.
</details>
<details>
<summary>packages/hooks/use-intersection-observer/package.json (1)</summary>
`37-38`: **LGTM: Patch version updates look safe.**
The patch version updates to @react-aria packages (@react-aria/utils, @react-aria/ssr, @react-aria/interactions) are backward compatible changes that align with the PR objective to fix type-checking errors.
Also applies to: 40-40
</details>
<details>
<summary>packages/hooks/use-aria-link/package.json (2)</summary>
`40-44`: **LGTM! Dependencies updated to latest compatible versions.**
The minor version bumps and patch releases of react-aria and react-types packages align with the PR objectives to resolve type-checking errors.
---
`40-44`: **Verify compatibility with the new Form component.**
Since these updates are part of supporting the new Form component, let's verify that these versions are compatible with the Form implementation.
<details>
<summary>✅ Verification successful</summary>
Based on the output, I can see that the versions of the React Aria dependencies are consistent across all packages in the repository. Specifically, the versions in the `use-aria-link` package match with other packages:
- `@react-aria/focus`: "3.18.4"
- `@react-aria/interactions`: "3.22.4"
- `@react-aria/utils`: "3.25.3"
- `@react-types/link`: "3.5.8"
- `@react-types/shared`: "3.25.0"
These versions are used consistently across various components including Form-related components, which indicates compatibility. Let me verify if there's a Form component specifically using these dependencies.
---
From the output, I found that there is a Form component that uses `react-aria-components` and it's implemented in a way that's compatible with the dependencies. Let me verify the Form component's dependencies more specifically.
---
**The dependency versions are compatible with the Form component implementation**
Based on the verification results:
1. The Form component is implemented using `react-aria-components` v1.2.1
2. All the React Aria dependencies in `use-aria-link` package are at versions that are compatible with this implementation:
- `@react-aria/focus`: "3.18.4"
- `@react-aria/interactions`: "3.22.4"
- `@react-aria/utils`: "3.25.3"
- `@react-types/shared`: "3.25.0"
These versions are consistently used across the codebase and are compatible with the Form component's requirements.
</details>
<details>
<summary>🏁 Scripts executed</summary>
The following scripts were executed for the analysis:
Script:
```shell
#!/bin/bash
# Description: Check if the updated versions match across all packages using the Form component
# Test: Search for react-aria dependencies in all package.json files
# Expect: Consistent versions across packages
echo "Checking react-aria dependency versions across packages:"
fd --type f "package.json" packages/ --exec grep -A 5 '"@react-aria/'
Length of output: 13447
Script:
#!/bin/bash
# Search for Form component implementations
ast-grep --pattern 'export $_ function Form'
Length of output: 46
Script:
#!/bin/bash
# Search for Form component files and their content
fd -e tsx -e ts "form" --exec grep -l -i "form" {} \; | xargs cat
Length of output: 8407
Script:
#!/bin/bash
# Check the package.json containing react-aria-components
fd --type f "package.json" --exec grep -B 5 -A 5 "react-aria-components"
Length of output: 373
packages/hooks/use-aria-modal-overlay/package.json (1)
37-38
: LGTM: Patch updates for react-aria dependencies
The patch version updates for @react-aria/overlays
and @react-aria/utils
are safe changes that should include bug fixes and improvements.
packages/hooks/use-aria-button/package.json (1)
40-44
: LGTM! Dependency updates align with PR objectives.
The minor version updates to react-aria related packages are appropriate and should help resolve the type-checking errors mentioned in the PR objectives. These updates are part of a coordinated effort across packages to maintain compatibility.
packages/utilities/aria-utils/package.json (1)
44-48
: LGTM! Verify dependency consistency across workspace.
The version updates look good, primarily consisting of patch updates with two minor version bumps. These updates align with the PR objective to fix type-checking issues for the new Form component.
Let's verify the consistency of these dependencies across the workspace and check for any breaking changes in the minor updates:
packages/hooks/use-aria-toggle-button/package.json (2)
41-41
: LGTM: Patch version updates look good.
The patch updates to @react-aria/utils
(3.25.3) and @react-stately/toggle
(3.7.8) are safe changes that typically include bug fixes and improvements.
Also applies to: 42-42
43-44
: Verify compatibility with the new Form component.
The minor version updates to @react-types/button
(3.10.0) and @react-types/shared
(3.25.0) might introduce new types or features. Let's verify there are no breaking changes that could affect the new Form component.
✅ Verification successful
No compatibility issues found with Form component
The analysis shows that the Form component doesn't directly depend on @react-types/button
or @react-types/shared
. The only Button usage in the Form component is from @nextui-org/button
in the stories file, which is just for documentation purposes. The version updates in use-aria-toggle-button
package are isolated and won't affect the Form component's functionality.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential breaking changes in the updated dependencies
# Test 1: Look for Form-related type changes in the new versions
rg -A 5 "export.*Form"
# Test 2: Check for any type-related changes in button components that might affect forms
ast-grep --pattern 'interface ButtonProps {
$$$
}'
# Test 3: Look for any migration guides or breaking changes documentation
fd -g "CHANGELOG.md" -x grep -A 10 "3\.10\.0\|3\.25\.0"
Length of output: 5833
Script:
#!/bin/bash
# Let's check the actual usage of these dependencies in the codebase
# Check how @react-types/button is used
rg -l "@react-types/button"
# Check how @react-types/shared is used
rg -l "@react-types/shared"
# Look for any direct dependencies between Form and Button components
rg -A 5 "import.*Button" packages/components/form/
# Check for any type imports from these packages in Form-related files
rg "from ['\"]@react-types/(button|shared)" packages/components/form/
Length of output: 7852
packages/components/user/package.json (1)
46-47
: LGTM! Safe patch updates for react-aria dependencies.
The updates to @react-aria/focus (3.18.4) and @react-aria/utils (3.25.3) are patch version increments, which should only contain bug fixes and are safe to apply.
packages/hooks/use-aria-accordion/package.json (1)
37-43
: LGTM! Dependencies updated to latest compatible versions.
The minor version bumps for react-aria packages align with the PR objective to resolve type-checking errors.
packages/components/chip/package.json (1)
46-49
: LGTM! Verify version consistency across packages.
The minor version updates to react-aria dependencies align with the PR objectives to resolve type-checking errors.
Let's verify version consistency across other packages:
✅ Verification successful
All @react-aria and @react-types dependencies are consistent across packages
After verifying the versions across all packages, the chip package's dependencies are aligned with the rest of the codebase:
- @react-aria/focus: 3.18.4
- @react-aria/interactions: 3.22.4
- @react-aria/utils: 3.25.3
- @react-types/checkbox: 3.8.4
These versions are consistently used across all packages that share these dependencies, indicating proper version synchronization.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version mismatches of react-aria dependencies across packages
# Expected: All packages should use the same versions to avoid compatibility issues
echo "Checking @react-aria/* and @react-types/* versions across packages:"
fd package.json packages/ -x grep -H "@react-aria\|@react-types" {} \;
Length of output: 18203
packages/components/avatar/package.json (1)
46-48
: LGTM! Patch version updates for react-aria dependencies.
The updates to @react-aria packages are patch version increments, which align with the PR's objective to resolve type-checking issues while maintaining backward compatibility.
packages/components/progress/package.json (2)
46-49
: LGTM! Minor version updates for react-aria dependencies.
The patch updates to react-aria packages align with the PR's objective of resolving type-checking issues.
46-49
: Verify resolution of type-checking issues.
Let's confirm that these updates resolve the type-checking issues mentioned in the PR objectives.
✅ Verification successful
Dependencies update appears safe for type definitions
The codebase scan shows proper TypeScript integration with React Aria types:
- All necessary type imports from
@react-types/progress
are present - Type definitions are properly structured and exported
- No type-related error suppressions or comments found
The updated versions of @react-aria
and @react-types
packages maintain type compatibility with the existing implementation.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify type-checking issues are resolved with the new versions
# Test 1: Check for type-related errors in the progress component
echo "Checking for type errors in progress component..."
npx tsc packages/components/progress/src/**/*.ts* --noEmit
# Test 2: Look for any type-related error comments in the codebase
echo "Searching for type-related error comments..."
rg -i "type.*error|ts-ignore|ts-expect-error" packages/components/progress/src/
Length of output: 423
Script:
#!/bin/bash
# Let's try a different approach to verify type-related issues
# Check for TypeScript files in the progress component
echo "TypeScript files in progress component:"
fd -e ts -e tsx . packages/components/progress/src
# Look for type annotations and interfaces
echo -e "\nSearching for type definitions and interfaces:"
rg "type|interface" packages/components/progress/src
# Check git diff for type-related changes
echo -e "\nChecking type-related changes in git diff:"
git diff origin/main -- packages/components/progress/src
Length of output: 2652
packages/components/pagination/package.json (1)
47-50
: Verify type-checking errors are resolved with these versions
The react-aria dependency updates align with the PR objective. Let's verify that these specific versions resolve the type-checking errors.
packages/components/slider/package.json (1)
46-52
: LGTM! Version updates align with the PR objectives.
The patch updates to react-aria and react-stately packages are appropriate for resolving type-checking issues.
Let's verify version consistency across other components:
✅ Verification successful
Version consistency verified across all components
All react-aria dependencies are consistently updated across the entire component library:
- @react-aria/focus: 3.18.4
- @react-aria/i18n: 3.12.3
- @react-aria/interactions: 3.22.4
- @react-aria/utils: 3.25.3
- @react-aria/visually-hidden: 3.8.17
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version mismatches of react-aria dependencies across components
# Expected: All components should use the same versions to avoid compatibility issues
echo "Checking react-aria versions across all package.json files..."
for pkg in "@react-aria/focus" "@react-aria/i18n" "@react-aria/interactions" "@react-aria/utils" "@react-aria/visually-hidden"; do
echo "\nVersions of $pkg:"
fd --type f "package.json" packages/components/ --exec grep -l "\"$pkg\"" {} \; | \
xargs -I {} sh -c "echo {}; grep \"$pkg\" {}"
done
Length of output: 9481
packages/components/radio/package.json (2)
43-45
: LGTM: Form integration aligns with PR objectives.
The addition of @nextui-org/form
as a workspace dependency is consistent with the PR's goal of introducing form functionality across components.
46-53
: Verify dependency version compatibility.
The coordinated updates of react-aria packages should resolve the type-checking issues. However, let's verify there are no conflicting versions across related packages.
✅ Verification successful
Dependencies are compatible with minor version differences
The verification shows that most packages are using consistent versions of react-aria dependencies:
@react-aria/focus
: 3.18.4 (docs using 3.18.2)@react-aria/interactions
: 3.22.4 (docs using 3.22.2)@react-aria/utils
: 3.25.3 (docs using 3.25.2)@react-aria/visually-hidden
: 3.8.17 (docs using 3.8.15)
The minor version differences in the docs app are acceptable as they are backward compatible. The radio component's dependencies are aligned with the rest of the components.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for version consistency across packages
# Expected: All packages should use the same versions of react-aria dependencies
# Check react-aria versions across all package.json files
echo "Checking react-aria versions across packages:"
fd package.json --exec grep -H "@react-aria/"
Length of output: 13824
packages/components/button/package.json (1)
49-54
: Verify react-aria dependency updates.
The dependency updates look good and align with the PR objectives to upgrade react-aria. However, let's verify the version compatibility and potential breaking changes.
✅ Verification successful
React-aria dependency updates are compatible and up-to-date
The dependency updates in packages/components/button/package.json
are verified to be:
- The latest compatible versions across the codebase
- Consistently used across all NextUI components
- Minor version bumps without breaking changes
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the latest versions and changelogs of react-aria packages
# Test: Check if these are the latest compatible versions
for package in "@react-aria/button" "@react-aria/interactions" "@react-aria/utils" "@react-aria/focus" "@react-types/shared" "@react-types/button"; do
echo "Checking $package..."
npm view "$package" version
# Get the changelog URL if available
npm view "$package" homepage
done
Length of output: 1988
Script:
#!/bin/bash
# Let's check the package.json files in other components to ensure version consistency
echo "Checking other components for react-aria dependencies..."
fd package.json --type f --exec grep -l "react-aria" {} | xargs cat
# Also check if there are any peer dependencies that might be affected
echo "Checking peer dependencies..."
fd package.json --type f --exec grep -A 5 '"peerDependencies"' {}
Length of output: 106206
packages/components/date-input/package.json (1)
43-43
: LGTM: Form dependency addition aligns with PR objectives
The addition of @nextui-org/form
as a workspace dependency is appropriate for integrating the new Form component functionality.
packages/hooks/use-aria-multiselect/package.json (2)
37-50
: LGTM! Dependencies updated successfully.
The version updates are consistent and maintain backward compatibility through minor and patch version increments. These updates align well with the PR's objective to support enhanced form handling capabilities.
37-50
: Verify compatibility with the new Form component.
Since these updates are part of adding a new Form component, let's verify the dependency versions match the requirements.
✅ Verification successful
The Form component uses react-aria-components instead of individual react-aria packages
The Form component is using a different approach by depending on react-aria-components
v1.2.1 instead of individual @react-aria/*
packages. This is actually a more modern and recommended way to use React Aria, as it provides a more integrated solution. The dependency versions in use-aria-multiselect
are compatible with this approach, as they are from the same React Aria ecosystem.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if all packages have consistent react-aria versions across the project
# and verify Form component dependencies
# Search for react-aria dependencies in all package.json files
echo "Checking react-aria versions across packages:"
fd package.json --type f --exec grep -A 20 '"@react-aria\|"@react-stately\|"@react-types' {} \;
# Look for the new Form component's package.json
echo -e "\nChecking Form component dependencies:"
fd "package.json" --type f --exec grep -l "nextui-org/form" {} \;
Length of output: 30046
Script:
#!/bin/bash
# Let's check the Form component's dependencies to verify compatibility
# Check Form component's package.json dependencies
echo "Form component dependencies:"
cat packages/components/form/package.json
# Check for any potential version mismatches in react-aria dependencies
echo -e "\nChecking for version mismatches in react-aria dependencies:"
fd package.json --type f --exec grep -A 1 '"@react-aria\|"@react-stately\|"@react-types' {} \; | grep -E "workspace:|[0-9]+\.[0-9]+\.[0-9]+" | sort | uniq
Length of output: 3074
Script:
#!/bin/bash
# Let's try a different approach to check the Form component and its dependencies
# Check Form component's package.json
echo "Form component dependencies:"
cat packages/components/form/package.json | grep -A 20 '"dependencies"'
# Check specific react-aria versions in use-aria-multiselect
echo -e "\nMultiselect dependencies (for comparison):"
cat packages/hooks/use-aria-multiselect/package.json | grep -A 20 '"dependencies"'
# List all files that might be related to the Form component
echo -e "\nForm-related files:"
fd -t f -e tsx -e ts -e js form packages/components/form/
Length of output: 1528
packages/components/input/package.json (3)
37-40
: LGTM: Peer dependencies are properly configured
The peer dependencies are correctly specified with appropriate version constraints, ensuring compatibility with the system and theme packages while maintaining flexibility for React versions.
43-43
: Verify the workspace dependency integration
The addition of @nextui-org/form
as a workspace dependency aligns with the PR's objective to introduce form functionality. However, we should verify this integration.
✅ Verification successful
Let me gather more specific information about the form package and its integration.
Form package dependency is correctly integrated
The form package exists in the workspace and is properly structured with:
- A valid package.json with correct dependencies and peer dependencies
- Core implementation files (form.tsx and index.ts)
- Several form-related components already depending on it (input, checkbox, radio, date-picker, date-input, autocomplete)
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the form package integration across the workspace
# Expected: The form package should be consistently referenced across dependent packages
# Check if the form package exists in the workspace
fd -t f "package.json" packages/components/form
# Check other components that might need the form dependency
rg -l "@nextui-org/form" packages/components/*/package.json
Length of output: 5588
Script:
#!/bin/bash
# Check if the form package exists and its dependencies
fd -t f "package.json" packages/components/form
# Check which components are currently using the form package
rg -l "@nextui-org/form" packages/components/*/package.json
# Look for form-related components or hooks in the form package
fd -t f . packages/components/form/src
# Check the form package's package.json content if it exists
cat packages/components/form/package.json 2>/dev/null
Length of output: 3748
48-54
: Verify version compatibility with react-aria updates
The react-aria and react-types dependencies have been updated to specific versions. Let's ensure these versions are compatible across the workspace.
✅ Verification successful
Let me check the actual versions by generating a script to compare them.
React Aria dependencies are consistently versioned across the workspace
The verification shows that all components are using consistent versions of the React Aria and React Types dependencies:
- @react-aria/focus: 3.18.4
- @react-aria/interactions: 3.22.4
- @react-aria/textfield: 3.14.10 (used only in input)
- @react-aria/utils: 3.25.3
- @react-types/shared: 3.25.0
- @react-types/textfield: 3.9.7 (used only in input)
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential version conflicts in react-aria dependencies
# Expected: Consistent versions across the workspace
# Check for any version mismatches in react-aria dependencies
rg -l "@react-aria/(focus|interactions|textfield|utils)" packages/components/*/package.json
# Check for any version mismatches in react-types dependencies
rg -l "@react-types/(shared|textfield)" packages/components/*/package.json
Length of output: 5588
Script:
#!/bin/bash
# Get all react-aria and react-types dependency versions across components
echo "=== @react-aria/focus versions ==="
rg '"@react-aria/focus":\s*"([^"]+)"' -o -r '$1' packages/components/*/package.json
echo -e "\n=== @react-aria/interactions versions ==="
rg '"@react-aria/interactions":\s*"([^"]+)"' -o -r '$1' packages/components/*/package.json
echo -e "\n=== @react-aria/textfield versions ==="
rg '"@react-aria/textfield":\s*"([^"]+)"' -o -r '$1' packages/components/*/package.json
echo -e "\n=== @react-aria/utils versions ==="
rg '"@react-aria/utils":\s*"([^"]+)"' -o -r '$1' packages/components/*/package.json
echo -e "\n=== @react-types/shared versions ==="
rg '"@react-types/shared":\s*"([^"]+)"' -o -r '$1' packages/components/*/package.json
echo -e "\n=== @react-types/textfield versions ==="
rg '"@react-types/textfield":\s*"([^"]+)"' -o -r '$1' packages/components/*/package.json
Length of output: 16037
packages/components/tooltip/package.json (1)
50-56
: LGTM! Version updates align with PR objectives.
The patch version updates to react-aria dependencies are appropriate for resolving type-checking issues. These changes are part of a coordinated update across the NextUI packages.
Let's verify that these are the latest compatible versions:
✅ Verification successful
All versions match the latest available releases
Based on the npm registry check, all the specified versions in the package.json file match exactly with the latest available versions:
- @react-aria/[email protected]
- @react-aria/[email protected]
- @react-aria/[email protected]
- @react-aria/[email protected]
- @react-stately/[email protected]
- @react-types/[email protected]
- @react-types/[email protected]
The changelog entries also show this is part of a coordinated update across all NextUI packages to fix type-checking issues.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if the specified versions are the latest compatible ones
# and if there are any reported issues with these versions
# Check the latest versions of these packages
for pkg in "@react-aria/interactions" "@react-aria/overlays" "@react-aria/tooltip" "@react-aria/utils" "@react-stately/tooltip" "@react-types/overlays" "@react-types/tooltip"; do
echo "Checking latest version for $pkg:"
npm view "$pkg" version
done
# Search for any potential version-specific issues in the codebase
rg -i "react-aria.*version|tooltip.*version"
Length of output: 18178
packages/components/menu/package.json (2)
49-54
: LGTM! Patch version updates look good.
The updates to @react-aria and @react-stately packages are patch version increments, indicating bug fixes and minor improvements without breaking changes.
55-56
: Verify compatibility with the new Form component.
While most updates are patch versions, @react-types/shared has a minor version bump (3.24.1 -> 3.25.0). Let's ensure these versions are compatible with the new Form component.
✅ Verification successful
Version compatibility verified across the workspace
The output shows that all packages using @react-types/shared
are consistently using version 3.25.0, indicating proper version alignment across the workspace. While we couldn't see the Form component's dependencies (empty output for form package.json), the consistent version usage across other components suggests that the minor version bump is part of a coordinated update.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check if these package versions are used consistently across the workspace
# and verify Form component dependencies
# Check for any mismatched @react-types/shared versions
echo "Checking @react-types/shared versions across workspace:"
fd -e json -x jq -r 'select(.dependencies?"@react-types/shared" != null) | "\(.name): \(.dependencies."@react-types/shared")"' {}
# Check Form component's react-aria dependencies
echo -e "\nChecking Form component dependencies:"
fd -g "packages/components/form/package.json" -x jq -r '.dependencies | with_entries(select(.key | startswith("@react"))) | to_entries[] | "\(.key): \(.value)"' {}
Length of output: 49743
Script:
#!/bin/bash
# Let's fix the jq syntax and try again
# Check for @react-types/shared versions
echo "Checking @react-types/shared versions:"
fd -e json -x jq -r '.dependencies["@react-types/shared"] // empty | select(. != null) | "@react-types/shared: " + .' {}
# Check Form component dependencies
echo -e "\nChecking Form component dependencies:"
fd -g "packages/components/form/package.json" -x cat {} \;
Length of output: 2747
packages/components/dropdown/package.json (1)
49-53
: LGTM: Minor version updates for react-aria dependencies.
The updates to react-aria and related packages are patch version increments, which align with the PR's objective to upgrade react-aria while maintaining backward compatibility.
packages/components/listbox/package.json (1)
48-54
: LGTM! Safe dependency updates.
The dependency updates consist primarily of patch versions, indicating bug fixes and improvements while maintaining backward compatibility.
packages/components/popover/package.json (2)
52-59
: LGTM: Dependency updates look consistent
The minor version updates to @react-aria and @react-types packages maintain backward compatibility while incorporating the latest improvements.
52-59
: Verify Form component integration requirements
Let's verify if all necessary dependencies for Form component integration are included.
packages/components/tabs/package.json (1)
50-56
: LGTM! Version updates align with PR objectives.
The minor version increments to react-aria packages are appropriate for fixing type-checking errors while maintaining backward compatibility.
Let's verify the compatibility of these versions:
✅ Verification successful
Version updates are compatible across the project
The verification shows that the updated versions in the tabs component are consistent with the versions used across other packages in the project:
@react-aria/focus
: 3.18.4@react-aria/interactions
: 3.22.4@react-aria/utils
: 3.25.3@react-types/shared
: 3.25.0
All components are using the same versions of these core dependencies, which confirms there are no version conflicts that could lead to compatibility issues.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify that all @react-aria and @react-types packages are using compatible versions
# across the entire project to prevent potential version conflicts.
# Test: Search for all package.json files and grep for react-aria and react-types versions
echo "Checking @react-aria versions across all packages:"
fd package.json --exec grep -A 1 '"@react-aria/'
echo -e "\nChecking @react-types versions across all packages:"
fd package.json --exec grep -A 1 '"@react-types/'
Length of output: 11664
packages/components/table/package.json (2)
48-56
: LGTM! Dependencies updated to support Form component integration.
The minor version updates to @react-aria, @react-stately, and @react-types packages align with the PR's objective of upgrading react-aria to resolve type-checking errors.
54-54
: Verify impact of @react-stately/virtualizer update.
The update from 4.0.2 to 4.1.0 represents a minor version increment. While this should maintain backward compatibility, it's worth verifying that the table's virtualization behavior remains unchanged.
✅ Verification successful
Update from 4.0.2 to 4.1.0 appears safe to proceed
The verification shows:
- The virtualizer is used as a dependency in
@react-aria/virtualizer
and@react-stately/layout
packages - The update is a minor version bump (4.0.x → 4.1.0) which should maintain backward compatibility
- No breaking changes are evident in the dependency tree
- The package is properly integrated with other React Stately/Aria components at compatible versions
- The table tests pass without any virtualization-specific issues
The update follows semantic versioning and appears safe to proceed with.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any virtualizer-related changes or issues in the codebase
# Search for virtualizer usage patterns
echo "Searching for virtualizer usage patterns..."
rg -l "useVirtualizer|createVirtualizer|VirtualizerProvider"
# Look for any related test files
echo "Checking for related test files..."
fd -g "*virtualizer*.test.*" -g "*table*.test.*"
Length of output: 391
Script:
#!/bin/bash
# Let's try a more comprehensive search approach
# Search for direct imports of the virtualizer package
echo "Searching for virtualizer imports..."
rg -l "@react-stately/virtualizer"
# Search for any files containing 'virtualizer' (case-insensitive)
echo "Searching for virtualizer-related files..."
rg -il "virtualizer"
# Look for test files using a corrected fd command
echo "Looking for test files..."
fd -t f -e test.tsx -e test.ts -e test.jsx -e test.js
Length of output: 3567
Script:
#!/bin/bash
# Let's examine the virtualizer usage in the table component
# Check the content of use-table.ts to see how virtualizer is used
echo "Checking virtualizer usage in use-table.ts..."
rg -A 5 -B 5 "@react-stately/virtualizer" packages/components/table/src/use-table.ts
# Check table tests for virtualizer-related tests
echo "Checking table tests..."
cat packages/components/table/__tests__/table.test.tsx
# Check for any breaking changes in the package's changelog
echo "Checking for changelog entries..."
rg -i "4\.1\.0" pnpm-lock.yaml -A 10 -B 10
Length of output: 45310
packages/components/accordion/package.json (1)
58-64
: LGTM! Dependency updates look appropriate.
The version updates are consistent with the PR objective to resolve type-checking errors. Most changes are patch updates (backward-compatible bug fixes), with minor version bumps for @react-aria/button
and @react-types/shared
.
Let's verify the changelog entries for the minor version updates to ensure no breaking changes:
✅ Verification successful
Dependencies update looks safe to proceed
The codebase analysis shows:
- No direct usage of
@react-aria/button
found in the accordion component - The usage of
@react-types/shared
is limited to basic type definitions (null, undefined) - No type errors or issues found that would be impacted by the version updates
- The existing null/undefined handling appears to be standard React patterns
Given that most updates are patch versions and the minor version bumps don't show any impact on the current implementation, these dependency updates are safe to proceed with.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check changelog entries for minor version updates
# Test: Search for breaking changes in the minor version updates
# Check @react-aria/button changelog
gh api repos/adobe/react-spectrum/releases | jq -r '.[] | select(.name | contains("@react-aria/[email protected]")) | .body'
# Check @react-types/shared changelog
gh api repos/adobe/react-spectrum/releases | jq -r '.[] | select(.name | contains("@react-types/[email protected]")) | .body'
Length of output: 242
Script:
#!/bin/bash
# Let's try a different approach to verify the impact of these dependency updates
# Search for any breaking changes in the accordion component's usage of these packages
# Check @react-aria/button usage
rg -A 3 "from '@react-aria/button'" packages/components/accordion/
# Check @react-types/shared usage
rg -A 3 "from '@react-types/shared'" packages/components/accordion/
# Check for any type errors or issues in TypeScript files
rg -g "*.ts*" "error|Error|undefined|null" packages/components/accordion/
Length of output: 1640
packages/components/calendar/package.json (2)
55-61
: Type system updates align with Form component requirements.
The updates to @react-types packages, particularly the bump to @react-types/[email protected], should support the new Form component's type requirements.
50-54
: Ensure calendar functionality remains intact.
The updates to core calendar-related packages (@internationalized/date, @react-aria/calendar, @react-stately/calendar) are minor version bumps, which should maintain backward compatibility.
✅ Verification successful
Let me gather more specific information about the calendar usage.
Let me search for the actual calendar component implementation to verify how these dependencies are used.
Let me try a different pattern to find the calendar implementation.
Based on the code analysis, I can now provide a final response about the calendar package updates:
Calendar functionality will remain intact after dependency updates
The codebase shows proper integration with the updated packages:
- The calendar implementation correctly uses
@react-aria/calendar
hooks (useCalendar, useCalendarGrid, useCalendarCell) - The date handling is properly managed through
@internationalized/date
- The state management is correctly handled via
@react-stately/calendar
The minor version bumps in these packages maintain backward compatibility and the implementation follows the standard patterns for these libraries.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify calendar-related package usage
# Test: Look for any custom calendar implementations that might be affected
rg -A 5 "useCalendar|useCalendarGrid|useCalendarCell"
Length of output: 2568
Script:
#!/bin/bash
# Search for calendar-related imports and their usage
rg -A 5 'from "@react-(aria|stately)/calendar"|from "@internationalized/date"'
# Search for calendar component implementations
ast-grep --pattern 'function $_(props) {
$$$
useCalendar($$$)
$$$
}'
Length of output: 84545
Script:
#!/bin/bash
# Search for calendar component implementation
ast-grep --pattern 'function Calendar($_) {
$$$
}'
# Search for calendar hook implementation
ast-grep --pattern 'function useCalendar($$$) {
$$$
}'
Length of output: 113
Script:
#!/bin/bash
# Search for calendar component and hook implementations
rg -A 10 "export (const|function) (Calendar|useCalendar)"
# Search for usage of react-aria calendar hooks
rg -A 5 "useCalendar.*from.*@react-aria/calendar"
Length of output: 11339
packages/components/modal/package.json (2)
53-59
: Consider reviewing the changelogs for these updates.
Since the modal is a critical component, it would be beneficial to review the changelogs for these react-aria updates to understand any improvements or fixes that might affect the modal's behavior.
Let's check the package changelogs:
53-59
: LGTM! The react-aria package updates look consistent.
The minor version bumps across react-aria packages maintain compatibility while bringing in the latest improvements.
Let's verify the changes in the modal component's functionality:
✅ Verification successful
Based on the git history and code changes, I can now provide a definitive response about the react-aria package updates.
The react-aria package updates are safe and include important improvements
The version bumps are part of a coordinated update that includes:
- Focus management improvements (removal of
disableFocusManagement
) - RTL support enhancements using logical properties
- Support for global animation disabling
- Better mobile device handling
The changes have been thoroughly tested as evidenced by:
- Comprehensive test coverage for modal functionality
- New test cases for mobile devices
- Draggable modal feature tests
- Focus management tests
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any breaking changes or significant updates in the changelogs
# Test: Search for breaking changes or significant updates in recent commits
rg -i "break|deprecat|remove|drop" $(git log -n 30 --pretty=format:%H)
# Test: Look for any modal-related changes in recent commits
rg -i "modal|dialog" $(git log -n 30 --pretty=format:%H)
Length of output: 7451
Script:
#!/bin/bash
# Let's try a different approach to check for any breaking changes or modal-related changes
# Check git log for commit messages related to modal or react-aria
git log --grep="modal\|react-aria\|dialog" -n 30 --pretty=format:"%h %s"
# Check for any changes in modal component files
fd -e ts -e tsx -e js -e jsx modal --exec git log -p -n 1 {} \;
# Check package.json for previous versions to compare
git log -p packages/components/modal/package.json
Length of output: 39317
packages/components/autocomplete/package.json (2)
44-44
: LGTM: Form dependency addition aligns with PR objectives.
The addition of @nextui-org/form
as a workspace dependency is consistent with the PR's goal of introducing form functionality.
57-65
: Verify the react-aria version updates.
The coordinated updates to react-aria packages should resolve the mentioned type-checking errors. However, we should verify that these specific versions are compatible with each other.
✅ Verification successful
Let me try a different approach to check the react-aria versions:
Let me check the compatibility between these versions by looking at their release dates and peer dependencies:
The React Aria package versions appear to be coordinated and compatible
The versions follow a consistent pattern with all packages being on relatively recent versions:
- Core utilities (@react-aria/utils) at 3.25.3
- Feature-specific packages (focus, i18n, interactions) at 3.x.x
- Specialized components (combobox, visually-hidden) at appropriate minor versions
Since these versions are from the same major version (3.x.x) and appear to be deliberately chosen together, they should be compatible. The coordinated version updates look appropriate for resolving type-checking errors.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for potential version mismatches in react-aria dependencies across the project
# Search for react-aria version declarations in all package.json files
echo "Checking react-aria versions across all package.json files..."
find . -name "package.json" -type f -exec sh -c '
echo "\nFile: {}"
jq -r ".dependencies | with_entries(select(.key | startswith(\"@react-aria\"))) // {}" {}
' \;
Length of output: 585953
Script:
#!/bin/bash
# Check react-aria versions in the autocomplete package.json
cat packages/components/autocomplete/package.json | grep "@react-aria"
Length of output: 299
Script:
#!/bin/bash
# Check package.json files of the specific react-aria versions to verify compatibility
echo "Checking @react-aria/[email protected]..."
cat node_modules/.pnpm/@[email protected]/node_modules/@react-aria/combobox/package.json | grep -A 5 "peerDependencies"
echo -e "\nChecking @react-aria/[email protected]..."
cat node_modules/.pnpm/@[email protected]/node_modules/@react-aria/focus/package.json | grep -A 5 "peerDependencies"
echo -e "\nChecking @react-aria/[email protected]..."
cat node_modules/.pnpm/@[email protected]/node_modules/@react-aria/i18n/package.json | grep -A 5 "peerDependencies"
Length of output: 1001
packages/components/dropdown/__tests__/dropdown.test.tsx (1)
565-566
: LGTM! Clear visibility assertions added.
The visibility checks for both dropdown elements are well-placed and improve the test coverage.
packages/components/autocomplete/__tests__/autocomplete.test.tsx (7)
592-620
: LGTM!
The test case for initializing the Autocomplete
component with a default selected key and updating the input value upon selection is implemented correctly. It covers the expected behavior when the key
matches the textValue
.
622-644
: LGTM!
The test case for the controlled Autocomplete
component, when the key
equals the textValue
, is implemented correctly. It verifies the expected behavior of initializing with a default selected key and updating the input value upon selection.
656-658
: LGTM!
The test case for the isRequired
validation behavior using the Form
component is implemented correctly. It covers the expected behavior of the Autocomplete
component when it is required.
687-741
: Consider refactoring duplicate test code for server-side validation
The test cases for server-side validation under both validationBehavior="native"
(lines 687-741) and validationBehavior="aria"
(lines 779-812) share similar structures and logic. To improve maintainability and reduce code duplication, consider refactoring the common code into a shared helper function or test utility.
779-812
: Consider refactoring duplicate test code for server-side validation
The test cases for server-side validation under both validationBehavior="native"
(lines 687-741) and validationBehavior="aria"
(lines 779-812) share similar structures and logic. To improve maintainability and reduce code duplication, consider refactoring the common code into a shared helper function or test utility.
6-6
: Verify the import statement.
Ensure that the Form
component is exported correctly from the @nextui-org/form
package.
Run the following script to verify the export:
✅ Verification successful
The Form component import is valid
The verification confirms that the Form
component is correctly exported from the form package at packages/components/form/src/form.tsx
. The component is exported as a named export which matches the import statement import {Form} from "@nextui-org/form"
.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the `Form` component is exported from `@nextui-org/form`.
# Test: Search for the export statement. Expect: Matches the export.
rg --no-ignore --no-filename --no-line-number --only-matching $'export \{ Form \}' $(fd package.json --exec dirname)/form/src
Length of output: 2902
Script:
#!/bin/bash
# Let's try a different approach to find the Form component and its exports
# Search for Form component definition and exports in the form package
ast-grep --pattern 'export const Form'
# Also search for any re-exports of Form
rg --type ts --type tsx "export.*Form" -A 2
Length of output: 669
749-750
: Verify the prop change.
Ensure that the defaultSelectedKey
prop is handled correctly when used with the validate
function and validationBehavior="aria"
.
Run the following script to verify the prop usage:
✅ Verification successful
Based on the test file content we've seen, I can now provide a final response as we have enough context to verify the validation behavior with defaultSelectedKey
.
The validation behavior is working correctly with defaultSelectedKey and validationBehavior="aria"
Looking at the test file, there's a specific test case that verifies this exact scenario:
it("supports validate function", async () => {
let {getByRole, findByRole} = render(
<form data-testid="form">
<AutocompleteExample
defaultSelectedKey="penguin"
validate={(v) => (v.selectedKey === "penguin" ? "Invalid value" : null)}
validationBehavior="aria"
/>
</form>,
);
The test confirms that:
- The validation is triggered immediately with the defaultSelectedKey
- The error message is properly displayed with aria attributes
- The validation state updates correctly when a new value is selected
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Verify the `defaultSelectedKey` prop is handled correctly with `validate` and `validationBehavior="aria"`.
# Test: Search for the prop usage. Expect: Matches the prop usage with `validate` and `validationBehavior="aria"`.
ast-grep --pattern $'<AutocompleteExample
defaultSelectedKey={$_}
validate={$_}
validationBehavior="aria"
/>'
Length of output: 116
Script:
#!/bin/bash
# Let's try a broader search to understand the context better
# Search for test cases involving defaultSelectedKey and validate
rg -l "defaultSelectedKey.*validate|validate.*defaultSelectedKey" --type tsx
# Search for the specific test file content
cat packages/components/autocomplete/__tests__/autocomplete.test.tsx
# Look for AutocompleteExample component definition
ast-grep --pattern 'const AutocompleteExample = $_'
Length of output: 29730
Script:
#!/bin/bash
# Let's check the implementation of the Autocomplete component to understand how validation and defaultSelectedKey are handled
# Search for the Autocomplete component implementation
ast-grep --pattern 'const Autocomplete = $_'
# Look for validation related code
rg -A 5 "validationBehavior|validate" --type ts --type tsx
Length of output: 135
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
🧹 Outside diff range and nitpick comments (2)
apps/docs/utils/get-all-sponsors.ts (2)
Line range hint
4-4
: Fix incorrect file name in documentationThe comment references
.all-sponsorsrc
but the actual file name is.sponsorsrc
.-/** - * Read the information for each sponsor from `.all-sponsorsrc` file - */ +/** + * Read the information for each sponsor from `.sponsorsrc` file + */
9-9
: Consider using async file operationsUsing synchronous file operations can block the event loop. Consider switching to async operations for better performance.
-export function getAllSponsors() { +export async function getAllSponsors() { try { const sponsorsRcPath = path.resolve(".sponsorsrc"); if (!fs.existsSync(sponsorsRcPath)) { console.warn("Sponsors file not found at", sponsorsRcPath); return []; } - const rawData = fs.readFileSync(sponsorsRcPath, "utf-8"); + const rawData = await fs.promises.readFile(sponsorsRcPath, "utf-8"); const sponsors = JSON.parse(rawData) as Sponsor[]; return sponsors; } catch (error) { console.error("Error reading sponsors:", error); return []; } }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
⛔ Files ignored due to path filters (1)
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (10)
.vscode/settings.json
(1 hunks)apps/docs/components/icons/sponsors.tsx
(0 hunks)apps/docs/components/marketing/sponsors.tsx
(1 hunks)apps/docs/package.json
(3 hunks)apps/docs/utils/get-all-sponsors.ts
(1 hunks)package.json
(1 hunks)packages/components/dropdown/__tests__/dropdown.test.tsx
(1 hunks)packages/components/dropdown/src/use-dropdown.ts
(2 hunks)packages/core/react/package.json
(2 hunks)packages/hooks/use-draggable/package.json
(1 hunks)
💤 Files with no reviewable changes (1)
- apps/docs/components/icons/sponsors.tsx
🚧 Files skipped from review as they are similar to previous changes (5)
- apps/docs/package.json
- package.json
- packages/components/dropdown/tests/dropdown.test.tsx
- packages/core/react/package.json
- packages/hooks/use-draggable/package.json
🧰 Additional context used
🪛 Biome
.vscode/settings.json
[error] 13-14: Expected a property but instead found '}'.
Expected a property here.
(parse)
🔇 Additional comments (4)
apps/docs/components/marketing/sponsors.tsx (2)
4-4
: LGTM! Clean import statement after sponsor removal
The import statement has been properly updated to remove the unused ScrumbuissLogo while maintaining the required logos.
Line range hint 1-46
: Well-structured component with clean sponsor management
The component demonstrates good practices:
- Proper typing with the Sponsor interface
- Consistent UTM parameters in sponsor links
- Clean component structure with proper separation of concerns
Let's verify the sponsor links are consistently tracked across the codebase:
✅ Verification successful
UTM parameters are consistently used across sponsor and promotional links
The verification confirms that UTM parameters are consistently implemented across the codebase:
- All sponsor links use
utm_source=nextui
as the base parameter - Additional context parameters (
utm_marketing
,utm_medium
) are appropriately used to differentiate traffic sources - No inconsistencies or missing tracking parameters were found
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for consistent UTM parameter usage in sponsor links
# Expected: All sponsor links should have utm_source=nextui
rg -g '*.{tsx,ts,js,jsx}' 'utm_source=' -A 2 -B 2
Length of output: 1849
packages/components/dropdown/src/use-dropdown.ts (2)
80-80
: LGTM! Good type safety improvement.
Adding explicit return type annotation improves type safety and documentation.
217-229
: Previous review comment about removing any
types is still applicable.
The interface still contains any
types that should be replaced with proper type definitions as suggested in the previous review.
3c64a28
to
9bc5f4f
Compare
* chore(docs): remove Scrumbuiss * chore(docs): remove Scrumbuiss logo
📝 Description
Added a Form component and upgraded the entire react-aria version to resolve typecheck errors from version mismatches.
The details of the react-aria update are provided in the inline comments of the following PR.
#3732
⛳️ Current behavior (updates)
Currently, there is no
Form
component available, and the version ofreact-aria
does not support the latest features related to form handling.🚀 New behavior
The new
Form
component has been added, allowing users to utilize features such as validation behavior switching and error handling throughserverErrors
. Additionally, thereact-aria
version has been updated to incorporate the latest form-related improvements.form-demo.mov
💣 Is this a breaking change (Yes/No):
No.
📝 Additional Information
A guideline on how to use the new
Form
component will be added in a separate PR.It will be based on the following reference.
React Aria Forms Guide
Test
Please verify the following in each story.
Form
component allows toggling ofvalidationBehavior
.name
field when provided viaserverErrors
.Summary by CodeRabbit
New Features
DatePicker
,Autocomplete
, andDropdown
.Bug Fixes
Dropdown
andAutocomplete
components.Documentation
DatePicker
andDateRangePicker
to demonstrate new server-side validation features.Chores