Skip to content

fix(examples/react/start): make react-start example compatible with n…#329

Open
Dhavanesh24cs412 wants to merge 3 commits intoTanStack:mainfrom
Dhavanesh24cs412:patch-1
Open

fix(examples/react/start): make react-start example compatible with n…#329
Dhavanesh24cs412 wants to merge 3 commits intoTanStack:mainfrom
Dhavanesh24cs412:patch-1

Conversation

@Dhavanesh24cs412
Copy link
Copy Markdown

@Dhavanesh24cs412 Dhavanesh24cs412 commented Jan 27, 2026

…pm-based sandboxes

Replace the 'workspace:*' dependency reference with a fixed version (^0.4.0) for @tanstack/devtools-event-client in the react/start example.

The workspace:* reference was incompatible with npm-based sandboxes like StackBlitz and CodeSandbox, causing pnpm install failures with 'ERR_PNPM_OUTDATED_LOCKFILE' error.

This change allows the example to be used in cloud-based development environments while maintaining version compatibility.

🎯 Changes

✅ Checklist

  • I have followed the steps in the Contributing guide.
  • I have tested this code locally with pnpm test:pr.

🚀 Release Impact

  • This change affects published code, and I have generated a changeset.
  • This change is docs/CI/dev-only (no release).

Summary by CodeRabbit

  • Bug Fixes
    • Enhanced the React Start example to work reliably in npm-based sandbox environments. Updated dependency configuration for improved compatibility, ensuring the example functions consistently across different sandbox platforms and development setups. Users can now use the React Start example in their preferred sandbox environment without additional setup requirements.

…pm-based sandboxes

Replace the 'workspace:*' dependency reference with a fixed version (^0.4.0) for @tanstack/devtools-event-client in the react/start example.

The workspace:* reference was incompatible with npm-based sandboxes like StackBlitz and CodeSandbox, causing pnpm install failures with 'ERR_PNPM_OUTDATED_LOCKFILE' error.

This change allows the example to be used in cloud-based development environments while maintaining version compatibility.
@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Jan 27, 2026

🦋 Changeset detected

Latest commit: d35a68f

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

This PR includes changesets to release 0 packages

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

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

Replace 'workspace:*' dependency with fixed version for compatibility with npm-based sandboxes. This change resolves installation issues in cloud-based environments.
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 7, 2026

📝 Walkthrough

Walkthrough

The react/start example is updated for npm-based sandbox compatibility by replacing a workspace-linked dependency (workspace:*) with an explicit published version (^0.4.0) for @tanstack/devtools-event-client. A Changeset file documents this patch release.

Changes

Cohort / File(s) Summary
Release Documentation
.changeset/npm-sandbox-compat.md
New Changeset file declaring a patch release with notes about npm-sandbox compatibility improvements.
Dependency Update
examples/react/start/package.json
Updated @tanstack/devtools-event-client from workspace:* to ^0.4.0 to enable npm-based sandbox compatibility.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Poem

🐰 In sandboxes we hop and play,
With dependencies fixed today,
No more workspace chains in sight,
Just npm versions, pure and right! 🏜️✨

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description is incomplete. The template sections (🎯 Changes, ✅ Checklist, 🚀 Release Impact) are mostly empty, with only the first paragraph filled out and checklist items unchecked. Complete all required template sections: expand the 🎯 Changes section with detailed motivations, and explicitly check the 🚀 Release Impact checkbox since a changeset was created.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically summarizes the main change: updating the react-start example for npm-based sandbox compatibility.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@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

🧹 Nitpick comments (1)
.changeset/npm-sandbox-compat.md (1)

7-7: Minor: Capitalize "React" as a proper noun.

The word "react" in "react/start example" should be capitalized to "React/start example" since React is a proper noun (library name).

📝 Suggested capitalization fix
-Replace the 'workspace:*' dependency reference with a fixed version (^0.4.0) for `@tanstack/devtools-event-client` in the react/start example.
+Replace the 'workspace:*' dependency reference with a fixed version (^0.4.0) for `@tanstack/devtools-event-client` in the React/start example.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/npm-sandbox-compat.md at line 7, Update the phrase "react/start
example" to "React/start example" in the changeset entry that mentions replacing
the 'workspace:*' dependency for `@tanstack/devtools-event-client` so the proper
noun React is capitalized; locate the sentence containing "react/start example"
and change it to "React/start example".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In @.changeset/npm-sandbox-compat.md:
- Around line 1-11: The changeset targets a private example package ("start")
and should be removed; delete the .changeset/npm-sandbox-compat.md file and any
references to this changeset so the release workflow doesn't try to version the
private examples, and ensure the examples/react/start/package.json (the "start"
package marked "private": true) remains unchanged (do not publish or include a
changeset for `@tanstack/devtools-event-client` or any workspace:* replacement in
that private example).

In `@examples/react/start/package.json`:
- Line 13: Update the dependency entry for "@tanstack/devtools-event-client" in
the examples/react/time-travel/package.json to use the published semver "^0.4.0"
instead of "workspace:^" so it matches the fix applied in examples/react/start
and prevents sandbox resolution failures; locate the dependency key
"@tanstack/devtools-event-client" and replace its version string accordingly.

---

Nitpick comments:
In @.changeset/npm-sandbox-compat.md:
- Line 7: Update the phrase "react/start example" to "React/start example" in
the changeset entry that mentions replacing the 'workspace:*' dependency for
`@tanstack/devtools-event-client` so the proper noun React is capitalized; locate
the sentence containing "react/start example" and change it to "React/start
example".
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: d6b4efce-ba20-4204-9eb1-9245ec377c40

