Socket
Socket
Sign inDemoInstall

mobx

Package Overview
Dependencies
Maintainers
7
Versions
251
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mobx - npm Package Compare versions

Comparing version 6.0.0 to 6.0.1

2

dist/api/annotation.d.ts

@@ -7,3 +7,3 @@ export declare type Annotation = {

export declare type AnnotationsMap<T, AdditionalFields extends PropertyKey> = {
[P in keyof T]?: AnnotationMapEntry;
[P in Exclude<keyof T, "toString">]?: AnnotationMapEntry;
} & Record<AdditionalFields, AnnotationMapEntry>;

@@ -6,3 +6,3 @@ import { AnnotationsMap, Annotation, CreateObservableOptions, ObservableObjectAdministration } from "../internal";

export declare function makeObservable<T, AdditionalKeys extends PropertyKey = never>(target: T, annotations?: AnnotationsMap<T, NoInfer<AdditionalKeys>>, options?: CreateObservableOptions): T;
export declare function makeAutoObservable<T extends Object, AdditionalKeys extends PropertyKey = never>(target: T, excludes?: AnnotationsMap<T, NoInfer<AdditionalKeys>>, options?: CreateObservableOptions): T;
export declare function makeAutoObservable<T extends Object, AdditionalKeys extends PropertyKey = never>(target: T, overrides?: AnnotationsMap<T, NoInfer<AdditionalKeys>>, options?: CreateObservableOptions): T;
export {};

@@ -15,3 +15,3 @@ import { IDerivation } from "../internal";

}
export declare function _startAction(actionName: string, canRunAsDeriviation: boolean, // true for autoAction
export declare function _startAction(actionName: string, canRunAsDerivation: boolean, // true for autoAction
scope: any, args?: IArguments): IActionRunInfo;

@@ -18,0 +18,0 @@ export declare function _endAction(runInfo: IActionRunInfo): void;

@@ -75,3 +75,3 @@ import { CaughtException, IDerivation, IDerivationState_, IEqualsComparer, IObservable, Lambda, TraceMode } from "../internal";

* value differs from the previous value. Two comparers are provided in the library; `defaultComparer`
* compares based on identity comparison (===), and `structualComparer` deeply compares the structure.
* compares based on identity comparison (===), and `structuralComparer` deeply compares the structure.
* Structural comparison can be convenient if you always produce a new aggregated object and

@@ -78,0 +78,0 @@ * don't want to notify observers if it is structurally the same.

{
"name": "mobx",
"version": "6.0.0",
"version": "6.0.1",
"description": "Simple, scalable state management.",

@@ -5,0 +5,0 @@ "main": "dist/index.js",

@@ -166,3 +166,3 @@ <img src="docs/assets/mobx.png" alt="logo" height="120" align="right" />

- [ReactNext 2016: Real World MobX](https://www.youtube.com/watch?v=Aws40KOx90U) by Michel Weststrate, _40min_, [slides](https://docs.google.com/presentation/d/1DrI6Hc2xIPTLBkfNH8YczOcPXQTOaCIcDESdyVfG_bE/edit?usp=sharing).
- [CityJS 2020: MobX, from mutable to immutable, to observable data](https://youtu.be/sP7dtZm_Wx0?t=27050) by Michel Weststrate, _30min_
- [CityJS 2020: MobX, from mutable to immutable, to observable data](https://youtu.be/sP7dtZm_Wx0?t=27050) by Michel Weststrate, _30min_.
- [OpenSourceNorth: Practical React with MobX (ES5)](https://www.youtube.com/watch?v=XGwuM_u7UeQ) by Matt Ruby, _42min_.

@@ -169,0 +169,0 @@ - [HolyJS 2019: MobX and the unique symbiosis of predictability and speed](https://www.youtube.com/watch?v=NBYbBbjZeX4&list=PL8sJahqnzh8JJD7xahG5zXkjfM5GOgcPA&index=21&t=0s) by Michel Weststrate, _59min_.

@@ -25,4 +25,4 @@ export type Annotation = {

export type AnnotationsMap<T, AdditionalFields extends PropertyKey> = {
[P in keyof T]?: AnnotationMapEntry
[P in Exclude<keyof T, "toString">]?: AnnotationMapEntry
} &
Record<AdditionalFields, AnnotationMapEntry>

@@ -94,3 +94,3 @@ import {

const defaultAnnotation: Annotation | undefined = observable // ideally grap this from adm's defaultEnahncer instead!
const origAnnotation = annotation
const originAnnotation = annotation
if (annotation === true) {

@@ -166,5 +166,5 @@ annotation = getInferredAnnotation(descriptor, defaultAnnotation, autoBind)

)
// if the origAnnotation was true, preferred the adm's default enhancer over the inferred one
// if the originAnnotation was true, preferred the adm's default enhancer over the inferred one
const enhancer =
origAnnotation === true
originAnnotation === true
? adm.defaultEnhancer_

@@ -187,3 +187,3 @@ : getEnhancerFromAnnotation(annotation)

// We need this, because otherwise, AdditionalKeys is going to be inferred to be any
// set of superfluos keys. But, we rather want to get a compile error unless AdditionalKeys is
// set of superfluous keys. But, we rather want to get a compile error unless AdditionalKeys is
// _explicity_ passed as generic argument

@@ -228,3 +228,3 @@ // Fixes: https://github.com/mobxjs/mobx/issues/2325#issuecomment-691070022

target: T,
excludes?: AnnotationsMap<T, NoInfer<AdditionalKeys>>,
overrides?: AnnotationsMap<T, NoInfer<AdditionalKeys>>,
options?: CreateObservableOptions

@@ -245,3 +245,3 @@ ): T {

} else {
annotations = { ...excludes }
annotations = { ...overrides }
extractAnnotationsFromObject(target, annotations, options)

@@ -248,0 +248,0 @@ if (!isPlain) {

@@ -88,3 +88,3 @@ import {

actionName: string,
canRunAsDeriviation: boolean, // true for autoAction
canRunAsDerivation: boolean, // true for autoAction
scope: any,

@@ -97,3 +97,3 @@ args?: IArguments

startTime_ = Date.now()
const flattendArgs = args ? Array.from(args) : EMPTY_ARRAY
const flattenedArgs = args ? Array.from(args) : EMPTY_ARRAY
spyReportStart({

@@ -103,7 +103,7 @@ type: ACTION,

object: scope,
arguments: flattendArgs
arguments: flattenedArgs
})
}
const prevDerivation_ = globalState.trackingDerivation
const runAsAction = !canRunAsDeriviation || !prevDerivation_
const runAsAction = !canRunAsDerivation || !prevDerivation_
startBatch()

@@ -110,0 +110,0 @@ let prevAllowStateChanges_ = globalState.allowStateChanges // by default preserve previous allow

@@ -112,3 +112,3 @@ import {

* value differs from the previous value. Two comparers are provided in the library; `defaultComparer`
* compares based on identity comparison (===), and `structualComparer` deeply compares the structure.
* compares based on identity comparison (===), and `structuralComparer` deeply compares the structure.
* Structural comparison can be convenient if you always produce a new aggregated object and

@@ -115,0 +115,0 @@ * don't want to notify observers if it is structurally the same.

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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