Skip to content

Commit 35266ec

Browse files
committed
Bump RQB core to v8.23.0
1 parent e33b458 commit 35266ec

10 files changed

Lines changed: 50 additions & 13 deletions

File tree

AGENTS.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,10 @@ opposite render modes. This is structural, not cosmetic — one plugin instance
247247
run otherwise lands on the flush _after_ the first op and silently reverts it. Found the hard
248248
way: 4 of 19 cases failed with the ops apparently never applied.
249249
- `extract.ts` exposes both `extractFromContainer` and `extractFromMarkup` (upstream's
250-
`schemaVersion` 2 split). The markup form builds its own `JSDOM` when there is no global
250+
`schemaVersion` 2 split). Both walk a real DOM here, so `schemaVersion` 3's per-element `text`
251+
channel (own direct text-node children only, verbatim) needs no entity decoding — upstream's
252+
`decodeText` exists only because its markup walker is `HTMLRewriter`. The markup form builds its
253+
own `JSDOM` when there is no global
251254
`DOMParser`, which is what lets the ssr project run in the `node` environment and thereby prove
252255
a server render needs no document.
253256

@@ -294,8 +297,9 @@ The four conformance gates were each proved red and reverted:
294297

295298
1. **DOM parity**` conformance-gate-probe` appended to `ActionElement.tsx`'s class turned
296299
exactly 100 cases red (50 static + 50 post-flush), which is the split the two projects promise.
297-
2. **`schemaVersion`**`EXPECTED_SCHEMA_VERSION = 3` made `conformance:fetch` exit 1 with the
298-
"update `test/conformance` before bumping the tag" message.
300+
2. **`schemaVersion`**`EXPECTED_SCHEMA_VERSION = 4` made `conformance:fetch` exit 1 with the
301+
"update `test/conformance` before bumping the tag" message. (Originally proved with `3` against
302+
the schema-2 fixtures; it fired for real on the v8.23.0 bump.)
299303
3. **Scenario drift** — renaming the local `allControls` scenario turned the drift test (and the
300304
three case-alignment tests) red while all 50 rendered cases stayed green.
301305
4. **Value-editor reset** — an early `return` in `createValueEditorReset`'s apply phase left

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,17 @@ adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1616

1717
### Changed
1818

19+
- `@react-querybuilder/core` is bumped to **8.23.0**, and the conformance fixtures with it
20+
(`CONFORMANCE_TAG` v8.22.4 → v8.23.0, `schemaVersion` 2 → 3). Schema 3 adds a per-element `text`
21+
channel — the element's own direct text-node children, verbatim — so `extract.ts` now emits it.
22+
Both walkers here go through a real DOM, so entity decoding is free. All 237 conformance
23+
assertions stay green; the new channel was proved live (a leading space added to every
24+
`ActionElement` label turns 100 cases red, a change the class-only schema-2 surface could not
25+
see).
26+
- `controlKeys` is now re-exported explicitly from the barrel. Core 8.23.0 exports a `controlKeys`
27+
of its own, and two star exports cannot disambiguate themselves (TS2308). This package's list is
28+
the deliberate delta — it omits `dragHandle`, `ruleGroupHeaderElements`, and
29+
`ruleGroupBodyElements`, matching this package's `Controls` — so it wins.
1930
- **Breaking:** `createQueryBuilderState` is renamed **`createQueryBuilder`** and is now documented
2031
as the package's headless entry point (see "Headless usage" in the README). It already was one —
2132
it returns query, tree, manager, schema, actions and context and renders nothing — so this is a

bun.lock

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

examples/demo/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"check": "tsc --noEmit -p tsconfig.json"
1111
},
1212
"dependencies": {
13-
"@react-querybuilder/core": "^8.22.5",
13+
"@react-querybuilder/core": "^8.23.0",
1414
"@solidjs/web": "2.0.0-rc.0",
1515
"solid-js": "2.0.0-rc.0"
1616
},

