Update @balena/lint to 8.0.0

Change-type: patch
This commit is contained in:
myarmolinsky 2024-03-14 08:11:53 -04:00
parent 6ebeb97917
commit 634ad156ce
44 changed files with 830 additions and 808 deletions

View File

@ -22,7 +22,7 @@ import * as archiver from 'archiver';
import * as Bluebird from 'bluebird'; import * as Bluebird from 'bluebird';
import { exec, execFile } from 'child_process'; import { exec, execFile } from 'child_process';
import * as filehound from 'filehound'; import * as filehound from 'filehound';
import { Stats } from 'fs'; import type { Stats } from 'fs';
import * as fs from 'fs-extra'; import * as fs from 'fs-extra';
import * as klaw from 'klaw'; import * as klaw from 'klaw';
import * as path from 'path'; import * as path from 'path';

View File

@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import { Command as OclifCommandClass } from '@oclif/core'; import type { Command as OclifCommandClass } from '@oclif/core';
type OclifCommand = typeof OclifCommandClass; type OclifCommand = typeof OclifCommandClass;

View File

@ -16,7 +16,7 @@
*/ */
import * as path from 'path'; import * as path from 'path';
import { getCapitanoDoc } from './capitanodoc'; import { getCapitanoDoc } from './capitanodoc';
import { Category, Document, OclifCommand } from './doc-types'; import type { Category, Document, OclifCommand } from './doc-types';
import * as markdown from './markdown'; import * as markdown from './markdown';
import { stripIndent } from '../../lib/utils/lazy'; import { stripIndent } from '../../lib/utils/lazy';

View File

@ -20,7 +20,7 @@ import * as _ from 'lodash';
import { getManualSortCompareFunction } from '../../lib/utils/helpers'; import { getManualSortCompareFunction } from '../../lib/utils/helpers';
import { capitanoizeOclifUsage } from '../../lib/utils/oclif-utils'; import { capitanoizeOclifUsage } from '../../lib/utils/oclif-utils';
import { Category, Document, OclifCommand } from './doc-types'; import type { Category, Document, OclifCommand } from './doc-types';
function renderOclifCommand(command: OclifCommand): string[] { function renderOclifCommand(command: OclifCommand): string[] {
const result = [`## ${ent.encode(command.usage || '')}`]; const result = [`## ${ent.encode(command.usage || '')}`];

View File

@ -107,11 +107,11 @@ async function $main() {
const changeType = process.argv[4] const changeType = process.argv[4]
? // if the caller specified a change type, use that one ? // if the caller specified a change type, use that one
validateChangeType(process.argv[4]) validateChangeType(process.argv[4])
: // use the same change type as in the dependency, but avoid major bumps : // use the same change type as in the dependency, but avoid major bumps
semverChangeType && semverChangeType !== 'major' semverChangeType && semverChangeType !== 'major'
? semverChangeType ? semverChangeType
: 'minor'; : 'minor';
console.log(`Using Change-type: ${changeType}`); console.log(`Using Change-type: ${changeType}`);
let { stdout: currentBranch } = await run('git rev-parse --abbrev-ref HEAD'); let { stdout: currentBranch } = await run('git rev-parse --abbrev-ref HEAD');

View File

@ -76,8 +76,8 @@ export function diffLines(str1: string, str2: string): string {
return part.added return part.added
? prefix(part.value, '+') ? prefix(part.value, '+')
: part.removed : part.removed
? prefix(part.value, '-') ? prefix(part.value, '-')
: prefix(part.value, ' '); : prefix(part.value, ' ');
}) })
.join('\n'); .join('\n');
return diffStr; return diffStr;

View File

