From 175e41de8d162a94005d157b6df9b36de10fa799 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 14 Jul 2020 13:47:58 +0200 Subject: [PATCH 01/11] Update rendition to ^16.1.1 Changelog-entry: Update rendition to ^16.1.1 Change-type: patch --- lib/gui/app/components/finish/finish.tsx | 2 +- .../flash-results/flash-results.tsx | 3 +- .../progress-button/progress-button.tsx | 5 +- .../reduced-flashing-infos.tsx | 3 +- lib/gui/app/components/settings/settings.tsx | 4 +- .../source-selector/source-selector.tsx | 14 +- .../target-selector-button.tsx | 3 +- .../target-selector/target-selector-modal.tsx | 15 +- lib/gui/app/pages/main/DriveSelector.tsx | 2 +- lib/gui/app/pages/main/Flash.tsx | 4 +- lib/gui/app/pages/main/MainPage.tsx | 2 +- lib/gui/app/styled-components.tsx | 16 +- npm-shrinkwrap.json | 306 +++++++++++++----- package.json | 2 +- 14 files changed, 256 insertions(+), 125 deletions(-) diff --git a/lib/gui/app/components/finish/finish.tsx b/lib/gui/app/components/finish/finish.tsx index 6484461f..51aa6738 100644 --- a/lib/gui/app/components/finish/finish.tsx +++ b/lib/gui/app/components/finish/finish.tsx @@ -16,7 +16,7 @@ import * as _ from 'lodash'; import * as React from 'react'; -import { Flex } from 'rendition'; +import { Flex } from 'rendition/dist_esm5/components/Flex'; import { v4 as uuidV4 } from 'uuid'; import * as flashState from '../../models/flash-state'; diff --git a/lib/gui/app/components/flash-results/flash-results.tsx b/lib/gui/app/components/flash-results/flash-results.tsx index aefff367..4a1d2acf 100644 --- a/lib/gui/app/components/flash-results/flash-results.tsx +++ b/lib/gui/app/components/flash-results/flash-results.tsx @@ -19,7 +19,8 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import * as _ from 'lodash'; import outdent from 'outdent'; import * as React from 'react'; -import { Txt, Flex } from 'rendition'; +import { Flex } from 'rendition/dist_esm5/components/Flex'; +import Txt from 'rendition/dist_esm5/components/Txt'; import { progress } from '../../../../shared/messages'; import { bytesToMegabytes } from '../../../../shared/units'; diff --git a/lib/gui/app/components/progress-button/progress-button.tsx b/lib/gui/app/components/progress-button/progress-button.tsx index d9466ed3..9b373d2d 100644 --- a/lib/gui/app/components/progress-button/progress-button.tsx +++ b/lib/gui/app/components/progress-button/progress-button.tsx @@ -15,7 +15,10 @@ */ import * as React from 'react'; -import { Button, Flex, ProgressBar, Txt } from 'rendition'; +import { Flex } from 'rendition/dist_esm5/components/Flex'; +import Button from 'rendition/dist_esm5/components/Button'; +import ProgressBar from 'rendition/dist_esm5/components/ProgressBar'; +import Txt from 'rendition/dist_esm5/components/Txt'; import { default as styled } from 'styled-components'; import { fromFlashState } from '../../modules/progress-status'; diff --git a/lib/gui/app/components/reduced-flashing-infos/reduced-flashing-infos.tsx b/lib/gui/app/components/reduced-flashing-infos/reduced-flashing-infos.tsx index 527f45fc..62752b43 100644 --- a/lib/gui/app/components/reduced-flashing-infos/reduced-flashing-infos.tsx +++ b/lib/gui/app/components/reduced-flashing-infos/reduced-flashing-infos.tsx @@ -15,7 +15,8 @@ */ import * as React from 'react'; -import { Flex, Txt } from 'rendition'; +import { Flex } from 'rendition/dist_esm5/components/Flex'; +import Txt from 'rendition/dist_esm5/components/Txt'; import DriveSvg from '../../../assets/drive.svg'; import ImageSvg from '../../../assets/image.svg'; diff --git a/lib/gui/app/components/settings/settings.tsx b/lib/gui/app/components/settings/settings.tsx index e895cad0..7a203b12 100644 --- a/lib/gui/app/components/settings/settings.tsx +++ b/lib/gui/app/components/settings/settings.tsx @@ -19,7 +19,9 @@ import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import * as _ from 'lodash'; import * as os from 'os'; import * as React from 'react'; -import { Checkbox, Flex, Txt } from 'rendition'; +import { Flex } from 'rendition/dist_esm5/components/Flex'; +import Checkbox from 'rendition/dist_esm5/components/Checkbox'; +import Txt from 'rendition/dist_esm5/components/Txt'; import { version, packageType } from '../../../../../package.json'; import * as settings from '../../models/settings'; diff --git a/lib/gui/app/components/source-selector/source-selector.tsx b/lib/gui/app/components/source-selector/source-selector.tsx index 4cd1c0d2..b5053e3a 100644 --- a/lib/gui/app/components/source-selector/source-selector.tsx +++ b/lib/gui/app/components/source-selector/source-selector.tsx @@ -26,14 +26,12 @@ import * as _ from 'lodash'; import { GPTPartition, MBRPartition } from 'partitioninfo'; import * as path from 'path'; import * as React from 'react'; -import { - ButtonProps, - Card as BaseCard, - Input, - Modal as SmallModal, - Txt, - Flex, -} from 'rendition'; +import { Flex } from 'rendition/dist_esm5/components/Flex'; +import { ButtonProps } from 'rendition/dist_esm5/components/Button'; +import SmallModal from 'rendition/dist_esm5/components/Modal'; +import Txt from 'rendition/dist_esm5/components/Txt'; +import BaseCard from 'rendition/dist_esm5/components/Card'; +import Input from 'rendition/dist_esm5/components/Input'; import styled from 'styled-components'; import * as errors from '../../../../shared/errors'; diff --git a/lib/gui/app/components/target-selector/target-selector-button.tsx b/lib/gui/app/components/target-selector/target-selector-button.tsx index 2d9e4315..46b3d232 100644 --- a/lib/gui/app/components/target-selector/target-selector-button.tsx +++ b/lib/gui/app/components/target-selector/target-selector-button.tsx @@ -16,7 +16,8 @@ import { Drive as DrivelistDrive } from 'drivelist'; import * as React from 'react'; -import { Txt, Flex, FlexProps } from 'rendition'; +import { Flex, FlexProps } from 'rendition/dist_esm5/components/Flex'; +import Txt from 'rendition/dist_esm5/components/Txt'; import { getDriveImageCompatibilityStatuses, diff --git a/lib/gui/app/components/target-selector/target-selector-modal.tsx b/lib/gui/app/components/target-selector/target-selector-modal.tsx index f4da1c64..7c62451c 100644 --- a/lib/gui/app/components/target-selector/target-selector-modal.tsx +++ b/lib/gui/app/components/target-selector/target-selector-modal.tsx @@ -21,15 +21,12 @@ import { import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; import { scanner, sourceDestination } from 'etcher-sdk'; import * as React from 'react'; -import { - Badge, - Table, - Txt, - Flex, - Link, - TableColumn, - ModalProps, -} from 'rendition'; +import { Flex } from 'rendition/dist_esm5/components/Flex'; +import { ModalProps } from 'rendition/dist_esm5/components/Modal'; +import Txt from 'rendition/dist_esm5/components/Txt'; +import Badge from 'rendition/dist_esm5/components/Badge'; +import Link from 'rendition/dist_esm5/components/Link'; +import Table, { TableColumn } from 'rendition/dist_esm5/components/Table'; import styled from 'styled-components'; import { diff --git a/lib/gui/app/pages/main/DriveSelector.tsx b/lib/gui/app/pages/main/DriveSelector.tsx index f89e4d98..afe66e16 100644 --- a/lib/gui/app/pages/main/DriveSelector.tsx +++ b/lib/gui/app/pages/main/DriveSelector.tsx @@ -16,7 +16,7 @@ import { scanner } from 'etcher-sdk'; import * as React from 'react'; -import { Flex } from 'rendition'; +import { Flex } from 'rendition/dist_esm5/components/Flex'; import { TargetSelector } from '../../components/target-selector/target-selector-button'; import { TargetSelectorModal } from '../../components/target-selector/target-selector-modal'; import { diff --git a/lib/gui/app/pages/main/Flash.tsx b/lib/gui/app/pages/main/Flash.tsx index 7c46daca..e65dcf76 100644 --- a/lib/gui/app/pages/main/Flash.tsx +++ b/lib/gui/app/pages/main/Flash.tsx @@ -17,7 +17,9 @@ import * as _ from 'lodash'; import * as path from 'path'; import * as React from 'react'; -import { Flex, Modal, Txt } from 'rendition'; +import { Flex } from 'rendition/dist_esm5/components/Flex'; +import Modal from 'rendition/dist_esm5/components/Modal'; +import Txt from 'rendition/dist_esm5/components/Txt'; import * as constraints from '../../../../shared/drive-constraints'; import * as messages from '../../../../shared/messages'; diff --git a/lib/gui/app/pages/main/MainPage.tsx b/lib/gui/app/pages/main/MainPage.tsx index bbbd5a67..d25d092c 100644 --- a/lib/gui/app/pages/main/MainPage.tsx +++ b/lib/gui/app/pages/main/MainPage.tsx @@ -20,7 +20,7 @@ import { sourceDestination } from 'etcher-sdk'; import * as _ from 'lodash'; import * as path from 'path'; import * as React from 'react'; -import { Flex } from 'rendition'; +import { Flex } from 'rendition/dist_esm5/components/Flex'; import styled from 'styled-components'; import { FeaturedProject } from '../../components/featured-project/featured-project'; diff --git a/lib/gui/app/styled-components.tsx b/lib/gui/app/styled-components.tsx index 19ba5ea7..95900e1a 100644 --- a/lib/gui/app/styled-components.tsx +++ b/lib/gui/app/styled-components.tsx @@ -15,16 +15,12 @@ */ import * as React from 'react'; -import { - Button, - ButtonProps, - Modal as ModalBase, - Provider, - Txt, - Flex, - FlexProps, - Theme as renditionTheme, -} from 'rendition'; +import { Flex, FlexProps } from 'rendition/dist_esm5/components/Flex'; +import Button, { ButtonProps } from 'rendition/dist_esm5/components/Button'; +import ModalBase from 'rendition/dist_esm5/components/Modal'; +import Provider from 'rendition/dist_esm5/components/Provider'; +import Txt from 'rendition/dist_esm5/components/Txt'; +import renditionTheme from 'rendition/dist_esm5/theme'; import styled from 'styled-components'; import { space } from 'styled-system'; diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 93208d89..426d84b6 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2630,9 +2630,9 @@ } }, "@babel/runtime-corejs2": { - "version": "7.10.3", - "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.10.3.tgz", - "integrity": "sha512-enKvnR/kKFbZFgXYo165wtSA5OeiTlgsnU4jV3vpKRhfWUJjLS6dfVcjIPeRcgJbgEgdgu0I+UyBWqu6c0GumQ==", + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/runtime-corejs2/-/runtime-corejs2-7.10.4.tgz", + "integrity": "sha512-9sArmpZDQsnR1yyAcU51DxQrntWxt0LUKjPp3pIyo7kVLfaqKt8muppcT87QmFkXV5H50qXAF8JWOjk0jaXRYA==", "dev": true, "requires": { "core-js": "^2.6.5", @@ -2848,12 +2848,20 @@ "dev": true }, "@fortawesome/fontawesome-svg-core": { - "version": "1.2.28", - "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.28.tgz", - "integrity": "sha512-4LeaNHWvrneoU0i8b5RTOJHKx7E+y7jYejplR7uSVB34+mp3Veg7cbKk7NBCLiI4TyoWS1wh9ZdoyLJR8wSAdg==", + "version": "1.2.29", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.29.tgz", + "integrity": "sha512-xmPmP2t8qrdo8RyKihTkGb09RnZoc+7HFBCnr0/6ZhStdGDSLeEd7ajV181+2W29NWIFfylO13rU+s3fpy3cnA==", "dev": true, "requires": { - "@fortawesome/fontawesome-common-types": "^0.2.28" + "@fortawesome/fontawesome-common-types": "^0.2.29" + }, + "dependencies": { + "@fortawesome/fontawesome-common-types": { + "version": "0.2.29", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-common-types/-/fontawesome-common-types-0.2.29.tgz", + "integrity": "sha512-cY+QfDTbZ7XVxzx7jxbC98Oxr/zc7R2QpTLqTxqlfyXDrAJjzi/xUIqAUsygELB62JIrbsWxtSRhayKFkGI7MA==", + "dev": true + } } }, "@fortawesome/free-brands-svg-icons": { @@ -2951,6 +2959,25 @@ "integrity": "sha512-bliu3CfMWLxMJaW8UK7+6Q1iPQoXbP9BK14yvid2pZL+OgqKgmnY6O9pazIi5Ca9NVTviNcN8WCz1TicUiABQw==", "dev": true }, + "@rjsf/core": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/@rjsf/core/-/core-2.2.1.tgz", + "integrity": "sha512-XUpUUF1EParZjFIfgZXzu0lP8YWK/R+38UfXuP7JEu8NqopRdw6J4XqVhcYjJtdULsi3lr279CSOmJuyzokJGg==", + "dev": true, + "requires": { + "@babel/runtime-corejs2": "^7.8.7", + "@types/json-schema": "^7.0.4", + "ajv": "^6.7.0", + "core-js": "^2.5.7", + "json-schema-merge-allof": "^0.6.0", + "jsonpointer": "^4.0.1", + "lodash": "^4.17.15", + "prop-types": "^15.7.2", + "react-app-polyfill": "^1.0.4", + "react-is": "^16.9.0", + "shortid": "^2.2.14" + } + }, "@ronomon/direct-io": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/@ronomon/direct-io/-/direct-io-3.0.1.tgz", @@ -3611,20 +3638,10 @@ "@types/react": "*" } }, - "@types/react-jsonschema-form": { - "version": "1.7.3", - "resolved": "https://registry.npmjs.org/@types/react-jsonschema-form/-/react-jsonschema-form-1.7.3.tgz", - "integrity": "sha512-YiUCSnTA84e8g3zQobA+Iheh3+i3pb7TiIIXT4oEHwenhyrHVB5vPSIi/QeURy6PwVP1LfSCGOAHFRDpE/hAtQ==", - "dev": true, - "requires": { - "@types/json-schema": "*", - "@types/react": "*" - } - }, "@types/react-native": { - "version": "0.62.14", - "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.62.14.tgz", - "integrity": "sha512-ItBgiEQks2Mid6GsiLBx75grNH0glaKemTK9V7G+vSnvP+Zk3x1Wr+aTy4dJxRPPMg14DAJyYePLZwj2cigXbw==", + "version": "0.63.1", + "resolved": "https://registry.npmjs.org/@types/react-native/-/react-native-0.63.1.tgz", + "integrity": "sha512-mo2DAgliCqdNyivBa0/JL8JIkebt9TU0ATmsvtUvypIP5qN+YJekbVPpHt6WLXEZyBm7LtmIqxbjIHqeoaojsg==", "dev": true, "requires": { "@types/react": "*" @@ -3665,9 +3682,9 @@ } }, "@types/sanitize-html": { - "version": "1.23.2", - "resolved": "https://registry.npmjs.org/@types/sanitize-html/-/sanitize-html-1.23.2.tgz", - "integrity": "sha512-s00omSXGjemcNGXChE44grxYLPCkxdp/rdxGCb4FcGyH0aOjFOacrnP0P394Ktp+IKeBk1Q7VsGJ+cOa2GZ5hw==", + "version": "1.23.3", + "resolved": "https://registry.npmjs.org/@types/sanitize-html/-/sanitize-html-1.23.3.tgz", + "integrity": "sha512-Isg8N0ifKdDq6/kaNlIcWfapDXxxquMSk2XC5THsOICRyOIhQGds95XH75/PL/g9mExi4bL8otIqJM/Wo96WxA==", "dev": true, "requires": { "htmlparser2": "^4.1.0" @@ -3712,9 +3729,9 @@ "dev": true }, "@types/styled-components": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.0.tgz", - "integrity": "sha512-ZFlLCuwF5r+4Vb7JUmd+Yr2S0UBdBGmI7ctFTgJMypIp3xOHI4LCFVn2dKMvpk6xDB2hLRykrEWMBwJEpUAUIQ==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/@types/styled-components/-/styled-components-5.1.1.tgz", + "integrity": "sha512-fIjKvDU1LJExBZWEQilHqzfpOK4KUwBsj5zC79lxa94ekz8oDQSBNcayMACBImxIuevF+NbBGL9O/2CQ67Zhig==", "dev": true, "requires": { "@types/hoist-non-react-statics": "*", @@ -4619,12 +4636,6 @@ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", "dev": true }, - "balena-temen": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/balena-temen/-/balena-temen-0.5.7.tgz", - "integrity": "sha512-ud6CJAdPXXy7UGN+ws1iKNl4W1egqxA4STOWlbQjER7xGt/L7AWVZDkUXcrBrLaDwFDd+uSwi+AhqFp+yrplNw==", - "dev": true - }, "base": { "version": "0.11.2", "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", @@ -5855,6 +5866,29 @@ } } }, + "compute-gcd": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/compute-gcd/-/compute-gcd-1.2.0.tgz", + "integrity": "sha1-/B7eW2UAHpUCJlAvRlQ4Y+T+oQ4=", + "dev": true, + "requires": { + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, + "compute-lcm": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/compute-lcm/-/compute-lcm-1.1.0.tgz", + "integrity": "sha1-q9ltBAtBsKFm+JlEtci3xRHiGtU=", + "dev": true, + "requires": { + "compute-gcd": "^1.2.0", + "validate.io-array": "^1.0.3", + "validate.io-function": "^1.0.2", + "validate.io-integer-array": "^1.0.0" + } + }, "concat-map": { "version": "0.0.1", "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", @@ -8035,12 +8069,23 @@ "optional": true }, "encoding": { - "version": "0.1.12", - "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.12.tgz", - "integrity": "sha1-U4tm8+5izRq1HsMjgp0flIDHS+s=", + "version": "0.1.13", + "resolved": "https://registry.npmjs.org/encoding/-/encoding-0.1.13.tgz", + "integrity": "sha512-ETBauow1T35Y/WZMkio9jiM0Z5xjHHmJ4XmjZOq1l/dXz3lr2sRn87nJy20RupqSh1F2m3HHPSp8ShIPQJrJ3A==", "dev": true, "requires": { - "iconv-lite": "~0.4.13" + "iconv-lite": "^0.6.2" + }, + "dependencies": { + "iconv-lite": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.6.2.tgz", + "integrity": "sha512-2y91h5OpQlolefMPmUlivelittSWy0rP+oYVpn6A7GwVHNE8AWzoYOBNmlwks3LobaJxgHCYZAnyNo2GgpNRNQ==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3.0.0" + } + } } }, "end-of-stream": { @@ -8687,6 +8732,15 @@ "resolved": "https://registry.npmjs.org/core-js/-/core-js-1.2.7.tgz", "integrity": "sha1-ZSKUwUZR2yj6k70tX/KYOk8IxjY=", "dev": true + }, + "promise": { + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", + "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "dev": true, + "requires": { + "asap": "~2.0.3" + } } } }, @@ -10466,12 +10520,6 @@ } } }, - "jellyschema": { - "version": "0.11.10", - "resolved": "https://registry.npmjs.org/jellyschema/-/jellyschema-0.11.10.tgz", - "integrity": "sha512-aYGNa5XwFKgahnxu1cloyOog8GcefeMl6rZpaieBYPAZsmXvPeJ+cf+mjito65hBLVOz0PmA45YHv+OXsgRcOw==", - "dev": true - }, "js-message": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/js-message/-/js-message-1.0.5.tgz", @@ -10539,6 +10587,26 @@ "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=", "dev": true }, + "json-schema-compare": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/json-schema-compare/-/json-schema-compare-0.2.2.tgz", + "integrity": "sha512-c4WYmDKyJXhs7WWvAWm3uIYnfyWFoIp+JEoX34rctVvEkMYCPGhXtvmFFXiffBbxfZsvQ0RNnV5H7GvDF5HCqQ==", + "dev": true, + "requires": { + "lodash": "^4.17.4" + } + }, + "json-schema-merge-allof": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/json-schema-merge-allof/-/json-schema-merge-allof-0.6.0.tgz", + "integrity": "sha512-LEw4VMQVRceOPLuGRWcxW5orTTiR9ZAtqTAe4rQUjNADTeR81bezBVFa0MqIwp0YmHIM1KkhSjZM7o+IQhaPbQ==", + "dev": true, + "requires": { + "compute-lcm": "^1.1.0", + "json-schema-compare": "^0.2.2", + "lodash": "^4.17.4" + } + }, "json-schema-traverse": { "version": "0.4.1", "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", @@ -10570,6 +10638,12 @@ "universalify": "^1.0.0" } }, + "jsonpointer": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/jsonpointer/-/jsonpointer-4.1.0.tgz", + "integrity": "sha512-CXcRvMyTlnR53xMcKnuMzfCA5i/nfblTnnr74CZb6C4vG39eu6w51t7nKmU5MfLfbTgGItliNyjO/ciNPDqClg==", + "dev": true + }, "jsprim": { "version": "1.4.1", "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.1.tgz", @@ -13496,12 +13570,12 @@ "dev": true }, "promise": { - "version": "7.3.1", - "resolved": "https://registry.npmjs.org/promise/-/promise-7.3.1.tgz", - "integrity": "sha512-nolQXZ/4L+bP/UGlkfaIujX9BKxGwmQ9OT4mOt5yvy8iK1h3wqTEJCijzGANTCCl9nWjY41juyAn2K3Q1hLLTg==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/promise/-/promise-8.1.0.tgz", + "integrity": "sha512-W04AqnILOL/sPRXziNicCjSNRruLAuIHEOVBazepu0545DDNGYHz7ar9ZgZ1fMU8/MA4mVxp5rkBWRi6OXIy3Q==", "dev": true, "requires": { - "asap": "~2.0.3" + "asap": "~2.0.6" } }, "promise-inflight": { @@ -13663,6 +13737,15 @@ "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", "dev": true }, + "raf": { + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/raf/-/raf-3.4.1.tgz", + "integrity": "sha512-Sq4CW4QhwOHE8ucn6J34MqtZCeWFP2aQSmrlroYgqAV1PjStIhJXxYuTgUIfkEk7zTLjmIjLmU5q+fbD1NnOJA==", + "dev": true, + "requires": { + "performance-now": "^2.1.0" + } + }, "randombytes": { "version": "2.1.0", "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", @@ -13732,6 +13815,28 @@ "prop-types": "^15.6.2" } }, + "react-app-polyfill": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/react-app-polyfill/-/react-app-polyfill-1.0.6.tgz", + "integrity": "sha512-OfBnObtnGgLGfweORmdZbyEz+3dgVePQBb3zipiaDsMHV1NpWm0rDFYIVXFV/AK+x4VIIfWHhrdMIeoTLyRr2g==", + "dev": true, + "requires": { + "core-js": "^3.5.0", + "object-assign": "^4.1.1", + "promise": "^8.0.3", + "raf": "^3.4.1", + "regenerator-runtime": "^0.13.3", + "whatwg-fetch": "^3.0.0" + }, + "dependencies": { + "core-js": { + "version": "3.6.5", + "resolved": "https://registry.npmjs.org/core-js/-/core-js-3.6.5.tgz", + "integrity": "sha512-vZVEEwZoIsI+vPEuoF9Iqf5H7/M3eeQqWlQnYa8FSKKePuYTf5MWnxb5SDAzCa60b3JBRS5g9b+Dq7b1y/RCrA==", + "dev": true + } + } + }, "react-async-script": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/react-async-script/-/react-async-script-1.2.0.tgz", @@ -13794,28 +13899,6 @@ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==", "dev": true }, - "react-jsonschema-form": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/react-jsonschema-form/-/react-jsonschema-form-1.8.1.tgz", - "integrity": "sha512-aaDloxNAcGXOOOcdKOxxqEEn5oDlPUZgWcs8unXXB9vjBRgCF8rCm/wVSv1u2G5ih0j/BX6Ewd/WjI2g00lPdg==", - "dev": true, - "requires": { - "@babel/runtime-corejs2": "^7.4.5", - "ajv": "^6.7.0", - "core-js": "^2.5.7", - "lodash": "^4.17.15", - "prop-types": "^15.5.8", - "react-is": "^16.8.4", - "react-lifecycles-compat": "^3.0.4", - "shortid": "^2.2.14" - } - }, - "react-lifecycles-compat": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/react-lifecycles-compat/-/react-lifecycles-compat-3.0.4.tgz", - "integrity": "sha512-fBASbA6LnOU9dOU2eW7aQ8xmYBSXUIWr+UmF9b1efZBazGNO+rcXT/icdKnYm2pTwcRylVUYwW7H1PHfLekVzA==", - "dev": true - }, "react-notifications-component": { "version": "2.4.0", "resolved": "https://registry.npmjs.org/react-notifications-component/-/react-notifications-component-2.4.0.tgz", @@ -14024,9 +14107,9 @@ "dev": true }, "rendition": { - "version": "15.2.4", - "resolved": "https://registry.npmjs.org/rendition/-/rendition-15.2.4.tgz", - "integrity": "sha512-/AdQwNyBuHqbYDf7JTRvFNKnpWZQxEpOe8ac/hAAg9mOOjTt+kgV7SO7NjWKkl4IADic/OtWN7BpBsfAtuwrsw==", + "version": "16.1.1", + "resolved": "https://registry.npmjs.org/rendition/-/rendition-16.1.1.tgz", + "integrity": "sha512-mna7HAzVXL9qyFKU/56HHCaQQK31Wie0bmTqmgQQSw/L3xPgdRMhSELZambwacFdzhyNBTKucK4purQBcWf0Jw==", "dev": true, "requires": { "@fortawesome/fontawesome-svg-core": "^1.2.25", @@ -14034,14 +14117,14 @@ "@fortawesome/free-solid-svg-icons": "^5.11.2", "@fortawesome/react-fontawesome": "^0.1.5", "@react-google-maps/api": "^1.9.7", + "@rjsf/core": "^2.2.1", "@types/color": "^3.0.0", - "@types/json-schema": "^7.0.3", + "@types/json-schema": "^7.0.5", "@types/lodash": "^4.14.77", "@types/marked": "^0.7.2", "@types/node": "^13.13.4", "@types/prop-types": "^15.7.0", "@types/react-helmet": "^6.0.0", - "@types/react-jsonschema-form": "^1.3.2", "@types/recompose": "^0.26.2", "@types/sanitize-html": "^1.18.3", "@types/styled-components": "^5.0.1", @@ -14049,20 +14132,17 @@ "@types/uuid": "^3.4.3", "ajv": "^6.7.0", "ajv-keywords": "^3.3.0", - "balena-temen": "^0.5.5", "color": "^3.1.2", "color-hash": "^1.0.3", "copy-to-clipboard": "^3.0.8", "grommet": "^2.14.0", "highlight.js": "^10.0.3", - "jellyschema": "^0.11.9", "lodash": "^4.17.11", "marked": "^0.8.0", "mermaid": "8.4.0", "prop-types": "^15.7.2", "react-google-recaptcha": "^2.0.0-rc.1", "react-helmet": "^6.0.0", - "react-jsonschema-form": "^1.3.0", "react-notifications-component": "^2.2.3", "react-simplemde-editor": "^4.1.1", "recompose": "0.26.0", @@ -14070,15 +14150,16 @@ "sanitize-html": "^1.20.1", "styled-components": "^5.0.1", "styled-system": "^4.1.0", - "tslib": "^1.10.0", + "tslib": "^2.0.0", "uuid": "^3.2.1", - "xterm": "^3.14.5" + "xterm": "^4.8.1", + "xterm-addon-fit": "^0.4.0" }, "dependencies": { "@types/node": { - "version": "13.13.12", - "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.12.tgz", - "integrity": "sha512-zWz/8NEPxoXNT9YyF2osqyA9WjssZukYpgI4UYZpOjcyqwIUqWGkcCionaEb9Ki+FULyPyvNFpg/329Kd2/pbw==", + "version": "13.13.14", + "resolved": "https://registry.npmjs.org/@types/node/-/node-13.13.14.tgz", + "integrity": "sha512-Az3QsOt1U/K1pbCQ0TXGELTuTkPLOiFIQf3ILzbOyo0FqgV9SxRnxbxM5QlAveERZMHpZY+7u3Jz2tKyl+yg6g==", "dev": true }, "styled-system": { @@ -14091,6 +14172,12 @@ "prop-types": "^15.7.2" } }, + "tslib": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", + "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==", + "dev": true + }, "uuid": { "version": "3.4.0", "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", @@ -16372,6 +16459,43 @@ "spdx-expression-parse": "^3.0.0" } }, + "validate.io-array": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/validate.io-array/-/validate.io-array-1.0.6.tgz", + "integrity": "sha1-W1osr9j4uFq7L4hroVPy2Tond00=", + "dev": true + }, + "validate.io-function": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/validate.io-function/-/validate.io-function-1.0.2.tgz", + "integrity": "sha1-NDoZgC7TsZaCaceA5VjpNBHAutc=", + "dev": true + }, + "validate.io-integer": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/validate.io-integer/-/validate.io-integer-1.0.5.tgz", + "integrity": "sha1-FoSWSAuVviJH7EQ/IjPeT4mHgGg=", + "dev": true, + "requires": { + "validate.io-number": "^1.0.3" + } + }, + "validate.io-integer-array": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/validate.io-integer-array/-/validate.io-integer-array-1.0.0.tgz", + "integrity": "sha1-LKveAzKTpry+Bj/q/pHq9GsToIk=", + "dev": true, + "requires": { + "validate.io-array": "^1.0.3", + "validate.io-integer": "^1.0.4" + } + }, + "validate.io-number": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/validate.io-number/-/validate.io-number-1.0.3.tgz", + "integrity": "sha1-9j/+2iSL8opnqNSODjtGGhZluvg=", + "dev": true + }, "verror": { "version": "1.10.0", "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", @@ -17257,9 +17381,9 @@ "dev": true }, "whatwg-fetch": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.0.0.tgz", - "integrity": "sha512-9GSJUgz1D4MfyKU7KRqwOjXCXTqWdFNvEr7eUBYchQiVc744mqK/MzXPNR2WsPkmkOa4ywfg8C2n8h+13Bey1Q==", + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/whatwg-fetch/-/whatwg-fetch-3.2.0.tgz", + "integrity": "sha512-SdGPoQMMnzVYThUbSrEvqTlkvC1Ux27NehaJ/GUHBfNrh5Mjg+1/uRyFMwVnxO2MrikMWvWAqUGgQOfVU4hT7w==", "dev": true }, "which": { @@ -17490,9 +17614,15 @@ "dev": true }, "xterm": { - "version": "3.14.5", - "resolved": "https://registry.npmjs.org/xterm/-/xterm-3.14.5.tgz", - "integrity": "sha512-DVmQ8jlEtL+WbBKUZuMxHMBgK/yeIZwkXB81bH+MGaKKnJGYwA+770hzhXPfwEIokK9On9YIFPRleVp/5G7z9g==", + "version": "4.8.1", + "resolved": "https://registry.npmjs.org/xterm/-/xterm-4.8.1.tgz", + "integrity": "sha512-ax91ny4tI5eklqIfH79OUSGE2PUX2rGbwONmB6DfqpyhSZO8/cf++sqiaMWEVCMjACyMfnISW7C3gGMoNvNolQ==", + "dev": true + }, + "xterm-addon-fit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/xterm-addon-fit/-/xterm-addon-fit-0.4.0.tgz", + "integrity": "sha512-p4BESuV/g2L6pZzFHpeNLLnep9mp/DkF3qrPglMiucSFtD8iJxtMufEoEJbN8LZwB4i+8PFpFvVuFrGOSpW05w==", "dev": true }, "xxhash": { @@ -17752,4 +17882,4 @@ } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 3bc41e0c..e503fb39 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,7 @@ "react": "^16.8.5", "react-dom": "^16.8.5", "redux": "^4.0.5", - "rendition": "^15.2.4", + "rendition": "^16.1.1", "request": "^2.81.0", "resin-corvus": "^2.0.5", "semver": "^7.3.2", From 5eac622b8c74ac3c3ad78b34d9e60c45205768a6 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 14 Jul 2020 14:53:36 +0200 Subject: [PATCH 02/11] Use strict typescript compiler option Changelog-entry: Use strict typescript compiler option Change-type: patch --- .../source-selector/source-selector.tsx | 9 ++-- .../target-selector/target-selector-modal.tsx | 4 +- lib/gui/modules/child-writer.ts | 2 +- lib/shared/errors.ts | 8 ++-- npm-shrinkwrap.json | 42 +++++++++++++++++-- package.json | 3 +- tsconfig.json | 7 +--- 7 files changed, 52 insertions(+), 23 deletions(-) diff --git a/lib/gui/app/components/source-selector/source-selector.tsx b/lib/gui/app/components/source-selector/source-selector.tsx index b5053e3a..19f12ef2 100644 --- a/lib/gui/app/components/source-selector/source-selector.tsx +++ b/lib/gui/app/components/source-selector/source-selector.tsx @@ -125,10 +125,7 @@ const URLSelector = ({ cancel: () => void; }) => { const [imageURL, setImageURL] = React.useState(''); - const [recentImages, setRecentImages]: [ - URL[], - (value: React.SetStateAction) => void, - ] = React.useState([]); + const [recentImages, setRecentImages] = React.useState([]); const [loading, setLoading] = React.useState(false); React.useEffect(() => { const fetchRecentUrlImages = async () => { @@ -252,7 +249,7 @@ export class SourceSelector extends React.Component< SourceSelectorProps, SourceSelectorState > { - private unsubscribe: () => void; + private unsubscribe: (() => void) | undefined; private afterSelected: SourceSelectorProps['afterSelected']; constructor(props: SourceSelectorProps) { @@ -282,7 +279,7 @@ export class SourceSelector extends React.Component< } public componentWillUnmount() { - this.unsubscribe(); + this.unsubscribe?.(); ipcRenderer.removeListener('select-image', this.onSelectImage); } diff --git a/lib/gui/app/components/target-selector/target-selector-modal.tsx b/lib/gui/app/components/target-selector/target-selector-modal.tsx index 7c62451c..0e73bb11 100644 --- a/lib/gui/app/components/target-selector/target-selector-modal.tsx +++ b/lib/gui/app/components/target-selector/target-selector-modal.tsx @@ -161,7 +161,7 @@ export class TargetSelectorModal extends React.Component< TargetSelectorModalProps, TargetSelectorModalState > { - unsubscribe: () => void; + private unsubscribe: (() => void) | undefined; tableColumns: Array>; constructor(props: TargetSelectorModalProps) { @@ -320,7 +320,7 @@ export class TargetSelectorModal extends React.Component< } componentWillUnmount() { - this.unsubscribe(); + this.unsubscribe?.(); } render() { diff --git a/lib/gui/modules/child-writer.ts b/lib/gui/modules/child-writer.ts index 4cd5e2f9..7b14bf3b 100644 --- a/lib/gui/modules/child-writer.ts +++ b/lib/gui/modules/child-writer.ts @@ -213,7 +213,7 @@ ipc.connectTo(IPC_SERVER_ID, () => { * writer.on('fail', onFail) */ const onFail = ( - destination: sdk.sourceDestination.BlockDevice, + destination: sdk.sourceDestination.SourceDestination, error: Error, ) => { ipc.of[IPC_SERVER_ID].emit('fail', { diff --git a/lib/shared/errors.ts b/lib/shared/errors.ts index 6a07b99d..30e87172 100644 --- a/lib/shared/errors.ts +++ b/lib/shared/errors.ts @@ -17,11 +17,11 @@ import * as _ from 'lodash'; function createErrorDetails(options: { - title: string | ((error: Error) => string); - description: string | ((error: Error) => string); + title: string | ((error: Error & { path: string }) => string); + description: string; }): { - title: (error: Error) => string; - description: (error: Error) => string; + title: (error: Error & { path: string }) => string; + description: (error: Error & { path: string }) => string; } { return _.pick( _.mapValues(options, (value) => { diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 426d84b6..3b44c97c 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -5443,6 +5443,7 @@ "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", + "fsevents": "~2.1.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -8370,6 +8371,7 @@ "udif": "^0.17.0", "unbzip2-stream": "github:balena-io-modules/unbzip2-stream#4a54f56a25b58950f9e4277c56db2912d62242e7", "unzip-stream": "^0.3.0", + "winusb-driver-generator": "^1.2.3", "xxhash": "^0.3.0", "yauzl": "^2.9.2" }, @@ -9213,6 +9215,13 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -11887,6 +11896,7 @@ "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", + "fsevents": "~2.1.2", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -15898,9 +15908,9 @@ "dev": true }, "ts-loader": { - "version": "7.0.5", - "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-7.0.5.tgz", - "integrity": "sha512-zXypEIT6k3oTc+OZNx/cqElrsbBtYqDknf48OZos0NQ3RTt045fBIU8RRSu+suObBzYB355aIPGOe/3kj9h7Ig==", + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/ts-loader/-/ts-loader-8.0.0.tgz", + "integrity": "sha512-giEW167rtK1V6eX/DnXEtOgcawwoIp6hqznqYNNSmraUZOq36zMhwBq12JMlYhxf50BC58bscsTSKKtE42zAuw==", "dev": true, "requires": { "chalk": "^2.3.0", @@ -16605,6 +16615,7 @@ "anymatch": "^2.0.0", "async-each": "^1.0.1", "braces": "^2.3.2", + "fsevents": "^1.2.7", "glob-parent": "^3.1.0", "inherits": "^2.0.3", "is-binary-path": "^1.0.0", @@ -16638,6 +16649,17 @@ } } }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", @@ -17459,6 +17481,18 @@ } } }, + "winusb-driver-generator": { + "version": "1.2.7", + "resolved": "https://registry.npmjs.org/winusb-driver-generator/-/winusb-driver-generator-1.2.7.tgz", + "integrity": "sha512-NMRpH61jvvU32kGp7TcB0uzC2vxbTNpdX8kkGn4RLafycm5bKRKNzIqinnshs8G5Z7VFAMVACaCo1uPLslT3nw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.3.0", + "nan": "^2.14.0", + "prebuild-install": "^5.2.2" + } + }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -17882,4 +17916,4 @@ } } } -} \ No newline at end of file +} diff --git a/package.json b/package.json index e503fb39..187c0eda 100644 --- a/package.json +++ b/package.json @@ -91,6 +91,7 @@ "node-gyp": "^7.0.0", "node-ipc": "^9.1.1", "omit-deep-lodash": "1.1.4", + "outdent": "^0.7.1", "path-is-inside": "^1.0.2", "pretty-bytes": "^5.3.0", "react": "^16.8.5", @@ -109,7 +110,7 @@ "sudo-prompt": "^9.0.0", "sys-class-rgb-led": "^2.1.0", "tmp": "^0.2.1", - "ts-loader": "^7.0.5", + "ts-loader": "^8.0.0", "ts-node": "^8.3.0", "typescript": "^3.5.3", "uuid": "^8.1.0", diff --git a/tsconfig.json b/tsconfig.json index 551a92e6..7be1e36c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,14 +1,11 @@ { "compilerOptions": { - "noImplicitAny": true, + "strict": true, "noUnusedLocals": true, "noUnusedParameters": true, - "strictNullChecks": true, "resolveJsonModule": true, - "allowJs": true, - "moduleResolution": "node", "module": "commonjs", - "target": "es2018", + "target": "es2019", "jsx": "react", "typeRoots": ["./node_modules/@types", "./typings"], "allowSyntheticDefaultImports": true From 7d53d0aadcac2d07336afd255de0965ea5666f19 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Tue, 14 Jul 2020 18:10:17 +0200 Subject: [PATCH 03/11] Use tslib Changelog-entry: Use tslib Change-type: patch --- npm-shrinkwrap.json | 137 ++++++++++++++++++++++---------------------- package.json | 3 +- tsconfig.json | 1 + 3 files changed, 70 insertions(+), 71 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 3b44c97c..68dc28f4 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -4762,24 +4762,14 @@ } }, "blockmap": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/blockmap/-/blockmap-4.0.1.tgz", - "integrity": "sha512-ktam+finx4xUQQNbKRBD6VXiULFCb814/N50QBWyD2e6nrWc3QvuMISDLKnSnK64pTnQUMA9dRWpyGFK9ZIchw==", + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/blockmap/-/blockmap-4.0.2.tgz", + "integrity": "sha512-jeQSY/yAc/URhOoK/odQtqaIV9wiSB5KKRfERD1pnlkyOciBQwYuZ9Lvt/v8dCdVmn53vNlMKLm4h5Esy+WcnQ==", "dev": true, "requires": { - "debug": "^3.1.0", + "debug": "^4.1.1", + "tslib": "^2.0.0", "xml-js": "^1.6.11" - }, - "dependencies": { - "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", - "dev": true, - "requires": { - "ms": "^2.1.1" - } - } } }, "bloodline": { @@ -5443,7 +5433,6 @@ "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.1", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -5464,6 +5453,14 @@ "dev": true, "requires": { "tslib": "^1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true + } } }, "chromium-pickle-js": { @@ -8345,9 +8342,9 @@ "dev": true }, "etcher-sdk": { - "version": "4.1.17", - "resolved": "https://registry.npmjs.org/etcher-sdk/-/etcher-sdk-4.1.17.tgz", - "integrity": "sha512-cmsPI08f/uArgpWWvJLDKOYOLk99kUooQCKnbdWORwXvKCAnp7i2CAz2KMUDZ3csgsMx7a+JWFw+27/8NGr+Uw==", + "version": "4.1.18", + "resolved": "https://registry.npmjs.org/etcher-sdk/-/etcher-sdk-4.1.18.tgz", + "integrity": "sha512-j50QEtGv+3a3eEpKCEeSRUgPMenvox0otJ9COABMkwZ1wSpTOq84yxNAWokd5Ae789LrAem8GUP2PVoJUOxkbw==", "dev": true, "requires": { "@ronomon/direct-io": "^3.0.1", @@ -8368,10 +8365,10 @@ "partitioninfo": "^5.3.5", "resin-image-fs": "^5.0.8", "rwmutex": "^1.0.0", + "tslib": "^2.0.0", "udif": "^0.17.0", "unbzip2-stream": "github:balena-io-modules/unbzip2-stream#4a54f56a25b58950f9e4277c56db2912d62242e7", "unzip-stream": "^0.3.0", - "winusb-driver-generator": "^1.2.3", "xxhash": "^0.3.0", "yauzl": "^2.9.2" }, @@ -8777,12 +8774,13 @@ } }, "file-disk": { - "version": "6.0.1", - "resolved": "https://registry.npmjs.org/file-disk/-/file-disk-6.0.1.tgz", - "integrity": "sha512-bR+G6P2wc1Oq7nASGgDVE8xjnTZVrAKdXlIJCW6IHlqT9tgdwTl9V1mBZiWDyyPzXRe+GJeXlZhfRsL8oBSD3Q==", + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/file-disk/-/file-disk-6.0.2.tgz", + "integrity": "sha512-8RCeunLwMpEgM2sjiD8SEhmRWEong5YE5+n0wkQKFp++tfaTrSFdpAst9pl6Gc9NxUtUSyyDUOdXZt3yjkiTbg==", "dev": true, "requires": { - "bluebird": "^3.5.3" + "bluebird": "^3.7.2", + "tslib": "^2.0.0" } }, "file-loader": { @@ -9215,13 +9213,6 @@ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "dev": true }, - "fsevents": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", - "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", - "dev": true, - "optional": true - }, "function-bind": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", @@ -11896,7 +11887,6 @@ "requires": { "anymatch": "~3.1.1", "braces": "~3.0.2", - "fsevents": "~2.1.2", "glob-parent": "~5.1.0", "is-binary-path": "~2.1.0", "is-glob": "~4.0.1", @@ -13203,16 +13193,17 @@ "dev": true }, "partitioninfo": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/partitioninfo/-/partitioninfo-5.3.5.tgz", - "integrity": "sha512-lZIt5D9wsOVnixePPmVyHQs1m1eDICgDecBmV00W5tpDoOwHdkoseW0p+YjBlWd4LIbUqJXJIrfjPq/12uAVSg==", + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/partitioninfo/-/partitioninfo-5.3.6.tgz", + "integrity": "sha512-Bz6RBOrxy1uBZTB+fTXw7gSRVaKXddwzhZEvRCZNo4MbXJSF18XlxgZhxu9bDGSb1zNBcvmbY1D4WkeRJQKf1g==", "dev": true, "requires": { - "bluebird": "^3.5.3", - "file-disk": "^6.0.0", - "gpt": "^2.0.1", + "bluebird": "^3.7.2", + "file-disk": "^6.0.2", + "gpt": "^2.0.4", "mbr": "^1.1.3", - "typed-error": "^3.0.2" + "tslib": "^2.0.0", + "typed-error": "^3.2.0" } }, "pascalcase": { @@ -14501,6 +14492,14 @@ "dev": true, "requires": { "tslib": "^1.9.0" + }, + "dependencies": { + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true + } } }, "safe-buffer": { @@ -15655,9 +15654,9 @@ } }, "tar-stream": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.2.tgz", - "integrity": "sha512-UaF6FoJ32WqALZGOIAApXx+OdxhekNMChu6axLJR85zMMjXKWFGjbIRe+J6P4UnRGg9rAwWvbTT0oI7hD/Un7Q==", + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.1.3.tgz", + "integrity": "sha512-Z9yri56Dih8IaK8gncVPx4Wqt86NDmQTSh49XLZgjWpGZL9GK9HKParS2scqHCC4w6X9Gh2jwaU45V47XTKwVA==", "dev": true, "requires": { "bl": "^4.0.1", @@ -15942,9 +15941,9 @@ } }, "tslib": { - "version": "1.12.0", - "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.12.0.tgz", - "integrity": "sha512-5rxCQkP0kytf4H1T4xz1imjxaUUPMvc5aWp0rJ/VMIN7ClRiH1FwFvBt8wOeMasp/epeUnmSW6CixSIePtiLqA==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.0.tgz", + "integrity": "sha512-lTqkx847PI7xEDYJntxZH89L2/aXInsyF2luSafe/+0fHOMjlBNXdH6th7f70qxLDhul7KZK0zC8V5ZIyHl0/g==", "dev": true }, "tslint": { @@ -15988,6 +15987,12 @@ "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", "dev": true + }, + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true } } }, @@ -16013,6 +16018,14 @@ "dev": true, "requires": { "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true + } } } } @@ -16024,6 +16037,14 @@ "dev": true, "requires": { "tslib": "^1.8.1" + }, + "dependencies": { + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true + } } }, "tty-browserify": { @@ -16615,7 +16636,6 @@ "anymatch": "^2.0.0", "async-each": "^1.0.1", "braces": "^2.3.2", - "fsevents": "^1.2.7", "glob-parent": "^3.1.0", "inherits": "^2.0.3", "is-binary-path": "^1.0.0", @@ -16649,17 +16669,6 @@ } } }, - "fsevents": { - "version": "1.2.13", - "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", - "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.5.0", - "nan": "^2.12.1" - } - }, "glob-parent": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", @@ -17481,18 +17490,6 @@ } } }, - "winusb-driver-generator": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/winusb-driver-generator/-/winusb-driver-generator-1.2.7.tgz", - "integrity": "sha512-NMRpH61jvvU32kGp7TcB0uzC2vxbTNpdX8kkGn4RLafycm5bKRKNzIqinnshs8G5Z7VFAMVACaCo1uPLslT3nw==", - "dev": true, - "optional": true, - "requires": { - "bindings": "^1.3.0", - "nan": "^2.14.0", - "prebuild-install": "^5.2.2" - } - }, "wordwrap": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-0.0.3.tgz", @@ -17916,4 +17913,4 @@ } } } -} +} \ No newline at end of file diff --git a/package.json b/package.json index 187c0eda..b37bc5dd 100644 --- a/package.json +++ b/package.json @@ -78,7 +78,7 @@ "electron-notarize": "^1.0.0", "electron-rebuild": "^1.11.0", "electron-updater": "^4.3.2", - "etcher-sdk": "^4.1.17", + "etcher-sdk": "^4.1.18", "file-loader": "^6.0.0", "husky": "^4.2.5", "immutable": "^3.8.1", @@ -112,6 +112,7 @@ "tmp": "^0.2.1", "ts-loader": "^8.0.0", "ts-node": "^8.3.0", + "tslib": "^2.0.0", "typescript": "^3.5.3", "uuid": "^8.1.0", "webpack": "^4.40.2", diff --git a/tsconfig.json b/tsconfig.json index 7be1e36c..10db032a 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,6 +8,7 @@ "target": "es2019", "jsx": "react", "typeRoots": ["./node_modules/@types", "./typings"], + "importHelpers": true, "allowSyntheticDefaultImports": true }, "include": [ From 170126a490e805b9d14fa2b3e747cba3277cbae9 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 15 Jul 2020 13:23:40 +0200 Subject: [PATCH 04/11] Remove no longer used .sass-lint.yml Changelog-entry: Remove no longer used .sass-lint.yml Change-type: patch --- .sass-lint.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .sass-lint.yml diff --git a/.sass-lint.yml b/.sass-lint.yml deleted file mode 100644 index bfefb841..00000000 --- a/.sass-lint.yml +++ /dev/null @@ -1,17 +0,0 @@ -# sass-lint config generated by make-sass-lint-config v0.1.2 - -files: - include: lib/gui/scss/**/*.scss -options: - formatter: stylish - merge-default-rules: false -rules: - no-css-comments: 0 - no-important: 0 - no-qualifying-elements: 0 - placeholder-in-extend: 0 - property-sort-order: 0 - quotes: - - 1 - - style: double - From e72049d6e8cfc073ae539ab3b16ef9ecf0382fbf Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 15 Jul 2020 15:20:01 +0200 Subject: [PATCH 05/11] Remove font awesome unused icons from the generated bundle Changelog-entry: Remove font awesome unused icons from the generated bundle Change-type: patch --- .../components/flash-results/flash-results.tsx | 18 ++++++++---------- lib/gui/app/components/settings/settings.tsx | 9 ++++++--- .../source-selector/source-selector.tsx | 18 ++++++------------ .../target-selector/target-selector-button.tsx | 5 ++--- .../target-selector/target-selector-modal.tsx | 14 ++++---------- lib/gui/app/pages/main/Flash.tsx | 5 ++--- lib/gui/app/pages/main/MainPage.tsx | 9 +++++---- npm-shrinkwrap.json | 15 ++++++--------- package.json | 4 +--- 9 files changed, 40 insertions(+), 57 deletions(-) diff --git a/lib/gui/app/components/flash-results/flash-results.tsx b/lib/gui/app/components/flash-results/flash-results.tsx index 4a1d2acf..610f1aa5 100644 --- a/lib/gui/app/components/flash-results/flash-results.tsx +++ b/lib/gui/app/components/flash-results/flash-results.tsx @@ -14,8 +14,8 @@ * limitations under the License. */ -import { faCheckCircle, faCircle } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import CircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle.svg'; +import CheckCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/check-circle.svg'; import * as _ from 'lodash'; import outdent from 'outdent'; import * as React from 'react'; @@ -59,12 +59,10 @@ export function FlashResults({ }} > - @@ -79,9 +77,9 @@ export function FlashResults({ alignItems="center" tooltip={type === 'failed' ? errors : undefined} > - {quantity} {progress[type](quantity)} diff --git a/lib/gui/app/components/settings/settings.tsx b/lib/gui/app/components/settings/settings.tsx index 7a203b12..56861c10 100644 --- a/lib/gui/app/components/settings/settings.tsx +++ b/lib/gui/app/components/settings/settings.tsx @@ -14,8 +14,7 @@ * limitations under the License. */ -import { faGithub } from '@fortawesome/free-brands-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import GithubSvg from '@fortawesome/fontawesome-free/svgs/brands/github.svg'; import * as _ from 'lodash'; import * as os from 'os'; import * as React from 'react'; @@ -151,7 +150,11 @@ export function SettingsModal({ toggleModal }: SettingsModalProps) { ) } > - + {version} diff --git a/lib/gui/app/components/source-selector/source-selector.tsx b/lib/gui/app/components/source-selector/source-selector.tsx index 19f12ef2..199dc551 100644 --- a/lib/gui/app/components/source-selector/source-selector.tsx +++ b/lib/gui/app/components/source-selector/source-selector.tsx @@ -14,12 +14,9 @@ * limitations under the License. */ -import { - faFile, - faLink, - faExclamationTriangle, -} from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import FileSvg from '@fortawesome/fontawesome-free/svgs/solid/file.svg'; +import LinkSvg from '@fortawesome/fontawesome-free/svgs/solid/link.svg'; +import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/exclamation-triangle.svg'; import { sourceDestination } from 'etcher-sdk'; import { ipcRenderer, IpcRendererEvent } from 'electron'; import * as _ from 'lodash'; @@ -526,7 +523,7 @@ export class SourceSelector extends React.Component< flow={{ onClick: this.openImageSelector, label: 'Flash from file', - icon: , + icon: , }} /> , + icon: , }} /> @@ -545,10 +542,7 @@ export class SourceSelector extends React.Component< - {' '} + {' '} {this.state.warning.title} } diff --git a/lib/gui/app/components/target-selector/target-selector-button.tsx b/lib/gui/app/components/target-selector/target-selector-button.tsx index 46b3d232..3ff0f460 100644 --- a/lib/gui/app/components/target-selector/target-selector-button.tsx +++ b/lib/gui/app/components/target-selector/target-selector-button.tsx @@ -14,6 +14,7 @@ * limitations under the License. */ +import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/exclamation-triangle.svg'; import { Drive as DrivelistDrive } from 'drivelist'; import * as React from 'react'; import { Flex, FlexProps } from 'rendition/dist_esm5/components/Flex'; @@ -32,8 +33,6 @@ import { StepNameButton, } from '../../styled-components'; import { middleEllipsis } from '../../utils/middle-ellipsis'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faExclamationTriangle } from '@fortawesome/free-solid-svg-icons'; interface TargetSelectorProps { targets: any[]; @@ -64,7 +63,7 @@ function DriveCompatibilityWarning({ const messages = compatibilityWarnings.map((warning) => warning.message); return ( - + ); } diff --git a/lib/gui/app/components/target-selector/target-selector-modal.tsx b/lib/gui/app/components/target-selector/target-selector-modal.tsx index 0e73bb11..c779475c 100644 --- a/lib/gui/app/components/target-selector/target-selector-modal.tsx +++ b/lib/gui/app/components/target-selector/target-selector-modal.tsx @@ -14,11 +14,8 @@ * limitations under the License. */ -import { - faChevronDown, - faExclamationTriangle, -} from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import ExclamationTriangleSvg from '@fortawesome/fontawesome-free/svgs/solid/exclamation-triangle.svg'; +import ChevronDownSvg from '@fortawesome/fontawesome-free/svgs/solid/chevron-down.svg'; import { scanner, sourceDestination } from 'etcher-sdk'; import * as React from 'react'; import { Flex } from 'rendition/dist_esm5/components/Flex'; @@ -185,10 +182,7 @@ export class TargetSelectorModal extends React.Component< render: (description: string, drive: Target) => { return isDrivelistDrive(drive) && drive.isSystem ? ( - + {description} ) : ( @@ -424,7 +418,7 @@ export class TargetSelectorModal extends React.Component< onClick={() => this.setState({ showSystemDrives: true })} > - + Show {numberOfHiddenSystemDrives} hidden diff --git a/lib/gui/app/pages/main/Flash.tsx b/lib/gui/app/pages/main/Flash.tsx index e65dcf76..bec8b5d5 100644 --- a/lib/gui/app/pages/main/Flash.tsx +++ b/lib/gui/app/pages/main/Flash.tsx @@ -14,6 +14,7 @@ * limitations under the License. */ +import CircleSvg from '@fortawesome/fontawesome-free/svgs/solid/circle.svg'; import * as _ from 'lodash'; import * as path from 'path'; import * as React from 'react'; @@ -36,8 +37,6 @@ import * as notification from '../../os/notification'; import { selectAllTargets } from './DriveSelector'; import FlashSvg from '../../../assets/flash.svg'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; -import { faCircle } from '@fortawesome/free-solid-svg-icons'; const COMPLETED_PERCENTAGE = 100; const SPEED_PRECISION = 2; @@ -288,7 +287,7 @@ export class FlashStep extends React.PureComponent< {Boolean(this.props.failed) && ( - + {this.props.failed} {messages.progress.failed(this.props.failed)} diff --git a/lib/gui/app/pages/main/MainPage.tsx b/lib/gui/app/pages/main/MainPage.tsx index d25d092c..46e8c6e8 100644 --- a/lib/gui/app/pages/main/MainPage.tsx +++ b/lib/gui/app/pages/main/MainPage.tsx @@ -14,8 +14,9 @@ * limitations under the License. */ -import { faCog, faQuestionCircle } from '@fortawesome/free-solid-svg-icons'; -import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; +import CogSvg from '@fortawesome/fontawesome-free/svgs/solid/cog.svg'; +import QuestionCircleSvg from '@fortawesome/fontawesome-free/svgs/solid/question-circle.svg'; + import { sourceDestination } from 'etcher-sdk'; import * as _ from 'lodash'; import * as path from 'path'; @@ -193,14 +194,14 @@ export class MainPage extends React.Component< }} > } + icon={} plain tabIndex={5} onClick={() => this.setState({ hideSettings: false })} /> {!settings.getSync('disableExternalLinks') && ( } + icon={} onClick={() => openExternal( selectionState.getImageSupportUrl() || diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 68dc28f4..5674d953 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2847,6 +2847,12 @@ "integrity": "sha512-gtis2/5yLdfI6n0ia0jH7NJs5i/Z/8M/ZbQL6jXQhCthEOe5Cr5NcQPhgTvFxNOtURE03/ZqUcEskdn2M+QaBg==", "dev": true }, + "@fortawesome/fontawesome-free": { + "version": "5.13.1", + "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-free/-/fontawesome-free-5.13.1.tgz", + "integrity": "sha512-D819f34FLHeBN/4xvw0HR0u7U2G7RqjPSggXqf7LktsxWQ48VAfGwvMrhcVuaZV2fF069c/619RdgCCms0DHhw==", + "dev": true + }, "@fortawesome/fontawesome-svg-core": { "version": "1.2.29", "resolved": "https://registry.npmjs.org/@fortawesome/fontawesome-svg-core/-/fontawesome-svg-core-1.2.29.tgz", @@ -2864,15 +2870,6 @@ } } }, - "@fortawesome/free-brands-svg-icons": { - "version": "5.13.0", - "resolved": "https://registry.npmjs.org/@fortawesome/free-brands-svg-icons/-/free-brands-svg-icons-5.13.0.tgz", - "integrity": "sha512-/6xXiJFCMEQxqxXbL0FPJpwq5Cv6MRrjsbJEmH/t5vOvB4dILDpnY0f7zZSlA8+TG7jwlt12miF/yZpZkykucA==", - "dev": true, - "requires": { - "@fortawesome/fontawesome-common-types": "^0.2.28" - } - }, "@fortawesome/free-regular-svg-icons": { "version": "5.13.1", "resolved": "https://registry.npmjs.org/@fortawesome/free-regular-svg-icons/-/free-regular-svg-icons-5.13.1.tgz", diff --git a/package.json b/package.json index b37bc5dd..77ca67e2 100644 --- a/package.json +++ b/package.json @@ -47,9 +47,7 @@ ], "devDependencies": { "@balena/lint": "^5.0.4", - "@fortawesome/free-brands-svg-icons": "^5.11.2", - "@fortawesome/free-solid-svg-icons": "^5.11.2", - "@fortawesome/react-fontawesome": "^0.1.7", + "@fortawesome/fontawesome-free": "^5.13.1", "@svgr/webpack": "^5.4.0", "@types/bluebird": "^3.5.30", "@types/chai": "^4.2.7", From dc9351713cd4e78513781c3a8c31a0b822f78451 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Wed, 15 Jul 2020 23:30:02 +0200 Subject: [PATCH 06/11] Stop using request, replace it with already used axios Changelog-entry: Stop using request, replace it with already used axios Change-type: patch --- lib/shared/utils.ts | 8 +++----- package.json | 1 - 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/shared/utils.ts b/lib/shared/utils.ts index f9d34143..70abdabe 100755 --- a/lib/shared/utils.ts +++ b/lib/shared/utils.ts @@ -14,17 +14,14 @@ * limitations under the License. */ +import axios from 'axios'; import * as Bluebird from 'bluebird'; import * as _ from 'lodash'; -import * as request from 'request'; import * as tmp from 'tmp'; -import { promisify } from 'util'; import * as errors from './errors'; import * as settings from '../gui/app/models/settings'; -const getAsync = promisify(request.get); - export function isValidPercentage(percentage: any): boolean { return _.every([_.isNumber(percentage), percentage >= 0, percentage <= 100]); } @@ -55,7 +52,8 @@ export async function getConfig(): Promise<_.Dictionary> { const configUrl = (await settings.get('configUrl')) || 'https://balena.io/etcher/static/config.json'; - return (await getAsync({ url: configUrl, json: true })).body; + const response = await axios.get(configUrl, { responseType: 'json' }); + return response.data; } /** diff --git a/package.json b/package.json index 77ca67e2..6a7c4c0d 100644 --- a/package.json +++ b/package.json @@ -96,7 +96,6 @@ "react-dom": "^16.8.5", "redux": "^4.0.5", "rendition": "^16.1.1", - "request": "^2.81.0", "resin-corvus": "^2.0.5", "semver": "^7.3.2", "simple-progress-webpack-plugin": "^1.1.2", From 3218fc2c8352ebf710c87ae4fb086cc9e576b6db Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 16 Jul 2020 13:04:35 +0200 Subject: [PATCH 07/11] Split main process and child-writer js files Changelog-entry: Split main process and child-writer js files Change-type: patch --- lib/gui/app/modules/image-writer.ts | 6 +++++- lib/start.ts | 30 ----------------------------- webpack.config.ts | 23 +++++++++++++++++++--- 3 files changed, 25 insertions(+), 34 deletions(-) delete mode 100644 lib/start.ts diff --git a/lib/gui/app/modules/image-writer.ts b/lib/gui/app/modules/image-writer.ts index 358f7b46..99e31318 100644 --- a/lib/gui/app/modules/image-writer.ts +++ b/lib/gui/app/modules/image-writer.ts @@ -93,7 +93,11 @@ function terminateServer() { } function writerArgv(): string[] { - let entryPoint = electron.remote.app.getAppPath(); + let entryPoint = path.join( + electron.remote.app.getAppPath(), + 'generated', + 'child-writer.js', + ); // AppImages run over FUSE, so the files inside the mount point // can only be accessed by the user that mounted the AppImage. // This means we can't re-spawn Etcher as root from the same diff --git a/lib/start.ts b/lib/start.ts deleted file mode 100644 index d377d5c4..00000000 --- a/lib/start.ts +++ /dev/null @@ -1,30 +0,0 @@ -/* - * Copyright 2016 balena.io - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * 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. - */ - -// See http://electron.atom.io/docs/v0.37.7/api/environment-variables/#electronrunasnode -// -// Notice that if running electron with `ELECTRON_RUN_AS_NODE`, the binary -// *won't* attempt to load the `app.asar` application by default, therefore -// if passing `ELECTRON_RUN_AS_NODE`, you have to pass the path to the asar -// or the entry point file (this file) manually as an argument. - -import { env } from 'process'; - -if (env.ELECTRON_RUN_AS_NODE) { - import('./gui/modules/child-writer'); -} else { - import('./gui/etcher'); -} diff --git a/webpack.config.ts b/webpack.config.ts index eac976a1..2d1bed3d 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -288,15 +288,32 @@ const guiConfig = { ], }; -const etcherConfig = { +const mainConfig = { ...commonConfig, target: 'electron-main', node: { __dirname: false, __filename: true, }, +}; + +const etcherConfig = { + ...mainConfig, entry: { - etcher: path.join(__dirname, 'lib', 'start.ts'), + etcher: path.join(__dirname, 'lib', 'gui', 'etcher.ts'), + }, +}; + +const childWriterConfig = { + ...mainConfig, + entry: { + 'child-writer': path.join( + __dirname, + 'lib', + 'gui', + 'modules', + 'child-writer.ts', + ), }, }; @@ -337,4 +354,4 @@ const cssConfig = { }, }; -module.exports = [cssConfig, guiConfig, etcherConfig]; +module.exports = [cssConfig, guiConfig, etcherConfig, childWriterConfig]; From 963fc574c3569127da7cfce75642e50d5b226c3e Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 16 Jul 2020 13:05:53 +0200 Subject: [PATCH 08/11] Centralize imports in child-writer Changelog-entry: Centralize imports in child-writer Change-type: patch --- lib/gui/modules/child-writer.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/lib/gui/modules/child-writer.ts b/lib/gui/modules/child-writer.ts index 7b14bf3b..e7e3e78e 100644 --- a/lib/gui/modules/child-writer.ts +++ b/lib/gui/modules/child-writer.ts @@ -21,7 +21,6 @@ import { cleanupTmpFiles } from 'etcher-sdk/build/tmp'; import * as _ from 'lodash'; import * as ipc from 'node-ipc'; -import { File, Http } from 'etcher-sdk/build/source-destination'; import { toJSON } from '../../shared/errors'; import { GENERAL_ERROR, SUCCESS } from '../../shared/exit-codes'; import { SourceOptions } from '../app/components/source-selector/source-selector'; @@ -241,12 +240,15 @@ ipc.connectTo(IPC_SERVER_ID, () => { }); const { SourceType } = options; let source; - if (SourceType === File.name) { - source = new File({ + if (SourceType === sdk.sourceDestination.File.name) { + source = new sdk.sourceDestination.File({ path: options.imagePath, }); } else { - source = new Http({ url: options.imagePath, avoidRandomAccess: true }); + source = new sdk.sourceDestination.Http({ + url: options.imagePath, + avoidRandomAccess: true, + }); } try { const results = await writeAndValidate({ From 512785e0a96c5c24792a034fbb2b56c2c67926ab Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 16 Jul 2020 14:56:32 +0200 Subject: [PATCH 09/11] Remove bluebird from main process, reduce lodash usage Changelog-entry: Remove bluebird from main process, reduce lodash usage Change-type: patch --- lib/gui/app/modules/analytics.ts | 7 +-- lib/gui/app/os/windows-network-drives.ts | 2 +- lib/gui/etcher.ts | 47 +++++++++--------- lib/gui/modules/child-writer.ts | 2 +- lib/shared/permissions.ts | 2 +- lib/shared/tmp.ts | 24 +++++++++ lib/shared/utils.ts | 62 +++--------------------- 7 files changed, 63 insertions(+), 83 deletions(-) create mode 100644 lib/shared/tmp.ts diff --git a/lib/gui/app/modules/analytics.ts b/lib/gui/app/modules/analytics.ts index f62f10ac..d63969a5 100644 --- a/lib/gui/app/modules/analytics.ts +++ b/lib/gui/app/modules/analytics.ts @@ -18,7 +18,7 @@ import * as _ from 'lodash'; import * as resinCorvus from 'resin-corvus/browser'; import * as packageJSON from '../../../../package.json'; -import { getConfig, hasProps } from '../../../shared/utils'; +import { getConfig } from '../../../shared/utils'; import * as settings from '../models/settings'; import { store } from '../models/store'; @@ -55,7 +55,8 @@ async function initConfig() { await installCorvus(); let validatedConfig = null; try { - const config = await getConfig(); + const configUrl = await settings.get('configUrl'); + const config = await getConfig(configUrl); const mixpanel = _.get(config, ['analytics', 'mixpanel'], {}); mixpanelSample = mixpanel.probability || DEFAULT_PROBABILITY; if (isClientEligible(mixpanelSample)) { @@ -88,7 +89,7 @@ function validateMixpanelConfig(config: { const mixpanelConfig = { api_host: 'https://api.mixpanel.com', }; - if (hasProps(config, ['HTTP_PROTOCOL', 'api_host'])) { + if (config.HTTP_PROTOCOL !== undefined && config.api_host !== undefined) { mixpanelConfig.api_host = `${config.HTTP_PROTOCOL}://${config.api_host}`; } return mixpanelConfig; diff --git a/lib/gui/app/os/windows-network-drives.ts b/lib/gui/app/os/windows-network-drives.ts index 1acba6a7..860e26e9 100755 --- a/lib/gui/app/os/windows-network-drives.ts +++ b/lib/gui/app/os/windows-network-drives.ts @@ -23,7 +23,7 @@ import { join } from 'path'; import { env } from 'process'; import { promisify } from 'util'; -import { tmpFileDisposer } from '../../../shared/utils'; +import { tmpFileDisposer } from '../../../shared/tmp'; const readFileAsync = promisify(readFile); diff --git a/lib/gui/etcher.ts b/lib/gui/etcher.ts index afb7842a..044e9f13 100644 --- a/lib/gui/etcher.ts +++ b/lib/gui/etcher.ts @@ -14,26 +14,24 @@ * limitations under the License. */ -import { delay } from 'bluebird'; import * as electron from 'electron'; import { autoUpdater } from 'electron-updater'; import { promises as fs } from 'fs'; import { platform } from 'os'; -import * as _ from 'lodash'; import * as path from 'path'; import * as semver from 'semver'; import { packageType, version } from '../../package.json'; import * as EXIT_CODES from '../shared/exit-codes'; -import { getConfig } from '../shared/utils'; +import { delay, getConfig } from '../shared/utils'; import * as settings from './app/models/settings'; -import * as analytics from './app/modules/analytics'; +import { logException } from './app/modules/analytics'; import { buildWindowMenu } from './menu'; const customProtocol = 'etcher'; const scheme = `${customProtocol}://`; const updatablePackageTypes = ['appimage', 'nsis', 'dmg']; -const packageUpdatable = _.includes(updatablePackageTypes, packageType); +const packageUpdatable = updatablePackageTypes.includes(packageType); let packageUpdated = false; async function checkForUpdates(interval: number) { @@ -51,7 +49,7 @@ async function checkForUpdates(interval: number) { packageUpdated = true; } } catch (err) { - analytics.logException(err); + logException(err); } } await delay(interval); @@ -114,6 +112,14 @@ electron.app.on('open-url', async (event, data) => { await selectImageURL(data); }); +interface AutoUpdaterConfig { + autoDownload?: boolean; + autoInstallOnAppQuit?: boolean; + allowPrerelease?: boolean; + fullChangelog?: boolean; + allowDowngrade?: boolean; +} + async function createMainWindow() { const fullscreen = Boolean(await settings.get('fullscreen')); const defaultWidth = 800; @@ -171,27 +177,24 @@ async function createMainWindow() { page.once('did-frame-finish-load', async () => { autoUpdater.on('error', (err) => { - analytics.logException(err); + logException(err); }); if (packageUpdatable) { try { - const onlineConfig = await getConfig(); - const autoUpdaterConfig = _.get( - onlineConfig, - ['autoUpdates', 'autoUpdaterConfig'], - { - autoDownload: false, - }, - ); - _.merge(autoUpdater, autoUpdaterConfig); - const checkForUpdatesTimer = _.get( - onlineConfig, - ['autoUpdates', 'checkForUpdatesTimer'], - 300000, - ); + const configUrl = await settings.get('configUrl'); + const onlineConfig = await getConfig(configUrl); + const autoUpdaterConfig: AutoUpdaterConfig = onlineConfig?.autoUpdates + ?.autoUpdaterConfig ?? { + autoDownload: false, + }; + for (const [key, value] of Object.entries(autoUpdaterConfig)) { + autoUpdater[key as keyof AutoUpdaterConfig] = value; + } + const checkForUpdatesTimer = + onlineConfig?.autoUpdates?.checkForUpdatesTimer ?? 300000; checkForUpdates(checkForUpdatesTimer); } catch (err) { - analytics.logException(err); + logException(err); } } }); diff --git a/lib/gui/modules/child-writer.ts b/lib/gui/modules/child-writer.ts index e7e3e78e..deeccfb2 100644 --- a/lib/gui/modules/child-writer.ts +++ b/lib/gui/modules/child-writer.ts @@ -14,7 +14,6 @@ * limitations under the License. */ -import { delay } from 'bluebird'; import { Drive as DrivelistDrive } from 'drivelist'; import * as sdk from 'etcher-sdk'; import { cleanupTmpFiles } from 'etcher-sdk/build/tmp'; @@ -23,6 +22,7 @@ import * as ipc from 'node-ipc'; import { toJSON } from '../../shared/errors'; import { GENERAL_ERROR, SUCCESS } from '../../shared/exit-codes'; +import { delay } from '../../shared/utils'; import { SourceOptions } from '../app/components/source-selector/source-selector'; ipc.config.id = process.env.IPC_CLIENT_ID as string; diff --git a/lib/shared/permissions.ts b/lib/shared/permissions.ts index 51580a35..b152c9d2 100755 --- a/lib/shared/permissions.ts +++ b/lib/shared/permissions.ts @@ -25,7 +25,7 @@ import { promisify } from 'util'; import { sudo as catalinaSudo } from './catalina-sudo/sudo'; import * as errors from './errors'; -import { tmpFileDisposer } from './utils'; +import { tmpFileDisposer } from './tmp'; const execAsync = promisify(childProcess.exec); const execFileAsync = promisify(childProcess.execFile); diff --git a/lib/shared/tmp.ts b/lib/shared/tmp.ts new file mode 100644 index 00000000..9187f4d9 --- /dev/null +++ b/lib/shared/tmp.ts @@ -0,0 +1,24 @@ +import * as Bluebird from 'bluebird'; +import * as tmp from 'tmp'; + +function tmpFileAsync( + options: tmp.FileOptions, +): Promise<{ path: string; cleanup: () => void }> { + return new Promise((resolve, reject) => { + tmp.file(options, (error, path, _fd, cleanup) => { + if (error) { + reject(error); + } else { + resolve({ path, cleanup }); + } + }); + }); +} + +export function tmpFileDisposer( + options: tmp.FileOptions, +): Bluebird.Disposer<{ path: string; cleanup: () => void }> { + return Bluebird.resolve(tmpFileAsync(options)).disposer(({ cleanup }) => { + cleanup(); + }); +} diff --git a/lib/shared/utils.ts b/lib/shared/utils.ts index 70abdabe..36c4c021 100755 --- a/lib/shared/utils.ts +++ b/lib/shared/utils.ts @@ -15,15 +15,12 @@ */ import axios from 'axios'; -import * as Bluebird from 'bluebird'; -import * as _ from 'lodash'; -import * as tmp from 'tmp'; +import { Dictionary } from 'lodash'; import * as errors from './errors'; -import * as settings from '../gui/app/models/settings'; export function isValidPercentage(percentage: any): boolean { - return _.every([_.isNumber(percentage), percentage >= 0, percentage <= 100]); + return typeof percentage === 'number' && percentage >= 0 && percentage <= 100; } export function percentageToFloat(percentage: any) { @@ -35,63 +32,18 @@ export function percentageToFloat(percentage: any) { return percentage / 100; } -/** - * @summary Check if obj has one or many specific props - */ -export function hasProps(obj: _.Dictionary, props: string[]): boolean { - return _.every(props, (prop) => { - return _.has(obj, prop); - }); -} - /** * @summary Get etcher configs stored online * @param {String} - url where config.json is stored */ -export async function getConfig(): Promise<_.Dictionary> { - const configUrl = - (await settings.get('configUrl')) || - 'https://balena.io/etcher/static/config.json'; +export async function getConfig(configUrl?: string): Promise> { + configUrl = configUrl ?? 'https://balena.io/etcher/static/config.json'; const response = await axios.get(configUrl, { responseType: 'json' }); return response.data; } -/** - * @summary returns { path: String, cleanup: Function } - * - * @example - * const {path, cleanup } = await tmpFileAsync() - * console.log(path) - * cleanup() - */ -function tmpFileAsync( - options: tmp.FileOptions, -): Promise<{ path: string; cleanup: () => void }> { - return new Promise((resolve, reject) => { - tmp.file(options, (error, path, _fd, cleanup) => { - if (error) { - reject(error); - } else { - resolve({ path, cleanup }); - } - }); - }); -} - -/** - * @summary Disposer for tmpFileAsync, calls cleanup() - * - * @returns {Disposer<{ path: String, cleanup: Function }>} - * - * @example - * await Bluebird.using(tmpFileDisposer(), ({ path }) => { - * console.log(path); - * }) - */ -export function tmpFileDisposer( - options: tmp.FileOptions, -): Bluebird.Disposer<{ path: string; cleanup: () => void }> { - return Bluebird.resolve(tmpFileAsync(options)).disposer(({ cleanup }) => { - cleanup(); +export async function delay(duration: number): Promise { + await new Promise((resolve) => { + setTimeout(resolve, duration); }); } From 44c74f33d933141b5dde1929fb3f421347d2a32e Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Thu, 16 Jul 2020 18:49:34 +0200 Subject: [PATCH 10/11] Electron 9.1.1 Changelog-entry: Electron 9.1.1 Change-type: patch --- npm-shrinkwrap.json | 12 ++++++------ package.json | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index 5674d953..d52469a4 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -7311,9 +7311,9 @@ } }, "electron": { - "version": "9.0.5", - "resolved": "https://registry.npmjs.org/electron/-/electron-9.0.5.tgz", - "integrity": "sha512-bnL9H48LuQ250DML8xUscsKiuSu+xv5umXbpBXYJ0BfvYVmFfNbG3jCfhrsH7aP6UcQKVxOG1R/oQExd0EFneQ==", + "version": "9.1.1", + "resolved": "https://registry.npmjs.org/electron/-/electron-9.1.1.tgz", + "integrity": "sha512-BYvroBLV9x7G4iN33P/IxeZqwjl62/9VuBAF1CoM0m6OeheaiLog1ZMKLlCqVXycJvvrAvLHc454DDEmwnqqhA==", "dev": true, "requires": { "@electron/get": "^1.0.1", @@ -12336,9 +12336,9 @@ } }, "node-abi": { - "version": "2.17.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.17.0.tgz", - "integrity": "sha512-dFRAA0ACk/aBo0TIXQMEWMLUTyWYYT8OBYIzLmEUrQTElGRjxDCvyBZIsDL0QA7QCaj9PrawhOmTEdsuLY4uOQ==", + "version": "2.18.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-2.18.0.tgz", + "integrity": "sha512-yi05ZoiuNNEbyT/xXfSySZE+yVnQW6fxPZuFbLyS1s6b5Kw3HzV2PHOM4XR+nsjzkHxByK+2Wg+yCQbe35l8dw==", "dev": true, "requires": { "semver": "^5.4.1" diff --git a/package.json b/package.json index 6a7c4c0d..48d33688 100644 --- a/package.json +++ b/package.json @@ -70,7 +70,7 @@ "css-loader": "^3.5.3", "d3": "^4.13.0", "debug": "^4.2.0", - "electron": "9.0.5", + "electron": "9.1.1", "electron-builder": "^22.7.0", "electron-mocha": "^8.2.0", "electron-notarize": "^1.0.0", From 3f59d35fb6c5f9215715ccbc44b7443dd73e58c9 Mon Sep 17 00:00:00 2001 From: Alexis Svinartchouk Date: Fri, 24 Jul 2020 17:57:16 +0200 Subject: [PATCH 11/11] Update etcher-sdk to ^4.1.19 Changelog-entry: Fix flashing truncated images, fix flashing large dmgs Change-type: patch --- npm-shrinkwrap.json | 139 ++++++++++++++------------------------------ package.json | 2 +- 2 files changed, 44 insertions(+), 97 deletions(-) diff --git a/npm-shrinkwrap.json b/npm-shrinkwrap.json index d52469a4..2dee4c4e 100644 --- a/npm-shrinkwrap.json +++ b/npm-shrinkwrap.json @@ -2753,6 +2753,18 @@ } } }, + "@balena/udif": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/@balena/udif/-/udif-1.0.4.tgz", + "integrity": "sha512-FeZ/kBFPxFKj5MesnUIdkZWSLBbjY/dK8yGMm5qwfKKFmYOcAU1IQ40ocrp6QZb3B6syjB7/ORrUhwwBMqbl0Q==", + "dev": true, + "requires": { + "apple-data-compression": "^0.4.1", + "apple-plist": "^0.3.0", + "cyclic-32": "^1.1.0", + "unbzip2-stream": "github:balena-io-modules/unbzip2-stream#4a54f56a25b58950f9e4277c56db2912d62242e7" + } + }, "@braintree/sanitize-url": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/@braintree/sanitize-url/-/sanitize-url-3.1.0.tgz", @@ -4284,6 +4296,15 @@ "bloodline": "^1.0.1" } }, + "apple-plist": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/apple-plist/-/apple-plist-0.3.0.tgz", + "integrity": "sha512-JG1KFeAlKsPz4Fk4Av8P3xg50C2oAOJ+qRVDE4aGTvzZublYjOeG5FlB1HNxNST7uf1R55zOQr0lKdffW6SsxQ==", + "dev": true, + "requires": { + "htmlparser2": "^4.0.0" + } + }, "aproba": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/aproba/-/aproba-1.2.0.tgz", @@ -8339,11 +8360,12 @@ "dev": true }, "etcher-sdk": { - "version": "4.1.18", - "resolved": "https://registry.npmjs.org/etcher-sdk/-/etcher-sdk-4.1.18.tgz", - "integrity": "sha512-j50QEtGv+3a3eEpKCEeSRUgPMenvox0otJ9COABMkwZ1wSpTOq84yxNAWokd5Ae789LrAem8GUP2PVoJUOxkbw==", + "version": "4.1.19", + "resolved": "https://registry.npmjs.org/etcher-sdk/-/etcher-sdk-4.1.19.tgz", + "integrity": "sha512-3O24ZDDZ7ykiF40Ygw/hJRZMTMiNDwCsylotrHOJFMu9khZPoj8MMhO9DIJDS1Muym4AAp0t8OtMWuqLN0N6XA==", "dev": true, "requires": { + "@balena/udif": "^1.0.3", "@ronomon/direct-io": "^3.0.1", "axios": "^0.19.2", "blockmap": "^4.0.1", @@ -8352,18 +8374,17 @@ "crc": "^3.8.0", "debug": "^3.1.0", "drivelist": "^9.0.0", - "file-disk": "^6.0.1", + "file-disk": "^7.0.1", "file-type": "^8.0.0", "lodash": "^4.17.10", "lzma-native": "^6.0.0", "mountutils": "^1.3.18", "node-raspberrypi-usbboot": "^0.2.4", "outdent": "^0.7.0", - "partitioninfo": "^5.3.5", - "resin-image-fs": "^5.0.8", + "partitioninfo": "^6.0.0", + "resin-image-fs": "^6.0.0", "rwmutex": "^1.0.0", "tslib": "^2.0.0", - "udif": "^0.17.0", "unbzip2-stream": "github:balena-io-modules/unbzip2-stream#4a54f56a25b58950f9e4277c56db2912d62242e7", "unzip-stream": "^0.3.0", "xxhash": "^0.3.0", @@ -8771,9 +8792,9 @@ } }, "file-disk": { - "version": "6.0.2", - "resolved": "https://registry.npmjs.org/file-disk/-/file-disk-6.0.2.tgz", - "integrity": "sha512-8RCeunLwMpEgM2sjiD8SEhmRWEong5YE5+n0wkQKFp++tfaTrSFdpAst9pl6Gc9NxUtUSyyDUOdXZt3yjkiTbg==", + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/file-disk/-/file-disk-7.0.1.tgz", + "integrity": "sha512-uTW9b0uLgu80+5K5FkefrrWHkk6klvF7oPRPC/yNnwkdqLeVY8af91bduU84o86RnZo5HJ2Cgg5HN10qGqld4A==", "dev": true, "requires": { "bluebird": "^3.7.2", @@ -9506,12 +9527,6 @@ "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", "dev": true }, - "graceful-readlink": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/graceful-readlink/-/graceful-readlink-1.0.1.tgz", - "integrity": "sha1-TK+tdrxi8C+gObL5Tpo906ORpyU=", - "dev": true - }, "grapheme-splitter": { "version": "1.0.4", "resolved": "https://registry.npmjs.org/grapheme-splitter/-/grapheme-splitter-1.0.4.tgz", @@ -13190,13 +13205,13 @@ "dev": true }, "partitioninfo": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/partitioninfo/-/partitioninfo-5.3.6.tgz", - "integrity": "sha512-Bz6RBOrxy1uBZTB+fTXw7gSRVaKXddwzhZEvRCZNo4MbXJSF18XlxgZhxu9bDGSb1zNBcvmbY1D4WkeRJQKf1g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/partitioninfo/-/partitioninfo-6.0.0.tgz", + "integrity": "sha512-HkblFEmbLIkTRZQwFxKKvpaluSgofogfj6cTztrbt6+j/h33kwX3YjemWZbN4syCATD+B8fX3YQtdY8fXy0Vaw==", "dev": true, "requires": { "bluebird": "^3.7.2", - "file-disk": "^6.0.2", + "file-disk": "^7.0.1", "gpt": "^2.0.4", "mbr": "^1.1.3", "tslib": "^2.0.0", @@ -13396,17 +13411,6 @@ "semver-compare": "^1.0.0" } }, - "plist": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/plist/-/plist-3.0.1.tgz", - "integrity": "sha512-GpgvHHocGRyQm74b6FWEZZVRroHKE1I0/BTjAmySaohK+cUn+hZpbqXkc3KWgW3gQYkqcQej35FohcT0FRlkRQ==", - "dev": true, - "requires": { - "base64-js": "^1.2.3", - "xmlbuilder": "^9.0.7", - "xmldom": "0.1.x" - } - }, "polished": { "version": "3.6.5", "resolved": "https://registry.npmjs.org/polished/-/polished-3.6.5.tgz", @@ -14282,17 +14286,17 @@ } }, "resin-image-fs": { - "version": "5.0.9", - "resolved": "https://registry.npmjs.org/resin-image-fs/-/resin-image-fs-5.0.9.tgz", - "integrity": "sha512-fBCJjF6GeqRveum3cJCBf9E0AtIA7qtVccXU6bmoyEEixA0AxWDqp/nJ5+PjIL26/bpaX95vo7Mscyr8Q1UNfQ==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/resin-image-fs/-/resin-image-fs-6.0.0.tgz", + "integrity": "sha512-Vh1wQvvujnqkoRNWfYah1C6ZY6fMKqQwdA11GEaw4BKpf3Vio3I2nCqLPiCV6QfmEvoBH6AVY1+GlAUeq6bY/A==", "dev": true, "requires": { "bluebird": "^3.5.1", "ext2fs": "^1.0.28", "fatfs": "^0.10.6", - "file-disk": "^6.0.0", + "file-disk": "^7.0.1", "lodash": "^4.17.5", - "partitioninfo": "^5.2.0", + "partitioninfo": "^6.0.0", "replacestream": "^4.0.0" } }, @@ -14581,26 +14585,6 @@ "strip-css-comments": "^3.0.0" } }, - "seek-bzip": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/seek-bzip/-/seek-bzip-1.0.5.tgz", - "integrity": "sha1-z+kXyz0nS8/6x5J1ivUxc+sfq9w=", - "dev": true, - "requires": { - "commander": "~2.8.1" - }, - "dependencies": { - "commander": { - "version": "2.8.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.8.1.tgz", - "integrity": "sha1-Br42f+v9oMMwqh4qBy09yXYkJdQ=", - "dev": true, - "requires": { - "graceful-readlink": ">= 1.0.0" - } - } - } - }, "semver": { "version": "7.3.2", "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", @@ -14734,9 +14718,9 @@ "dev": true }, "simple-concat": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.0.tgz", - "integrity": "sha1-c0TLuLbib7J9ZrL8hvn21Zl1IcY=", + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", "dev": true }, "simple-get": { @@ -16129,31 +16113,6 @@ "integrity": "sha512-+O8/qh/Qj8CgC6eYBVBykMrNtp5Gebn4dlGD/kKXVkJNDwyrAwSIqwz8CDf+tsAIWVycKcku6gIXJ0qwx/ZXaQ==", "dev": true }, - "udif": { - "version": "0.17.0", - "resolved": "https://registry.npmjs.org/udif/-/udif-0.17.0.tgz", - "integrity": "sha512-59bQzrlk/MjbEg3Sv+jrCGOc44V4whyXE2ZlI5O3GWMECUpnM4Wfb5CUc20AV2Plbw8Owq6SaBJRbkkK1DSMPw==", - "dev": true, - "requires": { - "apple-data-compression": "^0.4.0", - "plist": "^3.0.1", - "readable-stream": "^3.3.0", - "seek-bzip": "^1.0.5" - }, - "dependencies": { - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - } - } - }, "uglify-js": { "version": "3.10.0", "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.10.0.tgz", @@ -17611,18 +17570,6 @@ "sax": "^1.2.4" } }, - "xmlbuilder": { - "version": "9.0.7", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-9.0.7.tgz", - "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=", - "dev": true - }, - "xmldom": { - "version": "0.1.31", - "resolved": "https://registry.npmjs.org/xmldom/-/xmldom-0.1.31.tgz", - "integrity": "sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ==", - "dev": true - }, "xmlhttprequest": { "version": "1.8.0", "resolved": "https://registry.npmjs.org/xmlhttprequest/-/xmlhttprequest-1.8.0.tgz", diff --git a/package.json b/package.json index 48d33688..14fb3fd0 100644 --- a/package.json +++ b/package.json @@ -76,7 +76,7 @@ "electron-notarize": "^1.0.0", "electron-rebuild": "^1.11.0", "electron-updater": "^4.3.2", - "etcher-sdk": "^4.1.18", + "etcher-sdk": "^4.1.19", "file-loader": "^6.0.0", "husky": "^4.2.5", "immutable": "^3.8.1",