Skip to content

Conversation

@jaruesink
Copy link
Contributor

@jaruesink jaruesink commented Dec 20, 2024

  • Removed @chromatic-com/storybook from package.json and Storybook configuration as it is no longer needed.
  • Updated React version from ^18.2.0 to ^19.0.0 in multiple package.json files to ensure compatibility with the latest features.
  • Cleaned up yarn.lock by removing outdated dependencies related to @chromatic-com/storybook and other obsolete packages.

Summary by CodeRabbit

  • New Features

    • Updated the react dependency to version 19.0.0 for improved performance and features.
    • Added a property to indicate the package is private, preventing public publication.
  • Bug Fixes

    • Removed deprecated addons from Storybook configuration and package dependencies to streamline functionality.
  • Chores

    • Updated version numbers in multiple package.json files for better version management.

- Removed `@chromatic-com/storybook` from `package.json` and Storybook configuration as it is no longer needed.
- Updated React version from `^18.2.0` to `^19.0.0` in multiple package.json files to ensure compatibility with the latest features.
- Cleaned up `yarn.lock` by removing outdated dependencies related to `@chromatic-com/storybook` and other obsolete packages.
@bolt-new-by-stackblitz
Copy link

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

@coderabbitai
Copy link

coderabbitai bot commented Dec 20, 2024

Walkthrough

This pull request involves configuration and dependency updates across multiple project files. The primary changes include removing Chromatic and Remix React Router Storybook addons, updating React to version 19.0.0, and marking the root package as private. These modifications suggest a streamlining of project dependencies and configuration, potentially preparing for a new version or refactoring the project's tooling setup.

Changes

File Changes
apps/docs/.storybook/main.ts Removed @chromatic-com/storybook addon from Storybook configuration
apps/docs/package.json - Removed @chromatic-com/storybook dependency
- Updated React to ^19.0.0
- Removed storybook-addon-remix-react-router
package.json Added "private": true property
packages/components/package.json - Bumped version from 0.11.1 to 0.11.2
- Updated React to ^19.0.0

Poem

🐰 Hop, hop, config update time!
Addons removed, versions climb
React nineteen takes the stage
Private package turns a new page
Refactoring with bunny glee! 🚀


🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

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

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

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

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

CodeRabbit Configuration File (.coderabbit.yaml)

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

Documentation and Community

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

- Added "private": true to package.json to prevent accidental publishing to npm of the parent
- Introduced a new package-lock.json file to manage dependencies more effectively.
- Updated the version of @lambdacurry/forms to 0.11.2 in package.json.
- Cleaned up yarn.lock by removing outdated dependencies and ensuring compatibility with the latest versions.
- Enhanced the overall dependency structure for better performance and stability.
- Regenerated yarn.lock to reflect the latest dependency versions and ensure compatibility.
- Updated multiple package versions, including Babel and various plugins, to their latest releases for improved performance and stability.
- Cleaned up the lockfile by removing outdated entries and ensuring a more streamlined dependency structure.
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 2

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b288c10 and 7c62889.

