Releasing¶
Four packages publish from this repo:
| Directory | Package |
|---|---|
packages/assistants-common |
@drewswiredin/backstage-plugin-assistants-common |
packages/assistants-backend |
@drewswiredin/backstage-plugin-assistants-backend |
packages/assistants |
@drewswiredin/backstage-plugin-assistants |
packages/assistants-backend-module-semantic-search |
@drewswiredin/backstage-plugin-assistants-backend-module-semantic-search |
The frontend and backend depend on -common via a caret range, so bump
-common first.
Releases are cut on main. Start by bringing it up to dev:
1 2 | |
1. Backstage ranges¶
1 2 | |
Every @backstage/* range in the published packages must match the current
Backstage release, or a consumer on that release installs a second copy of
each lagging package (^0.0.x ranges match one version only). The bump also
moves backstage.json; move the "Backstage N or later" floor in the READMEs and docs/getting-started.md
and add "Backstage dependency ranges track the N release line" to each
changed package's changelog. CI runs the dedupe check.
2. Version and changelog¶
- Bump
versionin eachpackage.jsonthat changes,-commonfirst. When-commonbumps, update the range the frontend and backend declare for it. - Move each package's
Unreleasedentries in itsCHANGELOG.mdunder the new version and date. yarn installto refresh the lockfile.
3. Verify¶
1 | |
4. Pack and inspect¶
Per package, after step 3 built dist/ (npm pack does not build; *.tgz is
gitignored):
1 2 3 | |
In the extracted package.json:
- no dependency value starts with
patch:orworkspace:; exports(andmain,types) point atdist/, notsrc/.
5. Publish from the tarball¶
1 | |
Publish the tarball, never the directory: publishing the directory leaves the
registry document with the pre-prepack ./src exports. Publish -common
first, then the backend, the semantic search module, and the frontend.
Verify each:
1 | |
6. Commit and tag¶
1 2 3 4 5 6 7 8 9 | |
Tags are annotated so --follow-tags pushes them. One tag per published
package; skip the tag for a package that did not publish.
7. Consumer check¶
In a throwaway directory, install what the registry serves and prove it loads and bundles:
1 2 3 4 5 6 7 8 9 10 11 12 | |
--loader:.svg=dataurl stands in for the app bundler's asset handling:
@backstage/core-components imports .svg files.
A missing-export error from esbuild means a mismatched @assistant-ui/* or
AI SDK family; yarn tsc and yarn add do not catch that.
Yarn's age gate¶
Yarn resolves a package version through npmMinimalAgeGate (3 days in a
create-app, 1 week on stable), so a create-app consumer running
yarn add <pkg> sees the release after 3 days. yarn add <pkg>@<version>
resolves the exact version immediately.