chore: version packages#204
Merged
Merged
Conversation
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
July 17, 2026 04:31
f1787d8 to
41db947
Compare
github-actions
Bot
force-pushed
the
changeset-release/main
branch
from
July 17, 2026 05:46
41db947 to
e50687e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR was opened by the Changesets release GitHub action. When you're ready to do a release, you can merge this and the packages will be published to npm automatically. If you're not ready to do a release yet, that's fine, whenever you add more changesets to main, this PR will be updated.
Releases
everything-dev@1.48.0
Minor Changes
d3d5be1: Extract DB convention helpers into shared
everything-dev/dbpackage export.packages/everything-dev/src/db.ts— new subpath export containing pure DB convention helpers:MigrationStoragetype,getMigrationSlug(),getMigrationStorage()getLegacyCandidates(),migrateSql(),extractExpectedTables()pluginMigrationSlug()for CLI plugin key normalizationgetDatabaseUrlSecretName()for deterministic*_DATABASE_URLnaming per workspace slugpackages/everything-dev/package.json— adds./dbsubpath export.api/src/db/migration-storage.ts— removed;api/drizzle.config.ts,api/src/db/migrate.ts,api/src/db/layer.tsnow import directly fromeverything-dev/db.api/tests/unit/migration-storage.test.ts— removed (redundant with package-level tests).packages/everything-dev/tsdown.config.ts— addedsrc/db.tsentry point.packages/everything-dev/src/cli/db-studio.ts— replaces inlinemigrationSlugwithpluginMigrationSlugfrom the shared helper.packages/everything-dev/src/cli/db-doctor.ts— replaces inlineextractTableswithextractExpectedTablesfrom the shared helper.packages/everything-dev/src/cli/sync.ts— addsapi/drizzle.config.tsto framework-owned sync files; syncs it into DB-enabled plugin workspaces; adds plugindrizzle.config.tsto owned-file detection.packages/everything-dev/tests/unit/db.test.ts— 8 tests covering slug derivation, table naming, table extraction, secret naming, and plugin key normalization.This reduces sync churn by centralizing the fragile name-convention logic in the published package instead of scattering it across synced local files.
d3d5be1: Implement isolated migration journals per plugin workspace and add database diagnostics tools.
api/src/db/migration-storage.ts— new shared helper that derives a stable slug from the workspacepackage.jsonname and provides isolated journal table naming (drizzle.__drizzle_migrations_<slug>).api/src/db/migrate.ts— runtime migrator now accepts an optionalMigrationStorageconfig. When provided, uses the isolated journal table. Includes legacy hash import from the old shareddrizzle.__drizzle_migrationsandpublic.drizzle_migrationstables (filtered to local migration hashes only). ExportsdetectDrift()that checks whether expected tables from migration SQL exist in thepublicschema and classifies the result.api/src/db/layer.ts— resolves migration storage on startup, logs the journal table in use, and fails with a clear drift error when the journal says "applied" but tables are missing.api/drizzle.config.ts— addsmigrations.schemaandmigrations.tableto keep Drizzle CLI aligned with the runtime journal table.packages/everything-dev/src/cli/db-doctor.ts— new CLI command (bos db doctor <plugin>) that inspects a plugin's isolated migration journal, local migration files, and expected tables, then reports health diagnosis.packages/everything-dev/src/cli/db-repair.ts— new CLI command (bos db repair <plugin>) that resets the isolated journal table and reapplies migrations viadrizzle-kit migrate. Refuses automatic repair for partial drift or unhealthy states.packages/everything-dev/src/contract.ts,contract.meta.ts,plugin.ts,cli.ts— wiring for the two new commands.packages/everything-dev/src/cli/db-studio.ts— generated remote drizzle configs now include the matchingmigrationsblock.packages/everything-dev/src/cli/sync.ts— addsapi/src/db/migration-storage.tsto framework-owned sync files. Plugins withsrc/db/directories automatically receive the new helper.packages/everything-dev/src/cli/init.ts— child projects getdb:doctoranddb:repairroot scripts.api/tests/unit/migration-storage.test.ts— covers slug derivation, table naming, legacy candidates, and expected table extraction from SQL.Migration drift detection: when
api/src/db/layer.tsdetects the journal has applied hashes but expected tables are missing, startup fails with a specific error pointing tobos db doctorandbos db repair.Patch Changes
ea699cd: Improve database error visibility and migration diagnostics:
api/src/lib/context.ts—flattenErrorhelper walks nested Error.cause chains so Drizzle/pg errors include the real underlying reason instead of just the SQL wrapper message. Mirrored toplugins/_template/src/lib/context.tsandplugins/apps/src/lib/context.ts.api/src/db/migrate.ts—loadMigrations()now logs migration source (virtual/disk) and count;migrate()returns the number of applied migrations.api/src/db/layer.ts— logs precise migration status (applied/total/source) and warns when zero migrations are found.api/src/db/index.ts— adds pool-level error listener for surfacing unexpected pg errors; makesclose()idempotent.host/src/program.ts— actually emits theformatORPCErroroutput instead of discarding it.api/tests/unit/context.test.tsandapi/tests/unit/db.test.ts— cover cause-chain flattening and database error unwrapping.