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

@fluidframework/id-compressor

Package Overview
Dependencies
Maintainers
2
Versions
130
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluidframework/id-compressor - npm Package Compare versions

Comparing version 2.1.0-276985 to 2.1.0-281041

api-extractor/api-extractor.current.json

2

api-extractor.json
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "../../../common/build/build-common/api-extractor-base.esm.current.json"
"extends": "../../../common/build/build-common/api-extractor-model.esm.json"
}
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-base.esm.legacy.json"
"extends": "<projectFolder>/../../../common/build/build-common/api-extractor-report.esm.legacy.json"
}

@@ -53,4 +53,4 @@ "use strict";

equals(other) {
for (let i = 0; i < this.clusterList.length; i++) {
if (!(0, sessions_js_1.clustersEqual)(this.clusterList[i], other.clusterList[i])) {
for (const [index, value] of Object.entries(this.clusterList)) {
if (!(0, sessions_js_1.clustersEqual)(value, other.clusterList[index])) {
return false;

@@ -57,0 +57,0 @@ }

@@ -527,3 +527,5 @@ "use strict";

const sessionIndex = (0, persistanceUtilities_js_1.readNumber)(index);
const session = sessions[sessionIndex + sessionOffset][1];
const sessionArray = sessions[sessionIndex + sessionOffset];
(0, internal_1.assert)(sessionArray !== undefined, "sessionArray is undefined in IdCompressor.deserialize2_0");
const session = sessionArray[1];
const capacity = (0, persistanceUtilities_js_1.readNumber)(index);

@@ -530,0 +532,0 @@ const count = (0, persistanceUtilities_js_1.readNumber)(index);

@@ -8,3 +8,3 @@ /*!

* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
* Generated by "flub generate entrypoints" in @fluidframework/build-tools.
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
*/

@@ -11,0 +11,0 @@

@@ -8,3 +8,3 @@ /*!

export declare const pkgName = "@fluidframework/id-compressor";
export declare const pkgVersion = "2.1.0-276985";
export declare const pkgVersion = "2.1.0-281041";
//# sourceMappingURL=packageVersion.d.ts.map

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

exports.pkgName = "@fluidframework/id-compressor";
exports.pkgVersion = "2.1.0-276985";
exports.pkgVersion = "2.1.0-281041";
//# sourceMappingURL=packageVersion.js.map

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

exports.readBoolean = exports.readNumericUuid = exports.readNumber = exports.writeBoolean = exports.writeNumericUuid = exports.writeNumber = void 0;
/* eslint-disable no-bitwise */
const internal_1 = require("@fluidframework/core-utils/internal");
const halfNumeric = BigInt("0xFFFFFFFFFFFFFFFF");

@@ -28,2 +30,3 @@ const sixtyFour = BigInt(64);

const value = index.bufferFloat[index.index];
(0, internal_1.assert)(value !== undefined, "value is undefined in readNumber");
index.index += 1;

@@ -35,3 +38,5 @@ return value;

const lowerHalf = index.bufferUint[index.index];
(0, internal_1.assert)(lowerHalf !== undefined, "lowerHalf is undefined in readNumericUuid");
const upperHalf = index.bufferUint[index.index + 1];
(0, internal_1.assert)(upperHalf !== undefined, "upperHalf is undefined in readNumericUuid");
const value = (upperHalf << sixtyFour) | lowerHalf;

@@ -38,0 +43,0 @@ index.index += 2;

@@ -8,3 +8,3 @@ /*!

* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
* Generated by "flub generate entrypoints" in @fluidframework/build-tools.
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
*/

@@ -11,0 +11,0 @@

@@ -221,5 +221,7 @@ "use strict";

const mid = Math.floor((left + right) / 2);
const c = comparator(search, arr[mid]);
const value = arr[mid];
(0, internal_1.assert)(value !== undefined, "value is undefined in Session.binarySearch");
const c = comparator(search, value);
if (c === 0) {
return arr[mid]; // Found the target, return its index.
return value; // Found the target, return its index.
}

@@ -236,4 +238,4 @@ else if (c > 0) {

equals(other) {
for (let i = 0; i < this.clusterChain.length; i++) {
if (!clustersEqual(this.clusterChain[i], other.clusterChain[i])) {
for (const [index, value] of Object.entries(this.clusterChain)) {
if (!clustersEqual(value, other.clusterChain[index])) {
return false;

@@ -240,0 +242,0 @@ }

@@ -70,2 +70,3 @@ "use strict";

}
(0, internal_1.assert)(ranges[0] !== undefined, "ranges[0] is undefined in SessionSpaceNormalizer.getRangesBetween");
// now we touch up the first and last ranges to ensure that if they contain the

@@ -82,6 +83,8 @@ // queried IDs they are trimmed to start/end with the queried IDs

const lastRangeIndex = ranges.length - 1;
const [limitGenCount, limitCount] = ranges[lastRangeIndex];
if (this.rangeContains(ranges[lastRangeIndex], lastGenCount)) {
const lastRange = ranges[lastRangeIndex];
(0, internal_1.assert)(lastRange !== undefined, "lastRange is undefined in SessionSpaceNormalizer.getRangesBetween");
const [limitGenCount, limitCount] = lastRange;
if (this.rangeContains(lastRange, lastGenCount)) {
ranges[lastRangeIndex] = [limitGenCount, lastGenCount - limitGenCount + 1];
(0, internal_1.assert)(this.rangeContains(ranges[lastRangeIndex], lastGenCount), 0x954 /* Expected the touched up range to contain the queried ID */);
(0, internal_1.assert)(this.rangeContains(lastRange, lastGenCount), 0x954 /* Expected the touched up range to contain the queried ID */);
}

@@ -88,0 +91,0 @@ else {

@@ -24,3 +24,3 @@ /*!

/**
* A version 4, variant 1 uuid (https://datatracker.ietf.org/doc/html/rfc4122).
* A {@link https://datatracker.ietf.org/doc/html/rfc4122 | version 4, variant 1 uuid}.
* A 128-bit Universally Unique IDentifier. Represented here

@@ -27,0 +27,0 @@ * with a string of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,

@@ -8,5 +8,5 @@ /*!

* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
* Generated by "flub generate entrypoints" in @fluidframework/build-tools.
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
*/
export * from "./lib/index.js";

@@ -8,5 +8,5 @@ /*!

* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
* Generated by "flub generate entrypoints" in @fluidframework/build-tools.
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
*/
export * from "./lib/legacy.js";

@@ -50,4 +50,4 @@ /*!

equals(other) {
for (let i = 0; i < this.clusterList.length; i++) {
if (!clustersEqual(this.clusterList[i], other.clusterList[i])) {
for (const [index, value] of Object.entries(this.clusterList)) {
if (!clustersEqual(value, other.clusterList[index])) {
return false;

@@ -54,0 +54,0 @@ }

@@ -524,3 +524,5 @@ /*!

const sessionIndex = readNumber(index);
const session = sessions[sessionIndex + sessionOffset][1];
const sessionArray = sessions[sessionIndex + sessionOffset];
assert(sessionArray !== undefined, "sessionArray is undefined in IdCompressor.deserialize2_0");
const session = sessionArray[1];
const capacity = readNumber(index);

@@ -527,0 +529,0 @@ const count = readNumber(index);

@@ -8,3 +8,3 @@ /*!

* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
* Generated by "flub generate entrypoints" in @fluidframework/build-tools.
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
*/

@@ -11,0 +11,0 @@

@@ -8,3 +8,3 @@ /*!

export declare const pkgName = "@fluidframework/id-compressor";
export declare const pkgVersion = "2.1.0-276985";
export declare const pkgVersion = "2.1.0-281041";
//# sourceMappingURL=packageVersion.d.ts.map

@@ -8,3 +8,3 @@ /*!

export const pkgName = "@fluidframework/id-compressor";
export const pkgVersion = "2.1.0-276985";
export const pkgVersion = "2.1.0-281041";
//# sourceMappingURL=packageVersion.js.map

@@ -5,2 +5,4 @@ /*!

*/
/* eslint-disable no-bitwise */
import { assert } from "@fluidframework/core-utils/internal";
const halfNumeric = BigInt("0xFFFFFFFFFFFFFFFF");

@@ -22,2 +24,3 @@ const sixtyFour = BigInt(64);

const value = index.bufferFloat[index.index];
assert(value !== undefined, "value is undefined in readNumber");
index.index += 1;

@@ -28,3 +31,5 @@ return value;

const lowerHalf = index.bufferUint[index.index];
assert(lowerHalf !== undefined, "lowerHalf is undefined in readNumericUuid");
const upperHalf = index.bufferUint[index.index + 1];
assert(upperHalf !== undefined, "upperHalf is undefined in readNumericUuid");
const value = (upperHalf << sixtyFour) | lowerHalf;

@@ -31,0 +36,0 @@ index.index += 2;

@@ -8,3 +8,3 @@ /*!

* THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
* Generated by "flub generate entrypoints" in @fluidframework/build-tools.
* Generated by "flub generate entrypoints" in @fluid-tools/build-cli.
*/

@@ -11,0 +11,0 @@

@@ -217,5 +217,7 @@ /*!

const mid = Math.floor((left + right) / 2);
const c = comparator(search, arr[mid]);
const value = arr[mid];
assert(value !== undefined, "value is undefined in Session.binarySearch");
const c = comparator(search, value);
if (c === 0) {
return arr[mid]; // Found the target, return its index.
return value; // Found the target, return its index.
}

@@ -232,4 +234,4 @@ else if (c > 0) {

equals(other) {
for (let i = 0; i < this.clusterChain.length; i++) {
if (!clustersEqual(this.clusterChain[i], other.clusterChain[i])) {
for (const [index, value] of Object.entries(this.clusterChain)) {
if (!clustersEqual(value, other.clusterChain[index])) {
return false;

@@ -236,0 +238,0 @@ }

@@ -67,2 +67,3 @@ /*!

}
assert(ranges[0] !== undefined, "ranges[0] is undefined in SessionSpaceNormalizer.getRangesBetween");
// now we touch up the first and last ranges to ensure that if they contain the

@@ -79,6 +80,8 @@ // queried IDs they are trimmed to start/end with the queried IDs

const lastRangeIndex = ranges.length - 1;
const [limitGenCount, limitCount] = ranges[lastRangeIndex];
if (this.rangeContains(ranges[lastRangeIndex], lastGenCount)) {
const lastRange = ranges[lastRangeIndex];
assert(lastRange !== undefined, "lastRange is undefined in SessionSpaceNormalizer.getRangesBetween");
const [limitGenCount, limitCount] = lastRange;
if (this.rangeContains(lastRange, lastGenCount)) {
ranges[lastRangeIndex] = [limitGenCount, lastGenCount - limitGenCount + 1];
assert(this.rangeContains(ranges[lastRangeIndex], lastGenCount), 0x954 /* Expected the touched up range to contain the queried ID */);
assert(this.rangeContains(lastRange, lastGenCount), 0x954 /* Expected the touched up range to contain the queried ID */);
}

@@ -85,0 +88,0 @@ else {

@@ -24,3 +24,3 @@ /*!

/**
* A version 4, variant 1 uuid (https://datatracker.ietf.org/doc/html/rfc4122).
* A {@link https://datatracker.ietf.org/doc/html/rfc4122 | version 4, variant 1 uuid}.
* A 128-bit Universally Unique IDentifier. Represented here

@@ -27,0 +27,0 @@ * with a string of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,

{
"name": "@fluidframework/id-compressor",
"version": "2.1.0-276985",
"version": "2.1.0-281041",
"description": "ID compressor",

@@ -82,6 +82,6 @@ "homepage": "https://fluidframework.com",

"dependencies": {
"@fluid-internal/client-utils": "2.1.0-276985",
"@fluidframework/core-interfaces": "2.1.0-276985",
"@fluidframework/core-utils": "2.1.0-276985",
"@fluidframework/telemetry-utils": "2.1.0-276985",
"@fluid-internal/client-utils": "2.1.0-281041",
"@fluidframework/core-interfaces": "2.1.0-281041",
"@fluidframework/core-utils": "2.1.0-281041",
"@fluidframework/telemetry-utils": "2.1.0-281041",
"@tylerbu/sorted-btree-es6": "^1.8.0",

@@ -92,11 +92,11 @@ "uuid": "^9.0.0"

"@arethetypeswrong/cli": "^0.15.2",
"@biomejs/biome": "^1.7.3",
"@fluid-internal/mocha-test-setup": "2.1.0-276985",
"@fluid-private/stochastic-test-utils": "2.1.0-276985",
"@biomejs/biome": "~1.8.3",
"@fluid-internal/mocha-test-setup": "2.1.0-281041",
"@fluid-private/stochastic-test-utils": "2.1.0-281041",
"@fluid-tools/benchmark": "^0.48.0",
"@fluid-tools/build-cli": "^0.39.0",
"@fluid-tools/build-cli": "^0.40.0",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.39.0",
"@fluidframework/build-tools": "^0.40.0",
"@fluidframework/eslint-config-fluid": "^5.3.0",
"@fluidframework/id-compressor-previous": "npm:@fluidframework/id-compressor@2.0.0-rc.5.0.0",
"@fluidframework/id-compressor-previous": "npm:@fluidframework/id-compressor@2.0.0",
"@microsoft/api-extractor": "^7.45.1",

@@ -127,7 +127,8 @@ "@types/mocha": "^9.1.1",

"build": "fluid-build . --task build",
"build:api-reports": "concurrently \"npm:build:api-reports:*\"",
"build:api-reports:current": "api-extractor run --local --config api-extractor/api-extractor.current.json",
"build:api-reports:legacy": "api-extractor run --local --config api-extractor/api-extractor.legacy.json",
"build:commonjs": "fluid-build . --task commonjs",
"build:compile": "fluid-build . --task compile",
"build:docs": "concurrently \"npm:build:docs:*\"",
"build:docs:current": "api-extractor run --local",
"build:docs:legacy": "api-extractor run --local --config api-extractor/api-extractor.legacy.json",
"build:docs": "api-extractor run --local",
"build:esnext": "tsc --project ./tsconfig.json",

@@ -139,3 +140,3 @@ "build:genver": "gen-version",

"check:are-the-types-wrong": "attw --pack . --exclude-entrypoints ./internal/test-utils",
"check:biome": "biome check . --formatter-enabled=true",
"check:biome": "biome check .",
"check:exports": "concurrently \"npm:check:exports:*\"",

@@ -149,5 +150,6 @@ "check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",

"check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
"ci:build:docs": "concurrently \"npm:ci:build:docs:*\"",
"ci:build:docs:current": "api-extractor run",
"ci:build:docs:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json",
"ci:build:api-reports": "concurrently \"npm:ci:build:api-reports:*\"",
"ci:build:api-reports:current": "api-extractor run --config api-extractor/api-extractor.current.json",
"ci:build:api-reports:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json",
"ci:build:docs": "api-extractor run",
"clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",

@@ -157,3 +159,3 @@ "eslint": "eslint --format stylish src",

"format": "npm run format:biome",
"format:biome": "biome check . --formatter-enabled=true --apply",
"format:biome": "biome check . --write",
"format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",

@@ -160,0 +162,0 @@ "lint": "fluid-build . --task lint",

@@ -66,9 +66,10 @@ /*!

public equals(other: FinalSpace): boolean {
for (let i = 0; i < this.clusterList.length; i++) {
if (!clustersEqual(this.clusterList[i], other.clusterList[i])) {
for (const [index, value] of Object.entries(this.clusterList)) {
if (!clustersEqual(value, other.clusterList[index])) {
return false;
}
}
return this.clusterList.length === other.clusterList.length;
}
}

@@ -700,3 +700,8 @@ /*!

const sessionIndex = readNumber(index);
const session = sessions[sessionIndex + sessionOffset][1];
const sessionArray = sessions[sessionIndex + sessionOffset];
assert(
sessionArray !== undefined,
"sessionArray is undefined in IdCompressor.deserialize2_0",
);
const session = sessionArray[1];
const capacity = readNumber(index);

@@ -703,0 +708,0 @@ const count = readNumber(index);

@@ -9,2 +9,2 @@ /*!

export const pkgName = "@fluidframework/id-compressor";
export const pkgVersion = "2.1.0-276985";
export const pkgVersion = "2.1.0-281041";

@@ -7,2 +7,4 @@ /*!

/* eslint-disable no-bitwise */
import { assert } from "@fluidframework/core-utils/internal";
import { NumericUuid } from "./identifiers.js";

@@ -45,2 +47,3 @@

const value = index.bufferFloat[index.index];
assert(value !== undefined, "value is undefined in readNumber");
index.index += 1;

@@ -52,3 +55,5 @@ return value;

const lowerHalf = index.bufferUint[index.index];
assert(lowerHalf !== undefined, "lowerHalf is undefined in readNumericUuid");
const upperHalf = index.bufferUint[index.index + 1];
assert(upperHalf !== undefined, "upperHalf is undefined in readNumericUuid");
const value = (upperHalf << sixtyFour) | lowerHalf;

@@ -55,0 +60,0 @@ index.index += 2;

@@ -283,5 +283,7 @@ /*!

const mid = Math.floor((left + right) / 2);
const c = comparator(search, arr[mid]);
const value = arr[mid];
assert(value !== undefined, "value is undefined in Session.binarySearch");
const c = comparator(search, value);
if (c === 0) {
return arr[mid]; // Found the target, return its index.
return value; // Found the target, return its index.
} else if (c > 0) {

@@ -297,7 +299,8 @@ left = mid + 1; // Continue search on right half.

public equals(other: Session): boolean {
for (let i = 0; i < this.clusterChain.length; i++) {
if (!clustersEqual(this.clusterChain[i], other.clusterChain[i])) {
for (const [index, value] of Object.entries(this.clusterChain)) {
if (!clustersEqual(value, other.clusterChain[index])) {
return false;
}
}
return this.sessionUuid === other.sessionUuid;

@@ -304,0 +307,0 @@ }

@@ -78,2 +78,6 @@ /*!

}
assert(
ranges[0] !== undefined,
"ranges[0] is undefined in SessionSpaceNormalizer.getRangesBetween",
);

@@ -97,7 +101,12 @@ // now we touch up the first and last ranges to ensure that if they contain the

const lastRangeIndex = ranges.length - 1;
const [limitGenCount, limitCount] = ranges[lastRangeIndex];
if (this.rangeContains(ranges[lastRangeIndex], lastGenCount)) {
const lastRange = ranges[lastRangeIndex];
assert(
lastRange !== undefined,
"lastRange is undefined in SessionSpaceNormalizer.getRangesBetween",
);
const [limitGenCount, limitCount] = lastRange;
if (this.rangeContains(lastRange, lastGenCount)) {
ranges[lastRangeIndex] = [limitGenCount, lastGenCount - limitGenCount + 1];
assert(
this.rangeContains(ranges[lastRangeIndex], lastGenCount),
this.rangeContains(lastRange, lastGenCount),
0x954 /* Expected the touched up range to contain the queried ID */,

@@ -104,0 +113,0 @@ );

@@ -27,3 +27,3 @@ /*!

/**
* A version 4, variant 1 uuid (https://datatracker.ietf.org/doc/html/rfc4122).
* A {@link https://datatracker.ietf.org/doc/html/rfc4122 | version 4, variant 1 uuid}.
* A 128-bit Universally Unique IDentifier. Represented here

@@ -30,0 +30,0 @@ * with a string of the form xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx,

@@ -7,3 +7,2 @@ {

"exactOptionalPropertyTypes": false,
"noUncheckedIndexedAccess": false,
},

@@ -10,0 +9,0 @@ "include": ["src/**/*"],

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

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

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

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

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

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