text-runner-engine 7.4.0 → 7.5.1

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.
Files changed (86) hide show
  1. package/LICENSE +23 -0
  2. package/dist/actions/actions.d.ts +1 -1
  3. package/dist/actions/actions.js +1 -0
  4. package/dist/actions/built-in/check-image.d.ts +2 -2
  5. package/dist/actions/built-in/check-image.js +4 -4
  6. package/dist/actions/built-in/check-link.d.ts +2 -2
  7. package/dist/actions/built-in/check-link.js +17 -21
  8. package/dist/actions/built-in/test.d.ts +1 -1
  9. package/dist/actions/export.d.ts +1 -1
  10. package/dist/actions/external-action-manager.d.ts +2 -2
  11. package/dist/actions/external-action-manager.js +3 -2
  12. package/dist/actions/finder.d.ts +3 -3
  13. package/dist/actions/finder.js +10 -9
  14. package/dist/actions/index.d.ts +5 -5
  15. package/dist/actions/name.js +1 -1
  16. package/dist/activities/extract-dynamic.d.ts +2 -2
  17. package/dist/activities/extract-images-and-links.d.ts +1 -1
  18. package/dist/activities/normalize-action-name.d.ts +1 -1
  19. package/dist/activities/normalize-action-name.js +1 -1
  20. package/dist/ast/index.d.ts +1 -1
  21. package/dist/ast/index.js +1 -1
  22. package/dist/ast/node-list.d.ts +1 -1
  23. package/dist/ast/node-list.js +4 -4
  24. package/dist/ast/node.js +1 -1
  25. package/dist/commands/command.d.ts +1 -1
  26. package/dist/commands/debug.d.ts +3 -3
  27. package/dist/commands/debug.js +2 -2
  28. package/dist/commands/dynamic.d.ts +3 -3
  29. package/dist/commands/dynamic.js +1 -1
  30. package/dist/commands/run.d.ts +3 -3
  31. package/dist/commands/run.js +1 -1
  32. package/dist/commands/static.d.ts +3 -3
  33. package/dist/commands/static.js +1 -1
  34. package/dist/commands/unused.d.ts +3 -3
  35. package/dist/commands/unused.js +1 -1
  36. package/dist/configuration/data.d.ts +2 -2
  37. package/dist/configuration/defaults.d.ts +1 -1
  38. package/dist/configuration/defaults.js +1 -1
  39. package/dist/configuration/publication.js +1 -1
  40. package/dist/configuration/publications.d.ts +2 -2
  41. package/dist/errors/user-error.d.ts +1 -1
  42. package/dist/events/index.d.ts +1 -1
  43. package/dist/filesystem/absolute-dir.js +1 -1
  44. package/dist/filesystem/absolute-file.js +2 -2
  45. package/dist/filesystem/full-dir.js +1 -1
  46. package/dist/filesystem/full-file.js +3 -3
  47. package/dist/filesystem/full-link.d.ts +1 -1
  48. package/dist/filesystem/full-link.js +5 -5
  49. package/dist/filesystem/full-path.d.ts +1 -1
  50. package/dist/filesystem/full-path.js +2 -2
  51. package/dist/filesystem/get-filenames.d.ts +1 -1
  52. package/dist/filesystem/has-directory.js +2 -2
  53. package/dist/filesystem/is-markdown-file.js +2 -2
  54. package/dist/filesystem/relative-link.d.ts +2 -2
  55. package/dist/filesystem/source-dir.js +1 -1
  56. package/dist/filesystem/unknown-link.d.ts +1 -1
  57. package/dist/helpers/add-leading-dot-unless-empty.js +1 -1
  58. package/dist/helpers/add-leading-slash.js +1 -1
  59. package/dist/helpers/add-trailing-slash.js +1 -1
  60. package/dist/helpers/trim-extension.js +1 -1
  61. package/dist/link-targets/find.d.ts +1 -1
  62. package/dist/link-targets/list.d.ts +3 -3
  63. package/dist/link-targets/target-url.js +0 -1
  64. package/dist/parsers/html/html-parser.d.ts +2 -2
  65. package/dist/parsers/html/html-parser.js +6 -4
  66. package/dist/parsers/html/parse-html-files.d.ts +2 -2
  67. package/dist/parsers/html/parse-html-files.js +1 -1
  68. package/dist/parsers/markdown/closing-tag-parser.d.ts +2 -2
  69. package/dist/parsers/markdown/md-parser.js +2 -2
  70. package/dist/parsers/markdown/open-node-tracker.d.ts +2 -2
  71. package/dist/parsers/markdown/parse.d.ts +2 -2
  72. package/dist/parsers/markdown/parse.js +1 -1
  73. package/dist/parsers/tag-mapper.d.ts +1 -1
  74. package/dist/parsers/tag-mapper.js +5 -5
  75. package/dist/run/activity-collector.d.ts +3 -3
  76. package/dist/run/name-refiner.d.ts +1 -1
  77. package/dist/run/output-collector.d.ts +1 -1
  78. package/dist/run/output-collector.js +3 -2
  79. package/dist/run/parallel.d.ts +5 -5
  80. package/dist/run/run-activity.d.ts +5 -5
  81. package/dist/run/run-activity.js +1 -1
  82. package/dist/run/sequential.d.ts +5 -5
  83. package/dist/run/stopwatch.js +2 -2
  84. package/dist/workspace/create.d.ts +1 -1
  85. package/dist/workspace/create.js +1 -1
  86. package/package.json +7 -7
