Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@s-libs/app-state

Package Overview
Dependencies
Maintainers
1
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@s-libs/app-state - npm Package Compare versions

Comparing version 12.0.0 to 13.0.0-next.0

esm2020/app-state.mjs

2

lib/utils/spread-array-store.d.ts

@@ -25,2 +25,2 @@ import { Observable } from 'rxjs';

*/
export declare function spreadArrayStore$<T>(source: Store<Array<T> | null | undefined>): Observable<Array<Store<T>>>;
export declare function spreadArrayStore$<T>(source: Store<T[] | null | undefined>): Observable<Array<Store<T>>>;
import { Observable } from 'rxjs';
import { Store } from '../index';
export declare type UndoOrRedo = 'undo' | 'redo';
export declare type UndoOrRedo = 'redo' | 'undo';
export declare abstract class UndoManager<StateType, UndoStateType> {

@@ -5,0 +5,0 @@ protected readonly store: Store<StateType>;

{
"name": "@s-libs/app-state",
"version": "12.0.0",
"version": "13.0.0-next.0",
"author": "Simonton Software",

@@ -13,16 +13,29 @@ "license": "MIT",

"peerDependencies": {
"@s-libs/js-core": "^12.0.0",
"@s-libs/micro-dash": "^12.0.0",
"@s-libs/rxjs-core": "^12.0.0"
"@s-libs/js-core": "^13.0.0-next.0",
"@s-libs/micro-dash": "^13.0.0-next.0",
"@s-libs/rxjs-core": "^13.0.0-next.0"
},
"dependencies": {
"tslib": "^2.1.0"
"tslib": "^2.3.0"
},
"main": "bundles/app-state.umd.js",
"module": "fesm2015/app-state.js",
"es2015": "fesm2015/app-state.js",
"esm2015": "esm2015/app-state.js",
"fesm2015": "fesm2015/app-state.js",
"module": "fesm2015/app-state.mjs",
"es2020": "fesm2020/app-state.mjs",
"esm2020": "esm2020/app-state.mjs",
"fesm2020": "fesm2020/app-state.mjs",
"fesm2015": "fesm2015/app-state.mjs",
"typings": "app-state.d.ts",
"exports": {
"./package.json": {
"default": "./package.json"
},
".": {
"types": "./app-state.d.ts",
"esm2020": "./esm2020/app-state.mjs",
"es2020": "./fesm2020/app-state.mjs",
"es2015": "./fesm2015/app-state.mjs",
"node": "./fesm2015/app-state.mjs",
"default": "./fesm2020/app-state.mjs"
}
},
"sideEffects": false
}

@@ -177,24 +177,1 @@ An observable state management library. Think of it like Redux, but without actions or reducers. That makes it a natural fit for anyone who wants the benefits of centralized state management, without adopting a function style of programming.

Consult the documentation in the source of `UndoState` for more options and information.
## Upgrading from the non-S-Libs version
If you are upgrading from the loose version of [`ng-app-state`](https://github.com/simontonsoftware/ng-app-state), there are a number of changes to be aware of. App state no longer depends on `@ngrx/store`. Among other changes, it is now a standalone library, depending only on other packages in S-Libs. There are also some exciting performance improvements. In the end, you'll need to make these changes:
- Remove `@ngrx/store` and `@ngrx/store-devtools` from your project, unless you are using them outside of `app-state`.
- Remove `StoreModule.forRoot()`, `ngAppStateReducer`, and `StoreDevtoolsModule.instrument()` from `app.module.ts`.
- To log state changes to the redux devtools extension, check out the new [`logToReduxDevtoolsExtension()`](file:///C:/Users/xemno/IdeaProjects/s-libs/docs/rxjs-core/index.html#logtoreduxdevtoolsextension) in `@s-libs/rxjs-core`. For example if you make your own subclass of `RootStore`, you could put this in its constructor:
```ts
logToReduxDevtoolsExtension(this.$, {
name: "MyStore",
autoPause: true,
});
```
- Replace references to `StoreObject` with `Store`.
- Replace references to `AppStore` with `RootStore`.
- The constructor for `RootStore` takes only 1 argument: its starting state. When transitioning from `AppStore` to `RootStore`, remove the other 2 arguments.
- Remove calls to `withCaching()`. The redesigned library comes with intelligent caching built in automatically.
- Batches are no longer tied to a specific slice of the store, but always operate on the entire `RootStore`. Therefore, `.batch()` was moved to `RootStore` and its callback no longer receives a `Store` object. Instead, operate on the store using any existing store object and it will automatically be included in the batch. `Store.getRootStore()` was added to get a reference to start the batch from if needed.
- `.inBatch()` has been removed.
- The `batch` parameter was removed from `UndoManager.applyUndoState()`. It still operates in a batch, but now you can use `this.store` in its place with no need for the additional argument.
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc