New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

medici

Package Overview
Dependencies
Maintainers
2
Versions
58
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

medici - npm Package Compare versions

Comparing version 6.1.0 to 6.2.0

16

build/Book.js

@@ -51,10 +51,8 @@ "use strict";

async balance(query, options = {}) {
if (options) {
// If there is a session, we must NOT set any readPreference (as per mongo v5 and v6).
// https://www.mongodb.com/docs/v6.0/core/transactions/#read-concern-write-concern-read-preference
// Otherwise, we are free to use any readPreference.
if (!options.session && !options.readPreference) {
// Let's try reading from the secondary node, if available.
options.readPreference = "secondaryPreferred";
}
// If there is a session, we must NOT set any readPreference (as per mongo v5 and v6).
// https://www.mongodb.com/docs/v6.0/core/transactions/#read-concern-write-concern-read-preference
// Otherwise, we are free to use any readPreference.
if (options && !options.session && !options.readPreference) {
// Let's try reading from the secondary node, if available.
options.readPreference = "secondaryPreferred";
}

@@ -165,3 +163,3 @@ const parsedQuery = (0, parseBalanceQuery_1.parseBalanceQuery)(query, this);

}
const results = await findPromise;
const results = (await findPromise);
return {

@@ -168,0 +166,0 @@ results,

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

class Entry {
static write(book, memo, date, original_journal) {
return new this(book, memo, date, original_journal);
}
constructor(book, memo, date, original_journal) {

@@ -26,5 +29,2 @@ this.transactions = [];

}
static write(book, memo, date, original_journal) {
return new this(book, memo, date, original_journal);
}
transact(type, account_path, amount, extra) {

@@ -31,0 +31,0 @@ if (typeof account_path === "string") {

{
"name": "medici",
"version": "6.1.0",
"version": "6.2.0",
"description": "Double-entry accounting ledger for Node + Mongoose",

@@ -9,2 +9,3 @@ "main": "build/index.js",

"ci": "npm run build && npm run test",
"ci-mongoose6": "npm i mongoose@6 && npm run test:code",
"ci-mongoose5": "npm i mongoose@5 && npm run test:code",

@@ -52,3 +53,3 @@ "bench:balance": "ts-node ./bench/bench-balance.ts",

"dependencies": {
"mongoose": "5 - 6"
"mongoose": "5 - 7"
},

@@ -58,11 +59,11 @@ "homepage": "https://github.com/flash-oss/medici",

"@istanbuljs/nyc-config-typescript": "^1.0.2",
"@types/chai": "^4.3.0",
"@types/mocha": "^9.0.0",
"@types/node": "^18.6.4",
"@types/sinon": "^10.0.6",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"@types/chai": "^4.3.5",
"@types/mocha": "^10.0.1",
"@types/node": "^18.16.17",
"@types/sinon": "^10.0.15",
"@typescript-eslint/eslint-plugin": "^5.59.9",
"@typescript-eslint/parser": "^5.59.9",
"chai": "^4.3.4",
"dts-bundle-generator": "^6.2.0",
"eslint": "^8.4.1",
"dts-bundle-generator": "^8.0.1",
"eslint": "^8.42.0",
"eslint-plugin-import": "^2.25.3",

@@ -72,14 +73,14 @@ "eslint-plugin-promise": "^6.0.0",

"eslint-plugin-security-node": "^1.0.14",
"eslint-plugin-sonarjs": "^0.14.0",
"eslint-plugin-sonarjs": "^0.19.0",
"luxon": "^3.0.1",
"mocha": "^10.2.0",
"moment": "^2.29.1",
"mongodb-memory-server": "^8.0.4",
"mongodb-memory-server": "^8.13.0",
"nyc": "^15.1.0",
"prettier": "^2.5.1",
"rimraf": "^3.0.2",
"sinon": "^14.0.0",
"prettier": "^2.8.8",
"rimraf": "^5.0.1",
"sinon": "^15.1.0",
"ts-mocha": "^10.0.0",
"tsd": "^0.22.0",
"typescript": "^4.5.4"
"tsd": "^0.28.1",
"typescript": "^5.1.3"
},

@@ -86,0 +87,0 @@ "tsd": {

@@ -405,2 +405,7 @@ # medici

### 6.0
- Drop node 12 and 14 support. Only 16 and 18 are supported now.
- By default use the secondary nodes (if present) of your MongoDB cluster to calculate balances.
### v5.2

@@ -407,0 +412,0 @@

@@ -1,2 +0,2 @@

// Generated by dts-bundle-generator v6.13.0
// Generated by dts-bundle-generator v8.0.1

@@ -28,3 +28,3 @@ import { ReadPreferenceLike } from 'mongodb';

}): void;
export declare type IFilterQuery = {
export type IFilterQuery = {
account?: string | string[];

@@ -41,3 +41,3 @@ _journal?: Types.ObjectId | string;

}
export declare type IBalanceQuery = {
export type IBalanceQuery = {
account?: string | string[];

@@ -58,5 +58,5 @@ start_date?: Date | string | number;

}
export declare type TJournalDocument<T extends IJournal = IJournal> = Omit<Document, "__v" | "id"> & T;
export type TJournalDocument<T extends IJournal = IJournal> = Omit<Document, "__v" | "id"> & T;
export declare function setJournalSchema(schema: Schema, collection?: string): void;
export declare type IOptions = {
export type IOptions = {
session?: ClientSession;

@@ -63,0 +63,0 @@ readPreference?: ReadPreferenceLike;

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