@typed-sql/core 2.1.0-rc.1 → 2.1.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/CHANGELOG.md +115 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,120 @@
|
|
|
1
1
|
# @typed-sql/core
|
|
2
2
|
|
|
3
|
+
## 2.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 1041bfa: Add the versioned, serializable source-analysis service shared by batch checks and editor tooling.
|
|
8
|
+
Results carry deterministic source, project, schema, type-policy, grammar, and capability identities;
|
|
9
|
+
cancellation and source, query-count, structural-variant, and generated-declaration limits fail closed.
|
|
10
|
+
- 1041bfa: Add a grammar-neutral serialized artifact compatibility identity and deterministic compatibility outcomes, and use the shared identity contract for query-manifest cache reuse.
|
|
11
|
+
- 1041bfa: Add structured opt-in debug events and confirmed support-bundle generation with privacy-safe default redaction.
|
|
12
|
+
- 1041bfa: Allow non-empty arrays of typed SQL fragments to be interpolated directly as homogeneous,
|
|
13
|
+
comma-separated structure. Add fail-closed compiler analysis for direct map callbacks and fragment
|
|
14
|
+
literals, cardinality-independent artifacts, bounded prepared-cardinality caches, shared grammar
|
|
15
|
+
conformance, and runtime limits while preserving ordinary arrays as single bound values.
|
|
16
|
+
- 1041bfa: Add neutral column charset and collation evidence, generated versioned MySQL built-in catalogs,
|
|
17
|
+
catalog-backed type and function availability, MySQL collation coercibility, and signed/unsigned
|
|
18
|
+
numeric expression resolution.
|
|
19
|
+
Conformance v2 now compares grammar analysis against the neutral resolved-column contract while
|
|
20
|
+
allowing grammar-owned result evidence.
|
|
21
|
+
- 1041bfa: Resolve PostgreSQL operators and snapshot v2 routines through a grammar-owned candidate selector
|
|
22
|
+
that uses canonical types, cast contexts, preferred categories, unknown-literal rules, domains,
|
|
23
|
+
arrays, ranges, enums, and the `anyelement` and `anycompatible` polymorphic families.
|
|
24
|
+
Named, defaulted, expanded-variadic, and explicit-variadic routine calls now select against snapshot
|
|
25
|
+
argument evidence, while known invalid explicit casts produce a stable diagnostic.
|
|
26
|
+
The versioned core catalog now recognizes PostgreSQL temporal, bit-string, network, geometric,
|
|
27
|
+
full-text, XML, range, multirange, object-identifier, and related scalar types. Unary numeric and
|
|
28
|
+
bitwise operators, plus binary integer and bit-string operators, now resolve through typed
|
|
29
|
+
candidates and reject invalid operands. Date, timestamp, time, and interval arithmetic now uses
|
|
30
|
+
asymmetric PostgreSQL signatures, with parameter inference deferred until candidate selection.
|
|
31
|
+
Built-in range/multirange containment and arithmetic, network containment and address arithmetic,
|
|
32
|
+
full-text search composition, JSON-path predicates and deletion, and their multi-character tokens
|
|
33
|
+
now use exact grammar-owned signatures.
|
|
34
|
+
Geometric transformation, position, intersection, distance, containment, and relationship operators
|
|
35
|
+
now resolve through their exact operand and result signatures, including prefix forms.
|
|
36
|
+
Numeric promotion, mathematical prefix, bit-string shift, binary/JSON/text concatenation, money,
|
|
37
|
+
`pg_lsn`, and tuple-identifier operators now use catalog-derived signatures and coercions.
|
|
38
|
+
Array subscripts infer nullable element types, slices preserve the array type, omitted bounds are
|
|
39
|
+
represented explicitly, index parameters infer `integer`, and nested array mappings retain every dimension.
|
|
40
|
+
`ANY`, `SOME`, and `ALL` comparisons now resolve array elements or single-column subqueries through
|
|
41
|
+
the operator catalog, while row comparisons validate arity and select an operator for each field pair.
|
|
42
|
+
Parenthesized composite field selection now uses snapshot v2 field evidence for its database type,
|
|
43
|
+
TypeScript type, nullability, parameter context, and unknown-field diagnostics.
|
|
44
|
+
`COLLATE` now preserves collatable expression types, and `AT TIME ZONE` resolves PostgreSQL's exact
|
|
45
|
+
timestamp, timestamp-with-time-zone, and time-with-time-zone conversions with text or interval zones.
|
|
46
|
+
PostgreSQL 17 and newer also resolve and version-gate the corresponding `AT LOCAL` forms.
|
|
47
|
+
Scalar and row-valued `IN` lists and subqueries now validate equality candidates, numeric literals,
|
|
48
|
+
row arity, composite field comparability, nullability, and per-position parameter contexts.
|
|
49
|
+
The versioned cast catalogs now include every direct `pg_cast` conversion among shipped core types
|
|
50
|
+
for PostgreSQL 14 through 18, including the PostgreSQL 15 geometric removal and PostgreSQL 18
|
|
51
|
+
integer/bytea additions. Automatic assignment-to-string and explicit string I/O casts follow the
|
|
52
|
+
server's fallback conversion rules.
|
|
53
|
+
PostgreSQL interval literals now parse prefix precision, every valid field and field-range qualifier,
|
|
54
|
+
suffix second precision, and qualified interval cast types while retaining typed-literal source spans.
|
|
55
|
+
All forms resolve through the canonical `interval` type, and invalid field ranges fail during parsing.
|
|
56
|
+
JSON, JSONB, and JSONPATH typed literals now preserve their grammar-owned cast form. The core catalog
|
|
57
|
+
and resolver cover `jsonb_path_exists`, `jsonb_path_match`, query-array, query-first, and set-returning
|
|
58
|
+
query variants, including timezone-aware forms, optional variables/silent arguments, and nullability.
|
|
59
|
+
Database parameter identities are now retained even when their configured TypeScript mapping is
|
|
60
|
+
`unknown`, so JSON and other deliberately opaque codecs still produce typed prepared parameters.
|
|
61
|
+
PostgreSQL 17 and newer now parse and resolve the grammar-owned `JSON_EXISTS` SQL/JSON expression,
|
|
62
|
+
including formatted inputs, `PASSING` variables, error behavior, parameter identities, nullability,
|
|
63
|
+
and server-version diagnostics.
|
|
64
|
+
The grammar-owned PostgreSQL 17 `JSON_QUERY` form also resolves returning types, JSON output formats,
|
|
65
|
+
wrapper and quote behavior, constant `ON EMPTY` and `ON ERROR` defaults, and exact output nullability.
|
|
66
|
+
PostgreSQL 17 `JSON_VALUE` now resolves scalar return types and behaviors while preserving its
|
|
67
|
+
always-possible SQL null result for JSON null and rejecting unsupported collection or format clauses.
|
|
68
|
+
PostgreSQL 16 and newer now parse and resolve the standard `JSON_OBJECT` and `JSON_ARRAY`
|
|
69
|
+
constructors, including key/value and query forms, null handling, unique-key declarations, formatted
|
|
70
|
+
inputs, encoded returns, parameter identities, non-null output types, and server-version diagnostics.
|
|
71
|
+
Legacy and quoted `json_object(...)` calls remain ordinary catalog-backed routine calls.
|
|
72
|
+
PostgreSQL 17 and newer also own `JSON`, `JSON_SCALAR`, and `JSON_SERIALIZE`, including JSON-compatible
|
|
73
|
+
inputs, uniqueness declarations, scalar and composite conversion, string or binary returns, UTF-8
|
|
74
|
+
encoding, parameter inference, null propagation, and version diagnostics. The overlapping pre-17
|
|
75
|
+
functional `json(...)` cast keeps its earlier cast semantics.
|
|
76
|
+
PostgreSQL 16 and newer now own `IS JSON` and `IS NOT JSON` predicates across value, scalar,
|
|
77
|
+
array, object, and unique-key constraints, with JSON-compatible input validation, text parameter
|
|
78
|
+
inference, SQL-null propagation, and server-version diagnostics.
|
|
79
|
+
PostgreSQL 16 and newer now also own the standard `JSON_OBJECTAGG` and `JSON_ARRAYAGG` grammar,
|
|
80
|
+
including null and uniqueness clauses, aggregate-local ordering, `FILTER`, `OVER`, formatted inputs,
|
|
81
|
+
encoded returns, grouping validation, parameter inference, nullable empty-input results, and
|
|
82
|
+
server-version diagnostics.
|
|
83
|
+
PostgreSQL 17 `JSON_TABLE` now owns its table-reference grammar and resolves root, ordinality,
|
|
84
|
+
scalar, formatted, `EXISTS`, and nested columns with implicit lateral scope, alias lists, declared
|
|
85
|
+
types, behavior validation, nested null-padding, and server-version diagnostics.
|
|
86
|
+
|
|
87
|
+
Expose optional routine argument names and default evidence through the neutral resolver bridge so
|
|
88
|
+
grammar packages can implement named, defaulted, and variadic call selection.
|
|
89
|
+
- 1041bfa: Complete PostgreSQL DML parsing and analysis for identity overriding, `ON CONFLICT` targets and the
|
|
90
|
+
`excluded` namespace, row assignments, source-aware update/delete returning, versioned `MERGE`, and
|
|
91
|
+
PostgreSQL 18 old/new `RETURNING` aliases. Version-dependent forms now use server-major evidence and
|
|
92
|
+
fail closed when that evidence is absent or outside the feature's supported range. Snapshot v2 index
|
|
93
|
+
evidence now verifies expression, operator-class, collation, and partial-predicate conflict targets,
|
|
94
|
+
while insert/select, update, and merge writes propagate parameter types and reject known-incompatible
|
|
95
|
+
source types.
|
|
96
|
+
|
|
97
|
+
The neutral resolver snapshot bridge now exposes optional index and constraint-deferrability evidence
|
|
98
|
+
so grammar packages can consume schema v2 conflict-target metadata without importing schema internals.
|
|
99
|
+
- 1041bfa: Add canonical schema snapshot format 2 with isolated v1/v2 codecs, conservative v1 upgrades,
|
|
100
|
+
neutral relation/constraint/index/type/routine evidence, and complete provider introspection.
|
|
101
|
+
Resolvers now consume structural write and routine evidence, while drift, compatibility, manifests,
|
|
102
|
+
verification proofs, and plan artifacts bind to the schema format and canonical hash.
|
|
103
|
+
- 1041bfa: Add deterministic versioned dialect capability states backed by normalized server versions,
|
|
104
|
+
settings, extensions, and compile options. Query manifests now invalidate on capability changes and
|
|
105
|
+
record evidence for capabilities each query uses, while the CLI exposes a human-readable capability
|
|
106
|
+
report. The boolean capability map remains available as an additive migration bridge.
|
|
107
|
+
|
|
108
|
+
### Patch Changes
|
|
109
|
+
|
|
110
|
+
- 1041bfa: Harden PostgreSQL execution with policy-owned scalar and array codecs, runtime extension codec OID
|
|
111
|
+
resolution, generated-snapshot compatibility checks, bounded per-connection prepared-statement
|
|
112
|
+
caches with schema and search-path invalidation, and structured driver failure classifications.
|
|
113
|
+
Keep the shared `TSQ230` diagnostic registry text grammar-neutral.
|
|
114
|
+
- 1041bfa: Resolve SQLite core built-ins, operators, coercions, arities, nullability, and in-band function
|
|
115
|
+
release boundaries from SQLite-owned catalog data. Add a stable diagnostic for invalid SQLite
|
|
116
|
+
built-in invocations and fail closed when version-gated functions lack usable server evidence.
|
|
117
|
+
|
|
3
118
|
## 2.1.0-rc.1
|
|
4
119
|
|
|
5
120
|
### Patch Changes
|