Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

@fluidframework/core-utils

Package Overview
Dependencies
Maintainers
1
Versions
332
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluidframework/core-utils - npm Package Compare versions

Comparing version
2.80.0
to
2.81.0
+4
-0
CHANGELOG.md
# @fluidframework/core-utils
## 2.81.0
Dependency updates only.
## 2.80.0

@@ -4,0 +8,0 @@

+18
-12

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

if (!condition) {
fail(message, debugMessageBuilder);
failPrivate(message, debugMessageBuilder);
}

@@ -43,2 +43,18 @@ }

/**
* {@link fail}'s implementation, but extracted to avoid assert tagging trying to tag the use of it in `assert`.
*/
function failPrivate(message, debugMessageBuilder) {
let messageString = typeof message === "number" ? `0x${message.toString(16).padStart(3, "0")}` : message;
skipInProduction(() => {
if (debugMessageBuilder !== undefined) {
messageString = `${messageString}\nDebug Message: ${debugMessageBuilder()}`;
}
// Using console.log instead of console.error or console.warn since the latter two may break downstream users.
console.log(`Bug in Fluid Framework: Failed Assertion: ${messageString}`);
});
const error = new Error(messageString);
onAssertionError(error);
throw error;
}
/**
* Throw an error with a constant message.

@@ -60,13 +76,3 @@ * @remarks

function fail(message, debugMessageBuilder) {
let messageString = typeof message === "number" ? `0x${message.toString(16).padStart(3, "0")}` : message;
skipInProduction(() => {
if (debugMessageBuilder !== undefined) {
messageString = `${messageString}\nDebug Message: ${debugMessageBuilder()}`;
}
// Using console.log instead of console.error or console.warn since the latter two may break downstream users.
console.log(`Bug in Fluid Framework: Failed Assertion: ${messageString}`);
});
const error = new Error(messageString);
onAssertionError(error);
throw error;
failPrivate(message, debugMessageBuilder);
}

@@ -73,0 +79,0 @@ exports.fail = fail;

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

async getPromise() {
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if result is a falsy value
if (this.result === undefined) {

@@ -80,0 +81,0 @@ this.result = this.execute();

@@ -1,6 +0,6 @@

/* eslint-disable */
/**
* GENERATED FILE - DO NOT EDIT DIRECTLY.
* To regenerate: pnpm tsx scripts/generate-flat-eslint-configs.ts --typescript
/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
import type { Linter } from "eslint";

@@ -7,0 +7,0 @@ import { strict } from "../../../common/build/eslint-config-fluid/flat.mts";

@@ -34,6 +34,22 @@ /*!

if (!condition) {
fail(message, debugMessageBuilder);
failPrivate(message, debugMessageBuilder);
}
}
/**
* {@link fail}'s implementation, but extracted to avoid assert tagging trying to tag the use of it in `assert`.
*/
function failPrivate(message, debugMessageBuilder) {
let messageString = typeof message === "number" ? `0x${message.toString(16).padStart(3, "0")}` : message;
skipInProduction(() => {
if (debugMessageBuilder !== undefined) {
messageString = `${messageString}\nDebug Message: ${debugMessageBuilder()}`;
}
// Using console.log instead of console.error or console.warn since the latter two may break downstream users.
console.log(`Bug in Fluid Framework: Failed Assertion: ${messageString}`);
});
const error = new Error(messageString);
onAssertionError(error);
throw error;
}
/**
* Throw an error with a constant message.

@@ -55,13 +71,3 @@ * @remarks

export function fail(message, debugMessageBuilder) {
let messageString = typeof message === "number" ? `0x${message.toString(16).padStart(3, "0")}` : message;
skipInProduction(() => {
if (debugMessageBuilder !== undefined) {
messageString = `${messageString}\nDebug Message: ${debugMessageBuilder()}`;
}
// Using console.log instead of console.error or console.warn since the latter two may break downstream users.
console.log(`Bug in Fluid Framework: Failed Assertion: ${messageString}`);
});
const error = new Error(messageString);
onAssertionError(error);
throw error;
failPrivate(message, debugMessageBuilder);
}

@@ -68,0 +74,0 @@ function onAssertionError(error) {

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

async getPromise() {
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if result is a falsy value
if (this.result === undefined) {

@@ -76,0 +77,0 @@ this.result = this.execute();

{
"name": "@fluidframework/core-utils",
"version": "2.80.0",
"version": "2.81.0",
"description": "Not intended for use outside the Fluid client repo.",

@@ -72,9 +72,9 @@ "homepage": "https://fluidframework.com",

"@biomejs/biome": "~1.9.3",
"@fluid-internal/mocha-test-setup": "~2.80.0",
"@fluid-tools/benchmark": "^0.51.0",
"@fluid-tools/build-cli": "^0.62.0",
"@fluid-internal/mocha-test-setup": "~2.81.0",
"@fluid-tools/benchmark": "^0.52.0",
"@fluid-tools/build-cli": "^0.63.0",
"@fluidframework/build-common": "^2.0.3",
"@fluidframework/build-tools": "^0.62.0",
"@fluidframework/core-utils-previous": "npm:@fluidframework/core-utils@2.74.0",
"@fluidframework/eslint-config-fluid": "~2.80.0",
"@fluidframework/build-tools": "^0.63.0",
"@fluidframework/core-utils-previous": "npm:@fluidframework/core-utils@2.80.0",
"@fluidframework/eslint-config-fluid": "~2.81.0",
"@microsoft/api-extractor": "7.52.11",

@@ -81,0 +81,0 @@ "@types/mocha": "^10.0.10",

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

if (!condition) {
fail(message, debugMessageBuilder);
failPrivate(message, debugMessageBuilder);
}

@@ -45,2 +45,20 @@ }

/**
* {@link fail}'s implementation, but extracted to avoid assert tagging trying to tag the use of it in `assert`.
*/
function failPrivate(message: string | number, debugMessageBuilder?: () => string): never {
let messageString =
typeof message === "number" ? `0x${message.toString(16).padStart(3, "0")}` : message;
skipInProduction(() => {
if (debugMessageBuilder !== undefined) {
messageString = `${messageString}\nDebug Message: ${debugMessageBuilder()}`;
}
// Using console.log instead of console.error or console.warn since the latter two may break downstream users.
console.log(`Bug in Fluid Framework: Failed Assertion: ${messageString}`);
});
const error = new Error(messageString);
onAssertionError(error);
throw error;
}
/**
* Throw an error with a constant message.

@@ -62,14 +80,3 @@ * @remarks

export function fail(message: string | number, debugMessageBuilder?: () => string): never {
let messageString =
typeof message === "number" ? `0x${message.toString(16).padStart(3, "0")}` : message;
skipInProduction(() => {
if (debugMessageBuilder !== undefined) {
messageString = `${messageString}\nDebug Message: ${debugMessageBuilder()}`;
}
// Using console.log instead of console.error or console.warn since the latter two may break downstream users.
console.log(`Bug in Fluid Framework: Failed Assertion: ${messageString}`);
});
const error = new Error(messageString);
onAssertionError(error);
throw error;
failPrivate(message, debugMessageBuilder);
}

@@ -76,0 +83,0 @@

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

private async getPromise(): Promise<T> {
// eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if result is a falsy value
if (this.result === undefined) {

@@ -86,0 +87,0 @@ this.result = this.execute();

/*!
* Copyright (c) Microsoft Corporation and contributors. All rights reserved.
* Licensed under the MIT License.
*/
module.exports = {
extends: [require.resolve("@fluidframework/eslint-config-fluid/strict"), "prettier"],
parserOptions: {
project: ["./tsconfig.json", "./src/test/tsconfig.json"],
},
rules: {
// This has been disabled in the next eslint-config-fluid.
// Once the dependency here has been updated, this override can be removed.
"unicorn/numeric-separators-style": "off",
},
overrides: [
{
// Rules only for test files
files: ["*.spec.ts", "*.test.ts", "src/test/**"],
rules: {
// Test files are run in node only so additional node libraries can be used.
"import-x/no-nodejs-modules": ["error", { allow: ["node:assert", "node:process"] }],
// Does not work well with describe/it block scoping
"unicorn/consistent-function-scoping": "off",
},
},
],
};

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