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

zustand

Package Overview
Dependencies
Maintainers
3
Versions
143
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

zustand - npm Package Compare versions

Comparing version 5.0.1 to 5.0.2

15

middleware.js

@@ -362,9 +362,10 @@ 'use strict';

if (options.migrate) {
return [
true,
options.migrate(
deserializedStorageValue.state,
deserializedStorageValue.version
)
];
const migration = options.migrate(
deserializedStorageValue.state,
deserializedStorageValue.version
);
if (migration instanceof Promise) {
return migration.then((result) => [true, result]);
}
return [true, migration];
}

@@ -371,0 +372,0 @@ console.error(

@@ -47,3 +47,3 @@ import type { StateCreator, StoreApi, StoreMutatorIdentifier } from '../vanilla';

}
type Devtools = <T, Mps extends [StoreMutatorIdentifier, unknown][] = [], Mcs extends [StoreMutatorIdentifier, unknown][] = []>(initializer: StateCreator<T, [...Mps, ['zustand/devtools', never]], Mcs>, devtoolsOptions?: DevtoolsOptions) => StateCreator<T, Mps, [['zustand/devtools', never], ...Mcs]>;
type Devtools = <T, Mps extends [StoreMutatorIdentifier, unknown][] = [], Mcs extends [StoreMutatorIdentifier, unknown][] = [], U = T>(initializer: StateCreator<T, [...Mps, ['zustand/devtools', never]], Mcs, U>, devtoolsOptions?: DevtoolsOptions) => StateCreator<T, Mps, [['zustand/devtools', never], ...Mcs]>;
declare module '../vanilla' {

@@ -50,0 +50,0 @@ interface StoreMutators<S, A> {

@@ -6,3 +6,3 @@ {

"type": "commonjs",
"version": "5.0.1",
"version": "5.0.2",
"main": "./index.js",

@@ -9,0 +9,0 @@ "types": "./index.d.ts",

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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