11name : Fresh Install Tests
22
3- # Periodically tests BlockNote with the latest versions of its dependencies
4- # (within declared ranges), without a lockfile . This catches breakage when a
3+ # Periodically tests BlockNote with the latest versions of its production
4+ # dependencies (within declared semver ranges). This catches breakage when a
55# new release of a dep like @tiptap/* or prosemirror-* ships and conflicts
66# with BlockNote's declared ranges — the kind of failure a user would hit when
77# running `npm install @blocknote/react` in a fresh project.
88#
9- # DevDependencies (vitest, vite, typescript, etc.) are still bounded by their
10- # declared ranges in package.json; only prod/peer deps get freshly resolved.
9+ # Only production dependencies of published (non-private) packages are updated.
10+ # DevDependencies (vitest, vite, typescript, etc.) stay pinned to the lockfile,
11+ # so test tooling churn doesn't cause false positives.
1112
1213on :
14+ push :
15+ branches :
16+ - package-upgrades
1317 schedule :
1418 - cron : " 0 2 * * *" # Daily at 02:00 UTC
1519 workflow_dispatch : # Allow manual runs
1620
1721env :
1822 FORCE_JAVASCRIPT_ACTIONS_TO_NODE24 : true
23+ pnpm_config_store_dir : ./node_modules/.pnpm-store
1924
2025jobs :
2126 fresh-install-unit-tests :
@@ -35,19 +40,32 @@ jobs:
3540 uses : actions/setup-node@v6
3641 with :
3742 node-version-file : " .nvmrc"
38- # Intentionally no pnpm cache — we want a genuinely fresh install
39-
40- - id : remove_lockfile
41- name : Remove lockfile to force fresh dep resolution
42- # Removing pnpm-lock.yaml causes pnpm to resolve all dependencies to
43- # the latest versions that satisfy the ranges declared in package.json
44- # (including pnpm-workspace.yaml overrides). This is equivalent to what
45- # a new user experiences when installing BlockNote in a blank project.
46- run : rm pnpm-lock.yaml
43+ # Intentionally no pnpm cache — we want fresh prod dep resolution
4744
4845 - id : install_dependencies
4946 name : Install dependencies
50- run : pnpm install --no-frozen-lockfile
47+ run : pnpm install
48+
49+ - id : update_prod_deps
50+ name : Update prod deps of published packages
51+ # Resolves production dependencies of every published (non-private)
52+ # workspace package to the latest version within their declared semver
53+ # ranges. This simulates what a user gets when running
54+ # `npm install @blocknote/react` in a fresh project.
55+ # DevDependencies are left at their lockfile versions.
56+ run : |
57+ FILTERS=$(node -e "
58+ const fs = require('fs');
59+ const path = require('path');
60+ fs.readdirSync('packages').forEach(dir => {
61+ try {
62+ const pkg = JSON.parse(fs.readFileSync(path.join('packages', dir, 'package.json'), 'utf8'));
63+ if (!pkg.private && pkg.name) process.stdout.write('--filter ' + pkg.name + ' ');
64+ } catch {}
65+ });
66+ ")
67+ echo "Updating prod deps for: $FILTERS"
68+ eval pnpm update --prod $FILTERS
5169
5270 - id : build_packages
5371 name : Build packages
@@ -84,10 +102,10 @@ jobs:
84102 failed_step="Install pnpm"
85103 elif [ "${{ steps.setup_node.outcome }}" = "failure" ]; then
86104 failed_step="Setup Node.js"
87- elif [ "${{ steps.remove_lockfile.outcome }}" = "failure" ]; then
88- failed_step="Remove lockfile to force fresh dep resolution"
89105 elif [ "${{ steps.install_dependencies.outcome }}" = "failure" ]; then
90106 failed_step="Install dependencies"
107+ elif [ "${{ steps.update_prod_deps.outcome }}" = "failure" ]; then
108+ failed_step="Update prod deps of published packages"
91109 elif [ "${{ steps.build_packages.outcome }}" = "failure" ]; then
92110 failed_step="Build packages"
93111 elif [ "${{ steps.run_unit_tests.outcome }}" = "failure" ]; then
0 commit comments