@ -16,8 +16,8 @@
*/ */
import * as packageJSON from '../package.json'; import * as packageJSON from '../package.json';
import type { AppOptions } from './preparser';
import { import {
AppOptions,
checkDeletedCommand, checkDeletedCommand,
preparseArgs, preparseArgs,
unsupportedFlag, unsupportedFlag,

View File

@ -52,7 +52,7 @@ export default class ApiKeysCmd extends Command {
await getApplication(getBalenaSdk(), options.fleet, { await getApplication(getBalenaSdk(), options.fleet, {
$select: 'actor', $select: 'actor',
}) })
).actor ).actor
: await getBalenaSdk().auth.getActorId(); : await getBalenaSdk().auth.getActorId();
const keys = await getBalenaSdk().pine.get({ const keys = await getBalenaSdk().pine.get({
resource: 'api_key', resource: 'api_key',
@ -65,7 +65,7 @@ export default class ApiKeysCmd extends Command {
name: { name: {
$ne: null, $ne: null,
}, },
} }
: {}), : {}),
}, },
$orderby: 'name asc', $orderby: 'name asc',

View File

@ -91,7 +91,7 @@ export default class DeviceCmd extends Command {
}, },
...expandForAppName.$expand, ...expandForAppName.$expand,
}, },
} }
: { : {
$select: [ $select: [
'device_name', 'device_name',
@ -118,7 +118,7 @@ export default class DeviceCmd extends Command {
'is_undervolted', 'is_undervolted',
], ],
...expandForAppName, ...expandForAppName,
}, },
)) as ExtendedDevice; )) as ExtendedDevice;
if (options.view) { if (options.view) {

View File

@ -132,7 +132,7 @@ export default class DeviceInitCmd extends Command {
$select: 'slug', $select: 'slug',
}, },
}, },
}) })
: await (await import('../../utils/patterns')).selectApplication(); : await (await import('../../utils/patterns')).selectApplication();
// Register new device // Register new device

View File

@ -126,7 +126,7 @@ export default class EnvsCmd extends Command {
let fleetSlug: string | undefined = options.fleet let fleetSlug: string | undefined = options.fleet
? await ( ? await (
await import('../../utils/sdk') await import('../../utils/sdk')
).getFleetSlug(balena, options.fleet) ).getFleetSlug(balena, options.fleet)
: undefined; : undefined;
let fullUUID: string | undefined; // as oppposed to the short, 7-char UUID let fullUUID: string | undefined; // as oppposed to the short, 7-char UUID

View File

@ -19,7 +19,7 @@ import { Flags, Args } from '@oclif/core';
import Command from '../../command'; import Command from '../../command';
import * as cf from '../../utils/common-flags'; import * as cf from '../../utils/common-flags';
import { getBalenaSdk, stripIndent } from '../../utils/lazy'; import { getBalenaSdk, stripIndent } from '../../utils/lazy';
import { LogMessage } from 'balena-sdk'; import type { LogMessage } from 'balena-sdk';
const MAX_RETRY = 1000; const MAX_RETRY = 1000;

View File

@ -173,7 +173,7 @@ Can be repeated to add multiple certificates.\
const fleetSlug: string | undefined = options.fleet const fleetSlug: string | undefined = options.fleet
? await ( ? await (
await import('../../utils/sdk') await import('../../utils/sdk')
).getFleetSlug(balena, options.fleet) ).getFleetSlug(balena, options.fleet)
: undefined; : undefined;
const progressBars: { const progressBars: {

View File

@ -23,7 +23,7 @@ import { getBalenaSdk, stripIndent } from '../../utils/lazy';
import { dockerignoreHelp, registrySecretsHelp } from '../../utils/messages'; import { dockerignoreHelp, registrySecretsHelp } from '../../utils/messages';
import type { BalenaSDK } from 'balena-sdk'; import type { BalenaSDK } from 'balena-sdk';
import { ExpectedError, instanceOf } from '../../errors'; import { ExpectedError, instanceOf } from '../../errors';
import { RegistrySecrets } from '@balena/compose/dist/multibuild'; import type { RegistrySecrets } from '@balena/compose/dist/multibuild';
import { lowercaseIfSlug } from '../../utils/normalization'; import { lowercaseIfSlug } from '../../utils/normalization';
import { import {
applyReleaseTagKeysAndValues, applyReleaseTagKeysAndValues,

View File

@ -78,7 +78,7 @@ export default class ReleasesCmd extends Command {
$select: ['tag_key', 'value'], $select: ['tag_key', 'value'],
}, },
}, },
} }
: { $select: fields }, : { $select: fields },
); );

