From 67e11467f7fd5b6d4c50067e665b15c12d3fa30b Mon Sep 17 00:00:00 2001 From: Paulo Castro Date: Sun, 19 Dec 2021 23:04:16 +0000 Subject: [PATCH] Clean up unused v13 feature switch code Change-type: patch --- lib/utils/patterns.ts | 13 ++++--------- lib/utils/version.ts | 4 ---- 2 files changed, 4 insertions(+), 13 deletions(-) diff --git a/lib/utils/patterns.ts b/lib/utils/patterns.ts index a800f16c..40d65857 100644 --- a/lib/utils/patterns.ts +++ b/lib/utils/patterns.ts @@ -13,15 +13,14 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. */ -import type * as BalenaSdk from 'balena-sdk'; + +import type { Application, BalenaSDK, Device, Organization } from 'balena-sdk'; import _ = require('lodash'); import { instanceOf, NotLoggedInError, ExpectedError } from '../errors'; import { getBalenaSdk, getVisuals, stripIndent, getCliForm } from './lazy'; import validation = require('./validation'); import { delay } from './helpers'; -import { isV13 } from './version'; -import type { Application, Device, Organization } from 'balena-sdk'; export function authenticate(options: {}): Promise { const balena = getBalenaSdk(); @@ -142,11 +141,7 @@ export async function confirm( ) { if (yesOption) { if (yesMessage) { - if (isV13()) { - console.error(yesMessage); - } else { - console.log(yesMessage); - } + console.log(yesMessage); } return; } @@ -326,7 +321,7 @@ export function inferOrSelectDevice(preferredUuid: string) { * TODO: Modify this when app IDs dropped. */ export async function getOnlineTargetDeviceUuid( - sdk: BalenaSdk.BalenaSDK, + sdk: BalenaSDK, applicationOrDevice: string, ) { const logger = (await import('../utils/logger')).getLogger(); diff --git a/lib/utils/version.ts b/lib/utils/version.ts index 94edd302..4413a0f7 100644 --- a/lib/utils/version.ts +++ b/lib/utils/version.ts @@ -25,10 +25,6 @@ export function isVersionGTE(v: string): boolean { let v14: boolean; /** Feature switch for the next major version of the CLI */ -export function isV13(): boolean { - return true; -} - export function isV14(): boolean { if (v14 === undefined) { v14 = isVersionGTE('14.0.0');