Repository navigation
hidane 0.2.4
hidane 0.2.4 closes the last Security Rules follow-ups of the 0.2 line and fixes how JSON strings are written. Both were recorded from the official emulator (v1.22.0) and are replayed by the test suite.
List rules, coverage and debug() (#167)
A list's filter becomes the constraint the official emulator shows in coverage reports and debug() output, null and NaN included: is not null is NEQ null, a field filter that compares with null or NaN (!= null, == NaN, in [null]) is EQ true, EQ false, which no value satisfies, array-contains null is LIST_CONTAINS [], a repeated filter counts once and a repeated way is evaluated once. The implications follow the official emulator too (bools as false < true, NaN as in IEEE 754, type errors for ordering bools and nulls), and an error inside a parenthesized object is placed where the official emulator places it.
Decisions changed only for the new cases: some queries that return no document are now allowed, and some lists that relied on treating == null or in [null] as a value are now denied, as on the official emulator. One case, is nan next to another filter of the same field, lets a list through that a get of the same documents would deny; hidane follows the official emulator, and the case is open for discussion in #194.
JSON strings (#191)
REST answers escape ", \, control characters, U+2028 and U+2029 as \u with lower-case hex, as protobuf-java's JsonFormat does; error messages also escape / and U+007F–U+009F and U+2000–U+20FF with upper-case hex, as the official error writer does; WebChannel messages also escape < > & = ' in strings and keys, and write doubles and empty maps as the official emulator does, so frame lengths match too.
Install
curl -fsSL https://hidane.dev/install.sh | sh
brew install hidane-dev/tap/hidane
npm install --save-dev hidane
cargo binstall hidane # or cargo install hidane
dart pub global activate hidane
docker run --rm -p 8080:8080 ghcr.io/hidane-dev/hidane:0.2.4Full changelog: v0.2.3...v0.2.4