View File

@ -88,7 +88,7 @@ async function outputDataSet(
...(options.json ...(options.json
? { ? {
output: 'json', output: 'json',
} }
: {}), : {}),
columns: options.fields, columns: options.fields,
printLine, printLine,
@ -147,7 +147,7 @@ function getLongestObjectKeyLength(o: any): number {
return Object.keys(o).length >= 1 return Object.keys(o).length >= 1
? Object.keys(o).reduce((a, b) => { ? Object.keys(o).reduce((a, b) => {
return a.length > b.length ? a : b; return a.length > b.length ? a : b;
}).length }).length
: 0; : 0;
} }

View File

@ -30,7 +30,7 @@ import type {
} from './compose-types'; } from './compose-types';
import { getChalk } from './lazy'; import { getChalk } from './lazy';
import Logger = require('./logger'); import Logger = require('./logger');
import { ProgressCallback } from 'docker-progress'; import type { ProgressCallback } from 'docker-progress';
export function generateOpts(options: { export function generateOpts(options: {
source?: string; source?: string;

View File

@ -15,7 +15,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { Flags } from '@oclif/core'; import { Flags } from '@oclif/core';
import { BalenaSDK } from 'balena-sdk'; import type { BalenaSDK } from 'balena-sdk';
import type { TransposeOptions } from '@balena/compose/dist/emulate'; import type { TransposeOptions } from '@balena/compose/dist/emulate';
import type * as Dockerode from 'dockerode'; import type * as Dockerode from 'dockerode';
import { promises as fs } from 'fs'; import { promises as fs } from 'fs';
@ -32,7 +32,7 @@ import * as semver from 'semver';
import type { Duplex, Readable } from 'stream'; import type { Duplex, Readable } from 'stream';
import type { Pack } from 'tar-stream'; import type { Pack } from 'tar-stream';
import { ExpectedError } from '../errors'; import { ExpectedError } from '../errors';
import { import type {
BuiltImage, BuiltImage,
ComposeOpts, ComposeOpts,
ComposeProject, ComposeProject,

View File

@ -18,13 +18,13 @@
import * as semver from 'balena-semver'; import * as semver from 'balena-semver';
import * as Docker from 'dockerode'; import * as Docker from 'dockerode';
import * as _ from 'lodash'; import * as _ from 'lodash';
import { Composition } from '@balena/compose/dist/parse'; import type { Composition } from '@balena/compose/dist/parse';
import { import type {
BuildTask, BuildTask,
getAuthConfigObj,
LocalImage, LocalImage,
RegistrySecrets, RegistrySecrets,
} from '@balena/compose/dist/multibuild'; } from '@balena/compose/dist/multibuild';
import { getAuthConfigObj } from '@balena/compose/dist/multibuild';
import type { Readable } from 'stream'; import type { Readable } from 'stream';
import { BALENA_ENGINE_TMP_PATH } from '../../config'; import { BALENA_ENGINE_TMP_PATH } from '../../config';
@ -37,7 +37,8 @@ import {
makeImageName, makeImageName,
} from '../compose_ts'; } from '../compose_ts';
import Logger = require('../logger'); import Logger = require('../logger');
import { DeviceAPI, DeviceInfo } from './api'; import type { DeviceInfo } from './api';
import { DeviceAPI } from './api';
import * as LocalPushErrors from './errors'; import * as LocalPushErrors from './errors';
import LivepushManager from './live'; import LivepushManager from './live';
import { displayBuildLog } from './logs'; import { displayBuildLog } from './logs';

View File

@ -30,11 +30,8 @@ import Logger = require('../logger');
import { Dockerfile } from 'livepush'; import { Dockerfile } from 'livepush';
import type DeviceAPI from './api'; import type DeviceAPI from './api';
import type { DeviceInfo, Status } from './api'; import type { DeviceInfo, Status } from './api';
import { import type { DeviceDeployOptions } from './deploy';
DeviceDeployOptions, import { generateTargetState, rebuildSingleTask } from './deploy';
generateTargetState,
rebuildSingleTask,
} from './deploy';
import { BuildError } from './errors'; import { BuildError } from './errors';
import { getServiceColourFn } from './logs'; import { getServiceColourFn } from './logs';
import { delay } from '../helpers'; import { delay } from '../helpers';

View File

@ -17,11 +17,11 @@ limitations under the License.
import { ExpectedError } from '../../errors'; import { ExpectedError } from '../../errors';
import { stripIndent } from '../lazy'; import { stripIndent } from '../lazy';
import type { SshRemoteCommandOpts } from '../ssh';
import { import {
findBestUsernameForDevice, findBestUsernameForDevice,
getRemoteCommandOutput, getRemoteCommandOutput,
runRemoteCommand, runRemoteCommand,
SshRemoteCommandOpts,
} from '../ssh'; } from '../ssh';
export interface DeviceSSHOpts extends SshRemoteCommandOpts { export interface DeviceSSHOpts extends SshRemoteCommandOpts {

View File

@ -85,13 +85,13 @@ export function getVarResourceName(
? isConfig ? isConfig
? 'device_config_variable' ? 'device_config_variable'
: isService : isService
? 'device_service_environment_variable' ? 'device_service_environment_variable'
: 'device_environment_variable' : 'device_environment_variable'
: isConfig : isConfig
? 'application_config_variable' ? 'application_config_variable'
: isService : isService
? 'service_environment_variable' ? 'service_environment_variable'
: 'application_environment_variable'; : 'application_environment_variable';
} }
/** /**

View File

@ -15,7 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
import * as _ from 'lodash'; import * as _ from 'lodash';
import { promises as fs, Stats } from 'fs'; import type { Stats } from 'fs';
import { promises as fs } from 'fs';
import * as path from 'path'; import * as path from 'path';
import type { Ignore } from '@balena/dockerignore'; import type { Ignore } from '@balena/dockerignore';

View File

@ -18,7 +18,7 @@
import type { Options as GlobalTunnelNgConfig } from 'global-tunnel-ng'; import type { Options as GlobalTunnelNgConfig } from 'global-tunnel-ng';
export type { GlobalTunnelNgConfig }; export type { GlobalTunnelNgConfig };
import { CliSettings } from './bootstrap'; import type { CliSettings } from './bootstrap';
type ProxyConfig = string | GlobalTunnelNgConfig; type ProxyConfig = string | GlobalTunnelNgConfig;

View File

@ -17,7 +17,7 @@ import type { BalenaSDK } from 'balena-sdk';
import * as JSONStream from 'JSONStream'; import * as JSONStream from 'JSONStream';
import * as readline from 'readline'; import * as readline from 'readline';
import * as request from 'request'; import * as request from 'request';
import { RegistrySecrets } from '@balena/compose/dist/multibuild'; import type { RegistrySecrets } from '@balena/compose/dist/multibuild';
import type * as Stream from 'stream'; import type * as Stream from 'stream';
import streamToPromise = require('stream-to-promise'); import streamToPromise = require('stream-to-promise');
import type { Pack } from 'tar-stream'; import type { Pack } from 'tar-stream';

View File

@ -14,7 +14,8 @@
* See the License for the specific language governing permissions and * See the License for the specific language governing permissions and
* limitations under the License. * limitations under the License.
*/ */
import { spawn, StdioOptions } from 'child_process'; import type { StdioOptions } from 'child_process';
import { spawn } from 'child_process';
import * as _ from 'lodash'; import * as _ from 'lodash';
import { ExpectedError } from '../errors'; import { ExpectedError } from '../errors';

View File

@ -15,7 +15,8 @@
* limitations under the License. * limitations under the License.
*/ */
import { ChildProcess, spawn, SpawnOptions } from 'child_process'; import type { ChildProcess, SpawnOptions } from 'child_process';
import { spawn } from 'child_process';
import { stripIndent } from './lazy'; import { stripIndent } from './lazy';
/** /**

View File

@ -14,7 +14,7 @@ See the License for the specific language governing permissions and
limitations under the License. limitations under the License.
*/ */
import type { BalenaSDK } from 'balena-sdk'; import type { BalenaSDK } from 'balena-sdk';
import { Socket } from 'net'; import type { Socket } from 'net';
import * as tls from 'tls'; import * as tls from 'tls';
import { TypedError } from 'typed-error'; import { TypedError } from 'typed-error';
import { ExpectedError } from '../errors'; import { ExpectedError } from '../errors';

1485
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -117,7 +117,7 @@
} }
}, },
"devDependencies": { "devDependencies": {
"@balena/lint": "^7.2.1", "@balena/lint": "^8.0.0",
"@electron/notarize": "^2.0.0", "@electron/notarize": "^2.0.0",
"@octokit/plugin-throttling": "^3.5.1", "@octokit/plugin-throttling": "^3.5.1",
"@octokit/rest": "^18.6.7", "@octokit/rest": "^18.6.7",

View File

@ -26,9 +26,11 @@ import { BalenaAPIMock } from '../nock/balena-api-mock';
import { expectStreamNoCRLF, testDockerBuildStream } from '../docker-build'; import { expectStreamNoCRLF, testDockerBuildStream } from '../docker-build';
import { DockerMock, dockerResponsePath } from '../nock/docker-mock'; import { DockerMock, dockerResponsePath } from '../nock/docker-mock';
import { cleanOutput, runCommand } from '../helpers'; import { cleanOutput, runCommand } from '../helpers';
import { import type {
ExpectedTarStreamFiles, ExpectedTarStreamFiles,
ExpectedTarStreamFilesByService, ExpectedTarStreamFilesByService,
} from '../projects';
import {
getDockerignoreWarn1, getDockerignoreWarn1,
getDockerignoreWarn2, getDockerignoreWarn2,
getDockerignoreWarn3, getDockerignoreWarn3,

View File

@ -20,7 +20,7 @@ import type { Request as ReleaseRequest } from '@balena/compose/dist/release';
import { expect } from 'chai'; import { expect } from 'chai';
import { promises as fs } from 'fs'; import { promises as fs } from 'fs';
import * as _ from 'lodash'; import * as _ from 'lodash';
import * as nock from 'nock'; import type * as nock from 'nock';
import * as path from 'path'; import * as path from 'path';
import * as sinon from 'sinon'; import * as sinon from 'sinon';
@ -28,12 +28,11 @@ import { BalenaAPIMock } from '../nock/balena-api-mock';
import { expectStreamNoCRLF, testDockerBuildStream } from '../docker-build'; import { expectStreamNoCRLF, testDockerBuildStream } from '../docker-build';
import { DockerMock, dockerResponsePath } from '../nock/docker-mock'; import { DockerMock, dockerResponsePath } from '../nock/docker-mock';
import { cleanOutput, runCommand, switchSentry } from '../helpers'; import { cleanOutput, runCommand, switchSentry } from '../helpers';
import { import type {
ExpectedTarStreamFiles, ExpectedTarStreamFiles,
ExpectedTarStreamFilesByService, ExpectedTarStreamFilesByService,
getDockerignoreWarn1,
getDockerignoreWarn3,
} from '../projects'; } from '../projects';
import { getDockerignoreWarn1, getDockerignoreWarn3 } from '../projects';
const repoPath = path.normalize(path.join(__dirname, '..', '..')); const repoPath = path.normalize(path.join(__dirname, '..', '..'));
const projectsPath = path.join(repoPath, 'tests', 'test-data', 'projects'); const projectsPath = path.join(repoPath, 'tests', 'test-data', 'projects');

View File

@ -23,10 +23,10 @@ import { BalenaAPIMock } from '../nock/balena-api-mock';
import { BuilderMock, builderResponsePath } from '../nock/builder-mock'; import { BuilderMock, builderResponsePath } from '../nock/builder-mock';
import { expectStreamNoCRLF, testPushBuildStream } from '../docker-build'; import { expectStreamNoCRLF, testPushBuildStream } from '../docker-build';
import { cleanOutput, runCommand } from '../helpers'; import { cleanOutput, runCommand } from '../helpers';
import type { ExpectedTarStreamFiles } from '../projects';
import { import {
addRegSecretsEntries, addRegSecretsEntries,
exists, exists,
ExpectedTarStreamFiles,
getDockerignoreWarn1, getDockerignoreWarn1,
getDockerignoreWarn2, getDockerignoreWarn2,
getDockerignoreWarn3, getDockerignoreWarn3,

View File

@ -17,7 +17,8 @@
import { expect } from 'chai'; import { expect } from 'chai';
import mock = require('mock-require'); import mock = require('mock-require');
import { createServer, Server } from 'net'; import type { Server } from 'net';
import { createServer } from 'net';
import { BalenaAPIMock } from '../nock/balena-api-mock'; import { BalenaAPIMock } from '../nock/balena-api-mock';
import { cleanOutput, runCommand } from '../helpers'; import { cleanOutput, runCommand } from '../helpers';

View File

@ -23,13 +23,12 @@ import * as semver from 'semver';
import * as sinon from 'sinon'; import * as sinon from 'sinon';
import * as packageJSON from '../package.json'; import * as packageJSON from '../package.json';
import { import type { ReleaseTimestampsByVersion } from '../build/deprecation';
DeprecationChecker, import { DeprecationChecker } from '../build/deprecation';
ReleaseTimestampsByVersion,
} from '../build/deprecation';
import { BalenaAPIMock } from './nock/balena-api-mock'; import { BalenaAPIMock } from './nock/balena-api-mock';
import { NpmMock } from './nock/npm-mock'; import { NpmMock } from './nock/npm-mock';
import { runCommand, TestOutput } from './helpers'; import type { TestOutput } from './helpers';
import { runCommand } from './helpers';
// "itSS" means "it() Skip Standalone" // "itSS" means "it() Skip Standalone"
const itSS = process.env.BALENA_CLI_TEST_TYPE === 'standalone' ? it.skip : it; const itSS = process.env.BALENA_CLI_TEST_TYPE === 'standalone' ? it.skip : it;

View File

@ -29,15 +29,15 @@ import { URL } from 'url';
import { makeImageName } from '../build/utils/compose_ts'; import { makeImageName } from '../build/utils/compose_ts';
import { stripIndent } from '../build/utils/lazy'; import { stripIndent } from '../build/utils/lazy';
import { BuilderMock } from './nock/builder-mock'; import type { BuilderMock } from './nock/builder-mock';
import { DockerMock } from './nock/docker-mock'; import type { DockerMock } from './nock/docker-mock';
import { import {
cleanOutput, cleanOutput,
deepJsonParse, deepJsonParse,
deepTemplateReplace, deepTemplateReplace,
runCommand, runCommand,
} from './helpers'; } from './helpers';
import { import type {
ExpectedTarStreamFile, ExpectedTarStreamFile,
ExpectedTarStreamFiles, ExpectedTarStreamFiles,
ExpectedTarStreamFilesByService, ExpectedTarStreamFilesByService,

View File

@ -18,7 +18,8 @@
import * as _ from 'lodash'; import * as _ from 'lodash';
import * as path from 'path'; import * as path from 'path';
import { NockMock, ScopeOpts } from './nock-mock'; import type { ScopeOpts } from './nock-mock';
import { NockMock } from './nock-mock';
export const apiResponsePath = path.normalize( export const apiResponsePath = path.normalize(
path.join(__dirname, '..', 'test-data', 'api-response'), path.join(__dirname, '..', 'test-data', 'api-response'),

View File

@ -18,7 +18,8 @@
import * as path from 'path'; import * as path from 'path';
import * as qs from 'querystring'; import * as qs from 'querystring';
import { NockMock, ScopeOpts } from './nock-mock'; import type { ScopeOpts } from './nock-mock';
import { NockMock } from './nock-mock';
export const dockerResponsePath = path.normalize( export const dockerResponsePath = path.normalize(
path.join(__dirname, '..', 'test-data', 'docker-response'), path.join(__dirname, '..', 'test-data', 'docker-response'),

View File

@ -17,7 +17,8 @@
import * as path from 'path'; import * as path from 'path';
import { Readable } from 'stream'; import { Readable } from 'stream';
import { NockMock, ScopeOpts } from './nock-mock'; import type { ScopeOpts } from './nock-mock';
import { NockMock } from './nock-mock';
export const dockerResponsePath = path.normalize( export const dockerResponsePath = path.normalize(
path.join(__dirname, '..', 'test-data', 'docker-response'), path.join(__dirname, '..', 'test-data', 'docker-response'),

View File

@ -17,10 +17,8 @@
import { expect } from 'chai'; import { expect } from 'chai';
import { import type { GlobalTunnelNgConfig } from '../build/utils/proxy';
GlobalTunnelNgConfig, import { makeUrlFromTunnelNgConfig } from '../build/utils/proxy';
makeUrlFromTunnelNgConfig,
} from '../build/utils/proxy';
describe('makeUrlFromTunnelNgConfig() function', function () { describe('makeUrlFromTunnelNgConfig() function', function () {
it('should return a URL given a GlobalTunnelNgConfig object', () => { it('should return a URL given a GlobalTunnelNgConfig object', () => {

View File

@ -16,7 +16,7 @@
*/ */
import { expect } from 'chai'; import { expect } from 'chai';
import * as chokidar from 'chokidar'; import type * as chokidar from 'chokidar';
import { promises as fs } from 'fs'; import { promises as fs } from 'fs';
import * as path from 'path'; import * as path from 'path';
import { promisify } from 'util'; import { promisify } from 'util';

View File

@ -17,8 +17,8 @@
import { expect } from 'chai'; import { expect } from 'chai';
import type { DockerConnectionCliFlags } from '../../build/utils/docker';
import { import {
DockerConnectionCliFlags,
generateConnectOpts, generateConnectOpts,
getDefaultDockerModemOpts, getDefaultDockerModemOpts,
} from '../../build/utils/docker'; } from '../../build/utils/docker';

View File

@ -17,7 +17,7 @@
declare module 'balena-device-init' { declare module 'balena-device-init' {
import { DeviceTypeJson } from 'balena-sdk'; import { DeviceTypeJson } from 'balena-sdk';
import * as Bluebird from 'bluebird'; import type * as Bluebird from 'bluebird';
interface OperationState { interface OperationState {
operation: operation:

2
typings/global.d.ts vendored
View File

@ -1,4 +1,4 @@
import { Application, DeviceType, Device } from 'balena-sdk'; import type { Application, DeviceType, Device } from 'balena-sdk';
declare global { declare global {
type ApplicationWithDeviceTypeSlug = Omit< type ApplicationWithDeviceTypeSlug = Omit<