@fluidframework/core-utils
Advanced tools
Comparing version 2.0.0-dev-rc.1.0.0.232845 to 2.0.0-dev-rc.2.0.0.245554
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"extends": "../../../common/build/build-common/api-extractor-lint.json" | ||
"extends": "../../../common/build/build-common/api-extractor-lint.esm.primary.json" | ||
} |
{ | ||
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json", | ||
"extends": "../../../common/build/build-common/api-extractor-base.json" | ||
"extends": "../../../common/build/build-common/api-extractor-base.esm.primary.json" | ||
} |
@@ -63,2 +63,8 @@ ## API Report File for "@fluidframework/core-utils" | ||
// @internal | ||
export const isObject: (value: unknown) => value is object; | ||
// @internal | ||
export const isPromiseLike: (value: unknown) => value is PromiseLike<unknown>; | ||
// @internal (undocumented) | ||
@@ -65,0 +71,0 @@ export interface ITimer { |
# @fluidframework/core-utils | ||
## 2.0.0-rc.2.0.0 | ||
Dependency updates only. | ||
## 2.0.0-rc.1.0.0 | ||
@@ -4,0 +8,0 @@ |
@@ -72,2 +72,6 @@ /** | ||
/* Excluded from this release type: isObject */ | ||
/* Excluded from this release type: isPromiseLike */ | ||
/* Excluded from this release type: ITimer */ | ||
@@ -74,0 +78,0 @@ |
@@ -19,2 +19,6 @@ /* Excluded from this release type: assert */ | ||
/* Excluded from this release type: isObject */ | ||
/* Excluded from this release type: isPromiseLike */ | ||
/* Excluded from this release type: ITimer */ | ||
@@ -21,0 +25,0 @@ |
@@ -19,2 +19,6 @@ /* Excluded from this release type: assert */ | ||
/* Excluded from this release type: isObject */ | ||
/* Excluded from this release type: isPromiseLike */ | ||
/* Excluded from this release type: ITimer */ | ||
@@ -21,0 +25,0 @@ |
@@ -167,4 +167,22 @@ /** | ||
/** | ||
* Determines if an arbitrary value is an object | ||
* @param value - The value to check to see if it is an object | ||
* @returns True if the passed value is an object | ||
* | ||
* @internal | ||
*/ | ||
export declare const isObject: (value: unknown) => value is object; | ||
/** | ||
* Determines if an arbitrary value is a promise | ||
* @param value - The value to check to see if it is a promise | ||
* @returns True if the passed value is a promise | ||
* | ||
* @internal | ||
*/ | ||
export declare const isPromiseLike: (value: unknown) => value is PromiseLike<unknown>; | ||
/** | ||
* @internal | ||
*/ | ||
export declare interface ITimer { | ||
@@ -171,0 +189,0 @@ /** |
@@ -5,11 +5,15 @@ /*! | ||
*/ | ||
export { assert } from "./assert"; | ||
export { compareArrays } from "./compare"; | ||
export { delay } from "./delay"; | ||
export { Heap, IComparer, IHeapNode, NumberComparer } from "./heap"; | ||
export { Lazy, LazyPromise } from "./lazy"; | ||
export { PromiseCache, PromiseCacheExpiry, PromiseCacheOptions } from "./promiseCache"; | ||
export { Deferred } from "./promises"; | ||
export { IPromiseTimer, IPromiseTimerResult, ITimer, PromiseTimer, setLongTimeout, Timer, } from "./timer"; | ||
export { unreachableCase } from "./unreachable"; | ||
export { assert } from "./assert.js"; | ||
export { compareArrays } from "./compare.js"; | ||
export { delay } from "./delay.js"; | ||
export type { IComparer, IHeapNode } from "./heap.js"; | ||
export { Heap, NumberComparer } from "./heap.js"; | ||
export { Lazy, LazyPromise } from "./lazy.js"; | ||
export type { PromiseCacheExpiry, PromiseCacheOptions } from "./promiseCache.js"; | ||
export { PromiseCache } from "./promiseCache.js"; | ||
export { Deferred } from "./promises.js"; | ||
export type { IPromiseTimer, IPromiseTimerResult, ITimer } from "./timer.js"; | ||
export { PromiseTimer, setLongTimeout, Timer } from "./timer.js"; | ||
export { unreachableCase } from "./unreachable.js"; | ||
export { isObject, isPromiseLike } from "./typesGuards.js"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -7,25 +7,28 @@ "use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.unreachableCase = exports.Timer = exports.setLongTimeout = exports.PromiseTimer = exports.Deferred = exports.PromiseCache = exports.LazyPromise = exports.Lazy = exports.NumberComparer = exports.Heap = exports.delay = exports.compareArrays = exports.assert = void 0; | ||
var assert_1 = require("./assert"); | ||
Object.defineProperty(exports, "assert", { enumerable: true, get: function () { return assert_1.assert; } }); | ||
var compare_1 = require("./compare"); | ||
Object.defineProperty(exports, "compareArrays", { enumerable: true, get: function () { return compare_1.compareArrays; } }); | ||
var delay_1 = require("./delay"); | ||
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return delay_1.delay; } }); | ||
var heap_1 = require("./heap"); | ||
Object.defineProperty(exports, "Heap", { enumerable: true, get: function () { return heap_1.Heap; } }); | ||
Object.defineProperty(exports, "NumberComparer", { enumerable: true, get: function () { return heap_1.NumberComparer; } }); | ||
var lazy_1 = require("./lazy"); | ||
Object.defineProperty(exports, "Lazy", { enumerable: true, get: function () { return lazy_1.Lazy; } }); | ||
Object.defineProperty(exports, "LazyPromise", { enumerable: true, get: function () { return lazy_1.LazyPromise; } }); | ||
var promiseCache_1 = require("./promiseCache"); | ||
Object.defineProperty(exports, "PromiseCache", { enumerable: true, get: function () { return promiseCache_1.PromiseCache; } }); | ||
var promises_1 = require("./promises"); | ||
Object.defineProperty(exports, "Deferred", { enumerable: true, get: function () { return promises_1.Deferred; } }); | ||
var timer_1 = require("./timer"); | ||
Object.defineProperty(exports, "PromiseTimer", { enumerable: true, get: function () { return timer_1.PromiseTimer; } }); | ||
Object.defineProperty(exports, "setLongTimeout", { enumerable: true, get: function () { return timer_1.setLongTimeout; } }); | ||
Object.defineProperty(exports, "Timer", { enumerable: true, get: function () { return timer_1.Timer; } }); | ||
var unreachable_1 = require("./unreachable"); | ||
Object.defineProperty(exports, "unreachableCase", { enumerable: true, get: function () { return unreachable_1.unreachableCase; } }); | ||
exports.isPromiseLike = exports.isObject = exports.unreachableCase = exports.Timer = exports.setLongTimeout = exports.PromiseTimer = exports.Deferred = exports.PromiseCache = exports.LazyPromise = exports.Lazy = exports.NumberComparer = exports.Heap = exports.delay = exports.compareArrays = exports.assert = void 0; | ||
var assert_js_1 = require("./assert.js"); | ||
Object.defineProperty(exports, "assert", { enumerable: true, get: function () { return assert_js_1.assert; } }); | ||
var compare_js_1 = require("./compare.js"); | ||
Object.defineProperty(exports, "compareArrays", { enumerable: true, get: function () { return compare_js_1.compareArrays; } }); | ||
var delay_js_1 = require("./delay.js"); | ||
Object.defineProperty(exports, "delay", { enumerable: true, get: function () { return delay_js_1.delay; } }); | ||
var heap_js_1 = require("./heap.js"); | ||
Object.defineProperty(exports, "Heap", { enumerable: true, get: function () { return heap_js_1.Heap; } }); | ||
Object.defineProperty(exports, "NumberComparer", { enumerable: true, get: function () { return heap_js_1.NumberComparer; } }); | ||
var lazy_js_1 = require("./lazy.js"); | ||
Object.defineProperty(exports, "Lazy", { enumerable: true, get: function () { return lazy_js_1.Lazy; } }); | ||
Object.defineProperty(exports, "LazyPromise", { enumerable: true, get: function () { return lazy_js_1.LazyPromise; } }); | ||
var promiseCache_js_1 = require("./promiseCache.js"); | ||
Object.defineProperty(exports, "PromiseCache", { enumerable: true, get: function () { return promiseCache_js_1.PromiseCache; } }); | ||
var promises_js_1 = require("./promises.js"); | ||
Object.defineProperty(exports, "Deferred", { enumerable: true, get: function () { return promises_js_1.Deferred; } }); | ||
var timer_js_1 = require("./timer.js"); | ||
Object.defineProperty(exports, "PromiseTimer", { enumerable: true, get: function () { return timer_js_1.PromiseTimer; } }); | ||
Object.defineProperty(exports, "setLongTimeout", { enumerable: true, get: function () { return timer_js_1.setLongTimeout; } }); | ||
Object.defineProperty(exports, "Timer", { enumerable: true, get: function () { return timer_js_1.Timer; } }); | ||
var unreachable_js_1 = require("./unreachable.js"); | ||
Object.defineProperty(exports, "unreachableCase", { enumerable: true, get: function () { return unreachable_js_1.unreachableCase; } }); | ||
var typesGuards_js_1 = require("./typesGuards.js"); | ||
Object.defineProperty(exports, "isObject", { enumerable: true, get: function () { return typesGuards_js_1.isObject; } }); | ||
Object.defineProperty(exports, "isPromiseLike", { enumerable: true, get: function () { return typesGuards_js_1.isPromiseLike; } }); | ||
//# sourceMappingURL=index.js.map |
@@ -8,4 +8,4 @@ "use strict"; | ||
exports.PromiseTimer = exports.Timer = exports.setLongTimeout = void 0; | ||
const assert_1 = require("./assert"); | ||
const promises_1 = require("./promises"); | ||
const assert_js_1 = require("./assert.js"); | ||
const promises_js_1 = require("./promises.js"); | ||
const maxSetTimeoutMs = 0x7fffffff; // setTimeout limit is MAX_INT32=(2^31-1). | ||
@@ -129,3 +129,3 @@ /** | ||
handler() { | ||
(0, assert_1.assert)(!!this.runningState, 0x764 /* Running timer missing handler */); | ||
(0, assert_js_1.assert)(!!this.runningState, 0x764 /* Running timer missing handler */); | ||
const restart = this.runningState.restart; | ||
@@ -172,3 +172,3 @@ if (restart === undefined) { | ||
this.clear(); | ||
this.deferred = new promises_1.Deferred(); | ||
this.deferred = new promises_js_1.Deferred(); | ||
this.timer.start(ms, handler ? () => this.wrapHandler(handler) : undefined); | ||
@@ -186,3 +186,3 @@ return this.deferred.promise; | ||
handler(); | ||
(0, assert_1.assert)(!!this.deferred, 0x765 /* Handler executed without deferred */); | ||
(0, assert_js_1.assert)(!!this.deferred, 0x765 /* Handler executed without deferred */); | ||
this.deferred.resolve({ timerResult: "timeout" }); | ||
@@ -189,0 +189,0 @@ this.deferred = undefined; |
@@ -8,5 +8,5 @@ // This file is read by tools that parse documentation comments conforming to the TSDoc standard. | ||
"packageName": "@microsoft/api-extractor", | ||
"packageVersion": "7.39.1" | ||
"packageVersion": "7.42.3" | ||
} | ||
] | ||
} |
{ | ||
"name": "@fluidframework/core-utils", | ||
"version": "2.0.0-dev-rc.1.0.0.232845", | ||
"version": "2.0.0-dev-rc.2.0.0.245554", | ||
"description": "Not intended for use outside the Fluid client repo.", | ||
@@ -14,7 +14,8 @@ "homepage": "https://fluidframework.com", | ||
"sideEffects": false, | ||
"type": "module", | ||
"exports": { | ||
".": { | ||
"import": { | ||
"types": "./lib/index.d.mts", | ||
"default": "./lib/index.mjs" | ||
"types": "./lib/index.d.ts", | ||
"default": "./lib/index.js" | ||
}, | ||
@@ -25,6 +26,35 @@ "require": { | ||
} | ||
}, | ||
"./public": { | ||
"import": { | ||
"types": "./lib/core-utils-public.d.ts", | ||
"default": "./lib/index.js" | ||
}, | ||
"require": { | ||
"types": "./dist/core-utils-public.d.ts", | ||
"default": "./dist/index.js" | ||
} | ||
}, | ||
"./alpha": { | ||
"import": { | ||
"types": "./lib/core-utils-alpha.d.ts", | ||
"default": "./lib/index.js" | ||
}, | ||
"require": { | ||
"types": "./dist/core-utils-alpha.d.ts", | ||
"default": "./dist/index.js" | ||
} | ||
}, | ||
"./internal": { | ||
"import": { | ||
"types": "./lib/index.d.ts", | ||
"default": "./lib/index.js" | ||
}, | ||
"require": { | ||
"types": "./dist/index.d.ts", | ||
"default": "./dist/index.js" | ||
} | ||
} | ||
}, | ||
"main": "dist/index.js", | ||
"module": "lib/index.mjs", | ||
"types": "dist/index.d.ts", | ||
@@ -36,3 +66,3 @@ "c8": { | ||
"src/test/**/*.*ts", | ||
"dist/test/**/*.*js" | ||
"lib/test/**/*.*js" | ||
], | ||
@@ -42,3 +72,3 @@ "exclude-after-remap": false, | ||
"src/**/*.*ts", | ||
"dist/**/*.*js" | ||
"lib/**/*.*js" | ||
], | ||
@@ -55,16 +85,16 @@ "report-dir": "nyc/report", | ||
"@arethetypeswrong/cli": "^0.13.3", | ||
"@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.2.0.0.245554", | ||
"@fluid-tools/benchmark": "^0.47.0", | ||
"@fluid-tools/build-cli": "^0.29.0", | ||
"@fluid-tools/build-cli": "^0.34.0", | ||
"@fluidframework/build-common": "^2.0.3", | ||
"@fluidframework/build-tools": "^0.29.0", | ||
"@fluidframework/eslint-config-fluid": "^3.3.0", | ||
"@fluidframework/mocha-test-setup": "2.0.0-dev-rc.1.0.0.232845", | ||
"@microsoft/api-extractor": "^7.39.1", | ||
"@fluidframework/build-tools": "^0.34.0", | ||
"@fluidframework/eslint-config-fluid": "^5.1.0", | ||
"@microsoft/api-extractor": "^7.42.3", | ||
"@types/mocha": "^9.1.1", | ||
"@types/node": "^18.19.0", | ||
"@types/sinon": "^7.0.13", | ||
"@types/sinon": "^17.0.3", | ||
"c8": "^8.0.1", | ||
"copyfiles": "^2.4.1", | ||
"cross-env": "^7.0.3", | ||
"eslint": "~8.50.0", | ||
"eslint": "~8.55.0", | ||
"eslint-config-prettier": "~9.0.0", | ||
@@ -77,4 +107,3 @@ "mocha": "^10.2.0", | ||
"rimraf": "^4.4.0", | ||
"sinon": "^7.4.2", | ||
"tsc-multi": "^1.1.0", | ||
"sinon": "^17.0.1", | ||
"typescript": "~5.1.6" | ||
@@ -100,6 +129,6 @@ }, | ||
"api": "fluid-build . --task api", | ||
"api-extractor:commonjs": "api-extractor run --local", | ||
"api-extractor:esnext": "api-extractor run --config ./api-extractor-esm.json", | ||
"bench": "mocha --timeout 999999 --perfMode --parentProcess --fgrep @Benchmark --reporter @fluid-tools/benchmark/dist/MochaReporter.js", | ||
"bench:profile": "mocha --v8-prof --v8-logfile=profile.log --v8-no-logfile-per-isolate --timeout 999999 --perfMode --fgrep @Benchmark --reporter @fluid-tools/benchmark/dist/MochaReporter.js && node --prof-process profile.log > profile.txt && rimraf profile.log && echo See results in profile.txt", | ||
"api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json", | ||
"api-extractor:esnext": "api-extractor run --local", | ||
"bench": "mocha --recursive \"lib/test/**/*.spec.*js\" --timeout 999999 --perfMode --parentProcess --fgrep @Benchmark --reporter @fluid-tools/benchmark/dist/MochaReporter.js", | ||
"bench:profile": "mocha --recursive \"lib/test/**/*.spec.*js\" --v8-prof --v8-logfile=profile.log --v8-no-logfile-per-isolate --timeout 999999 --perfMode --fgrep @Benchmark --reporter @fluid-tools/benchmark/dist/MochaReporter.js && node --prof-process profile.log > profile.txt && rimraf profile.log && echo See results in profile.txt", | ||
"build": "fluid-build . --task build", | ||
@@ -109,5 +138,7 @@ "build:commonjs": "fluid-build . --task commonjs", | ||
"build:docs": "fluid-build . --task api", | ||
"build:esnext": "tsc-multi --config ../../../common/build/build-common/tsc-multi.esm.json", | ||
"build:test": "tsc --project ./src/test/tsconfig.json", | ||
"check:are-the-types-wrong": "attw --pack", | ||
"build:esnext": "tsc --project ./tsconfig.json", | ||
"build:test": "npm run build:test:esm && npm run build:test:cjs", | ||
"build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json", | ||
"build:test:esm": "tsc --project ./src/test/tsconfig.json", | ||
"check:are-the-types-wrong": "attw --pack . --entrypoints .", | ||
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json", | ||
@@ -124,7 +155,9 @@ "ci:build:docs": "api-extractor run", | ||
"test": "npm run test:mocha", | ||
"test:benchmark:report": "mocha --node-option unhandled-rejections=strict,expose-gc --exit --perfMode --fgrep @Benchmark --reporter @fluid-tools/benchmark/dist/MochaReporter.js --timeout 60000", | ||
"test:benchmark:report": "mocha --recursive \"lib/test/**/*.spec.*js\" --node-option unhandled-rejections=strict,expose-gc --exit --perfMode --fgrep @Benchmark --reporter @fluid-tools/benchmark/dist/MochaReporter.js --timeout 60000", | ||
"test:coverage": "c8 npm test", | ||
"test:mocha": "mocha", | ||
"test:mocha": "npm run test:mocha:esm && echo skipping cjs to avoid overhead - npm run test:mocha:cjs", | ||
"test:mocha:cjs": "mocha --recursive \"dist/test/**/*.spec.*js\" --exit", | ||
"test:mocha:esm": "mocha --recursive \"lib/test/**/*.spec.*js\" --exit", | ||
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha", | ||
"tsc": "tsc", | ||
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist", | ||
"typetests:gen": "fluid-type-test-generator", | ||
@@ -131,0 +164,0 @@ "typetests:prepare": "flub typetests --dir . --reset --previous --normalize" |
@@ -61,3 +61,3 @@ /*! | ||
*/ | ||
constructor(public comp: IComparer<T>) { | ||
public constructor(public comp: IComparer<T>) { | ||
this.L = [{ value: comp.min, position: 0 }]; | ||
@@ -64,0 +64,0 @@ } |
@@ -6,17 +6,14 @@ /*! | ||
export { assert } from "./assert"; | ||
export { compareArrays } from "./compare"; | ||
export { delay } from "./delay"; | ||
export { Heap, IComparer, IHeapNode, NumberComparer } from "./heap"; | ||
export { Lazy, LazyPromise } from "./lazy"; | ||
export { PromiseCache, PromiseCacheExpiry, PromiseCacheOptions } from "./promiseCache"; | ||
export { Deferred } from "./promises"; | ||
export { | ||
IPromiseTimer, | ||
IPromiseTimerResult, | ||
ITimer, | ||
PromiseTimer, | ||
setLongTimeout, | ||
Timer, | ||
} from "./timer"; | ||
export { unreachableCase } from "./unreachable"; | ||
export { assert } from "./assert.js"; | ||
export { compareArrays } from "./compare.js"; | ||
export { delay } from "./delay.js"; | ||
export type { IComparer, IHeapNode } from "./heap.js"; | ||
export { Heap, NumberComparer } from "./heap.js"; | ||
export { Lazy, LazyPromise } from "./lazy.js"; | ||
export type { PromiseCacheExpiry, PromiseCacheOptions } from "./promiseCache.js"; | ||
export { PromiseCache } from "./promiseCache.js"; | ||
export { Deferred } from "./promises.js"; | ||
export type { IPromiseTimer, IPromiseTimerResult, ITimer } from "./timer.js"; | ||
export { PromiseTimer, setLongTimeout, Timer } from "./timer.js"; | ||
export { unreachableCase } from "./unreachable.js"; | ||
export { isObject, isPromiseLike } from "./typesGuards.js"; |
@@ -6,4 +6,4 @@ /*! | ||
import { assert } from "./assert"; | ||
import { Deferred } from "./promises"; | ||
import { assert } from "./assert.js"; | ||
import { Deferred } from "./promises.js"; | ||
@@ -10,0 +10,0 @@ /** |
{ | ||
"extends": [ | ||
"../../../common/build/build-common/tsconfig.base.json", | ||
"../../../common/build/build-common/tsconfig.cjs.json", | ||
], | ||
"extends": "../../../common/build/build-common/tsconfig.node16.json", | ||
"include": ["src/**/*"], | ||
@@ -10,4 +7,4 @@ "exclude": ["src/test/**/*"], | ||
"rootDir": "./src", | ||
"outDir": "./dist", | ||
"outDir": "./lib", | ||
}, | ||
} |
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
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
370520
24
134
5320
Yes