From 3ee0fad2f18c0f40bc62634cad8b441faa582ba1 Mon Sep 17 00:00:00 2001 From: Nicholas Lim <18374483+niclim@users.noreply.github.com> Date: Tue, 2 May 2023 14:33:29 -0400 Subject: [PATCH 1/2] Fix diff-all --generated when no paths are fetched --- projects/optic/src/commands/diff/diff-all.ts | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/projects/optic/src/commands/diff/diff-all.ts b/projects/optic/src/commands/diff/diff-all.ts index 3a14cc80e6..e00c3fd12d 100644 --- a/projects/optic/src/commands/diff/diff-all.ts +++ b/projects/optic/src/commands/diff/diff-all.ts @@ -27,6 +27,7 @@ import { generateComparisonLogsV2 } from '../../utils/diff-renderer'; import path from 'path'; import { getApiUrl } from '../../utils/cloud-urls'; import { getDetailsForGeneration } from '../../utils/generated'; +import * as Types from '../../client/optic-backend-types'; const usage = () => ` optic diff-all @@ -283,10 +284,13 @@ async function computeAll( pathToUrl[p] = null; } } - const { apis } = await config.client.getApis( - Object.keys(pathToUrl), - web_url - ); + let apis: (Types.Api | null)[] = []; + if (Object.keys(pathToUrl).length > 0) { + ({ apis } = await config.client.getApis( + Object.keys(pathToUrl), + web_url + )); + } for (const api of apis) { if (api) { From 11ede042588ba8fc991b7a20226b2ab722d2a87c Mon Sep 17 00:00:00 2001 From: Nicholas Lim <18374483+niclim@users.noreply.github.com> Date: Wed, 3 May 2023 09:11:48 -0400 Subject: [PATCH 2/2] bump version --- package.json | 2 +- projects/json-pointer-helpers/package.json | 2 +- projects/openapi-io/package.json | 2 +- projects/openapi-utilities/package.json | 2 +- projects/optic-ci/package.json | 2 +- projects/optic/package.json | 2 +- projects/rulesets-base/package.json | 2 +- projects/standard-rulesets/package.json | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/package.json b/package.json index 0f185cacd6..96abc886c7 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "openapi-workspaces", "license": "MIT", "private": true, - "version": "0.42.16", + "version": "0.42.17", "workspaces": [ "projects/json-pointer-helpers", "projects/openapi-io", diff --git a/projects/json-pointer-helpers/package.json b/projects/json-pointer-helpers/package.json index 2e1c8fb477..5a88368818 100644 --- a/projects/json-pointer-helpers/package.json +++ b/projects/json-pointer-helpers/package.json @@ -2,7 +2,7 @@ "name": "@useoptic/json-pointer-helpers", "license": "MIT", "packageManager": "yarn@3.5.1", - "version": "0.42.16", + "version": "0.42.17", "main": "build/index.js", "types": "build/index.d.ts", "files": [ diff --git a/projects/openapi-io/package.json b/projects/openapi-io/package.json index 44eee29533..cbb5e325b8 100644 --- a/projects/openapi-io/package.json +++ b/projects/openapi-io/package.json @@ -2,7 +2,7 @@ "name": "@useoptic/openapi-io", "license": "MIT", "packageManager": "yarn@3.5.1", - "version": "0.42.16", + "version": "0.42.17", "main": "build/index.js", "types": "build/index.d.ts", "files": [ diff --git a/projects/openapi-utilities/package.json b/projects/openapi-utilities/package.json index 23187cd551..7babbc01fb 100644 --- a/projects/openapi-utilities/package.json +++ b/projects/openapi-utilities/package.json @@ -2,7 +2,7 @@ "name": "@useoptic/openapi-utilities", "license": "MIT", "packageManager": "yarn@3.5.1", - "version": "0.42.16", + "version": "0.42.17", "main": "build/index.js", "types": "build/index.d.ts", "files": [ diff --git a/projects/optic-ci/package.json b/projects/optic-ci/package.json index 61bbe0c130..e90defe276 100644 --- a/projects/optic-ci/package.json +++ b/projects/optic-ci/package.json @@ -2,7 +2,7 @@ "name": "@useoptic/optic-ci", "license": "MIT", "packageManager": "yarn@3.5.1", - "version": "0.42.16", + "version": "0.42.17", "main": "build/index.js", "types": "build/index.d.ts", "files": [ diff --git a/projects/optic/package.json b/projects/optic/package.json index 961e7b99cb..9ba4399a2a 100644 --- a/projects/optic/package.json +++ b/projects/optic/package.json @@ -2,7 +2,7 @@ "name": "@useoptic/optic", "license": "MIT", "packageManager": "yarn@3.5.1", - "version": "0.42.16", + "version": "0.42.17", "main": "build/index.js", "types": "build/index.d.ts", "files": [ diff --git a/projects/rulesets-base/package.json b/projects/rulesets-base/package.json index f5cbdd7e70..62fd8b4560 100644 --- a/projects/rulesets-base/package.json +++ b/projects/rulesets-base/package.json @@ -2,7 +2,7 @@ "name": "@useoptic/rulesets-base", "license": "MIT", "packageManager": "yarn@3.5.1", - "version": "0.42.16", + "version": "0.42.17", "main": "build/index.js", "types": "build/index.d.ts", "files": [ diff --git a/projects/standard-rulesets/package.json b/projects/standard-rulesets/package.json index 987b8e5868..05dc641be6 100644 --- a/projects/standard-rulesets/package.json +++ b/projects/standard-rulesets/package.json @@ -2,7 +2,7 @@ "name": "@useoptic/standard-rulesets", "license": "MIT", "packageManager": "yarn@3.5.1", - "version": "0.42.16", + "version": "0.42.17", "main": "build/index.js", "types": "build/index.d.ts", "files": [