@logux/core
Advanced tools
Comparing version 0.7.3 to 0.8.0
@@ -186,2 +186,3 @@ import { createNanoEvents } from 'nanoevents' | ||
this.connected = false | ||
this.syncing = 0 | ||
this.setState('disconnected') | ||
@@ -188,0 +189,0 @@ } |
@@ -20,4 +20,4 @@ import { Meta } from '../index.js' | ||
export function isFirstOlder( | ||
firstMeta: Meta | undefined, | ||
secondMeta: Meta | undefined | ||
firstMeta: Meta | string | undefined, | ||
secondMeta: Meta | string | undefined | ||
): boolean |
@@ -8,2 +8,9 @@ export function isFirstOlder(firstMeta, secondMeta) { | ||
if (typeof firstMeta === 'string') { | ||
firstMeta = { id: firstMeta, time: parseInt(firstMeta) } | ||
} | ||
if (typeof secondMeta === 'string') { | ||
secondMeta = { id: secondMeta, time: parseInt(secondMeta) } | ||
} | ||
if (firstMeta.time > secondMeta.time) { | ||
@@ -10,0 +17,0 @@ return false |
{ | ||
"name": "@logux/core", | ||
"version": "0.7.3", | ||
"version": "0.8.0", | ||
"description": "Logux core components", | ||
@@ -26,7 +26,7 @@ "keywords": [ | ||
"engines": { | ||
"node": "^12.0.0 || ^14.0.0 || >=16.0.0" | ||
"node": "^14.0.0 || ^16.0.0 || >=18.0.0" | ||
}, | ||
"dependencies": { | ||
"nanoevents": "^6.0.2" | ||
"nanoevents": "^7.0.1" | ||
} | ||
} |
@@ -41,4 +41,2 @@ export function sendSync(added, entries) { | ||
export async function syncMessage(added, ...data) { | ||
let promises = [] | ||
for (let i = 0; i < data.length - 1; i += 2) { | ||
@@ -74,3 +72,3 @@ let action = data[i] | ||
process | ||
await process | ||
.then(filtered => { | ||
@@ -95,7 +93,4 @@ if (filtered && this.options.inFilter) { | ||
}) | ||
promises.push(process) | ||
} | ||
await Promise.all(promises) | ||
this.setLastReceived(added) | ||
@@ -102,0 +97,0 @@ this.sendSynced(added) |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
102517
3507
+ Addednanoevents@7.0.1(transitive)
- Removednanoevents@6.0.2(transitive)
Updatednanoevents@^7.0.1