@diplodoc/cli-tests 5.41.0 → 5.42.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.
@@ -12,6 +12,15 @@ import {bundleless, hashless, platformless} from './test';
12
12
 
13
13
  const SYSTEM_DIRS = ['_bundle/', '_search/'];
14
14
 
15
+ // CLI-emitted build artifacts that aren't part of user content. Build-stats
16
+ // and build-content default to on for md2md, so every md2md fixture would
17
+ // otherwise need to list these in its snapshot.
18
+ const SYSTEM_ARTIFACTS = [
19
+ 'yfm-build-manifest.json',
20
+ 'yfm-build-stats.json',
21
+ 'yfm-build-content.json',
22
+ ];
23
+
15
24
  export function getFileContent(filePath: string) {
16
25
  return platformless(bundleless(readFileSync(filePath, 'utf8')));
17
26
  }
@@ -78,7 +87,9 @@ export async function compareDirectories(
78
87
  if (checkBundle) {
79
88
  filesForSnapshot = filesFromOutput;
80
89
  } else {
81
- filesForSnapshot = filesFromOutput.filter((file) => uselessFile(file, SYSTEM_DIRS));
90
+ filesForSnapshot = filesFromOutput.filter((file) =>
91
+ uselessFile(file, [...SYSTEM_DIRS, ...SYSTEM_ARTIFACTS]),
92
+ );
82
93
  }
83
94
 
84
95
  // Here we sort the order of the included files after all processing
@@ -93,7 +104,7 @@ export async function compareDirectories(
93
104
 
94
105
  if (!ignoreFileContent) {
95
106
  filesFromOutput
96
- .filter((file) => uselessFile(file, ['_assets/', ...SYSTEM_DIRS]))
107
+ .filter((file) => uselessFile(file, ['_assets/', ...SYSTEM_DIRS, ...SYSTEM_ARTIFACTS]))
97
108
  .forEach((filePath) => {
98
109
  let content = getFileContent(resolve(outputPath, filePath));
99
110
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@diplodoc/cli-tests",
3
- "version": "5.41.0",
3
+ "version": "5.42.1",
4
4
  "bin": {
5
5
  "diplodoc-cli-test": "bin.mjs"
6
6
  },