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

@oada/list-lib

Package Overview
Dependencies
Maintainers
8
Versions
61
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.1.2 to 2.1.3

4

lib/index.spec.js

@@ -150,3 +150,3 @@ "use strict";

const cb = (_c = (_b = (_a = conn.watch.firstCall) === null || _a === void 0 ? void 0 : _a.args) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.watchCallback;
await bluebird_1.default.map(change, (c) => cb === null || cb === void 0 ? void 0 : cb(c));
await cb(change);
t.is(opts.onAddItem.callCount, 1);

@@ -193,3 +193,3 @@ t.is(opts.onItem.callCount, 1);

const cb = (_c = (_b = (_a = conn.watch.firstCall) === null || _a === void 0 ? void 0 : _a.args) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.watchCallback;
await bluebird_1.default.map(change, (c) => cb === null || cb === void 0 ? void 0 : cb(c));
await cb(change);
t.is(opts.onAddItem.callCount, 0);

@@ -196,0 +196,0 @@ t.is(opts.onItem.callCount, 0);

@@ -120,5 +120,6 @@ "use strict";

try {
await __classPrivateFieldGet(this, _conn).head({
path: __classPrivateFieldGet(this, _path),
const { data: rev } = await __classPrivateFieldGet(this, _conn).get({
path: path_1.join(__classPrivateFieldGet(this, _path), 'rev'),
});
__classPrivateFieldSet(this, _rev, rev);
return true;

@@ -125,0 +126,0 @@ }

@@ -20,3 +20,3 @@ "use strict";

// @ts-ignore
conn.get.resolves({ data: { rev } });
conn.get.resolves({ data: rev });
const opts = {

@@ -80,9 +80,9 @@ path,

const cb = (_c = (_b = (_a = conn.watch.firstCall) === null || _a === void 0 ? void 0 : _a.args) === null || _b === void 0 ? void 0 : _b[0]) === null || _c === void 0 ? void 0 : _c.watchCallback;
await bluebird_1.default.map(change, (c) => cb === null || cb === void 0 ? void 0 : cb(c));
await cb(change);
await bluebird_1.default.delay(100);
t.assert(conn.put.calledWithMatch({
path: `${path}/_meta/oada-list-lib/${name}/rev`,
data: '4',
path: `${path}/_meta/oada-list-lib/${name}`,
data: { rev: '4' },
}));
});
//# sourceMappingURL=Metadata.spec.js.map
{
"name": "@oada/list-lib",
"version": "2.1.2",
"version": "2.1.3",
"description": "Library for processing items in an OADA list",

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

@@ -172,5 +172,5 @@ import test from 'ava';

const cb = conn.watch.firstCall?.args?.[0]?.watchCallback as (
change: Change
change: readonly Change[]
) => Promise<void>;
await Bluebird.map(change, (c) => cb?.(c));
await cb(change);

@@ -220,5 +220,5 @@ t.is(opts.onAddItem.callCount, 1);

const cb = conn.watch.firstCall?.args?.[0]?.watchCallback as (
change: Change
change: readonly Change[]
) => Promise<void>;
await Bluebird.map(change, (c) => cb?.(c));
await cb(change);

@@ -225,0 +225,0 @@ t.is(opts.onAddItem.callCount, 0);

@@ -24,3 +24,3 @@ import test from 'ava';

// @ts-ignore
conn.get.resolves({ data: { rev } });
conn.get.resolves({ data: rev });

@@ -90,5 +90,5 @@ const opts = {

const cb = conn.watch.firstCall?.args?.[0]?.watchCallback as (
change: Change
change: readonly Change[]
) => Promise<void>;
await Bluebird.map(change, (c) => cb?.(c));
await cb(change);

@@ -99,6 +99,6 @@ await Bluebird.delay(100);

conn.put.calledWithMatch({
path: `${path}/_meta/oada-list-lib/${name}/rev`,
data: '4',
path: `${path}/_meta/oada-list-lib/${name}`,
data: { rev: '4' },
} as PUTRequest)
);
});

@@ -158,5 +158,6 @@ import { join } from 'path';

try {
await this.#conn.head({
path: this.#path,
const { data: rev } = await this.#conn.get({
path: join(this.#path, 'rev'),
});
this.#rev = rev as string;
return true;

@@ -163,0 +164,0 @@ } catch (err: unknown) {

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