You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
clibuddy: treat pnpm-workspace.yaml as a workspace only when it declares packages #249
Since pnpm 10, pnpm-workspace.yaml is also where single-package repos put pnpm settings such as minimumReleaseAge, minimumReleaseAgeExclude, onlyBuiltDependencies or catalog. Such a file has no packages key, and it does not make the repo a monorepo.
When a single-package repo adds one:
rr tsc (run-run/cli/src/actions/tsc.ts) and workspace-target.ts take the monorepo path. getWorkspaceProjects() then reads manifest.packages (undefined) and throws Invalid workspace patterns. That breaks rr check and any pre-commit hook that runs it.
With packages: ["."] the repo root is filtered out by excludeRoot, so the typecheck runs on nothing and passes silently.
Impact
withvariablelab/theme-toggle (single package, @rrlab/cli ^1.3.0) cannot put minimumReleaseAge: 1440 and minimumReleaseAgeExclude: ["@variablelab/*", "@rrlab/*"] in pnpm-workspace.yaml. It uses .npmrc instead (withvariablelab/theme-toggle#8). That has two costs:
The exclude list can't be used in .npmrc. When pnpm is launched through npm (npx pnpm, npm exec, npm run), npm exports the array as one npm_config_minimum_release_age_exclude="@variablelab/*\n\n@rrlab/*" string, and pnpm 10.30.3 then exempts every package. As a result, theme-toggle's own scopes also wait 24 h.
Every npm command warns Unknown project config "minimum-release-age", and pnpm 11 stops reading these settings from .npmrc.
Proposed fix
Treat pnpm-workspace.yaml as a workspace only when it declares a non-empty packages array, and treat getWorkspaceProjects() the same way. Add a test for a settings-only pnpm-workspace.yaml (for example, only minimumReleaseAge) and check that rr tsc typechecks the root package.
Follow-up once released
In theme-toggle:
Move minimum-release-age and the excludes from .npmrc to pnpm-workspace.yaml.
Delete .npmrc.
Then publish_mode: oidc-only in release.yml can go back to auto-detection, because preview-release core.ts treats any project .npmrc as token-only. Keeping it explicit also works.
Activity
chore: drop the minimum-release-age exclude list from .npmrc
ci: document why the preview job pins publish_mode to oidc-only
fix(clibuddy): treat pnpm-workspace.yaml as a workspace only when it …