@fluid-internal/client-utils
Advanced tools
Comparing version 2.1.0-274160 to 2.1.0-276326
@@ -33,3 +33,3 @@ /*! | ||
* | ||
* @alpha | ||
* @internal | ||
*/ | ||
@@ -36,0 +36,0 @@ export declare const bufferToString: (blob: ArrayBufferLike, encoding: "utf8" | "utf-8" | "base64") => string; |
@@ -79,3 +79,3 @@ "use strict"; | ||
* | ||
* @alpha | ||
* @internal | ||
*/ | ||
@@ -82,0 +82,0 @@ const bufferToString = (blob, |
@@ -59,5 +59,5 @@ /*! | ||
* | ||
* @alpha | ||
* @internal | ||
*/ | ||
export declare const bufferToString: (blob: ArrayBufferLike, encoding: "utf8" | "utf-8" | "base64") => string; | ||
//# sourceMappingURL=bufferNode.d.ts.map |
@@ -53,3 +53,3 @@ "use strict"; | ||
* | ||
* @alpha | ||
* @internal | ||
*/ | ||
@@ -56,0 +56,0 @@ const bufferToString = (blob, |
@@ -12,5 +12,5 @@ /*! | ||
export { EventEmitter } from "./eventEmitter.cjs"; | ||
export { IsomorphicPerformance } from "./performanceIsomorphic.js"; | ||
export type { IsomorphicPerformance } from "./performanceIsomorphic.js"; | ||
export { type ITraceEvent, Trace } from "./trace.js"; | ||
export { type EventEmitterEventType, TypedEventEmitter, type TypedEventTransform, } from "./typedEventEmitter.js"; | ||
//# sourceMappingURL=indexNode.d.ts.map |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import { IEvent, IEventProvider, IEventTransformer, TransformedEvent } from "@fluidframework/core-interfaces"; | ||
import type { IEvent, IEventProvider, IEventTransformer, TransformedEvent } from "@fluidframework/core-interfaces"; | ||
import { EventEmitter } from "./eventEmitter.cjs"; | ||
@@ -13,2 +13,3 @@ /** | ||
* The polyfill is now always used, but string is the only event type preferred. | ||
* @legacy | ||
* @alpha | ||
@@ -18,2 +19,3 @@ */ | ||
/** | ||
* @legacy | ||
* @alpha | ||
@@ -26,2 +28,3 @@ */ | ||
* This should become internal once the classes extending it become internal. | ||
* @legacy | ||
* @alpha | ||
@@ -28,0 +31,0 @@ */ |
@@ -13,2 +13,3 @@ "use strict"; | ||
* This should become internal once the classes extending it become internal. | ||
* @legacy | ||
* @alpha | ||
@@ -15,0 +16,0 @@ */ |
@@ -33,3 +33,3 @@ /*! | ||
* | ||
* @alpha | ||
* @internal | ||
*/ | ||
@@ -36,0 +36,0 @@ export declare const bufferToString: (blob: ArrayBufferLike, encoding: "utf8" | "utf-8" | "base64") => string; |
@@ -51,3 +51,3 @@ /*! | ||
* | ||
* @alpha | ||
* @internal | ||
*/ | ||
@@ -54,0 +54,0 @@ export const bufferToString = (blob, |
@@ -59,5 +59,5 @@ /*! | ||
* | ||
* @alpha | ||
* @internal | ||
*/ | ||
export declare const bufferToString: (blob: ArrayBufferLike, encoding: "utf8" | "utf-8" | "base64") => string; | ||
//# sourceMappingURL=bufferNode.d.ts.map |
@@ -48,3 +48,3 @@ /*! | ||
* | ||
* @alpha | ||
* @internal | ||
*/ | ||
@@ -51,0 +51,0 @@ export const bufferToString = (blob, |
@@ -12,5 +12,5 @@ /*! | ||
export { EventEmitter } from "./eventEmitter.cjs"; | ||
export { IsomorphicPerformance } from "./performanceIsomorphic.js"; | ||
export type { IsomorphicPerformance } from "./performanceIsomorphic.js"; | ||
export { type ITraceEvent, Trace } from "./trace.js"; | ||
export { type EventEmitterEventType, TypedEventEmitter, type TypedEventTransform, } from "./typedEventEmitter.js"; | ||
//# sourceMappingURL=indexNode.d.ts.map |
@@ -5,3 +5,3 @@ /*! | ||
*/ | ||
import { IEvent, IEventProvider, IEventTransformer, TransformedEvent } from "@fluidframework/core-interfaces"; | ||
import type { IEvent, IEventProvider, IEventTransformer, TransformedEvent } from "@fluidframework/core-interfaces"; | ||
import { EventEmitter } from "./eventEmitter.cjs"; | ||
@@ -13,2 +13,3 @@ /** | ||
* The polyfill is now always used, but string is the only event type preferred. | ||
* @legacy | ||
* @alpha | ||
@@ -18,2 +19,3 @@ */ | ||
/** | ||
* @legacy | ||
* @alpha | ||
@@ -26,2 +28,3 @@ */ | ||
* This should become internal once the classes extending it become internal. | ||
* @legacy | ||
* @alpha | ||
@@ -28,0 +31,0 @@ */ |
@@ -10,2 +10,3 @@ /*! | ||
* This should become internal once the classes extending it become internal. | ||
* @legacy | ||
* @alpha | ||
@@ -12,0 +13,0 @@ */ |
{ | ||
"name": "@fluid-internal/client-utils", | ||
"version": "2.1.0-274160", | ||
"version": "2.1.0-276326", | ||
"description": "Not intended for use outside the Fluid Framework.", | ||
@@ -37,2 +37,10 @@ "homepage": "https://fluidframework.com", | ||
} | ||
}, | ||
"./internal-api-report": { | ||
"import": { | ||
"types": { | ||
"browser legacy": "./lib/client-utils.browser.legacy.d.ts", | ||
"node legacy": "./lib/client-utils.node.legacy.d.ts" | ||
} | ||
} | ||
} | ||
@@ -63,4 +71,4 @@ }, | ||
"dependencies": { | ||
"@fluidframework/core-interfaces": "2.1.0-274160", | ||
"@fluidframework/core-utils": "2.1.0-274160", | ||
"@fluidframework/core-interfaces": "2.1.0-276326", | ||
"@fluidframework/core-utils": "2.1.0-276326", | ||
"@types/events_pkg": "npm:@types/events@^3.0.0", | ||
@@ -76,3 +84,3 @@ "base64-js": "^1.5.1", | ||
"@fluid-internal/client-utils-previous": "npm:@fluid-internal/client-utils@2.0.0-rc.5.0.0", | ||
"@fluid-internal/mocha-test-setup": "2.1.0-274160", | ||
"@fluid-internal/mocha-test-setup": "2.1.0-276326", | ||
"@fluid-tools/build-cli": "^0.39.0", | ||
@@ -85,3 +93,3 @@ "@fluidframework/build-common": "^2.0.3", | ||
"@types/jest": "29.5.3", | ||
"@types/jest-environment-puppeteer": "2.1.0-274160", | ||
"@types/jest-environment-puppeteer": "2.1.0-276326", | ||
"@types/mocha": "^9.1.1", | ||
@@ -124,2 +132,20 @@ "@types/node": "^18.19.0", | ||
], | ||
"build:docs:browser:current": [ | ||
"build:exports:browser" | ||
], | ||
"build:docs:browser:legacy": [ | ||
"build:exports:browser" | ||
], | ||
"build:docs:node:current": [ | ||
"build:docs:browser:current" | ||
], | ||
"build:docs:node:legacy": [ | ||
"build:docs:browser:legacy" | ||
], | ||
"check:exports:esm:indexBrowser:legacy": [ | ||
"build:exports:browser" | ||
], | ||
"check:exports:esm:indexNode:legacy": [ | ||
"build:exports:node" | ||
], | ||
"build:test:jest": [ | ||
@@ -136,2 +162,14 @@ "tsc" | ||
"build:esnext" | ||
], | ||
"ci:build:docs:browser:current": [ | ||
"build:exports:browser" | ||
], | ||
"ci:build:docs:browser:legacy": [ | ||
"build:exports:browser" | ||
], | ||
"ci:build:docs:node:current": [ | ||
"build:exports:node" | ||
], | ||
"ci:build:docs:node:legacy": [ | ||
"build:exports:node" | ||
] | ||
@@ -147,4 +185,12 @@ } | ||
"build:compile": "fluid-build . --task compile", | ||
"build:docs": "api-extractor run --local", | ||
"build:docs": "npm run build:docs:browser && npm run build:docs:node", | ||
"build:docs:browser": "npm run build:exports:browser && concurrently \"npm:build:docs:browser:*\"", | ||
"build:docs:browser:current": "api-extractor run --local --config api-extractor/api-extractor-browser.json", | ||
"build:docs:browser:legacy": "api-extractor run --local --config api-extractor/api-extractor-browser.legacy.json", | ||
"build:docs:node": "npm run build:exports:node && concurrently \"npm:build:docs:node:*\"", | ||
"build:docs:node:current": "npm run ci:build:docs:node:current", | ||
"build:docs:node:legacy": "npm run ci:build:docs:node:legacy", | ||
"build:esnext": "tsc --project ./tsconfig.json", | ||
"build:exports:browser": "flub generate entrypoints --outFilePrefix {@unscopedPackageName}.browser. --mainEntrypoint ./src/indexBrowser.ts --outDir ./lib", | ||
"build:exports:node": "flub generate entrypoints --outFilePrefix {@unscopedPackageName}.node. --mainEntrypoint ./src/indexNode.ts --outDir ./lib", | ||
"build:test": "concurrently npm:build:test:mocha npm:build:test:jest npm:build:test:types", | ||
@@ -156,3 +202,3 @@ "build:test:jest": "fluid-tsc commonjs --project ./src/test/jest/tsconfig.cjs.json", | ||
"build:test:types": "tsc --project ./src/test/types/tsconfig.json", | ||
"check:are-the-types-wrong": "attw --pack .", | ||
"check:are-the-types-wrong": "attw --pack . --exclude-entrypoints internal-api-report", | ||
"check:biome": "biome check . --formatter-enabled=true", | ||
@@ -164,6 +210,12 @@ "check:exports": "concurrently \"npm:check:exports:*\"", | ||
"check:exports:esm:indexBrowser": "api-extractor run --config api-extractor/api-extractor-lint-indexBrowser.esm.json", | ||
"check:exports:esm:indexBrowser:legacy": "api-extractor run --config api-extractor/api-extractor-lint-indexBrowser.legacy.esm.json", | ||
"check:exports:esm:indexNode": "api-extractor run --config api-extractor/api-extractor-lint-indexNode.esm.json", | ||
"check:exports:esm:indexNode:legacy": "api-extractor run --config api-extractor/api-extractor-lint-indexNode.legacy.esm.json", | ||
"check:format": "npm run check:biome", | ||
"check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore", | ||
"ci:build:docs": "api-extractor run", | ||
"ci:build:docs": "concurrently \"npm:ci:build:docs:*\"", | ||
"ci:build:docs:browser:current": "api-extractor run --config api-extractor/api-extractor-browser.json", | ||
"ci:build:docs:browser:legacy": "api-extractor run --config api-extractor/api-extractor-browser.legacy.json", | ||
"ci:build:docs:node:current": "api-extractor run --config api-extractor/api-extractor-node.json", | ||
"ci:build:docs:node:legacy": "api-extractor run --config api-extractor/api-extractor-node.legacy.json", | ||
"clean": "rimraf --glob _api-extractor-temp dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" nyc", | ||
@@ -170,0 +222,0 @@ "eslint": "eslint --format stylish src", |
@@ -29,2 +29,3 @@ # @fluid-internal/client-utils | ||
1. **All exports must be designated `@internal`.** This code is intended for use within the Fluid Framework only. | ||
**Excepting the small set of typed event emitter APIs** that are in use by legacy test support. | ||
1. This package should **only contain 'implementation' code, not type definitions.** This is the most flexible rule, and | ||
@@ -63,2 +64,14 @@ there are some exceptions. If the type is _only_ necessary when using this package, then it is probably OK. However, | ||
## Export Reports and Linting | ||
With the current case of legacy APIs that are present here and the isometric browser and Node.js support, | ||
generation and checking of APIs is unique within client group. `lib/client-utils.(browser|node).*.d.ts` files | ||
are generated but not used in production (excluded from npm package). | ||
For local (development) builds browser reports are generated first and Node.js reports are then verified to | ||
be the same as browser. (Both report sets use the same target files.) | ||
Package scripts `check:exports:esm:indexBrowser:legacy` and `check:exports:esm:indexNode:legacy` are not | ||
verifying actual exports, but the consistency of tags within the legacy API set. | ||
<!-- AUTO-GENERATED-CONTENT:START (README_DEPENDENCY_GUIDELINES_SECTION:includeHeading=TRUE) --> | ||
@@ -65,0 +78,0 @@ |
@@ -58,3 +58,3 @@ /*! | ||
* | ||
* @alpha | ||
* @internal | ||
*/ | ||
@@ -121,3 +121,3 @@ export const bufferToString = ( | ||
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types, @typescript-eslint/no-explicit-any | ||
static from(value: any, encodingOrOffset?: any, length?: any): IsoBuffer { | ||
public static from(value: any, encodingOrOffset?: any, length?: any): IsoBuffer { | ||
if (typeof value === "string") { | ||
@@ -144,3 +144,3 @@ return IsoBuffer.fromString(value, encodingOrOffset as string | undefined); | ||
static fromArrayBuffer( | ||
public static fromArrayBuffer( | ||
arrayBuffer: ArrayBuffer, | ||
@@ -164,3 +164,3 @@ byteOffset?: number, | ||
static fromString(str: string, encoding?: string): IsoBuffer { | ||
public static fromString(str: string, encoding?: string): IsoBuffer { | ||
switch (encoding) { | ||
@@ -185,3 +185,3 @@ case "base64": { | ||
static isBuffer(obj: unknown): boolean { | ||
public static isBuffer(obj: unknown): boolean { | ||
throw new Error("unimplemented"); | ||
@@ -188,0 +188,0 @@ } |
@@ -15,3 +15,3 @@ /*! | ||
// eslint-disable-next-line unicorn/text-encoding-identifier-case -- this value is supported, just discouraged | ||
toString(encoding?: "utf8" | "utf-8" | "base64"): string; | ||
public toString(encoding?: "utf8" | "utf-8" | "base64"): string; | ||
@@ -27,4 +27,4 @@ /** | ||
*/ | ||
static from(value: unknown, encodingOrOffset?: unknown, length?: unknown): IsoBuffer; | ||
static isBuffer(obj: unknown): obj is Buffer; | ||
public static from(value: unknown, encodingOrOffset?: unknown, length?: unknown): IsoBuffer; | ||
public static isBuffer(obj: unknown): obj is Buffer; | ||
} | ||
@@ -85,3 +85,3 @@ | ||
* | ||
* @alpha | ||
* @internal | ||
*/ | ||
@@ -88,0 +88,0 @@ export const bufferToString = ( |
@@ -22,3 +22,3 @@ /*! | ||
export { EventEmitter } from "./eventEmitter.cjs"; | ||
export { IsomorphicPerformance } from "./performanceIsomorphic.js"; | ||
export type { IsomorphicPerformance } from "./performanceIsomorphic.js"; | ||
export { type ITraceEvent, Trace } from "./trace.js"; | ||
@@ -25,0 +25,0 @@ export { |
@@ -6,3 +6,3 @@ /*! | ||
import { | ||
import type { | ||
IEvent, | ||
@@ -21,2 +21,3 @@ IEventProvider, | ||
* The polyfill is now always used, but string is the only event type preferred. | ||
* @legacy | ||
* @alpha | ||
@@ -27,2 +28,3 @@ */ | ||
/** | ||
* @legacy | ||
* @alpha | ||
@@ -51,2 +53,3 @@ */ | ||
* This should become internal once the classes extending it become internal. | ||
* @legacy | ||
* @alpha | ||
@@ -58,3 +61,3 @@ */ | ||
{ | ||
constructor() { | ||
public constructor() { | ||
super(); | ||
@@ -75,9 +78,9 @@ this.addListener = super.addListener.bind(this) as TypedEventTransform<this, TEvent>; | ||
} | ||
readonly addListener: TypedEventTransform<this, TEvent>; | ||
readonly on: TypedEventTransform<this, TEvent>; | ||
readonly once: TypedEventTransform<this, TEvent>; | ||
readonly prependListener: TypedEventTransform<this, TEvent>; | ||
readonly prependOnceListener: TypedEventTransform<this, TEvent>; | ||
readonly removeListener: TypedEventTransform<this, TEvent>; | ||
readonly off: TypedEventTransform<this, TEvent>; | ||
public readonly addListener: TypedEventTransform<this, TEvent>; | ||
public readonly on: TypedEventTransform<this, TEvent>; | ||
public readonly once: TypedEventTransform<this, TEvent>; | ||
public readonly prependListener: TypedEventTransform<this, TEvent>; | ||
public readonly prependOnceListener: TypedEventTransform<this, TEvent>; | ||
public readonly removeListener: TypedEventTransform<this, TEvent>; | ||
public readonly off: TypedEventTransform<this, TEvent>; | ||
} |
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
235170
155
2966
106
+ Added@fluidframework/core-interfaces@2.1.0-276326(transitive)
+ Added@fluidframework/core-utils@2.1.0-276326(transitive)
- Removed@fluidframework/core-interfaces@2.1.0-274160(transitive)
- Removed@fluidframework/core-utils@2.1.0-274160(transitive)