From ae36f5a7765827c8af1c9a02a96813ac58b4481e Mon Sep 17 00:00:00 2001 From: Wil Wilsman Date: Wed, 1 Apr 2020 13:08:00 -0500 Subject: [PATCH] fix: sort dry-run output (#494) --- src/commands/snapshot.ts | 2 +- src/services/image-snapshot-service.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/commands/snapshot.ts b/src/commands/snapshot.ts index 3f6d3bfb..35e3782c 100644 --- a/src/commands/snapshot.ts +++ b/src/commands/snapshot.ts @@ -132,6 +132,6 @@ export default class Snapshot extends PercyCommand { const ignore = parseGlobs(configuration['ignore-files']) const paths = await globby(globs, { cwd: configuration.path, ignore }) - console.log(paths.map((p) => configuration['base-url'] + p).join('\n')) + console.log(paths.map((p) => configuration['base-url'] + p).sort().join('\n')) } } diff --git a/src/services/image-snapshot-service.ts b/src/services/image-snapshot-service.ts index b43e8a89..6367667b 100644 --- a/src/services/image-snapshot-service.ts +++ b/src/services/image-snapshot-service.ts @@ -112,7 +112,7 @@ export default class ImageSnapshotService extends PercyClientService { async snapshotAll({ dry = false }: { dry?: boolean } = {}) { const globs = parseGlobs(this.configuration.files) const ignore = parseGlobs(this.configuration.ignore) - const paths = await globby(globs, { cwd: this.configuration.path, ignore }) + const paths = (await globby(globs, { cwd: this.configuration.path, ignore })).sort() let error if (!paths.length) {