You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
src/logic/getNodeParentName.ts — orphaned after f29f546 (👯 combine duplicated code #13328) consolidated its call sites; the logic it used to serve now lives in isNameInFieldArray, which handles nested field arrays correctly. Also updated a comment in isNameInFieldArray.test.ts that referenced the removed function.
Both modules are already tree-shaken from the published bundle, so there is no runtime or bundle-size impact — this is purely source hygiene (−107 lines of unused code and tests).
Stale API report:
Deleted reports/api-extractor.md — api-extractor enforces the .api.md extension, so the report is actually generated and validated as reports/api-extractor.md.api.md. The old file stopped being rewritten (last touched Mar 2025) and has drifted ~500 lines behind: it is missing Watch, FormStateSubscribe, setValues, the current Controller signature, and more, while still being tracked in git as if it were the public API report.
Set reportFileName to api-extractor.api.md in api-extractor.json (matching the extension requirement documented in the config itself) and renamed the generated report accordingly: reports/api-extractor.md.api.md → reports/api-extractor.api.md. Re-running pnpm api-extractor:build reproduces the renamed file with no diff, and pnpm api-extractor:ci passes.
Type of change
None of the listed options — internal cleanup with no runtime, public API, or bundle changes
Checklist:
My code follows the style guidelines of this project
I have performed a self-review of my own code
My changes generate no new warnings
New and existing tests pass locally with my changes (pnpm test: 118 suites / 1215 tests, pnpm test:type, pnpm lint, pnpm build, pnpm api-extractor:ci)
Heads-up on the failing playwright-run check: the useFieldArrayUnregister.spec.ts failure appears to be a pre-existing flake on master, unrelated to this PR (which only removes files with no production importers — dist/index.esm.mjs builds byte-identical to master's).
Evidence from local runs of pnpm e2e useFieldArrayUnregister --repeat-each=3:
this branch: 3/3 failed
master (9fde5f3): one invocation passed 3/3, two subsequent invocations failed — same assertion as CI (the dirtyFields poll after move(4, 2), missing conditional: true at index 2)
The Playwright page snapshot at the failure point shows the conditional input at index 2 is mounted and touchedFields moved { name, conditional } to index 2 correctly — but dirtyFields lost the conditional flag. So it looks like a timing race between the move() dirty-state recomputation and the conditional field's unregister({ keepDirty: true }) / re-register effect cycle, rather than anything in this diff.
I've re-pushed to retrigger CI. Happy to open a separate issue with the full repro details if that's useful.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed Changes
This PR removes two dead internal modules and a stale API report file, and aligns the api-extractor config with the report it actually generates.
Dead code (only referenced by their own test files):
src/utils/deepMerge.ts— orphaned since 9d22c8b (fix issue: Populating form with reset and keepDefaultValues as true breaks fieldarray actions #7109, Nov 2021) removed its last production call site. No imports anywhere insrc/outside its own test since then.src/logic/getNodeParentName.ts— orphaned after f29f546 (👯 combine duplicated code #13328) consolidated its call sites; the logic it used to serve now lives inisNameInFieldArray, which handles nested field arrays correctly. Also updated a comment inisNameInFieldArray.test.tsthat referenced the removed function.Both modules are already tree-shaken from the published bundle, so there is no runtime or bundle-size impact — this is purely source hygiene (−107 lines of unused code and tests).
Stale API report:
reports/api-extractor.md— api-extractor enforces the.api.mdextension, so the report is actually generated and validated asreports/api-extractor.md.api.md. The old file stopped being rewritten (last touched Mar 2025) and has drifted ~500 lines behind: it is missingWatch,FormStateSubscribe,setValues, the currentControllersignature, and more, while still being tracked in git as if it were the public API report.reportFileNametoapi-extractor.api.mdinapi-extractor.json(matching the extension requirement documented in the config itself) and renamed the generated report accordingly:reports/api-extractor.md.api.md→reports/api-extractor.api.md. Re-runningpnpm api-extractor:buildreproduces the renamed file with no diff, andpnpm api-extractor:cipasses.Type of change
Checklist:
pnpm test: 118 suites / 1215 tests,pnpm test:type,pnpm lint,pnpm build,pnpm api-extractor:ci)