@@ -1,4 +1,4 @@
1
- import * as path from "path";
1
+ import * as path from "node:path";
2
2
  import * as helpers from "../helpers/index.js";
3
3
  import * as files from "./index.js";
4
4
  /**
@@ -19,7 +19,7 @@ export class FullLink {
19
19
  * with the given relative link appended
20
20
  */
21
21
  append(segment) {
22
- return new FullLink(helpers.straightenLink(this.value + "/" + segment.value));
22
+ return new FullLink(helpers.straightenLink(`${this.value}/${segment.value}`));
23
23
  }
24
24
  /** Returns a link to the containing directory */
25
25
  directory() {
@@ -57,7 +57,7 @@ export class FullLink {
57
57
  * with the new enclosing directory
58
58
  */
59
59
  rebase(oldPath, newPath) {
60
- const re = new RegExp("^" + oldPath);
60
+ const re = new RegExp(`^${oldPath}`);
61
61
  return new FullLink(this.value.replace(re, newPath));
62
62
  }
63
63
  urlDecoded() {
@@ -65,11 +65,11 @@ export class FullLink {
65
65
  }
66
66
  /** Returns a link that contains the given anchor */
67
67
  withAnchor(anchor) {
68
- return new FullLink(this.withoutAnchor().value + "#" + anchor);
68
+ return new FullLink(`${this.withoutAnchor().value}#${anchor}`);
69
69
  }
70
70
  /** Returns another FullLink instance that uses the given file extension */
71
71
  withExtension(newExtension) {
72
- const extRE = new RegExp(path.extname(this.value) + "$");
72
+ const extRE = new RegExp(`${path.extname(this.value)}$`);
73
73
  return new FullLink(this.value.replace(extRE, helpers.addLeadingDotUnlessEmpty(newExtension)));
74
74
  }
75
75
  /** Returns a link that is this link without the anchor */
@@ -1,4 +1,4 @@
1
- import * as configuration from "../configuration/index.js";
1
+ import type * as configuration from "../configuration/index.js";
2
2
  import * as files from "./index.js";
3
3
  /**
4
4
  * represents a full path to either a file or a directory,
@@ -1,4 +1,4 @@
1
- import * as path from "path";
1
+ import * as path from "node:path";
2
2
  import * as helpers from "../helpers/index.js";
3
3
  import * as files from "./index.js";
4
4
  /**
@@ -18,7 +18,7 @@ export class FullPath {
18
18
  if (this.isDirectory()) {
19
19
  return this;
20
20
  }
21
- return new FullPath(path.dirname(this.value) + "/");
21
+ return new FullPath(`${path.dirname(this.value)}/`);
22
22
  }
23
23
  /** Returns the file extension of this path */
24
24
  extName() {
@@ -1,4 +1,4 @@
1
- import * as configuration from "../configuration/index.js";
1
+ import type * as configuration from "../configuration/index.js";
2
2
  import * as files from "./index.js";
3
3
  /**
4
4
  * Returns the FullPaths of all files/directories relative to the given sourceDir
@@ -1,10 +1,10 @@
1
- import { promises as fs } from "fs";
1
+ import { promises as fs } from "node:fs";
2
2
  export async function hasDirectory(dirname) {
3
3
  try {
4
4
  const stats = await fs.stat(dirname);
5
5
  return stats.isDirectory();
6
6
  }
7
- catch (e) {
7
+ catch (_e) {
8
8
  return false;
9
9
  }
10
10
  }
@@ -1,10 +1,10 @@
1
- import { promises as fs } from "fs";
1
+ import { promises as fs } from "node:fs";
2
2
  export async function isMarkdownFile(filepath) {
3
3
  try {
4
4
  const fileStats = await fs.stat(filepath);
5
5
  return filepath.endsWith(".md") && fileStats.isFile();
6
6
  }
7
- catch (e) {
7
+ catch (_e) {
8
8
  return false;
9
9
  }
10
10
  }
@@ -1,5 +1,5 @@
1
- import * as configuration from "../configuration/index.js";
2
- import * as files from "./index.js";
1
+ import type * as configuration from "../configuration/index.js";
2
+ import type * as files from "./index.js";
3
3
  /**
4
4
  * A link relative to the current location,
5
5
  * i.e. a link not starting with '/'
@@ -1,5 +1,5 @@
1
+ import * as path from "node:path";
1
2
  import { globby } from "globby";
2
- import * as path from "path";
3
3
  import * as files from "./index.js";
4
4
  /** represents the document base directory */
5
5
  export class SourceDir {
@@ -1,4 +1,4 @@
1
- import * as configuration from "../configuration/index.js";
1
+ import type * as configuration from "../configuration/index.js";
2
2
  import * as files from "./index.js";
3
3
  /**
4
4
  * A link that isn't known yet whether it is relative or absolute
@@ -5,6 +5,6 @@ export function addLeadingDotUnlessEmpty(text) {
5
5
  if (text.startsWith(".")) {
6
6
  return text;
7
7
  }
8
- return "." + text;
8
+ return `.${text}`;
9
9
  }
10
10
  //# sourceMappingURL=add-leading-dot-unless-empty.js.map
@@ -3,7 +3,7 @@ export function addLeadingSlash(filepath) {
3
3
  return filepath;
4
4
  }
5
5
  else {
6
- return "/" + filepath;
6
+ return `/${filepath}`;
7
7
  }
8
8
  }
9
9
  //# sourceMappingURL=add-leading-slash.js.map
@@ -2,6 +2,6 @@ export function addTrailingSlash(text) {
2
2
  if (text.endsWith("/")) {
3
3
  return text;
4
4
  }
5
- return text + "/";
5
+ return `${text}/`;
6
6
  }
7
7
  //# sourceMappingURL=add-trailing-slash.js.map
@@ -1,4 +1,4 @@
1
- import * as path from "path";
1
+ import * as path from "node:path";
2
2
  export function trimExtension(filePath) {
3
3
  return path.join(path.dirname(filePath), path.basename(filePath, path.extname(filePath)));
4
4
  }
@@ -1,4 +1,4 @@
1
- import * as ast from "../ast/index.js";
1
+ import type * as ast from "../ast/index.js";
2
2
  import { List } from "./list.js";
3
3
  export declare function find(nodeLists: ast.NodeList[]): List;
4
4
  //# sourceMappingURL=find.d.ts.map
@@ -1,6 +1,6 @@
1
- import * as ast from "../ast/index.js";
2
- import * as files from "../filesystem/index.js";
3
- import { Target, Types } from "./index.js";
1
+ import type * as ast from "../ast/index.js";
2
+ import type * as files from "../filesystem/index.js";
3
+ import type { Target, Types } from "./index.js";
4
4
  export declare class List {
5
5
  readonly targets: Record<string, Target[]>;
6
6
  constructor();
@@ -1,7 +1,6 @@
1
1
  // @ts-expect-error: no types available
2
2
  import anchor from "anchor-markdown-header";
3
3
  export function targetURL(targetName) {
4
- // eslint-disable-next-line @typescript-eslint/no-unsafe-call
5
4
  const link = anchor(targetName, "github.com");
6
5
  return link.substring(link.indexOf("#") + 1, link.indexOf(")"));
7
6
  }
@@ -1,7 +1,7 @@
1
1
  import * as parse5 from "parse5";
2
2
  import * as ast from "../../ast/index.js";
3
- import * as files from "../../filesystem/index.js";
4
- import { TagMapper } from "../tag-mapper.js";
3
+ import type * as files from "../../filesystem/index.js";
4
+ import type { TagMapper } from "../tag-mapper.js";
5
5
  /** Parser converts HTML5 source into the standardized AST format. */
6
6
  export declare class Parser {
7
7
  private readonly tagMapper;
@@ -1,5 +1,5 @@
1
+ import * as util from "node:util";
1
2
  import * as parse5 from "parse5";
2
- import * as util from "util";
3
3
  import * as ast from "../../ast/index.js";
4
4
  /** Parser converts HTML5 source into the standardized AST format. */
5
5
  export class Parser {
@@ -44,7 +44,7 @@ export class Parser {
44
44
  return this.standardizeTextNode(node, startingLocation);
45
45
  }
46
46
  if (!instanceOfElement(node)) {
47
- throw new Error("unknown tree node: " + util.inspect(node, false, Infinity));
47
+ throw new Error(`unknown tree node: ${util.inspect(node, false, Infinity)}`);
48
48
  }
49
49
  if (this.tagMapper.isStandaloneTag(node.nodeName)) {
50
50
  return this.standardizeStandaloneNode(node, startingLocation);
@@ -53,6 +53,7 @@ export class Parser {
53
53
  }
54
54
  /** converts the given HTML tag with open and closing tag into the standard format */
55
55
  standardizeOpenCloseTag(node, startingLocation) {
56
+ var _a;
56
57
  const result = new ast.NodeList();
57
58
  const attributes = standardizeHTMLAttributes(node.attrs);
58
59
  // store the opening node
@@ -92,8 +93,8 @@ export class Parser {
92
93
  else {
93
94
  throw new Error(`cannot determine end line for node ${node}`);
94
95
  }
95
- if (!node.sourceCodeLocation || (node.sourceCodeLocation && node.sourceCodeLocation.endTag)) {
96
- const tag = ("/" + node.tagName);
96
+ if (!node.sourceCodeLocation || ((_a = node.sourceCodeLocation) === null || _a === void 0 ? void 0 : _a.endTag)) {
97
+ const tag = `/${node.tagName}`;
97
98
  result.push(new ast.Node({
98
99
  attributes: {},
99
100
  content: "",
@@ -144,6 +145,7 @@ export function standardizeHTMLAttributes(attrs) {
144
145
  }
145
146
  return result;
146
147
  }
148
+ // biome-ignore lint/suspicious/noExplicitAny: there are too many possible node types here
147
149
  function instanceOfElement(object) {
148
150
  return !!object.nodeName && !!object.tagName && !!object.attrs;
149
151
  }
@@ -1,6 +1,6 @@
1
- import * as ast from "../../ast/index.js";
1
+ import type * as ast from "../../ast/index.js";
2
2
  import * as files from "../../filesystem/index.js";
3
- import { TagMapper } from "../tag-mapper.js";
3
+ import type { TagMapper } from "../tag-mapper.js";
4
4
  /** returns the standard AST for the HTML files with the given paths */
5
5
  export declare function parseHTMLFiles(filenames: files.FullFilePath[], sourceDir: files.SourceDir, tagMapper: TagMapper): Promise<ast.NodeList[]>;
6
6
  //# sourceMappingURL=parse-html-files.d.ts.map
@@ -1,4 +1,4 @@
1
- import { promises as fs } from "fs";
1
+ import { promises as fs } from "node:fs";
2
2
  import * as files from "../../filesystem/index.js";
3
3
  import { Parser } from "./html-parser.js";
4
4
  /** returns the standard AST for the HTML files with the given paths */
@@ -1,6 +1,6 @@
1
1
  import * as ast from "../../ast/index.js";
2
- import * as files from "../../filesystem/index.js";
3
- import { TagMapper } from "../tag-mapper.js";
2
+ import type * as files from "../../filesystem/index.js";
3
+ import type { TagMapper } from "../tag-mapper.js";
4
4
  /** ClosingTagParser parses HTML blocks containing just a closing tag. */
5
5
  export declare class ClosingTagParser {
6
6
  private readonly closingTagRE;
@@ -1,5 +1,5 @@
1
+ import * as util from "node:util";
1
2
  import MarkdownIt from "markdown-it";
2
- import * as util from "util";
3
3
  import * as ast from "../../ast/index.js";
4
4
  import { UserError } from "../../errors/user-error.js";
5
5
  import * as files from "../../filesystem/index.js";
@@ -163,7 +163,7 @@ export class MarkdownParser {
163
163
  attributes: standardizeMarkdownItAttributes(node.attrs),
164
164
  content: "",
165
165
  location,
166
- tag: ("/" + node.tag),
166
+ tag: `/${node.tag}`,
167
167
  type: `${node.tag}_close`
168
168
  }));
169
169
  return result;
@@ -1,5 +1,5 @@
1
- import * as ast from "../../ast/index.js";
2
- import * as files from "../../filesystem/index.js";
1
+ import type * as ast from "../../ast/index.js";
2
+ import type * as files from "../../filesystem/index.js";
3
3
  /** helps find open MarkdownIt AST nodes */
4
4
  export declare class OpenNodeTracker {
5
5
  private readonly entries;
@@ -1,5 +1,5 @@
1
- import * as ast from "../../ast/index.js";
2
- import * as files from "../../filesystem/index.js";
1
+ import type * as ast from "../../ast/index.js";
2
+ import type * as files from "../../filesystem/index.js";
3
3
  /** returns the standard AST for the Markdown files given as paths relative to the given sourceDir */
4
4
  export declare function parse(filenames: files.FullFilePath[], sourceDir: files.SourceDir): Promise<ast.NodeList[]>;
5
5
  //# sourceMappingURL=parse.d.ts.map
@@ -1,4 +1,4 @@
1
- import { promises as fs } from "fs";
1
+ import { promises as fs } from "node:fs";
2
2
  import { MarkdownParser } from "./md-parser.js";
3
3
  /** returns the standard AST for the Markdown files given as paths relative to the given sourceDir */
4
4
  export async function parse(filenames, sourceDir) {
@@ -1,4 +1,4 @@
1
- import * as ast from "../ast/node.js";
1
+ import type * as ast from "../ast/node.js";
2
2
  /**
3
3
  * TagMapper maps MarkdownIt node types to HTML tags and vice versa.
4
4
  *
@@ -44,7 +44,7 @@ export class TagMapper {
44
44
  }
45
45
  // handle generic closing tag
46
46
  if (type.endsWith("_close")) {
47
- return ("/" + type.substring(0, type.length - 6));
47
+ return `/${type.substring(0, type.length - 6)}`;
48
48
  }
49
49
  // handle generic stand-alone tag
50
50
  return type;
@@ -65,10 +65,10 @@ export class TagMapper {
65
65
  }
66
66
  // here it is an unknown tag, we assume it is opening-closing
67
67
  if (tag.startsWith("/")) {
68
- return (tag.substring(1) + "_close");
68
+ return `${tag.substring(1)}_close`;
69
69
  }
70
70
  else {
71
- return (tag + "_open");
71
+ return `${tag}_open`;
72
72
  }
73
73
  }
74
74
  /** Calculates the mappings from HTML tags to MarkdownIt types */
@@ -83,8 +83,8 @@ export class TagMapper {
83
83
  createTypeTagMappings() {
84
84
  const result = new Map();
85
85
  for (const [type, tag] of TagMapper.OPEN_CLOSE_MAPPINGS) {
86
- result.set((type + "_open"), tag);
87
- result.set((type + "_close"), ("/" + tag));
86
+ result.set(`${type}_open`, tag);
87
+ result.set(`${type}_close`, `/${tag}`);
88
88
  }
89
89
  for (const [type, tag] of TagMapper.STANDALONE_MAPPINGS) {
90
90
  result.set(type, tag);
@@ -1,6 +1,6 @@
1
- import { Activity } from "../activities/index.js";
2
- import { Command } from "../commands/index.js";
3
- import * as events from "../events/index.js";
1
+ import type { Activity } from "../activities/index.js";
2
+ import type { Command } from "../commands/index.js";
3
+ import type * as events from "../events/index.js";
4
4
  import { StopWatch } from "./stopwatch.js";
5
5
  /** Statistics about a run of Text-Runner */
6
6
  interface ActivityResult {
@@ -1,4 +1,4 @@
1
- import { RefineNameFn } from "./index.js";
1
+ import type { RefineNameFn } from "./index.js";
2
2
  /** allows refining the current name of a test step */
3
3
  export declare class NameRefiner {
4
4
  private name;
@@ -1,4 +1,4 @@
1
- import * as run from "./index.js";
1
+ import type * as run from "./index.js";
2
2
  /** simulates console.log to collect output from a running action */
3
3
  export declare class OutputCollector {
4
4
  /** collects the received output */
@@ -1,4 +1,4 @@
1
- import * as util from "util";
1
+ import * as util from "node:util";
2
2
  /** simulates console.log to collect output from a running action */
3
3
  export class OutputCollector {
4
4
  constructor() {
@@ -6,6 +6,7 @@ export class OutputCollector {
6
6
  this.content = [];
7
7
  }
8
8
  /** appends to the output with a newline */
9
+ // biome-ignore lint/suspicious/noExplicitAny: we want to allow any argument here for debugging variables
9
10
  log(...args) {
10
11
  const stringified = [];
11
12
  for (const arg of args) {
@@ -16,7 +17,7 @@ export class OutputCollector {
16
17
  stringified.push(util.inspect(arg, false, Infinity));
17
18
  }
18
19
  }
19
- this.content.push(stringified.join(" ") + "\n");
20
+ this.content.push(`${stringified.join(" ")}\n`);
20
21
  }
21
22
  /** returns the "log" function to be used by actions */
22
23
  logFn() {
@@ -1,8 +1,8 @@
1
- import * as actions from "../actions/index.js";
2
- import * as activities from "../activities/index.js";
3
- import * as commands from "../commands/index.js";
4
- import * as configuration from "../configuration/index.js";
5
- import * as linkTargets from "../link-targets/index.js";
1
+ import type * as actions from "../actions/index.js";
2
+ import type * as activities from "../activities/index.js";
3
+ import type * as commands from "../commands/index.js";
4
+ import type * as configuration from "../configuration/index.js";
5
+ import type * as linkTargets from "../link-targets/index.js";
6
6
  /**
7
7
  * Executes the given activities in parallel.
8
8
  * Returns the errors they produce.
@@ -1,8 +1,8 @@
1
- import * as actions from "../actions/index.js";
2
- import { Activity } from "../activities/index.js";
3
- import * as commands from "../commands/index.js";
4
- import * as configuration from "../configuration/index.js";
5
- import * as linkTargets from "../link-targets/index.js";
1
+ import type * as actions from "../actions/index.js";
2
+ import type { Activity } from "../activities/index.js";
3
+ import type * as commands from "../commands/index.js";
4
+ import type * as configuration from "../configuration/index.js";
5
+ import type * as linkTargets from "../link-targets/index.js";
6
6
  /** runs the given activity, indicates whether it encountered an error */
7
7
  export declare function runActivity(activity: Activity, actionFinder: actions.Finder, configuration: configuration.Data, targets: linkTargets.List, emitter: commands.Command): Promise<boolean>;
8
8
  //# sourceMappingURL=run-activity.d.ts.map
@@ -1,5 +1,5 @@
1
+ import * as util from "node:util";
1
2
  import humanize from "humanize-string";
2
- import * as util from "util";
3
3
  import { isUserError, UserError } from "../errors/user-error.js";
4
4
  import { errorMessage } from "../text-runner.js";
5
5
  import { NameRefiner } from "./name-refiner.js";
@@ -1,7 +1,7 @@
1
- import * as actions from "../actions/index.js";
2
- import * as activities from "../activities/index.js";
3
- import * as commands from "../commands/index.js";
4
- import * as configuration from "../configuration/index.js";
5
- import * as linkTargets from "../link-targets/index.js";
1
+ import type * as actions from "../actions/index.js";
2
+ import type * as activities from "../activities/index.js";
3
+ import type * as commands from "../commands/index.js";
4
+ import type * as configuration from "../configuration/index.js";
5
+ import type * as linkTargets from "../link-targets/index.js";
6
6
  export declare function sequential(activities: activities.List, actionFinder: actions.Finder, configuration: configuration.Data, linkTargets: linkTargets.List, emitter: commands.Command): Promise<void>;
7
7
  //# sourceMappingURL=sequential.d.ts.map
@@ -1,14 +1,14 @@
1
1
  /** StopWatch allows to measure the difference between time periods */
2
2
  export class StopWatch {
3
3
  constructor() {
4
- this.startTime = new Date().getTime();
4
+ this.startTime = Date.now();
5
5
  }
6
6
  /**
7
7
  * Duration returns a human-readable description of the difference
8
8
  * between the current time and when this StopWatch was created.
9
9
  */
10
10
  duration() {
11
- const endTime = new Date().getTime();
11
+ const endTime = Date.now();
12
12
  const milliseconds = endTime - this.startTime;
13
13
  if (milliseconds > 1000) {
14
14
  return `${Math.round(milliseconds / 1000)}s`;
@@ -1,4 +1,4 @@
1
- import * as configuration from "../configuration/index.js";
1
+ import type * as configuration from "../configuration/index.js";
2
2
  /** creates the temp directory to run the tests in */
3
3
  export declare function create(config: configuration.Data): Promise<void>;
4
4
  //# sourceMappingURL=create.d.ts.map
@@ -1,4 +1,4 @@
1
- import { promises as fs } from "fs";
1
+ import { promises as fs } from "node:fs";
2
2
  /** creates the temp directory to run the tests in */
3
3
  export async function create(config) {
4
4
  const path = config.workspace.platformified();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "text-runner-engine",
3
- "version": "7.4.0",
3
+ "version": "7.5.1",
4
4
  "description": "Tests documentation written in MarkDown",
5
5
  "homepage": "https://github.com/kevgo/text-runner",
6
6
  "repository": {
@@ -18,8 +18,8 @@
18
18
  "scripts": {
19
19
  "build": "tsc -p tsconfig-build.json",
20
20
  "doc": "text-runner",
21
- "fix": "eslint --fix --ignore-pattern=dist/ . && dprint fmt && sort-package-json --quiet",
22
- "lint": "eslint --ignore-pattern=dist/ . && dprint check && sort-package-json --check --quiet && depcheck",
21
+ "fix": "biome check --write --unsafe && dprint fmt && sort-package-json --quiet",
22
+ "lint": "biome check --error-on-warnings && dprint check && sort-package-json --check --quiet && depcheck",
23
23
  "reset": "rm -rf dist && yarn run build",
24
24
  "stats": "find . -type f | grep -v /node_modules/ | grep -v /dist/ | grep -v \\./\\.git/ | grep -v \\./\\.vscode/ | grep -v \\./tmp/ | xargs scc",
25
25
  "unit": "node --test --import tsx 'src/**/*.test.ts'"
@@ -27,8 +27,8 @@
27
27
  "dependencies": {
28
28
  "@sindresorhus/slugify": "3.0.0",
29
29
  "anchor-markdown-header": "0.7.0",
30
- "globby": "15.0.0",
31
- "got": "14.5.0",
30
+ "globby": "16.1.0",
31
+ "got": "14.6.6",
32
32
  "humanize-string": "3.1.0",
33
33
  "is-glob": "4.0.3",
34
34
  "markdown-it": "14.1.0",
@@ -39,7 +39,7 @@
39
39
  "@types/is-glob": "4.0.4",
40
40
  "@types/markdown-it": "14.1.2",
41
41
  "assert-no-diff": "4.1.0",
42
- "tsx": "4.20.6"
42
+ "tsx": "4.21.0"
43
43
  },
44
- "gitHead": "a173b524f1afa311e27fa7aa847acc2ddf6b1cbb"
44
+ "gitHead": "ffa7b993386ef88d6f199373e97d9c39e3ea3ac4"
45
45
  }