remove `object-hash` and `lru_map` (#3271)

* refactor: replace `object-hash` with `crypto-es`

* chore: remove `lru_map`
10.9-maintenance
Tomas Chmelevskij 2023-01-25 16:02:46 +01:00 committed by GitHub
parent c14a056dae
commit 7c6f90bea5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 2 additions and 16 deletions

View File

@ -30,7 +30,6 @@ module.exports = {
ol: true,
wNumb: true,
ConfigStorage: true,
objectHash: true,
// start cordova bindings, remove after cordova is removed/replace/modularized
cordova_serial: true,
fileChooser: true,

View File

@ -67,12 +67,10 @@
"jquery-touchswipe": "^1.6.19",
"jquery-ui-npm": "^1.12.0",
"jsdom": "^21.0.0",
"lru_map": "^0.3.3",
"marked": "^4.1.1",
"multicast-dns": "^7.2.5",
"multiple-select": "^1.5.2",
"nw-vue-devtools-prebuilt": "^0.0.10",
"object-hash": "^3.0.0",
"select2": "^4.0.13",
"semver-min": "^0.7.2",
"short-unique-id": "^4.4.4",

View File

@ -22,6 +22,7 @@ import { updateTabList } from "./utils/updateTabList";
import { get as getConfig, set as setConfig } from "./ConfigStorage";
import { tracking } from "./Analytics";
import semver from 'semver';
import CryptoES from "crypto-es";
let mspHelper;
let connectionTimestamp;
@ -463,7 +464,7 @@ function processUid() {
MSP.send_message(MSPCodes.MSP_UID, false, false, function () {
const deviceIdentifier = FC.CONFIG.deviceIdentifier;
tracking.setFlightControllerData(tracking.DATA.MCU_ID, objectHash.sha1(deviceIdentifier));
tracking.setFlightControllerData(tracking.DATA.MCU_ID, CryptoES.SHA1(deviceIdentifier));
tracking.sendEvent(tracking.EVENT_CATEGORIES.FLIGHT_CONTROLLER, 'Connected');
connectionTimestamp = Date.now();
gui_log(i18n.getMessage('uniqueDeviceIdReceived', [deviceIdentifier]));

View File

@ -57,7 +57,6 @@
<script type="module" src="./js/utils/common.js"></script>
<!-- CORDOVA_INCLUDE js/cordova_chromeapi.js -->
<!-- CORDOVA_INCLUDE js/cordova_startup.js -->
<script type="text/javascript" src="./node_modules/lru_map/lru.js"></script>
<script type="text/javascript" src="./node_modules/jquery/dist/jquery.min.js"></script>
<script type="text/javascript" src="./node_modules/jquery-ui-npm/jquery-ui.min.js"></script>
<script type="text/javascript" src="./js/libraries/d3.min.js"></script>
@ -69,7 +68,6 @@
<script type="text/javascript" src="./node_modules/jquery-touchswipe/jquery.touchSwipe.min.js"></script>
<script type="text/javascript" src="./node_modules/select2/dist/js/select2.min.js"></script>
<script type="text/javascript" src="./node_modules/multiple-select/dist/multiple-select.min.js"></script>
<script type="text/javascript" src="./node_modules/object-hash/dist/object_hash.js"></script>
<script type="module" src="./js/main.js"></script>
<title></title>

View File

@ -10237,11 +10237,6 @@ lru-queue@^0.1.0:
dependencies:
es5-ext "~0.10.2"
lru_map@^0.3.3:
version "0.3.3"
resolved "https://registry.yarnpkg.com/lru_map/-/lru_map-0.3.3.tgz#b5c8351b9464cbd750335a79650a0ec0e56118dd"
integrity sha1-tcg1G5Rky9dQM1p5ZQoOwOVhGN0=
macos-alias@~0.2.5:
version "0.2.11"
resolved "https://registry.yarnpkg.com/macos-alias/-/macos-alias-0.2.11.tgz#feeea6c13ba119814a43fc43c470b31e59ef718a"
@ -11359,11 +11354,6 @@ object-copy@^0.1.0:
define-property "^0.2.5"
kind-of "^3.0.3"
object-hash@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/object-hash/-/object-hash-3.0.0.tgz#73f97f753e7baffc0e2cc9d6e079079744ac82e9"
integrity sha512-RSn9F68PjH9HqtltsSnqYC1XXoWe9Bju5+213R98cNGttag9q9yAOTzdbsqvIa7aNm5WffBZFpWYr2aWrklWAw==
object-inspect@^1.12.0:
version "1.12.0"
resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.0.tgz#6e2c120e868fd1fd18cb4f18c31741d0d6e776f0"