-
feat(core): revert array-shape targetDefaults support pending redesign and reapplication (#36005)
发布于
2026-06-15 19:57:11 +00:00 Current Behavior
nx.jsontargetDefaultsaccepts the new filtered array shape
(entries matched bytarget/executorand narrowed by
projects/plugin), alongside the legacy record shape. This was
introduced and refined across:- #35340 — feat: support filtered array-shape targetDefaults with
projects and source - #35711 — fix: do not drop target defaults in the 23.0.0 array
migration - #35752 — docs: document the
convert-target-defaults-to-array
migration - #35991 — docs: rewrite the targetDefaults reference and guide for the
array shape
Expected Behavior
This PR reverts the array-shape
targetDefaultsfeature pending a
redesign, with the intent that it be reapplied once the design is
finalized.targetDefaultsreturns to the record-shape-only form
(Record<string, Partial<TargetConfiguration>>).To keep reapplication easy, the revert is split into focused commits
that mirror the original PRs — the feature can be brought back later by
reverting these reverts.Changes:
- Restore the
TargetDefaultstype; removeTargetDefaultEntry,
TargetDefaultsRecord, andNormalizedTargetDefaults - Restore the core target-defaults matcher and project-configuration
utils to the record-shape logic - Remove the
convert-target-defaults-to-arraymigration (and its
registration/docs) - Remove the devkit
upsertTargetDefault/findTargetDefaulthelpers
and thenormalize-target-defaultsutility; restore generators across
all plugins (angular, cypress, react, jest, eslint, vite, etc.) to write
the record shape - Restore the
nx.jsonschematargetDefaultsdefinition and revert
the array-shape documentation
Unrelated changes that landed in the same files after the feature are
preserved (theCreateNodesV2→CreateNodesrename, the
findMatchingConfigFilesoptimization, thenx migrateconfig,
.gitignoreentries, migration-doc packaging globs, and the maven
createNodesV2migration).Related Issue(s)
Reverts #35340, #35711, #35752, #35991 (to be reapplied after redesign).
Co-authored-by: Claude noreply@anthropic.com
Co-authored-by: nx-cloud[bot] <71083854+nx-cloud[bot]@users.noreply.github.com>下载附件
- #35340 — feat: support filtered array-shape targetDefaults with