Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: fix peer dep ranges #1103

Merged
merged 3 commits into from
Dec 30, 2024
Merged

chore: fix peer dep ranges #1103

merged 3 commits into from
Dec 30, 2024

Conversation

juliusmarminge
Copy link
Collaborator

@juliusmarminge juliusmarminge commented Dec 30, 2024

Summary by CodeRabbit

  • Dependency Updates

    • Updated bunchee package version to ^6.1.2 across multiple packages
    • Expanded React version compatibility to include React 19
    • Relaxed peer dependency constraints for Expo-related packages
    • Updated Tailwind CSS peer dependency range
  • Compatibility Improvements

    • Added support for React 19
    • Broadened version acceptance for Expo libraries and React Native
    • Removed peer dependencies for fastify and next in the uploadthing package
    • Introduced patches for various packages related to the UploadThing library

Copy link

changeset-bot bot commented Dec 30, 2024

🦋 Changeset detected

Latest commit: e8b112e

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

This PR includes changesets to release 9 packages
Name Type
@uploadthing/expo Patch
@uploadthing/mime-types Patch
@uploadthing/react Patch
@uploadthing/shared Patch
uploadthing Patch
@uploadthing/vue Patch
@uploadthing/solid Patch
@uploadthing/svelte Patch
@uploadthing/nuxt Patch

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

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

Copy link

vercel bot commented Dec 30, 2024

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

Name Status Preview Comments Updated (UTC)
docs-uploadthing ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 30, 2024 11:12am
1 Skipped Deployment
Name Status Preview Comments Updated (UTC)
legacy-docs-uploadthing ⬜️ Ignored (Inspect) Visit Preview Dec 30, 2024 11:12am

Copy link
Contributor

coderabbitai bot commented Dec 30, 2024

Walkthrough

This pull request involves updating the package.json files across multiple packages in the UploadThing project. Key changes include upgrading the bunchee dependency to version ^6.1.2 across all packages, expanding React version compatibility to include version 19, and adjusting peer dependencies to allow for more flexible version acceptance. These modifications aim to enhance compatibility and simplify dependency management across the UploadThing ecosystem.

Changes