⛔ Files ignored due to path filters (2)
  • package-lock.json is excluded by !**/package-lock.json
  • yarn.lock is excluded by !**/yarn.lock, !**/*.lock
📒 Files selected for processing (4)
  • apps/docs/.storybook/main.ts (0 hunks)
  • apps/docs/package.json (1 hunks)
  • package.json (1 hunks)
  • packages/components/package.json (2 hunks)
💤 Files with no reviewable changes (1)
  • apps/docs/.storybook/main.ts
✅ Files skipped from review due to trivial changes (1)
  • package.json
🔇 Additional comments (2)
apps/docs/package.json (1)

Line range hint 1-38: Verify impact of removed Storybook addons

The removal of @chromatic-com/storybook and storybook-addon-remix-react-router needs verification.

✅ Verification successful

Let me check the content of these story files to see if they use any features from the removed addons.


Let me check the content of the Storybook config files to see how these addons were configured and if there are any remaining references.


Removal of Storybook addons is safe

The removed addons (@chromatic-com/storybook and storybook-addon-remix-react-router) are not referenced in:

  • Storybook configuration files (main.ts and preview.ts)
  • Story files under apps/docs/src/remix/
  • Current addon list in package.json matches the configuration in main.ts
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check for any remaining references to removed addons
echo "Checking for remaining references to removed Storybook addons..."
rg -l "@chromatic-com/storybook|storybook-addon-remix-react-router" .storybook/

# Check for potentially affected story files
echo "Checking for potentially affected stories..."
fd -e stories.tsx -e stories.ts -e stories.jsx -e stories.js

Length of output: 881


Script:

#!/bin/bash
# Check story files for any usage of the removed addons
echo "Checking story files for addon usage..."
rg -l "chromatic|remix-react-router" apps/docs/src/remix/

# Check main.js or preview.js in the Storybook config directory
echo "Checking Storybook config files..."
fd -e js -e ts -p "main|preview" apps/docs/.storybook/

Length of output: 345


Script:

#!/bin/bash
# Check content of Storybook config files
echo "Content of main.ts:"
cat apps/docs/.storybook/main.ts

echo -e "\nContent of preview.ts:"
cat apps/docs/.storybook/preview.ts

Length of output: 1454

packages/components/package.json (1)

63-63: Verify React 19 compatibility with UI component dependencies

The update to React 19 requires verification of compatibility with all UI component dependencies (Radix UI, react-hook-form, etc.).

✅ Verification successful

Let me try a different approach to check the dependencies and their React version requirements.


Let me check the specific React peer dependency requirements for the key UI components we found.


React 19 compatibility confirmed with UI dependencies

All key UI component dependencies explicitly support React 19:

  • @radix-ui components: support "^19.0 || ^19.0.0-rc"
  • react-hook-form: supports "^19"
  • react-day-picker: supports ">=16.8.0" (compatible)
  • sonner: supports "^19.0.0 || ^19.0.0-rc"
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Check package.json files for React version requirements in dependencies
echo "Checking React peer dependency requirements..."
for pkg in $(jq -r '.dependencies | keys[]' package.json); do
  if curl -s "https://registry.npmjs.org/$pkg/latest" | jq -e '.peerDependencies.react' >/dev/null; then
    echo "Package $pkg React requirement:"
    curl -s "https://registry.npmjs.org/$pkg/latest" | jq '.peerDependencies.react'
  fi
done

Length of output: 301


Script:

#!/bin/bash
# First, let's see what UI-related dependencies we have
cat packages/components/package.json | jq '.dependencies'

# Then check package-lock.json for more detailed version info
if [ -f "packages/components/package-lock.json" ]; then
    echo -e "\nChecking package-lock.json:"
    cat packages/components/package-lock.json | jq '.packages | .[] | select(.peerDependencies.react != null) | {name: .name, reactPeerDep: .peerDependencies.react}'
fi

# Also check yarn.lock if it exists
if [ -f "packages/components/yarn.lock" ]; then
    echo -e "\nFound yarn.lock"
    cat packages/components/yarn.lock
fi

Length of output: 1192


Script:

#!/bin/bash
# Check React peer dependencies for Radix UI and other key UI packages
echo "Checking @radix-ui/react-dialog..."
curl -s "https://registry.npmjs.org/@radix-ui/react-dialog/latest" | jq '.peerDependencies'

echo -e "\nChecking react-hook-form..."
curl -s "https://registry.npmjs.org/react-hook-form/latest" | jq '.peerDependencies'

echo -e "\nChecking react-day-picker..."
curl -s "https://registry.npmjs.org/react-day-picker/latest" | jq '.peerDependencies'

echo -e "\nChecking @hookform/resolvers..."
curl -s "https://registry.npmjs.org/@hookform/resolvers/latest" | jq '.peerDependencies'

echo -e "\nChecking sonner..."
curl -s "https://registry.npmjs.org/sonner/latest" | jq '.peerDependencies'

Length of output: 1158

"postcss": "^8.4.38",
"react": "^18.2.0",
"storybook-addon-remix-react-router": "^3.0.0",
"react": "^19.0.0",
Copy link

@coderabbitai coderabbitai bot Dec 20, 2024

Choose a reason for hiding this comment

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

⚠️ Potential issue

⚠️ Caution: React 19 is not officially released

The update to React ^19.0.0 is premature as React 19 is not yet officially released. This could lead to stability issues.

Recommendation: Keep React at version 18.2.0 until React 19 is officially released and its compatibility with your dependencies (especially Storybook) is confirmed.

-    "react": "^19.0.0",
+    "react": "^18.2.0",
📝 Committable suggestion

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

Suggested change
"react": "^19.0.0",
"react": "^18.2.0",

Copy link
Contributor Author

Choose a reason for hiding this comment

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

it is now!

Copy link

Choose a reason for hiding this comment

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

@jaruesink Thanks for clarifying! If React 19 is officially out and meets your project's needs, there's no issue with keeping it in this PR. Let me know if there's anything else I can help with!

{
"name": "@lambdacurry/forms",
"version": "0.11.1",
"version": "0.11.2",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Consider a major version bump for React 19 update

The update to React 19 is a major change that could affect compatibility. Following semver, this should warrant a major version bump rather than a patch version bump.

Recommendation: Update the version to 0.12.0 or 1.0.0 to reflect the significant change.

-  "version": "0.11.2",
+  "version": "1.0.0",
📝 Committable suggestion

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

Suggested change
"version": "0.11.2",
"version": "1.0.0",

@jaruesink jaruesink merged commit 58a8f74 into main Dec 20, 2024
2 checks passed
@jaruesink jaruesink deleted the react-19 branch December 20, 2024 04:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants