Skip to content

Commit f94d37f

Browse files
committed
fix(firestore): validate TransactionOptions maxAttempts
1 parent ab1cc1c commit f94d37f

16 files changed

Lines changed: 264 additions & 219 deletions

File tree

Lines changed: 32 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,46 @@
11
---
22
name: ts-js-validation
3-
description: Validate TypeScript and JavaScript changes in React Native Firebase by running the root prepare, TypeScript compile, API reference, Jest, formatting, and compare-types scripts. Use when a developer updates TS/JS code and wants the standard RNFB validation pass before handing off or committing.
3+
description: Validate React Native Firebase changes by running the CI-equivalent prepare, TypeScript, lint, Jest, formatting, and compare-types scripts. Use before handoff, commit, or push when package sources, native bridge code, or docs changed.
44
metadata:
55
owner_team: react-native-firebase
66
maintainer: russell.wheatley
77
status: draft
88
tags: typescript,javascript,testing,validation,formatting,react-native-firebase
9-
last_reviewed: "2026-05-08"
10-
version: "0.1.0"
9+
last_reviewed: "2026-07-06"
10+
version: "0.2.0"
1111
---
1212

1313
# React Native Firebase TS/JS Validation
1414

1515
## Scope
1616

17-
Use this skill to validate changes to TypeScript or JavaScript code in the React Native Firebase monorepo.
17+
Use this skill to validate changes in the React Native Firebase monorepo before handoff, commit, or push.
1818

19-
It is for developer-facing validation after editing package JS/TS sources, type tests, Jest tests, or shared TypeScript configuration. It runs the standard root validation commands that catch generated package setup issues, TypeScript errors, consumer type regressions, API reference regressions, Jest failures, formatting drift, and firebase-js-sdk type parity drift.
19+
It runs the same static-analysis and compile/test commands CI uses for the Lint, TypeScript, Jest, docs, and compare-types jobs — not a narrowed JS-only subset.
2020

2121
## Triggers
2222

2323
Use this skill when the user asks for:
2424

2525
- testing TS or JS changes
2626
- validating TypeScript or JavaScript edits before commit or handoff
27-
- running the standard JS validation pass for RNFB
28-
- checking whether package JS/TS changes compile and pass Jest
29-
- formatting package JS/TS code and then running validation
27+
- running the standard validation pass for RNFB
28+
- checking whether package changes compile and pass Jest
29+
- formatting and linting before push
30+
- CI-equivalent validation before publication
3031

3132
## Out-of-scope boundaries
3233

3334
Do not use this skill for:
3435

35-
- Android Java/Kotlin formatting or build validation
36-
- iOS Objective-C, Objective-C++, C++, Swift, or pod validation
37-
- documentation-only changes that do not affect JS/TS behavior
38-
- release validation that requires the full platform, emulator, Detox, or packaging matrix
36+
- release validation that requires the full platform, emulator, Detox, or packaging matrix (see [validation checklist § e2e](../../../okf-bundle/testing/validation-checklist.md))
3937
- migrating a package from JavaScript to TypeScript; use the TypeScript refactor or migration skills instead
4038

4139
## Defaults
4240

43-
Set one clear default path so the agent does not choose randomly between options.
44-
4541
- Default tool or method: run the canonical command sequence below from the repository root
46-
- Fallback when default fails: if a command fails, stop the sequence, inspect the failure, fix issues only when the user asked for fixes or the fix is clearly in the current change set, then rerun the failed command and any later commands
47-
- Why this default exists: `lerna:prepare`, both TypeScript compiles, API reference generation, Jest, formatting, and compare-types cover the JS/TS surfaces most likely to regress in this monorepo
42+
- Fallback when default fails: stop, inspect the failure, fix issues in the current change set when authorized, then rerun the failed command and any later commands
43+
- Why this default exists: the sequence mirrors CI Lint + TypeScript + Jest + docs + compare-types gates
4844

4945
## Command sequence
5046