📥 Commits

Reviewing files that changed from the base of the PR and between f1844a2 and 84241a3.

📒 Files selected for processing (2)
  • .changeset/npm-sandbox-compat.md
  • examples/react/start/package.json

Comment on lines +1 to +11
---
"start": patch
---

Make react-start example compatible with npm-based sandboxes

Replace the 'workspace:*' dependency reference with a fixed version (^0.4.0) for @tanstack/devtools-event-client in the react/start example.

The workspace:* reference was incompatible with npm-based sandboxes like StackBlitz and CodeSandbox, causing pnpm install failures with 'ERR_PNPM_OUTDATED_LOCKFILE' error.

This change allows the example to be used in cloud-based development environments while maintaining version compatibility.
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Check if other example packages have changesets and verify publishing configuration

echo "=== Checking if examples directory is excluded from changesets config ==="
if [ -f .changeset/config.json ]; then
  cat .changeset/config.json | jq '.ignore // []'
fi

echo -e "\n=== Finding other changesets that target example packages ==="
rg -l '"@tanstack/devtools-example-|"start"|"time-travel"' .changeset/ -g '*.md' -g '!README.md'

echo -e "\n=== Checking package.json publish configuration for examples ==="
fd package.json examples/ -x jq -r '"\(.name): private=\(.private)"' {} \;

Repository: TanStack/devtools

Length of output: 1174


🏁 Script executed:

#!/bin/bash
# Search for changeset-related documentation or guidance

echo "=== Searching for changeset or release guidance in docs/contributing ==="
find . -maxdepth 3 -type f \( -name "CONTRIBUTING*" -o -name "CHANGELOG*" -o -name "README*" \) | head -10

echo -e "\n=== Checking for any comments about changesets in config or root ==="
rg -i "changeset|private.*example|example.*private" .changeset/config.json README.md CONTRIBUTING.md 2>/dev/null || true

echo -e "\n=== Checking git history of the changeset directory ==="
git log --oneline .changeset/config.json 2>/dev/null | head -5

Repository: TanStack/devtools

Length of output: 797


🏁 Script executed:

#!/bin/bash
# Check CONTRIBUTING.md and README.md for changeset guidance

echo "=== Checking CONTRIBUTING.md for changeset guidance ==="
rg -C 5 -i "changeset|version|release" CONTRIBUTING.md | head -50

echo -e "\n=== Checking if there are any examples in .changeset/ directory ==="
ls -la .changeset/ | grep -E "\.md$"

echo -e "\n=== Checking .changeset/config.json for ignore patterns ==="
cat .changeset/config.json

Repository: TanStack/devtools

Length of output: 654


🏁 Script executed:

#!/bin/bash
# Verify this is truly the only changeset for a private package by listing all changesets

echo "=== All changesets in the repository ==="
find .changeset -name "*.md" ! -name "README.md" -exec basename {} \;

echo -e "\n=== Content of npm-sandbox-compat.md to confirm it targets 'start' ==="
head -5 .changeset/npm-sandbox-compat.md

Repository: TanStack/devtools

Length of output: 280


Remove this changeset—it targets a private package that will not be published.

The "start" package is marked "private": true in examples/react/start/package.json. Changesets are for managing versions of publishable npm packages. Private example packages do not require changesets, as they are never published and don't need version tracking through the release process. Keeping this changeset could cause confusion and incorrect behavior in the release workflow.

🧰 Tools
🪛 LanguageTool

[uncategorized] ~7-~7: “React” is a proper noun and needs to be capitalized.
Context: ... @tanstack/devtools-event-client in the react/start example. The workspace:* referen...

(A_GOOGLE)

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In @.changeset/npm-sandbox-compat.md around lines 1 - 11, The changeset targets
a private example package ("start") and should be removed; delete the
.changeset/npm-sandbox-compat.md file and any references to this changeset so
the release workflow doesn't try to version the private examples, and ensure the
examples/react/start/package.json (the "start" package marked "private": true)
remains unchanged (do not publish or include a changeset for
`@tanstack/devtools-event-client` or any workspace:* replacement in that private
example).

"dependencies": {
"@tailwindcss/vite": "^4.0.6",
"@tanstack/devtools-event-client": "workspace:*",
"@tanstack/devtools-event-client": "^0.4.0",
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify `@tanstack/devtools-event-client` version 0.4.0 exists and check other examples

echo "=== Checking if version 0.4.0 exists on npm ==="
npm view `@tanstack/devtools-event-client` versions --json | jq -r '.[]' | grep "^0\.4\.0$"

echo -e "\n=== Finding all examples using workspace references for this package ==="
fd -e json -x grep -l "devtools-event-client" {} \; | xargs grep -H "devtools-event-client.*workspace"

Repository: TanStack/devtools

Length of output: 377


Apply the same dependency fix to examples/react/time-travel for consistency.

The version 0.4.0 of @tanstack/devtools-event-client exists on npm. However, examples/react/time-travel/package.json currently uses "workspace:^" for the same dependency, which would cause identical sandbox failures. Change it to "^0.4.0" to match this fix.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@examples/react/start/package.json` at line 13, Update the dependency entry
for "@tanstack/devtools-event-client" in the
examples/react/time-travel/package.json to use the published semver "^0.4.0"
instead of "workspace:^" so it matches the fix applied in examples/react/start
and prevents sandbox resolution failures; locate the dependency key
"@tanstack/devtools-event-client" and replace its version string accordingly.

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