@workerstack/database 0.22.1 → 0.23.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -52,6 +52,7 @@ This README is the full usage manual. An agent that reads only this file should
52
52
  - [Package exports](#package-exports)
53
53
  - [Repository layout](#repository-layout)
54
54
  - [Develop](#develop)
55
+ - [Upgrading to 0.23](#upgrading-to-023)
55
56
  - [Upgrading to 0.22.1](#upgrading-to-0221)
56
57
  - [Upgrading to 0.22](#upgrading-to-022)
57
58
  - [Upgrading to 0.21](#upgrading-to-021)
@@ -412,15 +413,24 @@ A text format trims the value, then writes it in its standard's case, before it
412
413
 
413
414
  A text format's rule is its pattern, which Go's RE2, Rust's regex and JavaScript's `u` mode read alike, and its length bounds, published as `pattern`, `minLength` and `maxLength` beside `x-comb-format` and the `x-comb-transform` it runs (`["trim", "uppercase"]` on `iso4217`), and its OpenAPI example is a value of the standard as written (`EUR` on `iso4217`), none where the column's own bounds leave that value out. It takes no `x-comb-text`, as no format's pattern admits U+0000 or a surrogate. The format sets the column's trim, case and length, so codegen refuses a `trim`, `lowercase` or `uppercase` beside it (`users.currency: an iso4217 text takes no lowercase: the format sets its case and trim`), a `min` or `max` outside its range, which the format already holds or which leaves no value (`users.currency: max 4 is past iso4217's length 3: the format holds it`), and an `email`, `url`, `password`, `imageUri` or `name` beside it, each a rule of its own (`users.currency: format and email contradict; declare one`). A bound inside the range, or a `pattern`, beside a format narrows it. `bcp47` sets no maximum, as RFC 5646's 35 characters are the least an implementation must hold, not a cap on a tag, so a column declares its own `max`. An id comb does not know is refused with the list it does (`users.currency: comb knows no format "iso-4217"; text formats: base64url, bcp47, …`).
414
415
 
415
- Where the table names a predicate, a value must also be a member of the pinned registry it reads, which no pattern states: `HRK` matches `^[A-Z]{3}$` and is no `iso4217` value, withdrawn in 2023, and `Europe/Atlantis` matches the zone pattern and names no zone. Each registry is a snapshot of the release the table names, committed in comb's source: nothing fetches at build, test or run time, and a comb release moves to a newer one. The five predicates are root exports, each taking any string, exactly as written, and never throwing; a bundle that calls none of them carries none of their lists.
416
+ Where the table names a predicate, a value must also be a member of the pinned registry it reads, which no pattern states: `HRK` matches `^[A-Z]{3}$` and is no `iso4217` value, withdrawn in 2023, and `Europe/Atlantis` matches the zone pattern and names no zone. Each registry is a snapshot of the release the table names, committed in comb's source: nothing fetches at build, test or run time, and a comb release moves to a newer one. The five registry predicates are root exports, each taking any string, exactly as written, and never throwing; a bundle that calls none of them carries none of their lists. `isBcp47` is the one predicate that checks a pattern alone: it takes what a `format: "bcp47"` column takes before its trim, RFC 5646 §2.1's whole Language-Tag, `x-private` and `i-klingon` among them, from the same grammar.
416
417
 
417
418
  ```ts
418
- import { isIanaTimeZone, isIso3166Alpha2, isIso3166Alpha3, isIso4217, isIso639Alpha2 } from "@workerstack/database"
419
+ import {
420
+ isBcp47,
421
+ isIanaTimeZone,
422
+ isIso3166Alpha2,
423
+ isIso3166Alpha3,
424
+ isIso4217,
425
+ isIso639Alpha2,
426
+ } from "@workerstack/database"
419
427
 
420
428
  isIso4217("EUR") // true
421
429
  isIso4217("HRK") // false: withdrawn in 2023
422
430
  isIso4217("eur") // false: the DTO uppercases a value first, the predicate does not
423
431
  isIso3166Alpha2("UK") // false: reserved, not assigned; GB is the code
432
+ isBcp47("zh-Hant-TW") // true
433
+ isBcp47(" en") // false: the DTO trims a value first, the predicate does not
424
434
  ```
425
435
 
426
436
  A reader that validates from the JSON Schema alone checks such a value with the predicate, or with the release meta-contract §2.1 names beside the id. The `uts35-*` formats are the values of UTS #35's Unicode locale extension keys in CLDR 49, deprecated ones left out (`uts35-hc` is `h11`, `h12`, `h23`, `h24`, `c12` and `c24`); their pattern lists every value, so it is the whole rule, as on every format the table names no registry for.
@@ -1199,27 +1209,27 @@ ULIDs use Crockford base32 with a 10-character timestamp and 16 characters of ra
1199
1209
 
1200
1210
  ## Package exports
1201
1211
 
1202
- | Specifier | Contents |
1203
- | ------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------- |
1204
- | `@workerstack/database` | `CombError`, `createUlidFactory`, `generateId`, `generateUlid`, `LruCache`, the format registry predicates, error keys and types |
1205
- | `@workerstack/database/types` | `StatusKey`, `ConstraintMap`, `DatabaseErrorHandler`, … |
1206
- | `@workerstack/database/cli` | `runCli(argv, io)`: run the CLI in process and get its exit code |
1207
- | `@workerstack/database/codegen` | `analyze`, `validateTables`, `fieldConstraintsOf`, analysis types |
1208
- | `@workerstack/database/codegen/generators` | every `generate*` function |
1209
- | `@workerstack/database/meta` | `combMeta`, `readCombMeta`, `readCombEntityMeta`, `readCombQueryMeta`, `carryCombMeta`, meta types |
1210
- | `@workerstack/database/migrate` | config, providers, apply, parse, Atlas helpers |
1211
- | `@workerstack/database/query` | filter, order, select, cursors, Zod builders |
1212
- | `@workerstack/database/query/sqlite` | SQL generation, FTS5, JSON helpers |
1213
- | `@workerstack/database/sqlite/columns` | `c` for SQLite |
1214
- | `@workerstack/database/sqlite/constraints` | constraint types |
1215
- | `@workerstack/database/sqlite/constraint-handler` | `sqliteErrorHandler`, `classifySqliteError`, `handleConstraintViolation` |
1216
- | `@workerstack/database/sqlite/d1/session` | `openD1Session` |
1217
- | `@workerstack/database/sqlite/d1/bookmark` | `BookmarkTracker` |
1218
- | `@workerstack/database/sqlite/d1/error-handler` | `d1ErrorHandler`, `classifyD1Error` |
1219
- | `@workerstack/database/sqlite/d1/sharding` | `ShardRouter`, `shardMap` |
1220
- | `@workerstack/database/states` | `defineStateMachine`, `canTransition`, `assertTransition`, `nextStates`, `isState`, `isTerminal` |
1221
- | `@workerstack/database/pg/columns` | `c` for PostgreSQL |
1222
- | `@workerstack/database/pg/error-handler` | `pgErrorHandler`, `classifyPgError` |
1212
+ | Specifier | Contents |
1213
+ | ------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------- |
1214
+ | `@workerstack/database` | `CombError`, `createUlidFactory`, `generateId`, `generateUlid`, `LruCache`, the format registry predicates, `isBcp47`, error keys and types |
1215
+ | `@workerstack/database/types` | `StatusKey`, `ConstraintMap`, `DatabaseErrorHandler`, … |
1216
+ | `@workerstack/database/cli` | `runCli(argv, io)`: run the CLI in process and get its exit code |
1217
+ | `@workerstack/database/codegen` | `analyze`, `validateTables`, `fieldConstraintsOf`, analysis types |
1218
+ | `@workerstack/database/codegen/generators` | every `generate*` function |
1219
+ | `@workerstack/database/meta` | `combMeta`, `readCombMeta`, `readCombEntityMeta`, `readCombQueryMeta`, `carryCombMeta`, meta types |
1220
+ | `@workerstack/database/migrate` | config, providers, apply, parse, Atlas helpers |
1221
+ | `@workerstack/database/query` | filter, order, select, cursors, Zod builders |
1222
+ | `@workerstack/database/query/sqlite` | SQL generation, FTS5, JSON helpers |
1223
+ | `@workerstack/database/sqlite/columns` | `c` for SQLite |
1224
+ | `@workerstack/database/sqlite/constraints` | constraint types |
1225
+ | `@workerstack/database/sqlite/constraint-handler` | `sqliteErrorHandler`, `classifySqliteError`, `handleConstraintViolation` |
1226
+ | `@workerstack/database/sqlite/d1/session` | `openD1Session` |
1227
+ | `@workerstack/database/sqlite/d1/bookmark` | `BookmarkTracker` |
1228
+ | `@workerstack/database/sqlite/d1/error-handler` | `d1ErrorHandler`, `classifyD1Error` |
1229
+ | `@workerstack/database/sqlite/d1/sharding` | `ShardRouter`, `shardMap` |
1230
+ | `@workerstack/database/states` | `defineStateMachine`, `canTransition`, `assertTransition`, `nextStates`, `isState`, `isTerminal` |
1231
+ | `@workerstack/database/pg/columns` | `c` for PostgreSQL |
1232
+ | `@workerstack/database/pg/error-handler` | `pgErrorHandler`, `classifyPgError` |
1223
1233
 
1224
1234
  ## Repository layout
1225
1235
 
@@ -1267,6 +1277,22 @@ bun run test:bun # bun test — the bun:sqlite replay suite
1267
1277
 
1268
1278
  Commits follow [Conventional Commits](https://www.conventionalcommits.org). `bun install` points `core.hooksPath` at `.githooks`, so the `commit-msg` hook enforces it locally; CI re-checks every commit on a pull request.
1269
1279
 
1280
+ ## Upgrading to 0.23
1281
+
1282
+ What changes for a project on 0.22.1. Before deploying it:
1283
+
1284
+ 1. **Know what changed in the API.** A test holds these three lists to the exports themselves.
1285
+
1286
+ New exports: `isBcp47`.
1287
+
1288
+ Removed: none. **Fix:** none.
1289
+
1290
+ Changed: none.
1291
+
1292
+ `isBcp47(value)` answers whether a string is a well-formed BCP 47 language tag, RFC 5646 §2.1's Language-Tag, exactly as written: it reads the grammar a `format: "bcp47"` column checks, takes what the column takes before its trim, never trims or folds case (`" en"` is false), and never throws, as the registry predicates do ([Formats](#formats)). **Fix:** none.
1293
+
1294
+ 2. **Expect `format: "bcp47"` to take private-use and grandfathered tags.** The format named RFC 5646 §2.1 but checked its `langtag` alone, so it refused a private-use tag such as `x-private` and the irregular grandfathered tags, `i-klingon`, `i-default`, `en-GB-oed`, `sgn-BE-FR` and the rest of RFC 5646's list, which are well-formed tags of the standard. It now checks the whole Language-Tag, each class case-insensitive, and its published `pattern` grows to match: a column, its generated DTO and `isBcp47` (step 1) take them, and still take every tag they took before. The regular grandfathered tags, such as `zh-min-nan` and `art-lojban`, were already taken as langtags. **Fix:** none, unless code behind a `bcp47` column assumes a tag starts with a language subtag: handle a tag starting `x-` or `i-` there, or narrow the column with a `pattern`; regenerate, so the published spec carries the new pattern.
1295
+
1270
1296
  ## Upgrading to 0.22.1
1271
1297
 
1272
1298
  What changes for a project on 0.22. No export changed. Before deploying it:
@@ -178,7 +178,7 @@ no `anyOf` walk. A nullable trimmed text with a `max` of 9, as codegen publishes
178
178
  `maximum` are the standard's range, or a declared one inside it. A read of a text or an integer
179
179
  publishes none. The ids, each with its standard and release:
180
180
  - `base64url`: RFC 4648 §5 base64url, unpadded.
181
- - `bcp47`: BCP 47 language tag, RFC 5646 §2.1 well-formed.
181
+ - `bcp47`: BCP 47 language tag, RFC 5646 §2.1 well-formed. Predicate: `isBcp47`.
182
182
  - `e164`: ITU-T E.164 phone number, + and up to 15 digits.
183
183
  - `iana-time-zone`: IANA time zone name, tzdata 2026f. Registry: `isIanaTimeZone`.
184
184
  - `ip`: IPv4 dotted quad or IPv6 address, RFC 4291 §2.2.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workerstack/database",
3
- "version": "0.22.1",
3
+ "version": "0.23.0",
4
4
  "description": "Database framework for Cloudflare D1, PostgreSQL, and SQLite. Schema builders, error handling, D1 sessions, sharding, codegen, migrations.",
5
5
  "keywords": [
6
6
  "cloudflare-d1",
@@ -0,0 +1,12 @@
1
+ import { formatTakes } from "./catalog.ts"
2
+
3
+ /**
4
+ * Whether `value` is a well-formed BCP 47 language tag, RFC 5646 §2.1's Language-Tag, exactly as
5
+ * written: a langtag such as zh-Hant-TW or es-419, a private-use tag such as x-private, or a
6
+ * grandfathered tag such as i-klingon. It takes what a `format: "bcp47"` column takes before its
7
+ * trim, from the same grammar: it never trims or folds case, so " en" is no tag. A value that is no
8
+ * string at runtime is refused, and this never throws.
9
+ */
10
+ export function isBcp47(value: string): boolean {
11
+ return typeof value === "string" && formatTakes("bcp47", value)
12
+ }
@@ -98,13 +98,28 @@ const LOWERCASE: Transforms = ["trim", "lowercase"]
98
98
  const UPPERCASE: Transforms = ["trim", "uppercase"]
99
99
 
100
100
  /*
101
- * RFC 5646 §2.1's langtag: language (with up to three extlangs), script, region, variants, extensions
102
- * and private use, each class case-insensitive; a grandfathered tag is no langtag
101
+ * RFC 5646 §2.1's Language-Tag, each class case-insensitive: a langtag (language with up to three
102
+ * extlangs, script, region, variants, extensions and private use), a private-use tag alone, or an
103
+ * irregular grandfathered tag; the regular grandfathered tags, such as zh-min-nan, are langtags
103
104
  */
104
105
  const LANGUAGE = "(?:[A-Za-z]{2,3}(?:-[A-Za-z]{3}){0,3}|[A-Za-z]{4,8})"
105
106
  const VARIANTS = "(?:-(?:[A-Za-z0-9]{5,8}|[0-9][A-Za-z0-9]{3}))*"
106
107
  const EXTENSIONS = "(?:-[0-9A-WYZa-wyz](?:-[A-Za-z0-9]{2,8})+)*"
107
- const LANGTAG = `${LANGUAGE}(?:-[A-Za-z]{4})?(?:-(?:[A-Za-z]{2}|[0-9]{3}))?${VARIANTS}${EXTENSIONS}(?:-[Xx](?:-[A-Za-z0-9]{1,8})+)?`
108
+ const PRIVATE_USE = "[Xx](?:-[A-Za-z0-9]{1,8})+"
109
+ const LANGTAG = `${LANGUAGE}(?:-[A-Za-z]{4})?(?:-(?:[A-Za-z]{2}|[0-9]{3}))?${VARIANTS}${EXTENSIONS}(?:-${PRIVATE_USE})?`
110
+ /* RFC 5646 §2.1's irregular grandfathered tags, which match no langtag */
111
+ const IRREGULAR =
112
+ "en-GB-oed i-ami i-bnn i-default i-enochian i-hak i-klingon i-lux i-mingo i-navajo i-pwn i-tao i-tay i-tsu sgn-BE-FR sgn-BE-NL sgn-CH-DE"
113
+
114
+ /** `tag` with each letter a class of its two cases, as the rest of the grammar reads them */
115
+ const anyCase = (tag: string): string =>
116
+ tag.replace(/[A-Za-z]/gu, (letter) => `[${letter.toUpperCase()}${letter.toLowerCase()}]`)
117
+
118
+ /** RFC 5646 §2.1's Language-Tag, anchored: langtag / privateuse / grandfathered */
119
+ function languageTagSource(): string {
120
+ const grandfathered = IRREGULAR.split(" ").map(anyCase).join("|")
121
+ return `^(?:${LANGTAG}|${PRIVATE_USE}|${grandfathered})$`
122
+ }
108
123
 
109
124
  /* semver.org 2.0.0's version pattern, its groups non-capturing */
110
125
  const NUMBER = "(?:0|[1-9][0-9]*)"
@@ -194,7 +209,15 @@ function specs(): { readonly [F in TextFormat]: FormatSpec } {
194
209
  return {
195
210
  base64url: spec(["RFC 4648 §5 base64url, unpadded", UNPADDED, 0, null, TRIM, null, "dGVzdA"]),
196
211
  /* RFC 5646 §4.4.1's 35 is the buffer an implementation must hold, not a cap on a tag */
197
- bcp47: spec(["BCP 47 language tag, RFC 5646 §2.1 well-formed", `^${LANGTAG}$`, 2, null, TRIM, null, "zh-Hant-TW"]),
212
+ bcp47: spec([
213
+ "BCP 47 language tag, RFC 5646 §2.1 well-formed",
214
+ languageTagSource(),
215
+ 2,
216
+ null,
217
+ TRIM,
218
+ null,
219
+ "zh-Hant-TW",
220
+ ]),
198
221
  e164: spec(["ITU-T E.164 phone number, + and up to 15 digits", "^\\+[1-9][0-9]{1,14}$", 3, 16, TRIM, null, PHONE]),
199
222
  "iana-time-zone": spec(["IANA time zone name, tzdata 2026f", ZONE_NAME, 1, 64, TRIM, "isIanaTimeZone", ZONE]),
200
223
  ip: spec([ADDRESS, `^(?:${ipv4}|${ipv6})$`, 2, 45, LOWERCASE, null, IPV6]),
package/src/index.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { isCidr } from "./cidr.ts"
2
+ export { isBcp47 } from "./formats/bcp47.ts"
2
3
  export type { IntegerFormat, TextFormat } from "./formats/catalog.ts"
3
4
  export { isIanaTimeZone } from "./formats/iana-time-zone.ts"
4
5
  export { isIso3166Alpha2, isIso3166Alpha3 } from "./formats/iso3166-1.ts"
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Whether `value` is a well-formed BCP 47 language tag, RFC 5646 §2.1's Language-Tag, exactly as
3
+ * written: a langtag such as zh-Hant-TW or es-419, a private-use tag such as x-private, or a
4
+ * grandfathered tag such as i-klingon. It takes what a `format: "bcp47"` column takes before its
5
+ * trim, from the same grammar: it never trims or folds case, so " en" is no tag. A value that is no
6
+ * string at runtime is refused, and this never throws.
7
+ */
8
+ export declare function isBcp47(value: string): boolean;
9
+ //# sourceMappingURL=bcp47.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bcp47.d.ts","sourceRoot":"","sources":["../../src/formats/bcp47.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAE9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"catalog.d.ts","sourceRoot":"","sources":["../../src/formats/catalog.ts"],"names":[],"mappings":"AAoBA,0EAA0E;AAC1E,eAAO,MAAM,YAAY,YACxB,WAAW,EACX,OA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KAAK,EAAE,MAAM,GAAG,OAAO,CAKtE"}
package/types/index.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  export { isCidr } from "./cidr.ts";
2
+ export { isBcp47 } from "./formats/bcp47.ts";
2
3
  export type { IntegerFormat, TextFormat } from "./formats/catalog.ts";
3
4
  export { isIanaTimeZone } from "./formats/iana-time-zone.ts";
4
5
  export { isIso3166Alpha2, isIso3166Alpha3 } from "./formats/iso3166-1.ts";
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAA;AAClC,YAAY,EAAE,aAAa,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAA;AACrE,OAAO,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AAC5D,OAAO,EAAE,eAAe,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACzE,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAA;AACtD,OAAO,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAA;AAC3C,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EACN,KAAK,YAAY,EACjB,YAAY,EACZ,KAAK,mBAAmB,EACxB,KAAK,oBAAoB,GACzB,MAAM,oBAAoB,CAAA;AAC3B,OAAO,EAAE,cAAc,EAAE,kBAAkB,EAAE,YAAY,EAAE,MAAM,oBAAoB,CAAA;AACrF,OAAO,EACN,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,iBAAiB,EACjB,QAAQ,EACR,KAAK,cAAc,EACnB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,aAAa,EAClB,KAAK,YAAY,EACjB,KAAK,aAAa,EAClB,KAAK,eAAe,EACpB,KAAK,aAAa,EAClB,KAAK,kBAAkB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