patch: bump balena-lint to 8.0.2 and lint

This commit is contained in:
Edwin Joassart 2024-04-23 11:41:14 +02:00
parent 5ad8d5a72a
commit 7876aa1385
34 changed files with 39968 additions and 84 deletions

View File

@ -1,5 +1,5 @@
import { PluginBase } from '@electron-forge/plugin-base'; import { PluginBase } from '@electron-forge/plugin-base';
import { import type {
ForgeHookMap, ForgeHookMap,
ResolvedForgeConfig, ResolvedForgeConfig,
} from '@electron-forge/shared-types'; } from '@electron-forge/shared-types';

View File

@ -16,14 +16,15 @@
import * as electron from 'electron'; import * as electron from 'electron';
import * as remote from '@electron/remote'; import * as remote from '@electron/remote';
import { debounce, capitalize, Dictionary, values } from 'lodash'; import type { Dictionary } from 'lodash';
import { debounce, capitalize, values } from 'lodash';
import outdent from 'outdent'; import outdent from 'outdent';
import * as React from 'react'; import * as React from 'react';
import * as ReactDOM from 'react-dom'; import * as ReactDOM from 'react-dom';
import { v4 as uuidV4 } from 'uuid'; import { v4 as uuidV4 } from 'uuid';
import * as packageJSON from '../../../package.json'; import * as packageJSON from '../../../package.json';
import { DrivelistDrive } from '../../shared/drive-constraints'; import type { DrivelistDrive } from '../../shared/drive-constraints';
import * as EXIT_CODES from '../../shared/exit-codes'; import * as EXIT_CODES from '../../shared/exit-codes';
import * as messages from '../../shared/messages'; import * as messages from '../../shared/messages';
import * as availableDrives from './models/available-drives'; import * as availableDrives from './models/available-drives';
@ -38,7 +39,7 @@ import * as windowProgress from './os/window-progress';
import MainPage from './pages/main/MainPage'; import MainPage from './pages/main/MainPage';
import './css/main.css'; import './css/main.css';
import * as i18next from 'i18next'; import * as i18next from 'i18next';
import { SourceMetadata } from '../../shared/typings/source-selector'; import type { SourceMetadata } from '../../shared/typings/source-selector';
window.addEventListener( window.addEventListener(
'unhandledrejection', 'unhandledrejection',

View File

@ -16,16 +16,19 @@
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg'; import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
import ChevronDownSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg'; import ChevronDownSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg';
import * as sourceDestination from 'etcher-sdk/build/source-destination/'; import type * as sourceDestination from 'etcher-sdk/build/source-destination/';
import * as React from 'react'; import * as React from 'react';
import { Flex, ModalProps, Txt, Badge, Link, TableColumn } from 'rendition'; import type { ModalProps, TableColumn } from 'rendition';
import { Flex, Txt, Badge, Link } from 'rendition';
import styled from 'styled-components'; import styled from 'styled-components';
import type {
DriveStatus,
DrivelistDrive,
} from '../../../../shared/drive-constraints';
import { import {
getDriveImageCompatibilityStatuses, getDriveImageCompatibilityStatuses,
isDriveValid, isDriveValid,
DriveStatus,
DrivelistDrive,
isDriveSizeLarge, isDriveSizeLarge,
} from '../../../../shared/drive-constraints'; } from '../../../../shared/drive-constraints';
import { compatibility, warning } from '../../../../shared/messages'; import { compatibility, warning } from '../../../../shared/messages';
@ -35,14 +38,10 @@ import { getImage, isDriveSelected } from '../../models/selection-state';
import { store } from '../../models/store'; import { store } from '../../models/store';
import { logEvent, logException } from '../../modules/analytics'; import { logEvent, logException } from '../../modules/analytics';
import { open as openExternal } from '../../os/open-external/services/open-external'; import { open as openExternal } from '../../os/open-external/services/open-external';
import { import type { GenericTableProps } from '../../styled-components';
Alert, import { Alert, Modal, Table } from '../../styled-components';
GenericTableProps,
Modal,
Table,
} from '../../styled-components';
import { SourceMetadata } from '../../../../shared/typings/source-selector'; import type { SourceMetadata } from '../../../../shared/typings/source-selector';
import { middleEllipsis } from '../../utils/middle-ellipsis'; import { middleEllipsis } from '../../utils/middle-ellipsis';
import * as i18next from 'i18next'; import * as i18next from 'i18next';

View File

@ -1,11 +1,12 @@
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg'; import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
import * as React from 'react'; import * as React from 'react';
import { Badge, Flex, Txt, ModalProps } from 'rendition'; import type { ModalProps } from 'rendition';
import { Badge, Flex, Txt } from 'rendition';
import { Modal, ScrollableFlex } from '../../styled-components'; import { Modal, ScrollableFlex } from '../../styled-components';
import { middleEllipsis } from '../../utils/middle-ellipsis'; import { middleEllipsis } from '../../utils/middle-ellipsis';
import prettyBytes from 'pretty-bytes'; import prettyBytes from 'pretty-bytes';
import { DriveWithWarnings } from '../../pages/main/Flash'; import type { DriveWithWarnings } from '../../pages/main/Flash';
import * as i18next from 'i18next'; import * as i18next from 'i18next';
const DriveStatusWarningModal = ({ const DriveStatusWarningModal = ({

View File

@ -24,7 +24,8 @@ import * as settings from '../../models/settings';
import { Actions, store } from '../../models/store'; import { Actions, store } from '../../models/store';
import * as analytics from '../../modules/analytics'; import * as analytics from '../../modules/analytics';
import { FlashAnother } from '../flash-another/flash-another'; import { FlashAnother } from '../flash-another/flash-another';
import { FlashResults, FlashError } from '../flash-results/flash-results'; import type { FlashError } from '../flash-results/flash-results';
import { FlashResults } from '../flash-results/flash-results';
import { SafeWebview } from '../safe-webview/safe-webview'; import { SafeWebview } from '../safe-webview/safe-webview';
function restart(goToMain: () => void) { function restart(goToMain: () => void) {

View File

@ -18,7 +18,8 @@ import CircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle.svg';
import CheckCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle-check.svg'; import CheckCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle-check.svg';
import TimesCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle-xmark.svg'; import TimesCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle-xmark.svg';
import * as React from 'react'; import * as React from 'react';
import { Flex, FlexProps, Link, TableColumn, Txt } from 'rendition'; import type { FlexProps, TableColumn } from 'rendition';
import { Flex, Link, Txt } from 'rendition';
import styled from 'styled-components'; import styled from 'styled-components';
import { progress } from '../../../../shared/messages'; import { progress } from '../../../../shared/messages';

View File

@ -20,16 +20,17 @@ import LinkSvg from '@fortawesome/fontawesome-free/svgs/solid/link.svg';
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg'; import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
import ChevronDownSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg'; import ChevronDownSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg';
import ChevronRightSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-right.svg'; import ChevronRightSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-right.svg';
import { ipcRenderer, IpcRendererEvent } from 'electron'; import type { IpcRendererEvent } from 'electron';
import { ipcRenderer } from 'electron';
import { uniqBy, isNil } from 'lodash'; import { uniqBy, isNil } from 'lodash';
import * as path from 'path'; import * as path from 'path';
import * as prettyBytes from 'pretty-bytes'; import * as prettyBytes from 'pretty-bytes';
import * as React from 'react'; import * as React from 'react';
import { requestMetadata } from '../../app'; import { requestMetadata } from '../../app';
import type { ButtonProps } from 'rendition';
import { import {
Flex, Flex,
ButtonProps,
Modal as SmallModal, Modal as SmallModal,
Txt, Txt,
Card as BaseCard, Card as BaseCard,
@ -63,9 +64,9 @@ import { SVGIcon } from '../svg-icon/svg-icon';
import ImageSvg from '../../../assets/image.svg'; import ImageSvg from '../../../assets/image.svg';
import SrcSvg from '../../../assets/src.svg'; import SrcSvg from '../../../assets/src.svg';
import { DriveSelector } from '../drive-selector/drive-selector'; import { DriveSelector } from '../drive-selector/drive-selector';
import { DrivelistDrive } from '../../../../shared/drive-constraints'; import type { DrivelistDrive } from '../../../../shared/drive-constraints';
import { isJson } from '../../../../shared/utils'; import { isJson } from '../../../../shared/utils';
import { import type {
SourceMetadata, SourceMetadata,
Authentication, Authentication,
Source, Source,

View File

@ -16,12 +16,11 @@
import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg'; import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/triangle-exclamation.svg';
import * as React from 'react'; import * as React from 'react';
import { Flex, FlexProps, Txt } from 'rendition'; import type { FlexProps } from 'rendition';
import { Flex, Txt } from 'rendition';
import { import type { DriveStatus } from '../../../../shared/drive-constraints';
getDriveImageCompatibilityStatuses, import { getDriveImageCompatibilityStatuses } from '../../../../shared/drive-constraints';
DriveStatus,
} from '../../../../shared/drive-constraints';
import { compatibility, warning } from '../../../../shared/messages'; import { compatibility, warning } from '../../../../shared/messages';
import * as prettyBytes from 'pretty-bytes'; import * as prettyBytes from 'pretty-bytes';
import { getImage, getSelectedDrives } from '../../models/selection-state'; import { getImage, getSelectedDrives } from '../../models/selection-state';

View File

@ -17,10 +17,8 @@
import * as React from 'react'; import * as React from 'react';
import { Flex, Txt } from 'rendition'; import { Flex, Txt } from 'rendition';
import { import type { DriveSelectorProps } from '../drive-selector/drive-selector';
DriveSelector, import { DriveSelector } from '../drive-selector/drive-selector';
DriveSelectorProps,
} from '../drive-selector/drive-selector';
import { import {
isDriveSelected, isDriveSelected,
getImage, getImage,
@ -36,7 +34,7 @@ import { TargetSelectorButton } from './target-selector-button';
import TgtSvg from '../../../assets/tgt.svg'; import TgtSvg from '../../../assets/tgt.svg';
import DriveSvg from '../../../assets/drive.svg'; import DriveSvg from '../../../assets/drive.svg';
import { warning } from '../../../../shared/messages'; import { warning } from '../../../../shared/messages';
import { DrivelistDrive } from '../../../../shared/drive-constraints'; import type { DrivelistDrive } from '../../../../shared/drive-constraints';
import * as i18next from 'i18next'; import * as i18next from 'i18next';
export const getDriveListLabel = () => { export const getDriveListLabel = () => {

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { DrivelistDrive } from '../../../shared/drive-constraints'; import type { DrivelistDrive } from '../../../shared/drive-constraints';
import { Actions, store } from './store'; import { Actions, store } from './store';
export function hasAvailableDrives() { export function hasAvailableDrives() {

View File

@ -15,9 +15,9 @@
*/ */
import * as electron from 'electron'; import * as electron from 'electron';
import * as sdk from 'etcher-sdk'; import type * as sdk from 'etcher-sdk';
import * as _ from 'lodash'; import * as _ from 'lodash';
import { DrivelistDrive } from '../../../shared/drive-constraints'; import type { DrivelistDrive } from '../../../shared/drive-constraints';
import { bytesToMegabytes } from '../../../shared/units'; import { bytesToMegabytes } from '../../../shared/units';
import { Actions, store } from './store'; import { Actions, store } from './store';

View File

@ -15,12 +15,11 @@
*/ */
import * as _ from 'lodash'; import * as _ from 'lodash';
import { Animator, AnimationFunction, Color, RGBLed } from 'sys-class-rgb-led'; import type { AnimationFunction, Color } from 'sys-class-rgb-led';
import { Animator, RGBLed } from 'sys-class-rgb-led';
import { import type { DrivelistDrive } from '../../../shared/drive-constraints';
DrivelistDrive, import { isSourceDrive } from '../../../shared/drive-constraints';
isSourceDrive,
} from '../../../shared/drive-constraints';
import { getDrives } from './available-drives'; import { getDrives } from './available-drives';
import { getSelectedDrives } from './selection-state'; import { getSelectedDrives } from './selection-state';
import * as settings from './settings'; import * as settings from './settings';

View File

@ -1,4 +1,4 @@
import { DrivelistDrive } from '../../../shared/drive-constraints'; import type { DrivelistDrive } from '../../../shared/drive-constraints';
/* /*
* Copyright 2016 balena.io * Copyright 2016 balena.io
* *
@ -15,7 +15,7 @@ import { DrivelistDrive } from '../../../shared/drive-constraints';
* limitations under the License. * limitations under the License.
*/ */
import { SourceMetadata } from '../components/source-selector/source-selector'; import type { SourceMetadata } from '../components/source-selector/source-selector';
import * as availableDrives from './available-drives'; import * as availableDrives from './available-drives';
import { Actions, store } from './store'; import { Actions, store } from './store';

View File

@ -15,7 +15,8 @@
*/ */
import * as _ from 'lodash'; import * as _ from 'lodash';
import { Client, createClient, createNoopClient } from 'analytics-client'; import type { Client } from 'analytics-client';
import { createClient, createNoopClient } from 'analytics-client';
import * as SentryRenderer from '@sentry/electron/renderer'; import * as SentryRenderer from '@sentry/electron/renderer';
import * as settings from '../models/settings'; import * as settings from '../models/settings';
import { store } from '../models/store'; import { store } from '../models/store';

View File

@ -14,11 +14,11 @@
* limitations under the License. * limitations under the License.
*/ */
import { Drive as DrivelistDrive } from 'drivelist'; import type { Drive as DrivelistDrive } from 'drivelist';
import * as sdk from 'etcher-sdk'; import type * as sdk from 'etcher-sdk';
import { Dictionary } from 'lodash'; import type { Dictionary } from 'lodash';
import * as errors from '../../../shared/errors'; import * as errors from '../../../shared/errors';
import { SourceMetadata } from '../../../shared/typings/source-selector'; import type { SourceMetadata } from '../../../shared/typings/source-selector';
import * as flashState from '../models/flash-state'; import * as flashState from '../models/flash-state';
import * as selectionState from '../models/selection-state'; import * as selectionState from '../models/selection-state';
import * as settings from '../models/settings'; import * as settings from '../models/settings';

View File

@ -17,7 +17,8 @@
import * as remote from '@electron/remote'; import * as remote from '@electron/remote';
import { percentageToFloat } from '../../../shared/utils'; import { percentageToFloat } from '../../../shared/utils';
import { FlashState, titleFromFlashState } from '../modules/progress-status'; import type { FlashState } from '../modules/progress-status';
import { titleFromFlashState } from '../modules/progress-status';
/** /**
* @summary The title of the main window upon program launch * @summary The title of the main window upon program launch

View File

@ -27,7 +27,7 @@ import FinishPage from '../../components/finish/finish';
import { ReducedFlashingInfos } from '../../components/reduced-flashing-infos/reduced-flashing-infos'; import { ReducedFlashingInfos } from '../../components/reduced-flashing-infos/reduced-flashing-infos';
import { SettingsModal } from '../../components/settings/settings'; import { SettingsModal } from '../../components/settings/settings';
import { SourceSelector } from '../../components/source-selector/source-selector'; import { SourceSelector } from '../../components/source-selector/source-selector';
import { SourceMetadata } from '../../../../shared/typings/source-selector'; import type { SourceMetadata } from '../../../../shared/typings/source-selector';
import * as flashState from '../../models/flash-state'; import * as flashState from '../../models/flash-state';
import * as selectionState from '../../models/selection-state'; import * as selectionState from '../../models/selection-state';
import * as settings from '../../models/settings'; import * as settings from '../../models/settings';

View File

@ -15,16 +15,18 @@
*/ */
import * as React from 'react'; import * as React from 'react';
import type {
FlexProps,
ButtonProps,
TableProps as BaseTableProps,
} from 'rendition';
import { import {
Alert as AlertBase, Alert as AlertBase,
Flex, Flex,
FlexProps,
Button, Button,
ButtonProps,
Modal as ModalBase, Modal as ModalBase,
Provider, Provider,
Table as BaseTable, Table as BaseTable,
TableProps as BaseTableProps,
Txt, Txt,
} from 'rendition'; } from 'rendition';
import styled, { css } from 'styled-components'; import styled, { css } from 'styled-components';

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { Dictionary } from 'lodash'; import type { Dictionary } from 'lodash';
type BalenaTag = { type BalenaTag = {
id: number; id: number;

View File

@ -14,12 +14,12 @@
* limitations under the License. * limitations under the License.
*/ */
import { Drive } from 'drivelist'; import type { Drive } from 'drivelist';
import { isNil } from 'lodash'; import { isNil } from 'lodash';
import * as pathIsInside from 'path-is-inside'; import * as pathIsInside from 'path-is-inside';
import * as messages from './messages'; import * as messages from './messages';
import { SourceMetadata } from './typings/source-selector'; import type { SourceMetadata } from './typings/source-selector';
/** /**
* @summary The default unknown size for things such as images and drives * @summary The default unknown size for things such as images and drives

View File

@ -14,7 +14,7 @@
* limitations under the License. * limitations under the License.
*/ */
import { Dictionary } from 'lodash'; import type { Dictionary } from 'lodash';
import { outdent } from 'outdent'; import { outdent } from 'outdent';
import prettyBytes from 'pretty-bytes'; import prettyBytes from 'pretty-bytes';
import '../gui/app/i18n'; import '../gui/app/i18n';

View File

@ -1,6 +1,6 @@
import { GPTPartition, MBRPartition } from 'partitioninfo'; import type { GPTPartition, MBRPartition } from 'partitioninfo';
import { sourceDestination } from 'etcher-sdk'; import type { sourceDestination } from 'etcher-sdk';
import { DrivelistDrive } from '../drive-constraints'; import type { DrivelistDrive } from '../drive-constraints';
export type Source = 'File' | 'BlockDevice' | 'Http'; export type Source = 'File' | 'BlockDevice' | 'Http';

View File

@ -14,19 +14,34 @@
* limitations under the License. * limitations under the License.
*/ */
<<<<<<< ours
import * as ipc from 'node-ipc'; import * as ipc from 'node-ipc';
import { Dictionary, values } from 'lodash'; import { Dictionary, values } from 'lodash';
=======
import { WebSocketServer } from 'ws';
import type { Dictionary } from 'lodash';
import { values } from 'lodash';
>>>>>>> theirs
import type { MultiDestinationProgress } from 'etcher-sdk/build/multi-write'; import type { MultiDestinationProgress } from 'etcher-sdk/build/multi-write';
import { toJSON } from '../shared/errors'; import { toJSON } from '../shared/errors';
import { GENERAL_ERROR, SUCCESS } from '../shared/exit-codes'; import { GENERAL_ERROR, SUCCESS } from '../shared/exit-codes';
<<<<<<< ours
import { delay } from '../shared/utils'; import { delay } from '../shared/utils';
import { WriteOptions } from './types/types'; import { WriteOptions } from './types/types';
import { write, cleanup } from './child-writer'; import { write, cleanup } from './child-writer';
import { startScanning } from './scanner'; import { startScanning } from './scanner';
import { getSourceMetadata } from './source-metadata'; import { getSourceMetadata } from './source-metadata';
import { DrivelistDrive } from '../shared/drive-constraints'; import { DrivelistDrive } from '../shared/drive-constraints';
=======
import type { WriteOptions } from './types/types';
import { write, cleanup } from './child-writer';
import { startScanning } from './scanner';
import { getSourceMetadata } from './source-metadata';
import type { DrivelistDrive } from '../shared/drive-constraints';
import type { SourceMetadata } from '../shared/typings/source-selector';
>>>>>>> theirs
ipc.config.id = process.env.IPC_CLIENT_ID as string; ipc.config.id = process.env.IPC_CLIENT_ID as string;
ipc.config.socketRoot = process.env.IPC_SOCKET_ROOT as string; ipc.config.socketRoot = process.env.IPC_SOCKET_ROOT as string;

View File

@ -16,26 +16,24 @@
* This file handles the writer process. * This file handles the writer process.
*/ */
import { import type {
OnProgressFunction, OnProgressFunction,
OnFailFunction, OnFailFunction,
MultiDestinationProgress,
} from 'etcher-sdk/build/multi-write';
import {
decompressThenFlash, decompressThenFlash,
DECOMPRESSED_IMAGE_PREFIX, DECOMPRESSED_IMAGE_PREFIX,
MultiDestinationProgress,
} from 'etcher-sdk/build/multi-write'; } from 'etcher-sdk/build/multi-write';
import { totalmem } from 'os'; import { totalmem } from 'os';
import { cleanupTmpFiles } from 'etcher-sdk/build/tmp'; import { cleanupTmpFiles } from 'etcher-sdk/build/tmp';
import { import type { SourceDestination } from 'etcher-sdk/build/source-destination';
File, import { File, Http, BlockDevice } from 'etcher-sdk/build/source-destination';
Http,
BlockDevice,
SourceDestination,
} from 'etcher-sdk/build/source-destination';
import { WriteResult, FlashError, WriteOptions } from './types/types'; import type { WriteResult, FlashError, WriteOptions } from './types/types';
import { isJson } from '../shared/utils'; import { isJson } from '../shared/utils';
import { toJSON } from '../shared/errors'; import { toJSON } from '../shared/errors';

View File

@ -15,8 +15,8 @@
*/ */
import * as sdk from 'etcher-sdk'; import * as sdk from 'etcher-sdk';
import type { Adapter } from 'etcher-sdk/build/scanner/adapters';
import { import {
Adapter,
BlockDeviceAdapter, BlockDeviceAdapter,
UsbbootDeviceAdapter, UsbbootDeviceAdapter,
} from 'etcher-sdk/build/scanner/adapters'; } from 'etcher-sdk/build/scanner/adapters';

View File

@ -1,8 +1,9 @@
import { scanner as driveScanner } from './drive-scanner'; import { scanner as driveScanner } from './drive-scanner';
import * as sdk from 'etcher-sdk'; import * as sdk from 'etcher-sdk';
import { DrivelistDrive } from '../shared/drive-constraints'; import type { DrivelistDrive } from '../shared/drive-constraints';
import outdent from 'outdent'; import outdent from 'outdent';
import { Dictionary, values, keyBy, padStart } from 'lodash'; import type { Dictionary } from 'lodash';
import { values, keyBy, padStart } from 'lodash';
import { emitDrives } from './api'; import { emitDrives } from './api';
let availableDrives: DrivelistDrive[] = []; let availableDrives: DrivelistDrive[] = [];

View File

@ -2,15 +2,16 @@
import { sourceDestination } from 'etcher-sdk'; import { sourceDestination } from 'etcher-sdk';
import { replaceWindowsNetworkDriveLetter } from '../gui/app/os/windows-network-drives'; import { replaceWindowsNetworkDriveLetter } from '../gui/app/os/windows-network-drives';
import axios, { AxiosRequestConfig } from 'axios'; import type { AxiosRequestConfig } from 'axios';
import axios from 'axios';
import { isJson } from '../shared/utils'; import { isJson } from '../shared/utils';
import * as path from 'path'; import * as path from 'path';
import { import type {
SourceMetadata, SourceMetadata,
Authentication, Authentication,
Source, Source,
} from '../shared/typings/source-selector'; } from '../shared/typings/source-selector';
import { DrivelistDrive } from '../shared/drive-constraints'; import type { DrivelistDrive } from '../shared/drive-constraints';
import { omit } from 'lodash'; import { omit } from 'lodash';
function isString(value: any): value is string { function isString(value: any): value is string {

View File

@ -1,6 +1,6 @@
import { Metadata } from 'etcher-sdk/build/source-destination'; import type { Metadata } from 'etcher-sdk/build/source-destination';
import { SourceMetadata } from '../../shared/typings/source-selector'; import type { SourceMetadata } from '../../shared/typings/source-selector';
import { Drive as DrivelistDrive } from 'drivelist'; import type { Drive as DrivelistDrive } from 'drivelist';
export interface WriteResult { export interface WriteResult {
bytesWritten?: number; bytesWritten?: number;

39702
npm-shrinkwrap.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,4 +1,5 @@
{ {
<<<<<<< ours
"name": "balena-etcher", "name": "balena-etcher",
"private": true, "private": true,
"displayName": "balenaEtcher", "displayName": "balenaEtcher",
@ -149,4 +150,160 @@
"versionist": { "versionist": {
"publishedAt": "2024-04-22T10:20:10.994Z" "publishedAt": "2024-04-22T10:20:10.994Z"
} }
=======
"name": "balena-etcher",
"private": true,
"displayName": "balenaEtcher",
"productName": "balenaEtcher",
"version": "1.19.9",
"packageType": "local",
"main": ".webpack/main",
"description": "Flash OS images to SD cards and USB drives, safely and easily.",
"productDescription": "Etcher is a powerful OS image flasher built with web technologies to ensure flashing an SDCard or USB drive is a pleasant and safe experience. It protects you from accidentally writing to your hard-drives, ensures every byte of data was written correctly and much more.",
"homepage": "https://github.com/balena-io/etcher",
"repository": {
"type": "git",
"url": "git@github.com:balena-io/etcher.git"
},
"scripts": {
"prettify": "prettier --write lib/**/*.css && balena-lint --fix --typescript typings lib tests forge.config.ts forge.sidecar.ts webpack.config.ts",
"lint": "npm run prettify && catch-uncommitted",
"test-gui": "xvfb-maybe electron-mocha --recursive --reporter spec --window-config tests/gui/window-config.json --require ts-node/register/transpile-only --require-main tests/gui/allow-renderer-process-reuse.ts --full-trace --no-sandbox --renderer tests/gui/**/*.ts",
"test-shared": "xvfb-maybe electron-mocha --recursive --reporter spec --require ts-node/register/transpile-only --require-main tests/gui/allow-renderer-process-reuse.ts --full-trace --no-sandbox tests/shared/**/*.ts",
"test": "npm run test-gui && npm run test-shared",
"package": "electron-forge package",
"start": "electron-forge start",
"make": "electron-forge make"
},
"husky": {
"hooks": {
"pre-commit": "npm run prettify"
}
},
"author": "Balena Ltd. <hello@balena.io>",
"license": "Apache-2.0",
"dependencies": {
"@electron/remote": "^2.1.0",
"@fortawesome/fontawesome-free": "6.5.1",
"@ronomon/direct-io": "^3.0.1",
"@sentry/electron": "^4.15.1",
"analytics-client": "^2.0.1",
"axios": "^1.6.0",
"debug": "4.3.4",
"drivelist": "^12.0.2",
"electron-squirrel-startup": "^1.0.0",
"electron-updater": "6.1.7",
"etcher-sdk": "9.0.7",
"i18next": "23.7.8",
"immutable": "3.8.2",
"lodash": "4.17.21",
"outdent": "0.8.0",
"path-is-inside": "1.0.2",
"pretty-bytes": "5.6.0",
"react": "17.0.2",
"react-dom": "17.0.2",
"react-i18next": "13.5.0",
"redux": "4.2.1",
"rendition": "35.1.2",
"semver": "7.5.4",
"styled-components": "5.3.6",
"sys-class-rgb-led": "3.0.1",
"uuid": "9.0.1",
"ws": "^8.16.0"
},
"devDependencies": {
"@balena/lint": "^8.0.2",
"@electron-forge/cli": "7.2.0",
"@electron-forge/maker-deb": "7.2.0",
"@electron-forge/maker-dmg": "7.2.0",
"@electron-forge/maker-rpm": "7.2.0",
"@electron-forge/maker-squirrel": "7.2.0",
"@electron-forge/maker-zip": "7.2.0",
"@electron-forge/plugin-auto-unpack-natives": "7.2.0",
"@electron-forge/plugin-webpack": "7.2.0",
"@reforged/maker-appimage": "3.3.2",
"@svgr/webpack": "8.1.0",
"@types/chai": "4.3.11",
"@types/debug": "^4.1.12",
"@types/mime-types": "2.1.4",
"@types/mocha": "^10.0.6",
"@types/node": "^20.11.6",
"@types/react": "17.0.2",
"@types/react-dom": "17.0.2",
"@types/semver": "7.5.6",
"@types/sinon": "17.0.2",
"@types/tmp": "0.2.6",
"@vercel/webpack-asset-relocator-loader": "1.7.3",
"@yao-pkg/pkg": "^5.11.1",
"catch-uncommitted": "^2.0.0",
"chai": "4.3.10",
"css-loader": "5.2.7",
"electron": "27.1.3",
"electron-mocha": "^12.2.0",
"file-loader": "6.2.0",
"husky": "8.0.3",
"mocha": "^10.2.0",
"native-addon-loader": "2.0.1",
"node-loader": "^2.0.0",
"omit-deep-lodash": "1.1.7",
"sinon": "17.0.1",
"string-replace-loader": "3.1.0",
"style-loader": "3.3.3",
"ts-loader": "^9.5.1",
"ts-node": "^10.9.2",
"tslib": "2.6.2",
"typescript": "^5.3.3",
"url-loader": "4.1.1",
"xvfb-maybe": "^0.2.1"
},
"hostDependencies": {
"debian": [
"gconf-service",
"gconf2",
"libasound2",
"libatk1.0-0",
"libc6",
"libcairo2",
"libcups2",
"libdbus-1-3",
"libexpat1",
"libfontconfig1",
"libfreetype6",
"libgbm1",
"libgcc1",
"libgconf-2-4",
"libgdk-pixbuf2.0-0",
"libglib2.0-0",
"libgtk-3-0",
"liblzma5",
"libnotify4",
"libnspr4",
"libnss3",
"libpango1.0-0 | libpango-1.0-0",
"libstdc++6",
"libx11-6",
"libxcomposite1",
"libxcursor1",
"libxdamage1",
"libxext6",
"libxfixes3",
"libxi6",
"libxrandr2",
"libxrender1",
"libxss1",
"libxtst6",
"polkit-1-auth-agent | policykit-1-gnome | polkit-kde-1"
]
},
"engines": {
"node": ">=20 <21"
},
"versionist": {
"publishedAt": "2024-01-26T17:29:27.845Z"
},
"optionalDependencies": {
"bufferutil": "^4.0.8",
"utf-8-validate": "^5.0.10"
}
>>>>>>> theirs
} }

View File

@ -17,11 +17,11 @@
import { expect } from 'chai'; import { expect } from 'chai';
import { File } from 'etcher-sdk/build/source-destination'; import { File } from 'etcher-sdk/build/source-destination';
import * as path from 'path'; import * as path from 'path';
import { SourceMetadata } from '../../../lib/gui/app/components/source-selector/source-selector'; import type { SourceMetadata } from '../../../lib/gui/app/components/source-selector/source-selector';
import * as availableDrives from '../../../lib/gui/app/models/available-drives'; import * as availableDrives from '../../../lib/gui/app/models/available-drives';
import * as selectionState from '../../../lib/gui/app/models/selection-state'; import * as selectionState from '../../../lib/gui/app/models/selection-state';
import { DrivelistDrive } from '../../../lib/shared/drive-constraints'; import type { DrivelistDrive } from '../../../lib/shared/drive-constraints';
describe('Model: selectionState', function () { describe('Model: selectionState', function () {
describe('given a clean state', function () { describe('given a clean state', function () {

View File

@ -15,12 +15,17 @@
*/ */
import { expect } from 'chai'; import { expect } from 'chai';
import { Drive as DrivelistDrive } from 'drivelist'; import type { Drive as DrivelistDrive } from 'drivelist';
import { sourceDestination } from 'etcher-sdk'; import { sourceDestination } from 'etcher-sdk';
<<<<<<< ours
import * as ipc from 'node-ipc'; import * as ipc from 'node-ipc';
import { assert, SinonStub, stub } from 'sinon'; import { assert, SinonStub, stub } from 'sinon';
=======
import type { SinonStub } from 'sinon';
import { assert, stub } from 'sinon';
>>>>>>> theirs
import { SourceMetadata } from '../../../lib/gui/app/components/source-selector/source-selector'; import type { SourceMetadata } from '../../../lib/gui/app/components/source-selector/source-selector';
import * as flashState from '../../../lib/gui/app/models/flash-state'; import * as flashState from '../../../lib/gui/app/models/flash-state';
import * as imageWriter from '../../../lib/gui/app/modules/image-writer'; import * as imageWriter from '../../../lib/gui/app/modules/image-writer';

View File

@ -17,7 +17,8 @@
import { expect } from 'chai'; import { expect } from 'chai';
import { promises as fs } from 'fs'; import { promises as fs } from 'fs';
import * as os from 'os'; import * as os from 'os';
import { SinonStub, stub } from 'sinon'; import type { SinonStub } from 'sinon';
import { stub } from 'sinon';
import * as wnd from '../../../lib/gui/app/os/windows-network-drives'; import * as wnd from '../../../lib/gui/app/os/windows-network-drives';

View File

@ -17,7 +17,7 @@
import { expect } from 'chai'; import { expect } from 'chai';
import { sourceDestination } from 'etcher-sdk'; import { sourceDestination } from 'etcher-sdk';
import * as path from 'path'; import * as path from 'path';
import { SourceMetadata } from '../../lib/gui/app/components/source-selector/source-selector'; import type { SourceMetadata } from '../../lib/gui/app/components/source-selector/source-selector';
import * as constraints from '../../lib/shared/drive-constraints'; import * as constraints from '../../lib/shared/drive-constraints';
import * as messages from '../../lib/shared/messages'; import * as messages from '../../lib/shared/messages';