Version Packages - #685
Merged
Merged
Conversation
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
@nicia-ai/typegraph@0.58.0
Highlights
TypeGraph 0.58 reduces database round trips in graph read paths.
store.bulkFindEdgesToand its pinned-view counterpart resolve inbound edges for a set of targets across node and edge kinds, mirroringbulkFindEdgesFrom. Callers can replace per-target lookups with a set-oriented read while retaining input order, repeated and empty target buckets, temporal visibility, and per-input limits. For a single edge kind, the existingedges.Kind.bulkFindToremains available.Whole-node and whole-edge selections now choose a full-row fetch before executing SQL, including nested and spread selections detected during planning. Previously, a fresh query instance could issue a projected query, discover that the selector needed the complete entity, and fetch again. These selections now avoid that extra statement without requiring applications to retain query instances between requests. Selectors whose field needs depend on row values keep the existing fallback.
executeChecked(expectedSchemaVersion)combines a relational read with an active schema-version check in one statement snapshot. It offers an explicit alternative to probing the committed version before fetching data: a mismatch raisesSchemaChangedErrorbefore the selector runs, even when the query returns no rows. Applications can then reload the schema and rebuild the query before retrying. The check covers that statement; it does not pin later reads in the request or replace write fences.Upgrade notes
Storemocks and wrappers exposing the full store surface withbulkFindEdgesTo; query wrappers exposing the full executable-query surface must also forwardexecuteChecked. Library-created stores, pinned views, and queries provide the new methods automatically.executeChecked, catchSchemaChangedError, reload the reconciled schema, and rebuild the query before retrying. Start a new transaction if the old transaction holds a repeatable-read snapshot. An expected version ofundefinedmeans no active schema and is distinct from version zero.param()references with bound values before building a checked query.tableNames.schemaVersions, naming a relation withgraph_id,version, andis_activecolumns whose active row agrees withgetActiveSchema. A missing binding raisesConfigurationErrorbefore SQL execution. Bundled SQLite and PostgreSQL backends supply it automatically; this release requires no database migration.Minor Changes
ce35043Thanks @pdlug! - Addstore.bulkFindEdgesToand its pinned-view counterpart for set-oriented inbound reads across edge kinds. Detect whole-node and whole-edge selections before issuing a projected query, avoiding a redundant fetch for fresh query instances. AddexecuteChecked(expectedSchemaVersion)for a relational read and committed-schema check in one statement, withSchemaChangedErroron mismatch, including empty results.