Skip to content

Commit

Permalink
revert strict as assert for exported code (#4120)
Browse files Browse the repository at this point in the history
  • Loading branch information
micahgodbolt authored Oct 27, 2020
1 parent f4373d3 commit cdd1c9f
Show file tree
Hide file tree
Showing 92 changed files with 92 additions and 92 deletions.
2 changes: 1 addition & 1 deletion common/lib/common-utils/src/promises.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";

/**
* A deferred creates a promise and the ability to resolve or reject it
Expand Down
2 changes: 1 addition & 1 deletion common/lib/common-utils/src/rangeTracker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";

// eslint-disable-next-line import/no-internal-modules
import cloneDeep from "lodash/cloneDeep";
Expand Down
2 changes: 1 addition & 1 deletion common/lib/common-utils/src/timer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { Deferred } from "./promises";

export interface ITimer {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import * as api from "@fluid-internal/client-api";
import * as ink from "@fluidframework/ink";
import * as ui from "../ui";
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/key-value-cache/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import {
IFluidObject,
IFluidRouter,
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/prosemirror/src/fluidBridge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import {
createInsertSegmentOp,
Marker,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { EventEmitter } from "events";
import { ILoader } from "@fluidframework/container-definitions";
import {
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/smde/src/smde.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { EventEmitter } from "events";
import {
IFluidObject,
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/table-document/src/cellrange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { LocalReference } from "@fluidframework/merge-tree";
import { SequenceInterval } from "@fluidframework/sequence";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { PropertySet } from "@fluidframework/merge-tree";
import { IFluidDataStoreContext } from "@fluidframework/runtime-definitions";
import { ITable, TableDocumentItem } from "../table";
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/webflow/src/document/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { randomId, TokenList, TagName } from "@fluid-example/flow-util-lib";
import { LazyLoadedDataObject, LazyLoadedDataObjectFactory } from "@fluidframework/data-object-base";
import { IFluidHandle } from "@fluidframework/core-interfaces";
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/webflow/src/html/formatters.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { Caret as CaretUtil, Direction, Rect, TagName } from "@fluid-example/flow-util-lib";
import { IFluidObject } from "@fluidframework/core-interfaces";
import { Marker, TextSegment } from "@fluidframework/merge-tree";
Expand Down
2 changes: 1 addition & 1 deletion examples/data-objects/webflow/src/view/layout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { EventEmitter } from "events";
import { Dom, hasTagName, isTextNode, Scheduler, TagName } from "@fluid-example/flow-util-lib";
import { IFluidObject } from "@fluidframework/core-interfaces";
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/cell/src/cell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { ISerializedHandle } from "@fluidframework/core-interfaces";
import { fromBase64ToUtf8 } from "@fluidframework/common-utils";
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/map/src/directory.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { fromBase64ToUtf8 } from "@fluidframework/common-utils";
import { addBlobToTree } from "@fluidframework/protocol-base";
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/map/src/mapKernel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { IFluidHandle } from "@fluidframework/core-interfaces";
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
import { IFluidDataStoreRuntime } from "@fluidframework/datastore-definitions";
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/matrix/src/handlecache.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/* eslint-disable no-bitwise */

import { strict as assert } from "assert";
import assert from "assert";
import { IVectorConsumer } from "@tiny-calc/nano";
import { Handle, isHandleValid } from "./handletable";
import { PermutationVector, PermutationSegment } from "./permutationvector";
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/matrix/src/matrix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import {
FileMode,
ISequencedDocumentMessage,
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/matrix/src/permutationvector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { ChildLogger } from "@fluidframework/telemetry-utils";
import { IFluidDataStoreRuntime, IChannelStorageService } from "@fluidframework/datastore-definitions";
import { ITelemetryBaseLogger } from "@fluidframework/common-definitions";
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/matrix/src/undoprovider.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { Serializable } from "@fluidframework/datastore-definitions";
import { TrackingGroup, MergeTreeDeltaOperationType, MergeTreeDeltaType } from "@fluidframework/merge-tree";
import { SharedMatrix } from "./matrix";
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/merge-tree/src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { IFluidHandle } from "@fluidframework/core-interfaces";
import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
import { IFluidDataStoreRuntime, IChannelStorageService } from "@fluidframework/datastore-definitions";
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/merge-tree/src/mergeTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

/* eslint-disable @typescript-eslint/consistent-type-assertions, max-len, no-bitwise, no-param-reassign, no-shadow */

import { strict as assert } from "assert";
import assert from "assert";
import { Trace } from "@fluidframework/common-utils";
import * as Base from "./base";
import * as Collections from "./collections";
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/merge-tree/src/partialLengths.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License.
*/
import { strict as assert } from "assert";
import assert from "assert";
import { Property } from "./base";
import { RedBlackTree } from "./collections";
import { UnassignedSequenceNumber } from "./constants";
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/merge-tree/src/segmentPropertiesManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { UnassignedSequenceNumber } from "./constants";
import { CollaborationWindow, ISegment } from "./mergeTree";
import { ICombiningOp, IMergeTreeAnnotateMsg } from "./ops";
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/merge-tree/src/snapshotLoader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { fromBase64ToUtf8 } from "@fluidframework/common-utils";
import { ChildLogger } from "@fluidframework/telemetry-utils";
import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/merge-tree/src/snapshotV1.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { ITelemetryLogger } from "@fluidframework/common-definitions";
import {
IFluidHandle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { fromBase64ToUtf8, unreachableCase } from "@fluidframework/common-utils";
import {
FileMode,
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/ordered-collection/src/snapshotableArray.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";

export class SnapshotableArray<T> extends Array {
protected data: T[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { fromBase64ToUtf8, unreachableCase } from "@fluidframework/common-utils";
import {
FileMode,
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/sequence/src/sequence.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";

// eslint-disable-next-line import/no-internal-modules
import cloneDeep from "lodash/cloneDeep";
Expand Down
2 changes: 1 addition & 1 deletion packages/dds/shared-object-base/src/sharedObject.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { ITelemetryErrorEvent, ITelemetryLogger } from "@fluidframework/common-definitions";
import { IFluidHandle } from "@fluidframework/core-interfaces";
import { ChildLogger, EventEmitterWithErrorHandling } from "@fluidframework/telemetry-utils";
Expand Down
2 changes: 1 addition & 1 deletion packages/drivers/debugger/src/fluidDebuggerController.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { Deferred } from "@fluidframework/common-utils";
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
import { readAndParse } from "@fluidframework/driver-utils";
Expand Down
2 changes: 1 addition & 1 deletion packages/drivers/debugger/src/fluidDebuggerUi.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { ISequencedDocumentMessage, IVersion } from "@fluidframework/protocol-definitions";

export interface IDebuggerUI {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { BatchManager, TypedEventEmitter } from "@fluidframework/common-utils";
import { IDocumentDeltaConnection, IDocumentDeltaConnectionEvents } from "@fluidframework/driver-definitions";
import { createGenericNetworkError } from "@fluidframework/driver-utils";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import fs from "fs";
import { IDocumentDeltaStorageService } from "@fluidframework/driver-definitions";
import * as api from "@fluidframework/protocol-definitions";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import fs from "fs";
import { fromBase64ToUtf8 } from "@fluidframework/common-utils";
import { IDocumentStorageService } from "@fluidframework/driver-definitions";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { IRequest } from "@fluidframework/core-interfaces";
import { fromBase64ToUtf8 } from "@fluidframework/common-utils";
import { IResolvedUrl, IUrlResolver } from "@fluidframework/driver-definitions";
Expand Down
2 changes: 1 addition & 1 deletion packages/drivers/local-driver/src/localResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { parse } from "url";
import { IRequest } from "@fluidframework/core-interfaces";
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { ITelemetryLogger } from "@fluidframework/common-definitions";
import { TelemetryNullLogger } from "@fluidframework/common-utils";
import { DocumentDeltaConnection } from "@fluidframework/driver-base";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { ITelemetryLogger } from "@fluidframework/common-definitions";
import { v4 as uuid } from "uuid";
import {
Expand Down
2 changes: 1 addition & 1 deletion packages/drivers/odsp-driver/src/odspDriverUrlResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import {
IRequest,
DriverHeader,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import {
IDocumentDeltaConnection,
IDocumentDeltaStorageService,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import querystring from "querystring";
import { fromUtf8ToBase64 } from "@fluidframework/common-utils";
import { IDeltaStorageService, IDocumentDeltaStorageService } from "@fluidframework/driver-definitions";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
* Licensed under the MIT License.
*/

import { strict as assert } from "assert";
import assert from "assert";
import { parse } from "url";
import {
IDocumentService,
Expand Down
Loading

0 comments on commit cdd1c9f

Please sign in to comment.