Changelog - 2026-10-26
NOTE
devz codemod model-settings, named on this page, was removed in @venizia/dev-configs 0.4.7-5; on that release or later it exits 2 as an unknown codemod. Run it from an earlier release, or move the keys by hand with the table in the old @model keys are removed.
The deprecated model settings keys are removed
Breaking ChangeIn one line. 0.4.2 grouped @model settings under query and access and kept the flat keys with a warning. 0.4.3 removes the flat keys. A model that still uses one throws when the @model decorator runs, so no model can silently lose its row scope.
What changed
- The keys are removed from
IModelSettings:defaultFilter,defaultLimit,maxLimitandscopeFilter(withscopeFilter.writeGuardandscopeFilter.sharedRows). The typesIScopeFilterSettings,IDeprecatedModelSettingand thedeprecatedSettingsmetadata field go with them, and so does the boot deprecation warning. - The decorator throws on an old key, listing every removed key it finds:
[model][Product] Removed settings key(s): settings.defaultFilter (use settings.query.filter), settings.scopeFilter (use settings.access) | removed in 0.4.3 | run 'devz codemod model-settings --write' to rewrite themgetScopeFilterSettings()isgetAccessSettings(). It is the repository method that returns the model'saccesssettings, and the override point for stubs and test doubles. A subclass that overrides the old name no longer takes effect: rename the override.
Migrate
One command rewrites the settings of every @model({ ... }):
bunx devz codemod model-settings # dry run: lists the files that would change, writes nothing
bunx devz codemod model-settings --write # rewrites them
bunx devz codemod model-settings --check # dry run that exits 1 if anything would change (CI)
bun fmt && bun run typecheck # tidy the formatting, then check| Old key | New key |
|---|---|
defaultFilter | query.filter |
defaultLimit | query.limit.default |
maxLimit | query.limit.max |
scopeFilter | access |
scopeFilter.writeGuard | access.write.mode |
scopeFilter.sharedRows | access.write.sharedRows |
The codemod prints, with file and line, any settings it cannot read for sure (a variable, a call, a spread) and leaves it alone; fix those by hand. See Model Settings and the 0.4.2 regrouping.
Who is affected
- Models that still use an old key. They fail at boot with the message above. Run the codemod.
- Code that overrides
getScopeFilterSettings()(test doubles, stubs). Rename it togetAccessSettings(). - Everyone else. No action needed.