Skip to content

hidane 0.2.3

Choose a tag to compare

@github-actions github-actions released this 12 Oct 16:35
· 90 commits to main since this release
a0397db

hidane 0.2.3 fixes firebase emulators:start for projects with Firestore-triggered functions, and verifies @firebase/rules-unit-testing end to end. Both were checked against the official emulator (v1.22.0).

Functions emulator: trigger registrations (#185)

When the Functions emulator loads a function with a Firestore trigger, it registers the trigger with the Firestore emulator (v1: PUT /emulator/v1/projects/{p}/triggers/{key}; v2: POST /emulator/v1/projects/{p}/eventarcTrigger?eventarcTriggerId={key}). hidane answered both with 404, and firebase-tools stopped the whole suite. hidane now answers them as the official emulator does (171 recorded cases: the accepted bodies, 400 for bodies that do not parse, 500 for names and triggers it refuses, and the order of the checks), so the functions load and emulators:start comes up.

Events are not delivered to the Functions emulator yet: hidane keeps the registrations and says so once in firestore-debug.log. Delivery is #70, planned for v0.4.

@firebase/rules-unit-testing under Security Rules (#186)

assertSucceeds / assertFails for signed-in, signed-out and rules-disabled contexts (gets, lists, listeners, writes, batches, transactions) and clearFirestore() give the same results on hidane and the official emulator, in Node (gRPC) and in Chromium (WebChannel), with firebase 13.0.0 and @firebase/rules-unit-testing 6.0.0. Only denial messages differ, where the official emulator lists the reasons of its two evaluation passes (firebase-tools#6252, in docs/parity-exceptions.md). Transcripts are in results/.

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.3

Full changelog: v0.2.2...v0.2.3