Skip to content
All changes

Breaking

The Deprecated Model Settings Keys Are Removed

@venizia/ignis-kernel, @venizia/ignis-connectors

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 Change

In 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, maxLimit and scopeFilter (with scopeFilter.writeGuard and scopeFilter.sharedRows). The types IScopeFilterSettings, IDeprecatedModelSetting and the deprecatedSettings metadata field go with them, and so does the boot deprecation warning.
  • The decorator throws on an old key, listing every removed key it finds:
text
[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 them
  • getScopeFilterSettings() is getAccessSettings(). It is the repository method that returns the model's access settings, 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({ ... }):

bash
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 keyNew key
defaultFilterquery.filter
defaultLimitquery.limit.default
maxLimitquery.limit.max
scopeFilteraccess
scopeFilter.writeGuardaccess.write.mode
scopeFilter.sharedRowsaccess.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 to getAccessSettings().
  • Everyone else. No action needed.