@@ -54,43 +50,42 @@ Run these root `package.json` scripts in order. **Canonical checklist:** [valida
5450
2. `yarn tsc:compile`
5551
3. `yarn tsc:compile:consumer`
5652
4. `yarn reference:api`
57-
5. `yarn lint:js` (use `yarn lint:js --fix` then re-run until clean)
58-
6. `yarn tests:jest`
59-
7. `yarn format:js`
60-
8. `yarn compare:types`
53+
5. `yarn lint`**CI Lint job** (`lint:js` + `lint:android` + `lint:ios:check`). When `lint:android` reformats Java, commit the formatter output and rerun until exit 0.
54+
6. When `docs/**` changed: `yarn lint:markdown` then `yarn lint:spellcheck`**CI docs job**
55+
7. `yarn lint:js --fix` then `yarn lint:js` when step 5 reported ESLint issues only (optional shortcut before re-running full `yarn lint`)
56+
8. `yarn tests:jest`
57+
9. `yarn format:js` — inspect diff; rerun `yarn lint` if formatting touched files
58+
10. `yarn compare:types`
6159

6260
## Gotchas
6361

6462
- **Forbidden:** `yarn workspace … prepare`, `cd packages/<pkg> && yarn prepare/build`, `yarn jet`, `npx jet` — see [agent command policy](../../../okf-bundle/testing/agent-command-policy.md). On failure, fix product code and re-run the **same** canonical command.
63+
- **`yarn lint` is not optional** when native Java or iOS sources are in the diff — `lint:js` alone does not match CI.
64+
- **`yarn lint:spellcheck` is not optional** when `docs/**` is in the diff — `lint:markdown` alone does not match CI.
6565
- `yarn format:js` writes changes across `packages/**/*.{js,ts,tsx}`. Check the diff after formatting and do not revert user changes.
6666
- Run commands from the repository root so workspace resolution, root `tsconfig.json`, and Jest configuration are consistent.
6767
- `yarn lerna:prepare` may rebuild or refresh package artifacts needed before TypeScript or tests run.
68-
- `yarn tsc:compile` checks the repository TypeScript project, while `yarn tsc:compile:consumer` checks the consumer-facing TypeScript project. Run both.
69-
- `yarn reference:api` runs TypeDoc and should come after consumer TypeScript compilation.
70-
- `yarn tests:jest` is the root Jest entrypoint. If it fails, report the failing test file or suite and the first actionable error rather than dumping the full output.
7168
- `yarn compare:types` installs dependencies under `.github/scripts/compare-types` before running the type parity comparison. Keep it last.
72-
- If validation is slow, keep the command running rather than replacing it with a narrower command unless the user explicitly asks for targeted validation.
69+
- If validation is slow, keep the command running rather than replacing it with a narrower command unless the user explicitly narrows validation.
7370

7471
## Workflow
7572

76-
1. Confirm the task is TS/JS validation and note any specific changed package or test files the user mentioned.
73+
1. Confirm the task scope and note changed packages, native paths, or docs.
7774
2. Check whether the worktree has unrelated dirty files if the current task includes code edits or commit preparation.
7875
3. Run the command sequence from the repository root.
79-
4. If `yarn format:js` changes files, include those formatting changes in the validation context and inspect the relevant diff before continuing.
76+
4. If `yarn lint:android` or `yarn format:js` changes files, include those changes and rerun `yarn lint` before continuing.
8077
5. If a command fails:
8178
- stop before running later commands
82-
- identify whether the failure belongs to the current TS/JS changes, pre-existing repo state, or missing local setup
79+
- identify whether the failure belongs to the current changes, pre-existing repo state, or missing local setup
8380
- fix current-change failures when authorized, then rerun the failed command and continue the remaining sequence
8481
6. Return a concise result with the commands run, pass/fail status, and any remaining blockers.
8582

8683
## Validation loop
8784

88-
Use this loop before finalizing:
89-
9085
1. Run the command sequence.
91-
2. If validation fails because of current TS/JS changes and fixing is in scope, fix the issue and rerun the failed command plus all later commands.
86+
2. If validation fails because of current changes and fixing is in scope, fix the issue and rerun the failed command plus all later commands.
9287
3. If validation fails for unrelated or environment-specific reasons, stop and report the blocker with the command that failed and the shortest useful error summary.
93-
4. Only report success when every command in the sequence completes successfully.
88+
4. Only report success when every applicable command in the sequence completes successfully.
9489

9590
## Output format
9691

@@ -108,7 +103,9 @@ Use this template:
108103
- `yarn tsc:compile`: passed | failed | not run
109104
- `yarn tsc:compile:consumer`: passed | failed | not run
110105
- `yarn reference:api`: passed | failed | not run
111-
- `yarn lint:js`: passed | failed | not run
106+
- `yarn lint`: passed | failed | not run
107+
- `yarn lint:markdown`: passed | failed | not run | n/a
108+
- `yarn lint:spellcheck`: passed | failed | not run | n/a
112109
- `yarn tests:jest`: passed | failed | not run
113110
- `yarn format:js`: passed | failed | changed files
114111
- `yarn compare:types`: passed | failed | not run
@@ -123,7 +120,7 @@ Use this template:
123120
## Constraints
124121

125122
- Keep responses factual and grounded in command output.
126-
- Do not skip any command in the default sequence unless the user explicitly narrows validation.
123+
- Do not skip `yarn lint` or docs lint rows when the diff requires them.
127124
- Do not claim validation passed unless `compare:types` ran after any formatting changes.
128125
- Do not revert unrelated local changes.
129126
- Avoid broad refactors while fixing validation failures.
@@ -132,6 +129,6 @@ Use this template:
132129

133130
Load files only when needed:
134131

135-
- **`okf-bundle/testing/validation-checklist.md`** — full validation command list including e2e, coverage, and doc lints
132+
- **`okf-bundle/testing/validation-checklist.md`** — full validation command list including e2e, coverage, and CI job mapping
136133
- Read `package.json` if command names or script definitions need to be confirmed.
137-
- Read affected package `package.json`, `type-test.ts`, or nearby `__tests__/` files only when a failure needs package-specific diagnosis.
134+
- Read affected package `type-test.ts` or nearby `__tests__/` files only when a failure needs package-specific diagnosis.

0 commit comments

Comments
 (0)