Package Changes
@uploadthing/expo - Updated bunchee to ^6.1.2
- Expanded React peer dependency to `^17.0.2
@uploadthing/mime-types - Updated bunchee to ^6.1.2
@uploadthing/react - Updated bunchee to ^6.1.2
- Expanded React peer dependency to `^17.0.2
@uploadthing/shared - Updated bunchee to ^6.1.2
uploadthing - Updated bunchee to ^6.1.2
- Removed fastify and next peer dependencies
- Updated tailwindcss peer dependency to `^3.0.0
@uploadthing/vue - Updated bunchee to ^6.1.2

Possibly related PRs

Suggested Labels

sdk, 📚 documentation

Suggested Reviewers

  • markflorkowski
  • t3dotgg

📜 Recent review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 8233770 and e8b112e.

📒 Files selected for processing (1)
  • .changeset/brave-fireants-join.md (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .changeset/brave-fireants-join.md

🪧 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.

Copy link

pkg-pr-new bot commented Dec 30, 2024

Open in Stackblitz

More templates

@uploadthing/expo

npm i https://pkg.pr.new/pingdotgg/uploadthing/@uploadthing/expo@1103

@uploadthing/mime-types

npm i https://pkg.pr.new/pingdotgg/uploadthing/@uploadthing/mime-types@1103

@uploadthing/nuxt

npm i https://pkg.pr.new/pingdotgg/uploadthing/@uploadthing/nuxt@1103

@uploadthing/react

npm i https://pkg.pr.new/pingdotgg/uploadthing/@uploadthing/react@1103

@uploadthing/shared

npm i https://pkg.pr.new/pingdotgg/uploadthing/@uploadthing/shared@1103

uploadthing

npm i https://pkg.pr.new/pingdotgg/uploadthing@1103

@uploadthing/vue

npm i https://pkg.pr.new/pingdotgg/uploadthing/@uploadthing/vue@1103

commit: e8b112e

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 2248af0 and 0c9af34.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (6)
  • packages/expo/package.json (2 hunks)
  • packages/mime-types/package.json (1 hunks)
  • packages/react/package.json (2 hunks)
  • packages/shared/package.json (1 hunks)
  • packages/uploadthing/package.json (2 hunks)
  • packages/vue/package.json (1 hunks)
🔇 Additional comments (10)
packages/shared/package.json (1)

46-46: LGTM: Consistent bunchee version update

The update of bunchee to ^6.1.2 aligns with the changes across other packages.

packages/expo/package.json (2)

43-43: LGTM: Consistent bunchee version update

The update of bunchee to ^6.1.2 aligns with the changes across other packages.


58-58: LGTM: Added React 19 support

Adding React 19 support while maintaining compatibility with v17 and v18 is appropriate.

packages/vue/package.json (1)

50-50: LGTM: Consistent bunchee version update

The update of bunchee to ^6.1.2 aligns with the changes across other packages.

packages/mime-types/package.json (1)

92-92: LGTM! Verify build output after bunchee upgrade

The build tool upgrade looks good. Since this is a build dependency change, please ensure the package still builds correctly with the new version.

packages/react/package.json (2)

70-70: LGTM! Good proactive support for React 19

Adding React 19 to the peer dependency range while maintaining compatibility with React 17 and 18 is a good forward-looking change. This ensures the package will work with future React versions while maintaining backward compatibility.


85-85: LGTM! Consistent build tool upgrade

The bunchee upgrade is consistent with changes across other packages in the monorepo.

packages/uploadthing/package.json (3)

189-189: LGTM! Good proactive support for Tailwind CSS v4

Adding support for Tailwind CSS v4 beta while maintaining v3 compatibility is a good forward-looking change. The version range ^3.0.0 || ^4.0.0-beta.0 ensures compatibility with both stable and upcoming versions.


169-169: LGTM! Consistent build tool upgrade

The bunchee upgrade is consistent with changes across other packages in the monorepo.


187-191: Verify the impact of removed peer dependencies

The removal of fastify and next from peerDependencies while keeping them in peerDependenciesMeta looks good, as they remain optional. However, please verify this doesn't affect package managers' behavior.

✅ Verification successful

Let me analyze the references to verify if removing these peer dependencies could cause issues.


Based on the analysis of the code and dependencies, I can now provide a final response:

Removal of next and fastify from peerDependencies is safe

The removal of these dependencies from peerDependencies while keeping them in peerDependenciesMeta as optional is correct and safe because:

  1. The package provides modular exports for different frameworks (/next, /next-legacy, /fastify, etc.)
  2. The framework-specific code is properly isolated in separate modules (e.g., src/next-legacy.ts, src/fastify.ts)
  3. The imports of these frameworks are only present in their respective adapter files
  4. The package.json correctly marks these dependencies as optional in peerDependenciesMeta
  5. The test suite validates that each adapter works independently

This change aligns with best practices by:

  • Allowing users to install only the dependencies they need
  • Preventing unnecessary peer dependency warnings for unused adapters
  • Maintaining proper dependency isolation through the modular architecture
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check for any hardcoded references to removed peer dependencies
# that might need updating after this change

# Search for imports/requires of removed peer deps
rg -l "(?:import|require).*['\"](?:fastify|next)['\"]"

# Search for string references to removed peer deps
rg -l "(?:fastify|next)(?:\.|\s|'|\"|$)"

Length of output: 6289


Script:

#!/bin/bash
# Check the actual content of the files that import/require these dependencies
# to understand their usage patterns

# Check uploadthing package's main implementation files
cat packages/uploadthing/src/next-legacy.ts
cat packages/uploadthing/src/fastify.ts
cat packages/uploadthing/test/adapters.test.ts

# Check package.json to understand the full dependency context
cat packages/uploadthing/package.json

Length of output: 36255

packages/expo/package.json Show resolved Hide resolved
Copy link
Contributor

github-actions bot commented Dec 30, 2024

📦 Bundle size comparison

Bundle Size (gzip) Visualization
Main 29.30KB See Treemap 📊
PR (0f1a774) 29.30KB See Treemap 📊
Diff No change

@juliusmarminge juliusmarminge added the release canary Trigger a canary release to npm label Dec 30, 2024
Copy link
Contributor

A new canary is available for testing. You can install this latest build in your project with:

pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add @uploadthing/[email protected]
pnpm add [email protected]
pnpm add @uploadthing/[email protected]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant