diff --git a/desktop/package.json b/desktop/package.json index be8910b65..75cf3d749 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -96,7 +96,7 @@ "jest-fetch-mock": "^3.0.3", "less": "^4.1.2", "patch-package": "^6.4.7", - "prettier": "^2.4.1", + "prettier": "^2.5.1", "pretty-format": "^27.4.2", "rimraf": "^3.0.2", "ts-jest": "^26.5.6", diff --git a/desktop/plugins/public/cpu/index.tsx b/desktop/plugins/public/cpu/index.tsx index ec553d7bc..40e0516d3 100644 --- a/desktop/plugins/public/cpu/index.tsx +++ b/desktop/plugins/public/cpu/index.tsx @@ -87,23 +87,25 @@ export function devicePlugin(client: PluginClient<{}, {}>) { displayCPUDetail: true, }); - const updateCoreFrequency: (core: number, type: string) => Promise = - async (core: number, type: string) => { - const output = await executeShell( - 'cat /sys/devices/system/cpu/cpu' + core + '/cpufreq/' + type, - ); - cpuState.update((draft) => { - const newFreq = isNormalInteger(output) ? parseInt(output, 10) : -1; - // update table only if frequency changed - if (draft.cpuFreq[core][type] != newFreq) { - draft.cpuFreq[core][type] = newFreq; - if (type == 'scaling_cur_freq' && draft.cpuFreq[core][type] < 0) { - // cannot find current freq means offline - draft.cpuFreq[core][type] = -2; - } + const updateCoreFrequency: ( + core: number, + type: string, + ) => Promise = async (core: number, type: string) => { + const output = await executeShell( + 'cat /sys/devices/system/cpu/cpu' + core + '/cpufreq/' + type, + ); + cpuState.update((draft) => { + const newFreq = isNormalInteger(output) ? parseInt(output, 10) : -1; + // update table only if frequency changed + if (draft.cpuFreq[core][type] != newFreq) { + draft.cpuFreq[core][type] = newFreq; + if (type == 'scaling_cur_freq' && draft.cpuFreq[core][type] < 0) { + // cannot find current freq means offline + draft.cpuFreq[core][type] = -2; } - }); - }; + } + }); + }; const updateAvailableFrequencies: (core: number) => Promise = async ( core: number, diff --git a/desktop/yarn.lock b/desktop/yarn.lock index a62f165c9..73d55425f 100644 --- a/desktop/yarn.lock +++ b/desktop/yarn.lock @@ -9587,10 +9587,10 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^2.4.1: - version "2.4.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.4.1.tgz#671e11c89c14a4cfc876ce564106c4a6726c9f5c" - integrity sha512-9fbDAXSBcc6Bs1mZrDYb3XKzDLm4EXXL9sC1LqKP5rZkT6KRr/rf9amVUcODVXgguK/isJz0d0hP72WeaKWsvA== +prettier@^2.5.1: + version "2.5.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" + integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== pretty-format@^26.0.0, pretty-format@^26.6.2: version "26.6.2"