Skip to content

Commit 20d31a9

Browse files
committed
release(db): prepare 0.10.0 npm json dependency
1 parent c50589f commit 20d31a9

10 files changed

Lines changed: 49 additions & 19 deletions

File tree

.async-pipeline/tasks.lock.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,5 +223,5 @@
223223
}
224224
],
225225
"hash": "sha256:5f179042f0de7a5e090c0f234980b53f348f793f702a72c0b7f9fe287f87236e",
226-
"generatedAt": "2026-06-15T00:58:38.512Z"
226+
"generatedAt": "2026-06-15T07:20:08.795Z"
227227
}

.github/async-pipeline.lock.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"generator": "@async/pipeline",
44
"config": "pipeline.ts",
55
"workflow": ".github/workflows/async-pipeline.yml",
6-
"hash": "sha256:205c87f8bfd6e77a11e27cc598263a16e75f2f1abb08c33384fc06802b1928d6",
7-
"generatedAt": "2026-06-15T00:58:38.474Z",
6+
"hash": "sha256:aaab0227d98ee39492e0b669ca496b173c8f627026dbc8c90b48b5f6fcd982ce",
7+
"generatedAt": "2026-06-15T07:20:08.762Z",
88
"triggers": {
99
"pull_request": {},
1010
"push": {
@@ -72,7 +72,7 @@
7272
"env": {
7373
"NODE_AUTH_TOKEN": {
7474
"kind": "async-pipeline.env.secret",
75-
"name": "NPM_TOKEN"
75+
"name": "npm_token"
7676
},
7777
"GITHUB_TOKEN": {
7878
"kind": "async-pipeline.env.secret",

.github/workflows/async-pipeline.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ jobs:
182182
env:
183183
CI: true
184184
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
185-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
185+
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
186186

187187
publish-github:
188188
name: publish-github

.release-please-manifest.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
{
2-
".": "0.9.0"
2+
".": "0.10.0"
33
}

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,27 @@
22

33
## Unreleased
44

5+
## [0.10.0](https://github.com/async/db/releases/tag/v0.10.0) - 2026-06-15
6+
7+
### Added
8+
9+
- Added normalized resource identity metadata across schema builders, generated
10+
TypeScript, schema manifests, viewer manifests, REST metadata, GraphQL SDL,
11+
API surface ledgers, SQL adapters, and inspectors.
12+
- Added compound object-key runtime support across package APIs, REST `__key`
13+
routes, GraphQL resource key inputs, WAL replay, audit payloads, and
14+
SQLite/Postgres existing-table adapters.
15+
- Added append-only log policy handling and `field.bytes(...)` metadata with
16+
encoded payload validation.
17+
18+
### Changed
19+
20+
- Delegated JSON-backed identity behavior through the standalone `@async/json`
21+
engine while preserving the `@async/db/json` compatibility export.
22+
- Replaced the GitHub release tarball dependency on `@async/json` with the npm
23+
package dependency `@async/json@^0.2.0`; GitHub Packages remain preview/mirror
24+
install surfaces, not the default dependency source.
25+
526
## [0.9.0](https://github.com/async/db/releases/tag/v0.9.0) - 2026-06-15
627

728
### Added

docs/ci-and-release.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ pipeline npm publish command:
174174
pnpm run pipeline:publish:npm
175175
```
176176

177-
The generated publish job maps `NPM_TOKEN` to `NODE_AUTH_TOKEN` and requires
177+
The generated publish job maps the org-level `npm_token` secret to `NODE_AUTH_TOKEN` and requires
178178
GitHub OIDC provenance. Keep `package.json` `repository.url` exactly aligned with
179179
`https://github.com/async/db`, because npm validates trusted
180180
publishing against the GitHub repository identity.
@@ -184,7 +184,7 @@ and verify the package, but npm publish will fail until npm trusts this
184184
repository and workflow.
185185

186186
If Trusted Publishing is not configured and the npm publish step fails, fix the
187-
`npm-publish` environment or `NPM_TOKEN` setup and rerun the generated GitHub
187+
`npm-publish` environment or `npm_token` setup and rerun the generated GitHub
188188
Actions publish job. Do not publish `@async/db` from the local machine.
189189

190190
## Actions Release

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@async/db",
3-
"version": "0.9.0",
3+
"version": "0.10.0",
44
"description": "The Async data workflow package for fixtures, generated types, local APIs, runtime stores, and database-backed graduation.",
55
"packageManager": "pnpm@10.20.0",
66
"scripts": {
@@ -55,7 +55,7 @@
5555
"async-db": "./dist/cli.js"
5656
},
5757
"dependencies": {
58-
"@async/json": "https://github.com/async/json/releases/download/v0.1.0/async-json-0.1.0.tgz"
58+
"@async/json": "^0.2.0"
5959
},
6060
"devDependencies": {
6161
"@async/api-contract": "0.1.0",

pipeline.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ export default definePipeline({
226226
provenance: true
227227
},
228228
env: {
229-
NODE_AUTH_TOKEN: env.secret("NPM_TOKEN"),
229+
NODE_AUTH_TOKEN: env.secret("npm_token"),
230230
GITHUB_TOKEN: env.secret("GITHUB_TOKEN")
231231
},
232232
github: {

pnpm-lock.yaml

Lines changed: 5 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/package/exports.test.ts

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ test('consumer projects can import package APIs through the @async/db package',
4949
await writeFile(path.join(cwd, 'check-package.mjs'), `import { createDbOperationHandler, createDbRequestHandler, createDbRuntime, createIndexedDbCacheStorage, createMemoryFs, inspectSchemaMigration, loadDbSchema, openDb, reloadDb, watchDbSources } from '@async/db';
5050
import { createDbClient, createIndexedDbCacheStorage as createClientIndexedDbCacheStorage } from '@async/db/client';
5151
import { defineConfig } from '@async/db/config';
52-
import { fileStorage, jsonStore, jsonStoreCapabilities, readJsonState, s3Storage, writeJsonState } from '@async/db/json';
52+
import { fileStorage, json, jsonStore, jsonStoreCapabilities, readJsonState, s3Storage, writeJsonState } from '@async/db/json';
5353
import { sqliteStore } from '@async/db/sqlite';
5454
import { compoundKeyId, defineSqliteImportPlan, openLegacySqlite } from '@async/db/sqlite/compat';
5555
import { openPostgresDb, postgresStore } from '@async/db/postgres';
@@ -73,6 +73,7 @@ if (typeof createIndexedDbCacheStorage !== 'function') throw new Error('missing
7373
if (typeof createClientIndexedDbCacheStorage !== 'function') throw new Error('missing client indexeddb cache API');
7474
if (typeof defineConfig !== 'function') throw new Error('missing config API');
7575
if (jsonStoreCapabilities.persistence !== 'local-file') throw new Error('missing json store capabilities');
76+
if (typeof json !== 'function') throw new Error('missing json standalone API');
7677
if (typeof jsonStore !== 'function') throw new Error('missing json store helper');
7778
if (typeof fileStorage !== 'function') throw new Error('missing json file storage helper');
7879
if (typeof s3Storage !== 'function') throw new Error('missing json s3 storage helper');
@@ -162,6 +163,7 @@ import {
162163
atomicWriteJson,
163164
atomicWriteJsonVersioned,
164165
fileStorage,
166+
json,
165167
jsonStateVersionsDir,
166168
jsonStore,
167169
jsonStatePathForResource,
@@ -173,6 +175,7 @@ import {
173175
s3Storage,
174176
withJsonStateWrite,
175177
writeJsonState,
178+
type JsonOpenOptions,
176179
type JsonStoreCapabilities,
177180
} from '@async/db/json';
178181
import { kvStore } from '@async/db/kv';
@@ -309,6 +312,7 @@ void recoverJsonStateDir('.db/state');
309312
void jsonStateVersionsDir(jsonStatePath);
310313
void jsonStore({ durability: 'versioned', maxVersions: 5, encryption: { key: () => 'k' } });
311314
void jsonStore();
315+
void json('./db/package-versions.json', { identity: { fields: ['name', 'version'] } } satisfies JsonOpenOptions);
312316
void s3Storage({
313317
bucket: 'app-json-db',
314318
prefix: 'prod',
@@ -485,7 +489,7 @@ test('generated async-pipeline workflow owns release, preview, snapshot, and Pag
485489
assert.match(workflow, /id-token: write/);
486490
assert.match(workflow, /packages: write/);
487491
assert.match(workflow, /pull-requests: write/);
488-
assert.match(workflow, /NODE_AUTH_TOKEN: \$\{\{ secrets\.NPM_TOKEN \}\}/);
492+
assert.match(workflow, /NODE_AUTH_TOKEN: \$\{\{ secrets\.npm_token \}\}/);
489493
const releaseDoctorJob = workflow.match(/ release-doctor:[\s\S]*?\n\n snapshot:/)?.[0] ?? '';
490494
assert.match(releaseDoctorJob, /contents: read/);
491495
assert.match(releaseDoctorJob, /packages: read/);
@@ -631,6 +635,12 @@ test('public JSON declarations expose file database helpers', async () => {
631635
assert.match(declarations, /export function restoreJsonStateVersion\(/);
632636
assert.match(declarations, /export function listJsonStateVersions\(/);
633637
assert.match(declarations, /export function recoverJsonStateDir\(/);
638+
assert.match(declarations, /export type JsonIdentityDefinition = \{/);
639+
assert.match(declarations, /export type JsonOpenOptions = \{/);
640+
assert.match(declarations, /identity\?: JsonIdentityDefinition;/);
641+
assert.match(declarations, /writePolicy\?: 'append-only' \| string;/);
642+
assert.match(declarations, /export type JsonKey = string \| number \| boolean \| Record<string, unknown>;/);
643+
assert.match(declarations, /export function json\(target: string, options\?: JsonOpenOptions\): Promise<JsonOpenResult>;/);
634644
assert.match(declarations, /export type JsonStoreEncryptionOptions = \{/);
635645
assert.match(declarations, /export type JsonStateWriteOptions = \{/);
636646
assert.match(declarations, /crossProcessLock\?: boolean;/);

0 commit comments

Comments
 (0)