@jpeakai/mermaidjs-lint 0.6.1 → 0.6.2

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.
package/dist/bin.js CHANGED
@@ -9,7 +9,7 @@ import { parseArgs } from "node:util";
9
9
  // package.json
10
10
  var package_default = {
11
11
  name: "@jpeakai/mermaidjs-lint",
12
- version: "0.6.1",
12
+ version: "0.6.2",
13
13
  type: "module",
14
14
  description: "Deterministic lint gates and verified fixers for Mermaid diagrams in markdown",
15
15
  license: "MIT",
@@ -3043,9 +3043,9 @@ var run = async (argv, cwd) => {
3043
3043
  throw new FlagError("files", "no matching files");
3044
3044
  if (values.fix)
3045
3045
  await refuseOutsideLinks(files, root, cwd);
3046
- const setAside = files.filter((file) => canvasSetAside(file, flags, registry));
3046
+ const setAside = files.filter((file) => canvasSetAside(file, flags, registry)).map((f) => display(f, cwd));
3047
3047
  if (setAside.length > 0) {
3048
- console.error(`mermaidjs-lint: config canvas set aside for ${plural(setAside.length, "file")} scored under mkdocs-material: ${setAside.map((f) => display(f, cwd)).join(", ")}`);
3048
+ console.error(`mermaidjs-lint: config canvas set aside for ${plural(setAside.length, "file")} scored under mkdocs-material: ${setAside.join(", ")}`);
3049
3049
  }
3050
3050
  const perFile = await Promise.all(files.map(async (file) => {
3051
3051
  let src = await readFile3(file, "utf8");
@@ -3068,7 +3068,7 @@ var run = async (argv, cwd) => {
3068
3068
  code: f.error.code,
3069
3069
  message: reasonOf(f)
3070
3070
  }));
3071
- console.log(JSON.stringify({ findings: all, files: files.length, plugins: registry.sources, skippedPlugins }, null, 2));
3071
+ console.log(JSON.stringify({ findings: all, files: files.length, plugins: registry.sources, skippedPlugins, canvasSetAside: setAside }, null, 2));
3072
3072
  } else {
3073
3073
  for (const f of all)
3074
3074
  console.log(reportLine(f, f.file));
package/dist/index.js CHANGED
@@ -2023,7 +2023,7 @@ import { parseArgs } from "node:util";
2023
2023
  // package.json
2024
2024
  var package_default = {
2025
2025
  name: "@jpeakai/mermaidjs-lint",
2026
- version: "0.6.1",
2026
+ version: "0.6.2",
2027
2027
  type: "module",
2028
2028
  description: "Deterministic lint gates and verified fixers for Mermaid diagrams in markdown",
2029
2029
  license: "MIT",
@@ -3043,9 +3043,9 @@ var run = async (argv, cwd) => {
3043
3043
  throw new FlagError("files", "no matching files");
3044
3044
  if (values.fix)
3045
3045
  await refuseOutsideLinks(files, root, cwd);
3046
- const setAside = files.filter((file) => canvasSetAside(file, flags, registry));
3046
+ const setAside = files.filter((file) => canvasSetAside(file, flags, registry)).map((f) => display(f, cwd));
3047
3047
  if (setAside.length > 0) {
3048
- console.error(`mermaidjs-lint: config canvas set aside for ${plural(setAside.length, "file")} scored under mkdocs-material: ${setAside.map((f) => display(f, cwd)).join(", ")}`);
3048
+ console.error(`mermaidjs-lint: config canvas set aside for ${plural(setAside.length, "file")} scored under mkdocs-material: ${setAside.join(", ")}`);
3049
3049
  }
3050
3050
  const perFile = await Promise.all(files.map(async (file) => {
3051
3051
  let src = await readFile3(file, "utf8");
@@ -3068,7 +3068,7 @@ var run = async (argv, cwd) => {
3068
3068
  code: f.error.code,
3069
3069
  message: reasonOf(f)
3070
3070
  }));
3071
- console.log(JSON.stringify({ findings: all, files: files.length, plugins: registry.sources, skippedPlugins }, null, 2));
3071
+ console.log(JSON.stringify({ findings: all, files: files.length, plugins: registry.sources, skippedPlugins, canvasSetAside: setAside }, null, 2));
3072
3072
  } else {
3073
3073
  for (const f of all)
3074
3074
  console.log(reportLine(f, f.file));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jpeakai/mermaidjs-lint",
3
- "version": "0.6.1",
3
+ "version": "0.6.2",
4
4
  "type": "module",
5
5
  "description": "Deterministic lint gates and verified fixers for Mermaid diagrams in markdown",
6
6
  "license": "MIT",
package/src/cli.ts CHANGED
@@ -284,11 +284,12 @@ const run = async (argv: string[], cwd: string): Promise<number> => {
284
284
 
285
285
  // A config canvas is set aside for a file the auto profile reads as
286
286
  // mkdocs-material, and one line names every such file, so the run says what
287
- // it scored without the canvas.
288
- const setAside = files.filter((file) => canvasSetAside(file, flags, registry));
287
+ // it scored without the canvas. The --json object carries the same paths, so
288
+ // a job that reads only stdout still learns the canvas was dropped.
289
+ const setAside = files.filter((file) => canvasSetAside(file, flags, registry)).map((f) => display(f, cwd));
289
290
  if (setAside.length > 0) {
290
291
  console.error(
291
- `mermaidjs-lint: config canvas set aside for ${plural(setAside.length, "file")} scored under mkdocs-material: ${setAside.map((f) => display(f, cwd)).join(", ")}`,
292
+ `mermaidjs-lint: config canvas set aside for ${plural(setAside.length, "file")} scored under mkdocs-material: ${setAside.join(", ")}`,
292
293
  );
293
294
  }
294
295
 
@@ -321,7 +322,11 @@ const run = async (argv: string[], cwd: string): Promise<number> => {
321
322
  message: reasonOf(f),
322
323
  }));
323
324
  console.log(
324
- JSON.stringify({ findings: all, files: files.length, plugins: registry.sources, skippedPlugins }, null, 2),
325
+ JSON.stringify(
326
+ { findings: all, files: files.length, plugins: registry.sources, skippedPlugins, canvasSetAside: setAside },
327
+ null,
328
+ 2,
329
+ ),
325
330
  );
326
331
  } else {
327
332
  for (const f of all) console.log(reportLine(f, f.file));