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

proxy-state-tree

Package Overview
Dependencies
Maintainers
1
Versions
865
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

proxy-state-tree - npm Package Compare versions

Comparing version 1.0.0-1532860086530 to 1.0.0-1533059066486

6

es/index.js

@@ -89,6 +89,6 @@ import proxify, { IS_PROXY, STATUS } from './proxify';

clearPathsTracking(index) {
if (index !== this.paths.length - 1) {
throw new Error('Nested path tracking requires you to stop the nested path tracker before the outer');
const pathSet = this.paths.splice(index, 1, null)[0];
while (this.paths[this.paths.length - 1] === null) {
this.paths.pop();
}
const pathSet = this.paths.pop();
if (!this.paths.length) {

@@ -95,0 +95,0 @@ this.status = STATUS.IDLE;

@@ -144,10 +144,2 @@ import ProxyStateTree, { IS_PROXY } from './';

});
test('should throw when stopping outer nested tracking before inner', () => {
const tree = new ProxyStateTree({});
const trackIdA = tree.startPathsTracking();
tree.startPathsTracking();
expect(() => {
tree.clearPathsTracking(trackIdA);
}).toThrow();
});
test('should correctly keep track of changing indexes', () => {

@@ -154,0 +146,0 @@ expect.assertions(4);

@@ -92,6 +92,6 @@ "use strict";

clearPathsTracking(index) {
if (index !== this.paths.length - 1) {
throw new Error('Nested path tracking requires you to stop the nested path tracker before the outer');
const pathSet = this.paths.splice(index, 1, null)[0];
while (this.paths[this.paths.length - 1] === null) {
this.paths.pop();
}
const pathSet = this.paths.pop();
if (!this.paths.length) {

@@ -98,0 +98,0 @@ this.status = proxify_1.STATUS.IDLE;

@@ -146,10 +146,2 @@ "use strict";

});
test('should throw when stopping outer nested tracking before inner', () => {
const tree = new _1.default({});
const trackIdA = tree.startPathsTracking();
tree.startPathsTracking();
expect(() => {
tree.clearPathsTracking(trackIdA);
}).toThrow();
});
test('should correctly keep track of changing indexes', () => {

@@ -156,0 +148,0 @@ expect.assertions(4);

{
"name": "proxy-state-tree",
"version": "1.0.0-1532860086530",
"version": "1.0.0-1533059066486",
"description": "An implementation of the Mobx/Vue state tracking approach, for library authors",

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

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 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