ci(fresh-install): bump examples & playground in lockstep with packages#2660
ci(fresh-install): bump examples & playground in lockstep with packages#2660nperez0111 wants to merge 6 commits intomainfrom
Conversation
Without this, pnpm update --prod only bumped the publishable @blocknote/* packages, leaving examples/* and playground pinned to older versions. For peer-dep'd libs like @tiptap/core + @tiptap/pm that produced two virtual- store copies keyed on different peer versions, which TypeScript treated as unrelated types — breaking example-editor:build with TS2322. Extending the filter keeps every app that consumes @blocknote/* in lockstep with the published packages. docs/shared/tests/fumadocs stay excluded. Also add this branch to the push triggers so the PR exercises the workflow. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughCI workflow changed to trigger on Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/mantine
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/fresh-install-tests.yml (1)
9-10:⚠️ Potential issue | 🟡 MinorKeep the workflow description and Slack failure label in sync.
Line 9 and Line 110 still describe only published packages, but the update step now includes examples and playground too.
Proposed wording update
-# Only production dependencies of published (non-private) packages are updated. -# DevDependencies (vitest, vite, typescript, etc.) stay pinned to the lockfile, +# Production dependencies of published packages, examples, and playground are updated. +# DevDependencies (vitest, vite, typescript, etc.) stay pinned to the lockfile,- failed_step="Update prod deps of published packages" + failed_step="Update prod deps of packages, examples, and playground"Also applies to: 109-110
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/fresh-install-tests.yml around lines 9 - 10, Update the workflow description and the Slack failure label text that still say "only published packages" so they reflect the current behavior which also updates examples and playground; find the comment/description string near the top of the workflow and the Slack failure label value (the second occurrence later in the file) and change both to something like "published packages, examples, and playground" (or equivalent phrasing) so the description and Slack label remain in sync.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/workflows/fresh-install-tests.yml:
- Around line 67-70: The workflow currently passes a static --filter
"./packages/*" to pnpm update which now picks up private packages; change this
back to selecting only non-private workspaces while keeping the static filters
for "./examples/*/*" and "./playground". Concretely, replace the static --filter
"./packages/*" entry with a dynamic filter generation step that enumerates
workspaces from package.json/workspace config and emits only non-private package
selectors (or a script that prints the list of non-private workspace globs) and
feed those selectors into the pnpm update command; keep the existing --filter
"./examples/*/*" and --filter "./playground" entries unchanged so examples and
playground remain included. Ensure the new selector logic targets the same
invocation where "pnpm update --prod" is run.
---
Outside diff comments:
In @.github/workflows/fresh-install-tests.yml:
- Around line 9-10: Update the workflow description and the Slack failure label
text that still say "only published packages" so they reflect the current
behavior which also updates examples and playground; find the
comment/description string near the top of the workflow and the Slack failure
label value (the second occurrence later in the file) and change both to
something like "published packages, examples, and playground" (or equivalent
phrasing) so the description and Slack label remain in sync.
🪄 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: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 58df837b-bc2a-442c-ad20-219da72463af
📒 Files selected for processing (1)
.github/workflows/fresh-install-tests.yml
| pnpm update --prod | ||
| --filter "./packages/*" | ||
| --filter "./examples/*/*" | ||
| --filter "./playground" |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -euo pipefail
# Description: Check whether the new "./packages/*" filter could include private workspaces.
# Expected: no output, or only private packages with zero production dependencies.
fd '^package\.json$' packages --max-depth 2 --type f | while IFS= read -r pkg; do
private="$(jq -r '.private // false' "$pkg")"
if [ "$private" = "true" ]; then
name="$(jq -r '.name // "(unnamed)"' "$pkg")"
prod_dep_count="$(jq -r '(.dependencies // {}) | keys | length' "$pkg")"
printf '%s\tname=%s\tprivate=true\tprodDeps=%s\n' "$pkg" "$name" "$prod_dep_count"
fi
doneRepository: TypeCellOS/BlockNote
Length of output: 238
The new ./packages/* filter now includes private packages that were previously excluded.
The dynamic selection previously filtered for non-private packages only. The static path selector matches all workspaces under packages/, including:
@blocknote/dev-scripts(1 production dependency)@blocknote/xl-ai-server(10 production dependencies)
This widens the scope of pnpm update beyond intended publishable packages. Consider restoring non-private package discovery for the packages/* filter while keeping the static filters for examples/*/* and playground.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/workflows/fresh-install-tests.yml around lines 67 - 70, The workflow
currently passes a static --filter "./packages/*" to pnpm update which now picks
up private packages; change this back to selecting only non-private workspaces
while keeping the static filters for "./examples/*/*" and "./playground".
Concretely, replace the static --filter "./packages/*" entry with a dynamic
filter generation step that enumerates workspaces from package.json/workspace
config and emits only non-private package selectors (or a script that prints the
list of non-private workspace globs) and feed those selectors into the pnpm
update command; keep the existing --filter "./examples/*/*" and --filter
"./playground" entries unchanged so examples and playground remain included.
Ensure the new selector logic targets the same invocation where "pnpm update
--prod" is run.
The previous commit widened the update filter to include examples/* and playground so @tiptap/core + @tiptap/pm would resolve uniformly across the workspace. But pnpm update on examples/* rewrites "@blocknote/*": "latest" to "workspace:^", which means CI stops testing what CodeSandbox users actually see (they pull the published @blocknote/* from npm via "latest"). Switch to a two-step approach: keep the original publishable-only filter so examples' package.json stays untouched, then run pnpm dedupe afterward. Dedupe only rewrites the lockfile and collapses duplicate transitive resolutions — zero package.json churn, and both the TS2322 build failure and the CodeSandbox parity are preserved. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/fresh-install-tests.yml (1)
17-17: Remove the temporary debug branch trigger before merging.This is useful for exercising the workflow on this PR branch, but leaving
feat/fresh-install-debuginmainmakes the workflow permanently watch a short-lived branch name.Proposed cleanup
branches: - package-upgrades - - feat/fresh-install-debug🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/workflows/fresh-install-tests.yml at line 17, Remove the temporary debug branch entry "feat/fresh-install-debug" from the workflow trigger so the workflow no longer watches that short-lived branch; locate the branch list in the workflow YAML (the "branches" array under the top-level "on" or "push" trigger) and delete the "feat/fresh-install-debug" item, leaving only the intended persistent branches.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In @.github/workflows/fresh-install-tests.yml:
- Line 17: Remove the temporary debug branch entry "feat/fresh-install-debug"
from the workflow trigger so the workflow no longer watches that short-lived
branch; locate the branch list in the workflow YAML (the "branches" array under
the top-level "on" or "push" trigger) and delete the "feat/fresh-install-debug"
item, leaving only the intended persistent branches.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 7ccbeeb9-7c3d-458e-9926-3e25c41c8ed7
📒 Files selected for processing (1)
.github/workflows/fresh-install-tests.yml
The tests created BlockNoteEditor instances via createEditor() but never destroyed them. prosemirror-view's DOMObserver keeps a setTimeout alive waiting to flush pending mutations; when vitest tears down jsdom between test files the timer fires against a torn-down document and throws `ReferenceError: document is not defined`. Vitest catches it as an unhandled error and fails the whole run even when all 16 assertions pass. Local runs usually hit the lucky teardown ordering and pass; CI surfaces the race intermittently. Tracking created editors and calling _tiptapEditor.destroy() in afterEach ensures the DOMObserver timers are canceled before jsdom goes away. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
unmount() is the public API for tearing down a BlockNoteEditor and handles portalElement cleanup in addition to the underlying prosemirror teardown. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Summary
@blocknote/example-editor:Extension<any, any>not assignable toAnyExtension. The workflow'spnpm update --prod --filter <publishable @blocknote/* only>upgraded@tiptap/react/@tiptap/pmto3.22.4in the publishable packages, butexamples/*andplaygroundstayed at3.22.3. Since@tiptap/corehas@tiptap/pmas a peer dep, pnpm created two virtual-store copies (...@pm@3.22.3and...@pm@3.22.4) and TypeScript treated theirExtensionexports as unrelated types../examples/*/*and./playground.docs/,shared/,tests/,fumadocs/stay excluded — they're not part of the "freshnpm install @blocknote/react" user experience this workflow simulates. DevDependencies still stay pinned to the lockfile via--prod.feat/fresh-install-debugto the workflow'spushtriggers so this PR exercises the workflow.Verified locally: clean
pnpm install+ targeted update +nx run @blocknote/example-editor:buildall pass (was failing before).Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Tests