@dxos/timeframe
Advanced tools
Comparing version 0.1.31 to 0.1.32-next.77d513e
@@ -1,1 +0,1 @@ | ||
{"inputs":{"packages/common/timeframe/src/timeframe.ts":{"bytes":10990,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}]},"packages/common/timeframe/src/index.ts":{"bytes":377,"imports":[{"path":"packages/common/timeframe/src/timeframe.ts","kind":"import-statement","original":"./timeframe"}]}},"outputs":{"packages/common/timeframe/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5681},"packages/common/timeframe/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["Timeframe"],"entryPoint":"packages/common/timeframe/src/index.ts","inputs":{"packages/common/timeframe/src/timeframe.ts":{"bytesInOutput":2625},"packages/common/timeframe/src/index.ts":{"bytesInOutput":0}},"bytes":2763}}} | ||
{"inputs":{"packages/common/timeframe/src/timeframe.ts":{"bytes":12039,"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}]},"packages/common/timeframe/src/index.ts":{"bytes":377,"imports":[{"path":"packages/common/timeframe/src/timeframe.ts","kind":"import-statement","original":"./timeframe"}]}},"outputs":{"packages/common/timeframe/dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6230},"packages/common/timeframe/dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/node-std/util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["Timeframe"],"entryPoint":"packages/common/timeframe/src/index.ts","inputs":{"packages/common/timeframe/src/timeframe.ts":{"bytesInOutput":2870},"packages/common/timeframe/src/index.ts":{"bytesInOutput":0}},"bytes":3008}}} |
@@ -1,1 +0,1 @@ | ||
{"inputs":{"packages/common/timeframe/src/timeframe.ts":{"bytes":10990,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}]},"packages/common/timeframe/src/index.ts":{"bytes":377,"imports":[{"path":"packages/common/timeframe/src/timeframe.ts","kind":"import-statement","original":"./timeframe"}]}},"outputs":{"packages/common/timeframe/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5797},"packages/common/timeframe/dist/lib/node/index.cjs":{"imports":[{"path":"node:util","kind":"require-call","external":true},{"path":"@dxos/keys","kind":"require-call","external":true},{"path":"@dxos/util","kind":"require-call","external":true}],"exports":[],"entryPoint":"packages/common/timeframe/src/index.ts","inputs":{"packages/common/timeframe/src/index.ts":{"bytesInOutput":123},"packages/common/timeframe/src/timeframe.ts":{"bytesInOutput":2665}},"bytes":3815}}} | ||
{"inputs":{"packages/common/timeframe/src/timeframe.ts":{"bytes":12039,"imports":[{"path":"node:util","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}]},"packages/common/timeframe/src/index.ts":{"bytes":377,"imports":[{"path":"packages/common/timeframe/src/timeframe.ts","kind":"import-statement","original":"./timeframe"}]}},"outputs":{"packages/common/timeframe/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":6343},"packages/common/timeframe/dist/lib/node/index.cjs":{"imports":[{"path":"node:util","kind":"require-call","external":true},{"path":"@dxos/debug","kind":"require-call","external":true},{"path":"@dxos/keys","kind":"require-call","external":true},{"path":"@dxos/util","kind":"require-call","external":true}],"exports":[],"entryPoint":"packages/common/timeframe/src/index.ts","inputs":{"packages/common/timeframe/src/index.ts":{"bytesInOutput":123},"packages/common/timeframe/src/timeframe.ts":{"bytesInOutput":2922}},"bytes":4072}}} |
/// <reference types="node" /> | ||
import { inspect } from 'node:util'; | ||
import { equalsSymbol, Equatable } from '@dxos/debug'; | ||
import { PublicKey } from '@dxos/keys'; | ||
@@ -7,3 +8,3 @@ /** | ||
*/ | ||
export declare class Timeframe { | ||
export declare class Timeframe implements Equatable { | ||
private readonly _frames; | ||
@@ -32,2 +33,3 @@ constructor(frames?: [PublicKey, number][]); | ||
[inspect.custom](): string; | ||
[equalsSymbol](other: any): boolean; | ||
/** | ||
@@ -34,0 +36,0 @@ * Merges the values, updating the highest sequence numbers. |
{ | ||
"name": "@dxos/timeframe", | ||
"version": "0.1.31", | ||
"version": "0.1.32-next.77d513e", | ||
"description": "Timeframe vector clock.", | ||
@@ -20,6 +20,7 @@ "homepage": "https://dxos.org", | ||
"debug": "^4.3.3", | ||
"@dxos/keys": "0.1.31", | ||
"@dxos/log": "0.1.31", | ||
"@dxos/node-std": "0.1.31", | ||
"@dxos/util": "0.1.31" | ||
"@dxos/debug": "0.1.32-next.77d513e", | ||
"@dxos/keys": "0.1.32-next.77d513e", | ||
"@dxos/log": "0.1.32-next.77d513e", | ||
"@dxos/node-std": "0.1.32-next.77d513e", | ||
"@dxos/util": "0.1.32-next.77d513e" | ||
}, | ||
@@ -26,0 +27,0 @@ "devDependencies": { |
@@ -7,2 +7,3 @@ // | ||
import { equalsSymbol, Equatable } from '@dxos/debug'; | ||
import { PublicKey } from '@dxos/keys'; | ||
@@ -14,3 +15,3 @@ import { ComplexMap } from '@dxos/util'; | ||
*/ | ||
export class Timeframe { | ||
export class Timeframe implements Equatable { | ||
private readonly _frames = new ComplexMap<PublicKey, number>(PublicKey.hash); | ||
@@ -92,2 +93,10 @@ | ||
[equalsSymbol](other: any) { | ||
if (!(other instanceof Timeframe)) { | ||
return false; | ||
} | ||
return this.size() === other.size() && this.frames().every(([key, seq]) => other.get(key) === seq); | ||
} | ||
/** | ||
@@ -94,0 +103,0 @@ * Merges the values, updating the highest sequence numbers. |
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
Sorry, the diff of this file is not supported yet
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
35215
534
6
+ Added@dxos/debug@0.1.32-next.77d513e(transitive)
+ Added@dxos/keys@0.1.32-next.77d513e(transitive)
+ Added@dxos/log@0.1.32-next.77d513e(transitive)
+ Added@dxos/node-std@0.1.32-next.77d513e(transitive)
+ Added@dxos/util@0.1.32-next.77d513e(transitive)
- Removed@dxos/debug@0.1.31(transitive)
- Removed@dxos/keys@0.1.31(transitive)
- Removed@dxos/log@0.1.31(transitive)
- Removed@dxos/node-std@0.1.31(transitive)
- Removed@dxos/util@0.1.31(transitive)