ngrx/platform

@ngrx/signals: Add migration schematic for `protectedState`

markostanimirovic opened this issue · 4 comments

Which @ngrx/* package(s) are relevant/related to the feature request?

signals

Information

The migration schematic should add protectedState: false to all SignalStores to ensure backward compatibility:

export const LocalStore = signalStore(
+ { protectedState: false },
  withState({ count: 0 })
);

export const GlobalStore = signalStore(
- { providedIn: 'root' },
+ { providedIn: 'root', protectedState: false },
  withState({ count: 0 })
);

Describe any alternatives/workarounds you're currently using

No response

I would be willing to submit a PR to fix this issue

  • Yes
  • No

Although I already have two other tasks, I wouldn’t usually ask for this one.

However, since I have spent a considerable amount of time on the topic of encapsulation and SignalStore, I would really appreciate the opportunity to contribute here as well.

Thanks Rainer! Btw, this one has high priority.

Feel free to ping me if I can help in any way.

@timdeschryver @markostanimirovic, here it is.

There is plenty of time left for any necessary corrections.

By the way, thank you for entrusting me with this time-critical issue.