@graphql-codegen/cli 2.11.0-alpha-9ba238a22.0 → 2.11.0-alpha-269e9f9ad.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.
package/cjs/cli.js CHANGED
@@ -40,7 +40,7 @@ async function runCli(cmd) {
40
40
  await (0, generate_and_save_js_1.generate)(context);
41
41
  if (context.checkMode && context.checkModeStaleFiles.length > 0) {
42
42
  // eslint-disable-next-line no-console
43
- console.log(`The following files are stale were detected: ${context.checkModeStaleFiles.join('\n')}`);
43
+ console.log(`The following stale files were detected:\n${context.checkModeStaleFiles.map(file => ` - ${file}\n`)}`);
44
44
  return 1;
45
45
  }
46
46
  return 0;
@@ -60,10 +60,10 @@ async function generate(input, saveToFile = true) {
60
60
  }
61
61
  if (previousHash && currentHash === previousHash) {
62
62
  (0, debugging_js_1.debugLog)(`Skipping file (${result.filename}) writing due to indentical hash...`);
63
- context.checkModeStaleFiles.push(result.filename);
64
63
  return;
65
64
  }
66
65
  else if (context.checkMode) {
66
+ context.checkModeStaleFiles.push(result.filename);
67
67
  return; // skip updating file in dry mode
68
68
  }
69
69
  if (content.length === 0) {
package/esm/cli.js CHANGED
@@ -14,7 +14,7 @@ export async function runCli(cmd) {
14
14
  await generate(context);
15
15
  if (context.checkMode && context.checkModeStaleFiles.length > 0) {
16
16
  // eslint-disable-next-line no-console
17
- console.log(`The following files are stale were detected: ${context.checkModeStaleFiles.join('\n')}`);
17
+ console.log(`The following stale files were detected:\n${context.checkModeStaleFiles.map(file => ` - ${file}\n`)}`);
18
18
  return 1;
19
19
  }
20
20
  return 0;
@@ -56,10 +56,10 @@ export async function generate(input, saveToFile = true) {
56
56
  }
57
57
  if (previousHash && currentHash === previousHash) {
58
58
  debugLog(`Skipping file (${result.filename}) writing due to indentical hash...`);
59
- context.checkModeStaleFiles.push(result.filename);
60
59
  return;
61
60
  }
62
61
  else if (context.checkMode) {
62
+ context.checkModeStaleFiles.push(result.filename);
63
63
  return; // skip updating file in dry mode
64
64
  }
65
65
  if (content.length === 0) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@graphql-codegen/cli",
3
- "version": "2.11.0-alpha-9ba238a22.0",
3
+ "version": "2.11.0-alpha-269e9f9ad.0",
4
4
  "peerDependencies": {
5
5
  "graphql": "^0.8.0 || ^0.9.0 || ^0.10.0 || ^0.11.0 || ^0.12.0 || ^0.13.0 || ^14.0.0 || ^15.0.0 || ^16.0.0"
6
6
  },