Skip to content

fix: drop Changesets from the vland monorepo template and allow lefthook's build with allowBuilds - #286

Merged
rqbazan merged 2 commits into
mainfrom
fix/vland-templates-builds-changesets
Oct 18, 2026
Merged

rqbazan merged 2 commits into
mainfrom
fix/vland-templates-builds-changesets

Conversation

@rqbazan

@rqbazan rqbazan commented Oct 18, 2026

Copy link
Copy Markdown
Member

Summary

Two template fixes, one commit each. Neither needs a vland CLI change: vland downloads templates from main, so they reach every installed vland as soon as this merges.

1. The monorepo template no longer ships Changesets. All of its packages are private and it has no release workflow. Only the library template is meant to be published, and it keeps its .changeset/ and release.yml.

 vland/templates/monorepo/
-├── .changeset/{config.json,README.md}
 └── package.json
-      "@changesets/changelog-github", "@changesets/cli"

2. All three templates allow lefthook's build with allowBuilds. onlyBuiltDependencies is the legacy key, and pnpm 11 drops it without a warning. Its strictDepBuilds then makes pnpm install fail (ERR_PNPM_IGNORED_BUILDS), so the git hooks are never installed. The templates pin pnpm 10.30.3, and allowBuilds exists since 10.26.

 # pnpm-workspace.yaml (library, backend, monorepo)
-onlyBuiltDependencies:
-  - "@biomejs/biome"   # monorepo only; Biome 2 has no install script
-  - lefthook
+# Dependencies whose build scripts pnpm runs on install; allowBuilds needs pnpm >= 10.26.
+allowBuilds:
+  lefthook: true
 sideEffectsCache: false   # unchanged

Evidence

Each case runs a real vland init <name> --template <t> --install --git </dev/null with VLAND_TEMPLATES_DIR set to this branch's templates, on pnpm 10.30.3:

  • library, backend, monorepo: lefthook writes .git/hooks/pre-commit and .git/hooks/pre-push. pnpm-workspace.yaml has allowBuilds and no onlyBuiltDependencies. After the README's rr plugins add steps, rr check passes.
  • monorepo: there's no .changeset/, no @changesets/* in any package.json, and git ls-files | xargs grep -il changeset finds nothing. pnpm build and pnpm test pass.
  • Before, on pnpm 11 with the old key: pnpm install exits 1 with ERR_PNPM_IGNORED_BUILDS and no hooks are installed.
    After, on pnpm 11 with allowBuilds: lefthook builds and the hooks are installed.
  • init-templates.test.ts: reverting only the template changes fails exactly the 4 new assertions, one for the monorepo and three for allowBuilds.

Merge Danger

Door: two-way

Blast Radius: small

  • This only affects projects generated after the merge; existing projects keep what they have.
  • If a new monorepo wants releases later, it adds Changesets back by hand.

🤖 Generated with Claude Code

https://claude.ai/code/session_01EZVC7xzzsEmByszmfff4u2

rqbazan and others added 2 commits October 18, 2026 12:54
Every package in the monorepo template is private and it has no release
workflow, so Changesets had nothing to version or publish. Only the
library template ships ready to publish to npm.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZVC7xzzsEmByszmfff4u2
pnpm prefers allowBuilds since 10.26 and pnpm 11 removed
onlyBuiltDependencies, so a generated project that moves to pnpm 11
fails its install on lefthook's build script and never gets the git
hooks. The monorepo also drops @biomejs/biome, which has had no install
script since Biome 2.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EZVC7xzzsEmByszmfff4u2
@changeset-bot

changeset-bot Bot commented Oct 18, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5bbe280

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

This PR includes changesets to release 1 package
Name Type
@variablelab/vland Patch

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

@vland-bot

vland-bot Bot commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

Preview release

Latest commit: 5bbe280

Some packages have been released:

Package Version Install
@variablelab/vland 0.4.2-git-5bbe280.0 @variablelab/vland@0.4.2-git-5bbe280.0

Note

Use the PR number as tag to install any package. For instance:

pnpm add @variablelab/vland@pr-286

@rqbazan
rqbazan merged commit 7a42302 into main Oct 18, 2026
10 checks passed
@rqbazan
rqbazan deleted the fix/vland-templates-builds-changesets branch October 18, 2026 18:01
@vland-bot vland-bot Bot mentioned this pull request Oct 18, 2026
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.

1 participant