Socket
Socket
Sign inDemoInstall

@oada/list-lib

Package Overview
Dependencies
Maintainers
8
Versions
60
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@oada/list-lib - npm Package Compare versions

Comparing version 2.0.5 to 2.0.6

lib/test.d.ts

14

lib/index.js

@@ -444,2 +444,5 @@ "use strict";

const { rev } = __classPrivateFieldGet(this, _meta);
if (__classPrivateFieldGet(this, _resume)) {
trace(`Resuming watch from rev ${rev}`);
}
__classPrivateFieldSet(this, _id_1, await conn.watch({

@@ -457,2 +460,6 @@ path,

trace(`Received change to ${changePath}: %O`, { type, body, ...ctx });
if (!changePath && __classPrivateFieldGet(this, _resume)) {
trace(`Received change to root of list, updating handled rev in our _meta records`);
__classPrivateFieldGet(this, _meta).rev = rev;
}
let itemsFound = !!changePath;

@@ -518,9 +525,2 @@ let listChange = body;

}
finally {
// Need this check to prevent infinite loop
if (itemsFound && __classPrivateFieldGet(this, _resume)) {
// Only update last processed rev if we actually processed items
__classPrivateFieldGet(this, _meta).rev = rev;
}
}
},

@@ -527,0 +527,0 @@ }));

@@ -23,2 +23,4 @@ "use strict";

const object_assign_deep_1 = __importDefault(require("object-assign-deep"));
const debug_1 = __importDefault(require("debug"));
const trace = debug_1.default('oada-list-lib#metadata:trace');
/**

@@ -59,2 +61,3 @@ * Persistent data we store in the _meta of the list

set rev(rev) {
trace(`Updating local rev to ${rev}`);
__classPrivateFieldSet(this, _rev, rev);

@@ -112,2 +115,3 @@ __classPrivateFieldSet(this, _updated, true);

}
trace(`Persisting _meta to OADA`);
// Removing keys in OADA is annoying

@@ -114,0 +118,0 @@ // TODO: Is it better to just DELETE the whole thing and then put?

{
"name": "@oada/list-lib",
"version": "2.0.5",
"version": "2.0.6",
"description": "Library for processing items in an OADA list",

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

@@ -602,2 +602,5 @@ import { join } from 'path';

const { rev } = this.#meta;
if (this.#resume) {
trace(`Resuming watch from rev ${rev}`);
}
this.#id = await conn.watch({

@@ -618,2 +621,9 @@ path,

trace(`Received change to ${changePath}: %O`, { type, body, ...ctx });
if (!changePath && this.#resume) {
trace(`Received change to root of list, updating handled rev in our _meta records`);
this.#meta!.rev = rev;
}
let itemsFound = !!changePath;

@@ -678,8 +688,2 @@ let listChange = body as DeepPartial<List>;

error(`Error processing change at ${path}, rev ${rev}: %O`, err);
} finally {
// Need this check to prevent infinite loop
if (itemsFound && this.#resume) {
// Only update last processed rev if we actually processed items
this.#meta!.rev = rev;
}
}

@@ -686,0 +690,0 @@ },

@@ -8,2 +8,6 @@ import { join } from 'path';

import debug from 'debug';
const trace = debug('oada-list-lib#metadata:trace');
/**

@@ -64,2 +68,3 @@ * Record of successfully handled list item(s)

set rev(rev) {
trace(`Updating local rev to ${rev}`);
this.#rev = rev;

@@ -146,2 +151,3 @@ this.#updated = true;

}
trace(`Persisting _meta to OADA`);

@@ -148,0 +154,0 @@ // Removing keys in OADA is annoying

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