examples/ssr/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"test:ssr": "bun run ./ssr-smoke-test.ts"
1111
},
1212
"dependencies": {
13-
"@react-querybuilder/core": "^8.22.5",
13+
"@react-querybuilder/core": "^8.23.0",
1414
"@solidjs/web": "2.0.0-rc.0",
1515
"solid-js": "2.0.0-rc.0",
1616
"solid-querybuilder": "workspace:*"

packages/solid-querybuilder/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@
6868
"@solidjs/web": "^2.0.0-rc.0"
6969
},
7070
"dependencies": {
71-
"@react-querybuilder/core": "^8.22.5"
71+
"@react-querybuilder/core": "^8.23.0"
7272
},
7373
"devDependencies": {
7474
"@arethetypeswrong/cli": "^0.18.5",

packages/solid-querybuilder/scripts/fetch-fixtures.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,13 @@ import * as path from 'node:path';
1919
* The upstream release whose fixtures this port is verified against. Bump deliberately, and
2020
* expect a diff in the conformance tests when you do.
2121
*/
22-
export const CONFORMANCE_TAG = 'v8.22.4';
22+
export const CONFORMANCE_TAG = 'v8.23.0';
2323

2424
/**
2525
* The fixture *shape* version. Not the tag: upstream may cut a dozen releases without changing
2626
* the schema, and a schema change must fail loudly rather than be mis-read.
2727
*/
28-
export const EXPECTED_SCHEMA_VERSION = 2;
28+
export const EXPECTED_SCHEMA_VERSION = 3;
2929

3030
const ASSET = 'rqb-conformance-fixtures.tar.gz';
3131
const RELEASE_URL = `https://github.com/react-querybuilder/react-querybuilder/releases/download/${CONFORMANCE_TAG}`;

packages/solid-querybuilder/src/index.tsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,9 @@ export * from './actions.js';
1111
export * from './components/index.js';
1212
export { Label } from './internal/Label.jsx';
1313
export * from './reactive/index.js';
14+
// Two stars can't disambiguate themselves: core 8.23 added its own `controlKeys`, which collides
15+
// with the port's (TS2308). The port's list is the deliberate delta — it omits `dragHandle`,
16+
// `ruleGroupHeaderElements`, and `ruleGroupBodyElements`, matching this package's `Controls` —
17+
// so it is re-exported explicitly to win.
18+
export { controlKeys } from './reactive/context.js';
1419
export type * from './types/index.js';

packages/solid-querybuilder/test/conformance/classnames-post-flush.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/**
2-
* The class surface *after* effects have flushed, asserted against the `schemaVersion` 2
2+
* The class surface *after* effects have flushed, asserted against the `schemaVersion` 3
33
* `classnames-post-flush.json` layer.
44
*
55
* Rendered **uncontrolled** (`defaultQuery`, no `onQueryChange`), exactly as upstream generated

packages/solid-querybuilder/test/conformance/extract.ts

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,17 @@ export interface ClassNameEntry {
3333
path?: string;
3434
/** The verbatim `class` attribute. Whitespace is preserved; this is a byte-level claim. */
3535
className: string;
36+
/**
37+
* The concatenation of this element's *own* direct text-node children, verbatim — no trimming,
38+
* no collapsing, no descendant text. `''` when there are none (present, not omitted, so the
39+
* key set is stable). Added by `schemaVersion` 3.
40+
*
41+
* Verbatim is the point: it catches a stray space in a label or a whitespace text node emitted
42+
* by a template compiler, both invisible under any normalization. Both walkers here go through
43+
* a real DOM, so character references are decoded for free — upstream's `decodeText` exists
44+
* only because its markup walker is `HTMLRewriter`, which reports raw source text.
45+
*/
46+
text: string;
3647
}
3748

3849
/** The accessible description (`title`) of one rule group. */
@@ -75,6 +86,12 @@ export const extractFromContainer = (container: Element): ExtractResult => {
7586
...(testID === undefined ? {} : { testID }),
7687
...(path === undefined ? {} : { path }),
7788
className,
89+
// Direct text-node children only, in document order. `Node.TEXT_NODE` is spelled `3` so
90+
// this works against whatever DOM implementation is in play (jsdom in either project).
91+
text: [...element.childNodes]
92+
.filter(node => node.nodeType === 3)
93+
.map(node => node.nodeValue ?? '')
94+
.join(''),
7895
});
7996
}
8097

0 commit comments

Comments
 (0)