Skip to content

Conversation

@saseungmin
Copy link
Member

@saseungmin saseungmin commented Jun 24, 2025

Summary by CodeRabbit

  • Chores
    • Migrated the project from Bun to pnpm for dependency management and scripts.
    • Updated all workflows and automation to use pnpm instead of Bun.
    • Added pnpm workspace configuration and updated Node.js version specification.
    • Improved dependency caching and installation performance in CI.
    • Updated .gitignore to exclude coverage reports.
  • Refactor
    • Simplified and standardized configuration files and scripts for improved maintainability.
    • Removed custom path aliases and plugins from example project configuration.
  • Style
    • Reformatted arrays in package configuration files for consistency.

@changeset-bot
Copy link

changeset-bot bot commented Jun 24, 2025

⚠️ No Changeset found

Latest commit: 95253bf

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

This PR includes no changesets

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

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

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

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Jun 24, 2025

Deploying react-native-youtube-bridge-example with  Cloudflare Pages  Cloudflare Pages

Latest commit: 95253bf
Status: ✅  Deploy successful!
Preview URL: https://090ce168.react-native-youtube-bridge-example.pages.dev
Branch Preview URL: https://fix-migrate-pnpm.react-native-youtube-bridge-example.pages.dev

View logs

@coderabbitai
Copy link

coderabbitai bot commented Jun 24, 2025

Warning

Rate limit exceeded

@saseungmin has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 1 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between 6215e52 and 95253bf.

📒 Files selected for processing (1)
  • .github/workflows/ci.yml (4 hunks)

Walkthrough

This update migrates the project's tooling and workflows from the Bun package manager to pnpm. All continuous integration, release, and local scripts now use pnpm commands. Supporting configuration files were added or updated, and custom module resolution or path aliases in the example app were removed. Node version constraints and caching strategies were also adjusted.

Changes

File(s) Change Summary
.github/actions/setup/action.yml Switched setup from Bun to pnpm, updated caching, install, and environment steps accordingly.
.github/workflows/ci.yml, release.yml Replaced all Bun commands with pnpm equivalents in CI and release workflows; adjusted steps as needed.
.gitignore Added coverage/ directory to ignore list.
.nvmrc Changed Node version from "v22.16.0" to "22".
lefthook.yml Updated pre-commit hooks to use pnpm and fixed file extension globbing.
package.json Replaced Bun scripts with pnpm, removed workspace scripts, updated packageManager field, removed workspaces.
pnpm-workspace.yaml Added new pnpm workspace configuration, specifying packages and dependency versions to build.
example/babel.config.js, example/tsconfig.json Removed custom module resolution and path aliasing; configs now reference only base settings.
example/package.json Renamed package, updated scripts, added dependency, removed unused devDependency.
packages/*/package.json Reformatted "files" or Jest config arrays to single-line format (no functional change).

Sequence Diagram(s)

sequenceDiagram
    participant GitHub Actions
    participant Node.js Setup
    participant pnpm Setup
    participant pnpm Cache
    participant Project

    GitHub Actions->>Node.js Setup: Setup Node.js (from .nvmrc)
    Node.js Setup->>pnpm Setup: Setup pnpm (v10.11.0)
    pnpm Setup->>pnpm Cache: Restore pnpm cache (using pnpm-lock.yaml)
    pnpm Cache-->>pnpm Setup: Cache hit/miss
    pnpm Setup->>Project: Install dependencies (pnpm install)
    Project->>GitHub Actions: Run build/lint/test scripts (pnpm run ...)
Loading

Possibly related PRs

Poem

A hop and a skip, we say goodbye to Bun,
With pnpm in paw, our journey’s begun.
Scripts now run faster, the cache is so neat,
Workspaces aligned, our tooling complete.
The rabbit is cheerful, the codebase is bright—
Onward with pnpm, everything’s right!
🐇✨


🪧 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.
    • Explain this complex logic.
    • 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 explain this code block.
    • @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 explain its main purpose.
    • @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.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

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

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

@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: 4

🧹 Nitpick comments (7)
packages/react/package.json (1)

15-15: package.json is redundant in the files array – consider trimming for cleanliness

package.json is always shipped by npm even when the files whitelist is present, so listing it explicitly is unnecessary noise. Dropping it keeps the manifest minimal and avoids future drift if the array is copy-pasted elsewhere.

-  "files": ["dist", "package.json"],
+  "files": ["dist"],
packages/core/package.json (1)

15-15: Same redundancy in files array

As in packages/react, package.json can be removed.

-  "files": ["dist", "package.json"],
+  "files": ["dist"],
example/package.json (1)

10-11: Minor: make the build output explicit for easier artifact handling

expo export defaults to web-build. Declaring the directory up-front avoids surprises and makes it simpler to upload artefacts in CI.

-"web:build": "expo export --platform web --clear"
+"web:build": "expo export --platform web --output-dir dist-web --clear"
package.json (2)

8-8: Quote the glob in the clear script

Unquoted **/dist may be expanded by the shell before it reaches rimraf, especially on zsh/fish.

