docs: clarify skipping pristine calculations#66
Conversation
📝 WalkthroughWalkthroughThis PR documents and tests the ChangesDocumentation and Testing of updateOnPristine Feature
Estimated code review effort🎯 2 (Simple) | ⏱️ ~15 minutes Possibly related PRs
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@README.md`:
- Line 108: Update the README TOC entry for FieldPattern so the displayed type
matches the documented signature by including the array suffix; change the link
text that currently shows `(FieldName | RegExp)` to `(FieldName | RegExp)[]`
(the entry refers to FieldPattern and the anchor
`#fieldpattern-fieldname--regexp--fieldname--regexp`), ensuring the visible TOC
label and linked heading are consistent with the documented `(FieldName |
RegExp)[]` type in the body.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 03c81510-f383-4e28-b97d-2f7af96ae13a
📒 Files selected for processing (2)
README.mdsrc/decorator.test.ts
| - [`FieldName: string`](#fieldname-string) | ||
| - [`FieldPattern: FieldName | RegExp`](#fieldpattern-fieldname--regexp) | ||
| - [`Updates: { [FieldName]: (value: any, allValues: Object, prevValues: Object) => any }`](#updates--fieldname-value-any-allvalues-object--any-) | ||
| - [`FieldPattern: FieldName | RegExp | (FieldName | RegExp)[]`](#fieldpattern-fieldname--regexp--fieldname--regexp) |
There was a problem hiding this comment.
Fix FieldPattern TOC signature mismatch.
Line 108 drops the array suffix in the displayed type ((FieldName | RegExp)), but Line 151 correctly documents (FieldName | RegExp)[]. Please align the TOC entry to avoid misleading API docs.
Suggested doc fix
- - [`FieldPattern: FieldName | RegExp | (FieldName | RegExp)`](`#fieldpattern-fieldname--regexp--fieldname--regexp`)
+ - [`FieldPattern: FieldName | RegExp | (FieldName | RegExp)[]`](`#fieldpattern-fieldname--regexp--fieldname--regexp`)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| - [`FieldPattern: FieldName | RegExp | (FieldName | RegExp)[]`](#fieldpattern-fieldname--regexp--fieldname--regexp) | |
| - [`FieldPattern: FieldName | RegExp | (FieldName | RegExp)[]`](`#fieldpattern-fieldname--regexp--fieldname--regexp`) |
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@README.md` at line 108, Update the README TOC entry for FieldPattern so the
displayed type matches the documented signature by including the array suffix;
change the link text that currently shows `(FieldName | RegExp)` to `(FieldName
| RegExp)[]` (the entry refers to FieldPattern and the anchor
`#fieldpattern-fieldname--regexp--fieldname--regexp`), ensuring the visible TOC
label and linked heading are consistent with the documented `(FieldName |
RegExp)[]` type in the body.
|
The FieldPattern TOC entry already matches the documented signature now: Validation: yarn jest --runInBand; nps lint; nps typescript; nps build. |
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
Summary
updateOnPristine: falsefor avoiding initial calculations withinitialValuesupdateswithupdateOnPristine: falseTest Plan
Refs #26
Summary by CodeRabbit