Skip to content

chore: move the pnpm tooling into website/, where the only package is#726

Merged
macanderson merged 1 commit into
mainfrom
pnpm-relocate
Jul 26, 2026
Merged

chore: move the pnpm tooling into website/, where the only package is#726
macanderson merged 1 commit into
mainfrom
pnpm-relocate

Conversation

@macanderson

Copy link
Copy Markdown
Owner

⚠️ Requires one setting change outside this repo before merge. Vercel's Root Directory for the docs project must be website. See Before merging.

Why

The repo root carried a package.json, pnpm-workspace.yaml, and pnpm-lock.yaml describing a workspace that never linked anything:

  • the root importer was literally .: {}
  • zero workspace: protocol dependencies
  • no catalogs, no overrides, no patches
  • exactly one member — website/

It was one package with a workspace wrapped around it. The root package.json had no dependencies at all; its dev/build/typecheck scripts only forwarded to pnpm --filter website, and its rust:build/rust:test/rust:lint/rust:fmt/gate aliases have no caller anywhere in the repo (not the Makefile, not .github/, not scripts/, not .githooks/).

Nothing is shared across the two toolchains. The Rust crates aren't pnpm packages, the only build.rs shells out to nothing, there's no wasm/napi bridge, and stella ships no npm channel (binaries, Homebrew, curl | sh — confirmed in RELEASING.md and release.yml). The one thing that genuinely crosses between Rust and the site is the brand palette, and its generator is Python: docs/brand/build.py writes both stella-tui/src/palette.rs and website/src/app/tokens.css, via make brand, and never touches node.

What moved

From To Note
pnpm-lock.yaml website/pnpm-lock.yaml sole importer promoted website:.
package.jsonpackageManager, engines website/package.json rest of the file deleted
pnpm-workspace.yamlallowBuilds, minimumReleaseAge, minimumReleaseAgeExclude website/pnpm-workspace.yaml keeps the filename; drops packages:

website/pnpm-workspace.yaml keeps its name because pnpm 10+ reads those policy settings from that file rather than from .npmrc. It no longer declares a packages: list, because there is nothing to list. The minimumReleaseAge: 1440 supply-chain gate and the esbuild/sharp build approvals are preserved verbatim, comments and all — those were the two things in the root file doing real work.

The lockfile diff is three lines. No resolved version changed:

 importers:
-  .: {}
-
-  website:
+  .:

CI

docs.yml gains defaults.run.working-directory: website. Two uses: steps need explicit paths, since working-directory doesn't apply to them:

  • pnpm/action-setup reads packageManager via package_json_file: website/package.json
  • setup-node hashes the lockfile via cache-dependency-path: website/pnpm-lock.yaml

Both workflows' path filters drop the three root filenames — website/** already covers their new home. ci.yml only ever listed them in paths-ignore, so those lines were about to become dead.

Verification

  • make gate passes end to end (rebased onto current main, post-fix(ci): unbreak main — record #722's deck growth in the size baseline #724).
  • From a deleted node_modules, in website/: pnpm install --frozen-lockfilepnpm typecheckpnpm build all succeed. That's precisely the docs.yml sequence. The 78-page static build completes.
  • --frozen-lockfile succeeding is the proof there's no dependency drift — it fails by design if the lockfile would need to change. The lockfile is byte-identical after a clean install.

Before merging

Vercel Root Directory → website. No vercel.json exists, so this is a dashboard setting and I can't change it from here. website/README.md previously said the project "auto-detects Next.js + pnpm" and credited the root pnpm-workspace.yaml for the build-script approvals, which suggests it may currently install from the repo root. If Root Directory is already website, confirm "Include files outside root directory" isn't relied on for the lockfile. I've updated that README to state the requirement.

Worth a preview-deploy check on this PR before merge, since that exercises the real Vercel path in a way CI can't.

Not in scope

.dockerignore:47-48 references a stella-docs/ directory that doesn't exist — a genuinely stale entry, but unrelated to this change, so I left it.

The repo root carried a `package.json`, `pnpm-workspace.yaml`, and
`pnpm-lock.yaml` describing a workspace that never linked anything. The root
importer was empty (`.: {}`), there were no `workspace:` dependencies, no
catalogs, no overrides, no patches, and exactly one member — `website/`. It
was one package with a workspace wrapped around it.

Nothing was ever shared across the two toolchains. The Rust crates are not
pnpm packages, no `build.rs` shells out to node, there is no wasm/napi bridge,
and stella ships no npm channel (binaries, Homebrew, `curl | sh`). The one
thing that genuinely crosses between Rust and the site is the brand palette,
and its generator is Python: `docs/brand/build.py` writes both
`stella-tui/src/palette.rs` and `website/src/app/tokens.css` and never touches
node.

So the tooling moves to the package it describes:

- `pnpm-lock.yaml` → `website/pnpm-lock.yaml`, with its sole importer promoted
  from `website:` to `.`. That is the entire lockfile diff — three lines, no
  resolved version changes, verified by `pnpm install --frozen-lockfile`
  succeeding against it unchanged.
- `packageManager` and `engines` → `website/package.json`.
- `allowBuilds`, `minimumReleaseAge`, and `minimumReleaseAgeExclude` →
  `website/pnpm-workspace.yaml`. The file keeps its name because pnpm 10+
  reads those policy settings from it rather than from `.npmrc`; it no longer
  declares a `packages:` list, because there is nothing to list.
- The root `package.json` is deleted outright. Its `dev`/`build`/`typecheck`
  scripts only forwarded to `pnpm --filter website`, and its `rust:*` and
  `gate` aliases had no caller anywhere in the repo.

`docs.yml` gains `defaults.run.working-directory: website` and loses the
root-manifest hop. Two `uses:` steps need explicit paths, since
`working-directory` does not apply to them: `pnpm/action-setup` reads
`packageManager` via `package_json_file`, and `setup-node` hashes the lockfile
via `cache-dependency-path`. Both workflows' path filters drop the three root
filenames — `website/**` already covers their new home.

Requires one setting change outside this repo: Vercel's Root Directory must be
`website`. Noted in the PR and in `website/README.md`.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @macanderson, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
stella-cli-docs Ready Ready Preview, Comment Jul 26, 2026 7:46pm

@macanderson
macanderson marked this pull request as ready for review July 26, 2026 19:46
@macanderson
macanderson merged commit 75e72f2 into main Jul 26, 2026
6 of 9 checks passed
@macanderson
macanderson deleted the pnpm-relocate branch July 26, 2026 19:46
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