-"clear": "rimraf --glob **/dist",
+"clear": "rimraf --glob \"**/dist\"",

9-10: Reduce duplication with pnpm’s recursive mode

Hard-coding every package makes maintenance noisy. A single recursive run is shorter and automatically picks up new workspaces.

-"typecheck": "pnpm --filter @react-native-youtube-bridge/core typecheck && pnpm --filter @react-native-youtube-bridge/react typecheck && pnpm --filter @react-native-youtube-bridge/web typecheck && pnpm --filter react-native-youtube-bridge typecheck",
-"build": "pnpm --filter @react-native-youtube-bridge/core build && pnpm --filter @react-native-youtube-bridge/react build && pnpm --filter @react-native-youtube-bridge/web build && pnpm --filter react-native-youtube-bridge build",
+"typecheck": "pnpm -r run typecheck",
+"build": "pnpm -r run build",
.github/workflows/ci.yml (1)

28-30: Duplicate build—costly on CI time

Core and React packages are built again in the build-library job. Unless linting depends on the compiled artefacts, consider removing these two lines or running a single recursive build to save minutes.

.github/actions/setup/action.yml (1)

25-29: Guard against whitespace when exporting the store path

For robustness, capture the store path in JSON mode and strip quotes:

-echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
+echo "STORE_PATH=$(pnpm store path --silent --json | jq -r '.')" >> $GITHUB_ENV
📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between 44828ca and 0674ed4.

⛔ Files ignored due to path filters (3)
  • bun.lock is excluded by !**/*.lock
  • example/bun.lock is excluded by !**/*.lock
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • .github/actions/setup/action.yml (2 hunks)
  • .github/workflows/ci.yml (4 hunks)
  • .github/workflows/release.yml (1 hunks)
  • .gitignore (1 hunks)
  • .nvmrc (1 hunks)
  • example/babel.config.js (0 hunks)
  • example/package.json (2 hunks)
  • example/tsconfig.json (1 hunks)
  • lefthook.yml (1 hunks)
  • package.json (2 hunks)
  • packages/core/package.json (1 hunks)
  • packages/react-native-youtube-bridge/package.json (1 hunks)
  • packages/react/package.json (1 hunks)
  • packages/web/package.json (1 hunks)
  • pnpm-workspace.yaml (1 hunks)
💤 Files with no reviewable changes (1)
  • example/babel.config.js
🧰 Additional context used
🪛 GitHub Actions: CI
packages/react-native-youtube-bridge/package.json

[warning] 1-1: Invalid package.json configuration: 'exports' resolution points to a non-existent file '/lib/module/index.js'. Consider fixing the package configuration.

package.json

[warning] 1-1: Invalid package.json configuration: 'exports' resolution points to a non-existent file '/lib/module/index.js'. Consider fixing the package configuration.

