The workspace and versioning
Setting up, or a new version just shipped — what the framework reserves in your tree, and how you move across a release.
What it is
A template workspace is an ordinary private npm package that depends on
@homepages/concrete. That dependency is the whole definition — it is how the
commands find the workspace they are running in.
my-template/
package.json private; the framework, React, and what this template imports
template.ts the one reserved file; names the fixture list
tsconfig.json extends @homepages/concrete/tsconfig, "@/*" -> the workspace root
eslint.config.mjs the framework's preset
globals.css by convention: the first stylesheet template.ts imports
icon.svg
fixtures/ dev data: the fixture list, its documents, their properties
pages/ sections/ components/ lib/ fonts/ assets/ yours, named as you like.concrete/ is the framework's scratch directory — caches and build output —
and is gitignored, as is .env, where your publisher key lives.
Why it works this way
Reserved names are a tax. Every one of them is something a reader has to learn
before they can put a file anywhere, and something an existing codebase has to be
rearranged to satisfy. So there is exactly one reserved file, and it earns its
place by answering a question the framework cannot answer any other way:
template.ts is the root of the import graph.
Everything else is reached from it. Your sections are found because your pages
place them; your stylesheet is found because template.ts imports it; your
fixtures are found because template.ts names their list. Dev data is told from
shipped code by that list, not by a directory: the fixtures are JSON documents
nothing imports, and concrete check refuses a bundled module that reaches one. That is
why the tooling files are thin — they hold nothing the package could have owned,
so an upgrade never has to rewrite them.
The same instinct governs versions. The framework owns the toolchain: the TypeScript configuration, the lint preset, the bundler, Tailwind's compiler. You get the benefit of that without pinning any of it, and the price is that a change in the framework can change what your workspace compiles to. Standard semver is the contract over that price — a patch fixes, a minor adds, and a major may break — and a break that ships without a way across is a break the framework has pushed onto you. So each one carries its codemod.
How it works
The workspace's own tooling is three lines. tsconfig.json extends the
package's base and sets @/* to the workspace root; eslint.config.mjs exports
the preset; globals.css imports Tailwind and the framework's stylesheet. None of
them is a contract file.
Tests live beside what they test, as *.test.ts or *.test.tsx anywhere in
the tree, and are excluded from every bundle by suffix.
Commands tell you when you are behind. concrete dev, concrete check,
concrete build, concrete publish and the concrete property list and
concrete property add commands each begin by comparing your installed version with the
registry's published release:
- on it, or ahead of it, nothing is said;
- behind inside the same major, in a terminal with a lockfile, the package is refreshed before the command runs;
- a new major asks once,
[Y/n], defaulting to yes — and yes runs the upgrade before the command you typed.
All of it goes to stderr, none of it can fail the command it runs in front of, and the registry is read at most once an hour with a two-second budget. A workspace that installs the framework from somewhere other than the registry is never checked at all.
Two switches turn it off. For one command, the flag:
concrete check --no-auto-updateFor every command in this shell, the environment variable, which each shell spells its own way:
- bash or zsh:
export HOMEPAGES_NO_AUTO_UPDATE=1 - PowerShell:
$env:HOMEPAGES_NO_AUTO_UPDATE = "1" - cmd:
set HOMEPAGES_NO_AUTO_UPDATE=1
concrete upgrade is the crossing. It installs the target first and runs the
codemods second, and that order is forced: the codemods to run ship inside the
version being moved to, so they are on disk only once it is installed. The chain
runs oldest release first, from the version you were on up to the version npm
actually installed.
concrete upgrade --dry-run # the plan, read out of the target's tarball, installing nothing
concrete upgrade # to the published latestEach codemod prints every file it rewrote and every file it could not, and why. A
step no codemod could take is printed for you to do by hand and does not fail the
run; a codemod that fails stops the chain, and the ones after it do not run. A
failed install puts package.json back the way it was and runs nothing. Codemods
run forward only — moving to an older version moves the package and runs none.
concrete upgrade reads the registry fresh rather than through the hourly cache, because
an explicit upgrade is also how you get off a bad release, and it is the one
command nothing runs in front of.
What it is not
The workspace is not packed or wrapped before it is submitted; it is the
submission. There is no naming convention on the directory either — the publisher
reads key out of template.ts.
The framework is not a peer dependency you pin around. Your package.json carries
one caret range for it, and concrete upgrade moves that range.
And a major is not a rewrite. The changeset that ships a break says what changed and what it means for your code; the codemod does the mechanical part; what is left is named, not hidden.
Where next
Start sets a workspace up from nothing.
Cross a major version and
Read a failing check are the two
recipes over it, and Workspace states each reserved file
and directory one by one, with the subpaths a config defers to. The full flag
surface is concrete upgrade, and the currency rules
above are stated once, for every command, in
Staying current.
Reading another section
How one section's slot follows or derives from another's — declared on the slot that depends, and settled before any renderer runs.
Publishing and environments
Publishing, or publishing to a customer — what a publisher key decides, what the platform checks, and how a version is rolled back.
