@eslint-config-snapshot/cli 0.5.0 → 0.6.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/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # @eslint-config-snapshot/cli
2
2
 
3
+ ## 0.6.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Release minor version with improved interactive CLI logging tone and richer runtime context reporting.
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies
12
+ - @eslint-config-snapshot/api@0.6.0
13
+
3
14
  ## 0.5.0
4
15
 
5
16
  ### Minor Changes
package/dist/index.cjs CHANGED
@@ -195,7 +195,7 @@ async function executeCheck(cwd, format, defaultInvocation = false) {
195
195
  if (format !== "status") {
196
196
  writeRunContextHeader(cwd, defaultInvocation ? "check" : `check:${format}`, foundConfig?.path, storedSnapshots);
197
197
  if (shouldShowRunLogs()) {
198
- writeSubtleInfo("Analyzing current ESLint configuration...\n");
198
+ writeSubtleInfo("\u{1F50E} Checking current ESLint configuration...\n");
199
199
  }
200
200
  }
201
201
  if (!foundConfig) {
@@ -271,7 +271,7 @@ async function executeUpdate(cwd, printSummary) {
271
271
  const storedSnapshots = await loadStoredSnapshots(cwd);
272
272
  writeRunContextHeader(cwd, "update", foundConfig?.path, storedSnapshots);
273
273
  if (shouldShowRunLogs()) {
274
- writeSubtleInfo("Analyzing current ESLint configuration...\n");
274
+ writeSubtleInfo("\u{1F50E} Checking current ESLint configuration...\n");
275
275
  }
276
276
  if (!foundConfig) {
277
277
  writeSubtleInfo(
@@ -310,7 +310,7 @@ async function executePrint(cwd, format) {
310
310
  const storedSnapshots = await loadStoredSnapshots(cwd);
311
311
  writeRunContextHeader(cwd, `print:${format}`, foundConfig?.path, storedSnapshots);
312
312
  if (shouldShowRunLogs()) {
313
- writeSubtleInfo("Analyzing current ESLint configuration...\n");
313
+ writeSubtleInfo("\u{1F50E} Checking current ESLint configuration...\n");
314
314
  }
315
315
  const currentSnapshots = await computeCurrentSnapshots(cwd);
316
316
  if (format === "short") {
@@ -329,7 +329,7 @@ async function executeConfig(cwd, format) {
329
329
  const storedSnapshots = await loadStoredSnapshots(cwd);
330
330
  writeRunContextHeader(cwd, `config:${format}`, foundConfig?.path, storedSnapshots);
331
331
  if (shouldShowRunLogs()) {
332
- writeSubtleInfo("Resolving effective runtime configuration...\n");
332
+ writeSubtleInfo("\u{1F50E} Resolving effective runtime configuration...\n");
333
333
  }
334
334
  const config = await (0, import_api.loadConfig)(cwd);
335
335
  const resolved = await resolveWorkspaceAssignments(cwd, config);
@@ -891,10 +891,14 @@ function endRunTimer(exitCode) {
891
891
  }
892
892
  const elapsedMs = Math.max(0, Date.now() - activeRunTimer.startedAtMs - activeRunTimer.pausedMs);
893
893
  const color = createColorizer();
894
- const status = exitCode === 0 ? color.green("done") : color.red("failed");
895
894
  const seconds = (elapsedMs / 1e3).toFixed(2);
896
- writeSubtleInfo(`Run ${status} in ${seconds}s
895
+ if (exitCode === 0) {
896
+ writeSubtleInfo(`${color.green("\u2705")} Finished in ${seconds}s
897
897
  `);
898
+ } else {
899
+ writeSubtleInfo(`${color.red("\u274C")} Finished in ${seconds}s
900
+ `);
901
+ }
898
902
  activeRunTimer = void 0;
899
903
  }
900
904
  function pauseRunTimer() {
@@ -954,15 +958,15 @@ function writeRunContextHeader(cwd, commandLabel, configPath, storedSnapshots) {
954
958
  return;
955
959
  }
956
960
  const color = createColorizer();
957
- process.stdout.write(color.bold(`eslint-config-snapshot v${readCliVersion()}
961
+ process.stdout.write(color.bold(`\u2728 eslint-config-snapshot v${readCliVersion()}
958
962
  `));
959
- process.stdout.write(`Command: ${commandLabel}
963
+ process.stdout.write(`\u{1F9ED} Command: ${commandLabel}
960
964
  `);
961
- process.stdout.write(`Repository: ${cwd}
965
+ process.stdout.write(`\u{1F4C1} Repository: ${cwd}
962
966
  `);
963
- process.stdout.write(`Config: ${formatConfigSource(cwd, configPath)}
967
+ process.stdout.write(`\u2699\uFE0F Config source: ${formatConfigSource(cwd, configPath)}
964
968
  `);
965
- process.stdout.write(`Baseline: ${formatStoredSnapshotSummary(storedSnapshots)}
969
+ process.stdout.write(`\u{1F5C2}\uFE0F Baseline: ${formatStoredSnapshotSummary(storedSnapshots)}
966
970
 
967
971
  `);
968
972
  }
package/dist/index.js CHANGED
@@ -176,7 +176,7 @@ async function executeCheck(cwd, format, defaultInvocation = false) {
176
176
  if (format !== "status") {
177
177
  writeRunContextHeader(cwd, defaultInvocation ? "check" : `check:${format}`, foundConfig?.path, storedSnapshots);
178
178
  if (shouldShowRunLogs()) {
179
- writeSubtleInfo("Analyzing current ESLint configuration...\n");
179
+ writeSubtleInfo("\u{1F50E} Checking current ESLint configuration...\n");
180
180
  }
181
181
  }
182
182
  if (!foundConfig) {
@@ -252,7 +252,7 @@ async function executeUpdate(cwd, printSummary) {
252
252
  const storedSnapshots = await loadStoredSnapshots(cwd);
253
253
  writeRunContextHeader(cwd, "update", foundConfig?.path, storedSnapshots);
254
254
  if (shouldShowRunLogs()) {
255
- writeSubtleInfo("Analyzing current ESLint configuration...\n");
255
+ writeSubtleInfo("\u{1F50E} Checking current ESLint configuration...\n");
256
256
  }
257
257
  if (!foundConfig) {
258
258
  writeSubtleInfo(
@@ -291,7 +291,7 @@ async function executePrint(cwd, format) {
291
291
  const storedSnapshots = await loadStoredSnapshots(cwd);
292
292
  writeRunContextHeader(cwd, `print:${format}`, foundConfig?.path, storedSnapshots);
293
293
  if (shouldShowRunLogs()) {
294
- writeSubtleInfo("Analyzing current ESLint configuration...\n");
294
+ writeSubtleInfo("\u{1F50E} Checking current ESLint configuration...\n");
295
295
  }
296
296
  const currentSnapshots = await computeCurrentSnapshots(cwd);
297
297
  if (format === "short") {
@@ -310,7 +310,7 @@ async function executeConfig(cwd, format) {
310
310
  const storedSnapshots = await loadStoredSnapshots(cwd);
311
311
  writeRunContextHeader(cwd, `config:${format}`, foundConfig?.path, storedSnapshots);
312
312
  if (shouldShowRunLogs()) {
313
- writeSubtleInfo("Resolving effective runtime configuration...\n");
313
+ writeSubtleInfo("\u{1F50E} Resolving effective runtime configuration...\n");
314
314
  }
315
315
  const config = await loadConfig(cwd);
316
316
  const resolved = await resolveWorkspaceAssignments(cwd, config);
@@ -872,10 +872,14 @@ function endRunTimer(exitCode) {
872
872
  }
873
873
  const elapsedMs = Math.max(0, Date.now() - activeRunTimer.startedAtMs - activeRunTimer.pausedMs);
874
874
  const color = createColorizer();
875
- const status = exitCode === 0 ? color.green("done") : color.red("failed");
876
875
  const seconds = (elapsedMs / 1e3).toFixed(2);
877
- writeSubtleInfo(`Run ${status} in ${seconds}s
876
+ if (exitCode === 0) {
877
+ writeSubtleInfo(`${color.green("\u2705")} Finished in ${seconds}s
878
878
  `);
879
+ } else {
880
+ writeSubtleInfo(`${color.red("\u274C")} Finished in ${seconds}s
881
+ `);
882
+ }
879
883
  activeRunTimer = void 0;
880
884
  }
881
885
  function pauseRunTimer() {
@@ -935,15 +939,15 @@ function writeRunContextHeader(cwd, commandLabel, configPath, storedSnapshots) {
935
939
  return;
936
940
  }
937
941
  const color = createColorizer();
938
- process.stdout.write(color.bold(`eslint-config-snapshot v${readCliVersion()}
942
+ process.stdout.write(color.bold(`\u2728 eslint-config-snapshot v${readCliVersion()}
939
943
  `));
940
- process.stdout.write(`Command: ${commandLabel}
944
+ process.stdout.write(`\u{1F9ED} Command: ${commandLabel}
941
945
  `);
942
- process.stdout.write(`Repository: ${cwd}
946
+ process.stdout.write(`\u{1F4C1} Repository: ${cwd}
943
947
  `);
944
- process.stdout.write(`Config: ${formatConfigSource(cwd, configPath)}
948
+ process.stdout.write(`\u2699\uFE0F Config source: ${formatConfigSource(cwd, configPath)}
945
949
  `);
946
- process.stdout.write(`Baseline: ${formatStoredSnapshotSummary(storedSnapshots)}
950
+ process.stdout.write(`\u{1F5C2}\uFE0F Baseline: ${formatStoredSnapshotSummary(storedSnapshots)}
947
951
 
948
952
  `);
949
953
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eslint-config-snapshot/cli",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "type": "module",
5
5
  "repository": {
6
6
  "type": "git",
@@ -30,6 +30,6 @@
30
30
  "@inquirer/prompts": "^8.2.0",
31
31
  "commander": "^14.0.3",
32
32
  "fast-glob": "^3.3.3",
33
- "@eslint-config-snapshot/api": "0.5.0"
33
+ "@eslint-config-snapshot/api": "0.6.0"
34
34
  }
35
35
  }
package/src/index.ts CHANGED
@@ -270,7 +270,7 @@ async function executeCheck(cwd: string, format: CheckFormat, defaultInvocation
270
270
  if (format !== 'status') {
271
271
  writeRunContextHeader(cwd, defaultInvocation ? 'check' : `check:${format}`, foundConfig?.path, storedSnapshots)
272
272
  if (shouldShowRunLogs()) {
273
- writeSubtleInfo('Analyzing current ESLint configuration...\n')
273
+ writeSubtleInfo('🔎 Checking current ESLint configuration...\n')
274
274
  }
275
275
  }
276
276
 
@@ -356,7 +356,7 @@ async function executeUpdate(cwd: string, printSummary: boolean): Promise<number
356
356
  const storedSnapshots = await loadStoredSnapshots(cwd)
357
357
  writeRunContextHeader(cwd, 'update', foundConfig?.path, storedSnapshots)
358
358
  if (shouldShowRunLogs()) {
359
- writeSubtleInfo('Analyzing current ESLint configuration...\n')
359
+ writeSubtleInfo('🔎 Checking current ESLint configuration...\n')
360
360
  }
361
361
 
362
362
  if (!foundConfig) {
@@ -399,7 +399,7 @@ async function executePrint(cwd: string, format: PrintFormat): Promise<void> {
399
399
  const storedSnapshots = await loadStoredSnapshots(cwd)
400
400
  writeRunContextHeader(cwd, `print:${format}`, foundConfig?.path, storedSnapshots)
401
401
  if (shouldShowRunLogs()) {
402
- writeSubtleInfo('Analyzing current ESLint configuration...\n')
402
+ writeSubtleInfo('🔎 Checking current ESLint configuration...\n')
403
403
  }
404
404
  const currentSnapshots = await computeCurrentSnapshots(cwd)
405
405
 
@@ -420,7 +420,7 @@ async function executeConfig(cwd: string, format: PrintFormat): Promise<void> {
420
420
  const storedSnapshots = await loadStoredSnapshots(cwd)
421
421
  writeRunContextHeader(cwd, `config:${format}`, foundConfig?.path, storedSnapshots)
422
422
  if (shouldShowRunLogs()) {
423
- writeSubtleInfo('Resolving effective runtime configuration...\n')
423
+ writeSubtleInfo('🔎 Resolving effective runtime configuration...\n')
424
424
  }
425
425
  const config = await loadConfig(cwd)
426
426
  const resolved = await resolveWorkspaceAssignments(cwd, config)
@@ -1091,9 +1091,12 @@ function endRunTimer(exitCode: number): void {
1091
1091
 
1092
1092
  const elapsedMs = Math.max(0, Date.now() - activeRunTimer.startedAtMs - activeRunTimer.pausedMs)
1093
1093
  const color = createColorizer()
1094
- const status = exitCode === 0 ? color.green('done') : color.red('failed')
1095
1094
  const seconds = (elapsedMs / 1000).toFixed(2)
1096
- writeSubtleInfo(`Run ${status} in ${seconds}s\n`)
1095
+ if (exitCode === 0) {
1096
+ writeSubtleInfo(`${color.green('✅')} Finished in ${seconds}s\n`)
1097
+ } else {
1098
+ writeSubtleInfo(`${color.red('❌')} Finished in ${seconds}s\n`)
1099
+ }
1097
1100
  activeRunTimer = undefined
1098
1101
  }
1099
1102
 
@@ -1169,11 +1172,11 @@ function writeRunContextHeader(
1169
1172
  }
1170
1173
 
1171
1174
  const color = createColorizer()
1172
- process.stdout.write(color.bold(`eslint-config-snapshot v${readCliVersion()}\n`))
1173
- process.stdout.write(`Command: ${commandLabel}\n`)
1174
- process.stdout.write(`Repository: ${cwd}\n`)
1175
- process.stdout.write(`Config: ${formatConfigSource(cwd, configPath)}\n`)
1176
- process.stdout.write(`Baseline: ${formatStoredSnapshotSummary(storedSnapshots)}\n\n`)
1175
+ process.stdout.write(color.bold(`✨ eslint-config-snapshot v${readCliVersion()}\n`))
1176
+ process.stdout.write(`🧭 Command: ${commandLabel}\n`)
1177
+ process.stdout.write(`📁 Repository: ${cwd}\n`)
1178
+ process.stdout.write(`⚙️ Config source: ${formatConfigSource(cwd, configPath)}\n`)
1179
+ process.stdout.write(`🗂️ Baseline: ${formatStoredSnapshotSummary(storedSnapshots)}\n\n`)
1177
1180
  }
1178
1181
 
1179
1182
  function formatConfigSource(cwd: string, configPath: string | undefined): string {