Synchronize Framework Packages
This guide covers the end-to-end workflow for rebuilding and publishing the framework packages that Webstir workspaces consume.
Overview
- Run commands via
dotnet run --project Framework/Framework.csproj -- packages …from the repo root (or use a builtframeworkbinary). Framework/Frontend,Framework/Backend, andFramework/Testingcontain the sources for the published packages.framework packages syncrebuilds those packages, updatesFramework/Packaging/framework-packages.json, and refreshesEngine/Resources/package.jsonwith caret specifiers.webstir installkeeps consuming workspaces aligned with the recorded registry versions by updatingpackage.jsonspecifiers and running the configured package manager (pnpm by default) when drift is detected.
Update The Packages
- Run
framework packages bump(for example,framework packages bump --bump minororframework packages bump --set-version 1.2.3). Add--dry-runto preview the next version without touching manifests. - (Optional) Run
framework packages diffto preview version or specifier drift without modifying files. - Run
framework packages sync.- Add
--frontend,--testing, or--backendto rebuild a single package when only one changed. - The command runs the workspace package manager install (
pnpm install --frozen-lockfileby default) andnpm run build, then rewrites the manifest and template dependencies with the new versions and caret specifiers. No tarballs are generated. - Set
WEBSTIR_FRONTEND_REGISTRY_SPEC,WEBSTIR_TEST_REGISTRY_SPEC, orWEBSTIR_BACKEND_REGISTRY_SPECbefore running if you need an alternate registry specifier (for example, a dist-tag).
- Add
- Run
framework packages verify.- The verifier ensures package directories, manifest entries, template dependencies, and the repository state are aligned.
- The check also confirms that no legacy tarball assets remain in the repo.
- When you are ready to publish the new versions, run
framework packages publish.- Publishing pushes each package to the configured registry (GitHub Packages by default) if that version is missing. Export
GH_PACKAGES_TOKENso npm can authenticate.
- Publishing pushes each package to the configured registry (GitHub Packages by default) if that version is missing. Export
- Commit the updated package sources, lockfiles,
Framework/Packaging/framework-packages.json, andEngine/Resources/package.json.
Install In A Workspace
- Run
webstir install(or any workflow that indirectly calls it) in the consuming project. - The installer rewrites the framework package entries in
package.json, clears stale caches when necessary, and runs the selected package manager sonode_modulesmatches the recorded registry versions. - Use
webstir install --dry-runto see what would change before reinstalling dependencies. - Use
webstir install --cleanto delete the cached.webstir/directory before reinstalling.
Registry Requirements
- Framework installations now rely on registry packages. Configure
.npmrcwith the appropriate registry URL and credentials (currently GitHub Packages viaGH_PACKAGES_TOKEN). Corepack users should runcorepack enableso pnpm is available. - Provide the token and
.npmrcto CI or sandbox environments before executingframework packages publishorwebstir install.
Verify Changes
- Run
./utilities/scripts/format-build.shbefore handing off; it formats code, builds the solution, and executes frontend package tests. - Run
framework packages syncfollowed byframework packages verifywhenever package artifacts change. Useframework packages publish --dry-runto exercise the end-to-end pipeline without modifying files. - Optionally run
framework packages publishin a dry environment (or CI) to confirm the registry accepts the new version. - Exercise
webstir install(optionally with--clean) inside a sample workspace to verify the new packages resolve correctly and upgrade existing installations.