@fluid-tools/fetch-tool 2.80.0 → 2.81.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -743,6 +743,7 @@ function calcChannelStats(
743
743
  const channelStats = new Map<string, [number, number]>();
744
744
  for (const [objectId, type] of dataType) {
745
745
  let value = objectStats.get(objectId);
746
+ // eslint-disable-next-line @typescript-eslint/prefer-nullish-coalescing -- using ??= could change behavior if value is falsy
746
747
  if (value === undefined) {
747
748
  value = [0, 0];
748
749
  }
package/src/fluidFetch.ts CHANGED
@@ -131,7 +131,9 @@ fluidFetchMain()
131
131
  if (key !== "message" && key !== "stack") {
132
132
  extraMsg += `\n${key}: ${JSON.stringify(error[key], undefined, 2)}`;
133
133
  }
134
- } catch (_) {}
134
+ } catch (_) {
135
+ // TODO: document why we are ignoring the error here
136
+ }
135
137
  }
136
138
  console.error(`ERROR: ${error.stack}${extraMsg}`);
137
139
  } else if (typeof error === "object") {
@@ -316,6 +316,7 @@ export async function fluidFetchMessages(
316
316
  return printMessageStats(generator, dumpMessageStats, dumpMessages, messageTypeFilter);
317
317
  } else {
318
318
  let item;
319
+ // eslint-disable-next-line no-empty -- TODO: Investigate / document what is going on here.
319
320
  for await (item of generator) {
320
321
  }
321
322
  }
@@ -245,7 +245,9 @@ async function saveSnapshot(
245
245
  if (!paramActualFormatting) {
246
246
  decoded = JSON.stringify(JSON.parse(decoded), undefined, 2);
247
247
  }
248
- } catch (e) {}
248
+ } catch (e) {
249
+ // TODO: document why we are ignoring the error here
250
+ }
249
251
  fs.writeFileSync(`${outDir}/decoded/${item.filename}.json`, decoded);
250
252
  } else {
251
253
  // Write out same data for tree decoded or not, except for formatting
@@ -383,6 +385,7 @@ export async function fluidFetchSnapshot(
383
385
  if (version === undefined) {
384
386
  console.log("No snapshot tree");
385
387
  } else {
388
+ // eslint-disable-next-line @typescript-eslint/strict-boolean-expressions, @typescript-eslint/prefer-nullish-coalescing -- intentional behavior
386
389
  if (blobsToDump === undefined) {
387
390
  blobsToDump = await fetchBlobsFromVersion(storage, version);
388
391
  }
package/.eslintrc.cjs DELETED
@@ -1,27 +0,0 @@
1
- /*!
2
- * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
- * Licensed under the MIT License.
4
- */
5
-
6
- module.exports = {
7
- extends: [
8
- require.resolve("@fluidframework/eslint-config-fluid/minimal-deprecated"),
9
- "prettier",
10
- ],
11
- rules: {
12
- // This library is used in the browser, so we don't want dependencies on most node libraries.
13
- "import-x/no-nodejs-modules": ["error", { allow: ["child_process", "fs", "util"] }],
14
-
15
- // #region TODO: remove these once this config has been updated to use our "recommended" base instead of our deprecated minimal one.
16
- "@typescript-eslint/consistent-type-exports": [
17
- "error",
18
- { fixMixedExportsWithInlineTypeSpecifier: true },
19
- ],
20
- "@typescript-eslint/consistent-type-imports": [
21
- "error",
22
- { fixStyle: "inline-type-imports" },
23
- ],
24
- "@typescript-eslint/no-import-type-side-effects": "error",
25
- // #endregion
26
- },
27
- };