🔇 Additional comments (9)
.gitignore (1)

86-88: 👍 Good call adding the coverage directory to .gitignore

Prevents large LCOV/HTML artefacts from creeping into the repo.
No further action required.

.nvmrc (1)

1-1: Broadening to the whole 22.x line—verify CI & toolchain compatibility

Moving from an exact patch (v22.16.0) to just 22 gives flexibility but may introduce subtle breakages when Node 22 receives non-LTS updates. Make sure:

  1. CI runners install 22 (not an older cache).
  2. All dependencies (e.g. react-native, pnpm@10) are already tested on 22.x.
  3. Contributors are aware a non-LTS version is in use.

If stability is a concern, pin to the latest audited patch instead.

packages/react-native-youtube-bridge/package.json (1)

83-83: ```shell
#!/bin/bash
set -e

echo "🔍 Directories in packages/react-native-youtube-bridge:"
find packages/react-native-youtube-bridge -maxdepth 2 -type d || echo "❌ no directories found"

echo ""
echo "🔍 Listing files under packages/react-native-youtube-bridge/lib (if any):"
find packages/react-native-youtube-bridge/lib -type f || echo "❌ lib directory not present"

echo ""
echo "🔍 'exports' field in package.json:"
grep -R -n '"exports"' -n packages/react-native-youtube-bridge/package.json || echo "❌ exports not found"

echo ""
echo "🔍 Snippet around 'exports' (lines 60–120):"
sed -n '60,120p' packages/react-native-youtube-bridge/package.json


</details>
<details>
<summary>packages/web/package.json (1)</summary>

`11-11`: **Minor style change looks good**

Array rewritten to single-line – no functional impact.

</details>
<details>
<summary>lefthook.yml (1)</summary>

`6-9`: **Hook commands correctly migrated to pnpm**

Commands now call `pnpm run lint` / `typecheck`; glob typo fixed.  
Confirm that the scripts exist in the root `package.json`, otherwise the hooks will fail.

</details>
<details>
<summary>example/tsconfig.json (1)</summary>

`2-2`: I’ll try running the workspace’s TypeScript compiler against the example config:


```shell
#!/bin/bash
pnpm exec tsc --noEmit -p example/tsconfig.json
.github/workflows/release.yml (1)

30-33: Confirm custom commands passed to changesets/action

version: "pnpm changeset version" and publish: "pnpm changeset publish" override defaults.
Double-check that these pnpm scripts exist (changeset version, changeset publish) or the action will exit with non-zero status.

If you intend to call the binary directly, you can drop the quotes:

version: pnpm changeset version
publish: pnpm changeset publish
example/package.json (1)

21-22: Verify that the workspace protocol actually resolves

"react-native-youtube-bridge": "workspace:*" will only install if

  1. pnpm-workspace.yaml contains the example package and
  2. the react-native-youtube-bridge package’s version satisfies the * selector.

Otherwise pnpm aborts with “No matching version found”. Double-check before merging.

.github/workflows/ci.yml (1)

68-68: Forward the argument after fixing the root script

Once the root example script is corrected to pnpm --filter example run, update the call here to pass the sub-script via --.

-run: pnpm run example web:build
+run: pnpm run example -- web:build

@cloudflare-workers-and-pages
Copy link

Deploying react-native-youtube-bridge with  Cloudflare Pages  Cloudflare Pages

Latest commit: d0c74a0
Status: ✅  Deploy successful!
Preview URL: https://3eac5b3f.react-native-youtube-bridge.pages.dev
Branch Preview URL: https://fix-migrate-pnpm.react-native-youtube-bridge.pages.dev

View logs

@saseungmin saseungmin merged commit f879f96 into main Jun 24, 2025
5 checks passed
@saseungmin saseungmin deleted the fix/migrate-pnpm branch June 24, 2025 04:31
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