From 3bfe26a1f860042e71868212d2a826af850530fc Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Tue, 2 Jan 2024 18:12:16 +0000 Subject: [PATCH] Update dependency prettier to v3 (#1405) Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Michael Telatynski <7t3chguy@gmail.com> --- .github/labels.yml | 62 ++++++++++++++++++------------------ docs/windows-requirements.md | 1 - hak/matrix-seshat/build.ts | 32 +++++++------------ package.json | 8 ++--- scripts/hak/hakEnv.ts | 5 ++- src/electron-main.ts | 11 ++++--- yarn.lock | 8 ++--- 7 files changed, 62 insertions(+), 65 deletions(-) diff --git a/.github/labels.yml b/.github/labels.yml index 52ec911..fa08e9f 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -1,31 +1,31 @@ -- name: "A-Install" - color: "72A447" -- name: "A-Seshat" - color: "8262BE" -- name: "A-Update" - color: "17BE67" -- name: "Story" - description: "A change to the product that generates user value on its own. Unit of delivery." - color: "0BAC47" -- name: "X-Breaking-Change" - color: "ff7979" -- name: "Z-Arch" - color: "D601BE" -- name: "Z-ARM" - color: "5DEC5B" -- name: "Z-Flatpak" - color: "0CA856" -- name: "Z-Linux" - color: "7B4A9C" -- name: "Z-macOS" - color: "500605" -- name: "Z-Official" - color: "1D2B20" -- name: "Z-Snap" - color: "29CD95" -- name: "Z-Suse" - color: "79D07B" -- name: "Z-Wayland" - color: "94C519" -- name: "Z-Windows" - color: "0632DE" +- name: "A-Install" + color: "72A447" +- name: "A-Seshat" + color: "8262BE" +- name: "A-Update" + color: "17BE67" +- name: "Story" + description: "A change to the product that generates user value on its own. Unit of delivery." + color: "0BAC47" +- name: "X-Breaking-Change" + color: "ff7979" +- name: "Z-Arch" + color: "D601BE" +- name: "Z-ARM" + color: "5DEC5B" +- name: "Z-Flatpak" + color: "0CA856" +- name: "Z-Linux" + color: "7B4A9C" +- name: "Z-macOS" + color: "500605" +- name: "Z-Official" + color: "1D2B20" +- name: "Z-Snap" + color: "29CD95" +- name: "Z-Suse" + color: "79D07B" +- name: "Z-Wayland" + color: "94C519" +- name: "Z-Windows" + color: "0632DE" diff --git a/docs/windows-requirements.md b/docs/windows-requirements.md index fc3bb13..9f67437 100644 --- a/docs/windows-requirements.md +++ b/docs/windows-requirements.md @@ -1,6 +1,5 @@ # Windows - ## Requirements to build native modules We rely on Github Actions `windows-latest` plus a few extra utilities as per [the workflow](https://github.com/vector-im/element-desktop/blob/develop/.github/workflows/build_windows.yaml). diff --git a/hak/matrix-seshat/build.ts b/hak/matrix-seshat/build.ts index cc38902..a2a8bbb 100644 --- a/hak/matrix-seshat/build.ts +++ b/hak/matrix-seshat/build.ts @@ -28,16 +28,12 @@ export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Prom console.log("Running yarn install"); await new Promise((resolve, reject) => { - const proc = childProcess.spawn( - "yarn" + (hakEnv.isWin() ? ".cmd" : ""), - ["install"], - { - cwd: moduleInfo.moduleBuildDir, - env, - shell: true, - stdio: "inherit", - }, - ); + const proc = childProcess.spawn("yarn" + (hakEnv.isWin() ? ".cmd" : ""), ["install"], { + cwd: moduleInfo.moduleBuildDir, + env, + shell: true, + stdio: "inherit", + }); proc.on("exit", (code) => { code ? reject(code) : resolve(); }); @@ -47,16 +43,12 @@ export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Prom console.log("Running yarn build"); await new Promise((resolve, reject) => { - const proc = childProcess.spawn( - "yarn" + (hakEnv.isWin() ? ".cmd" : ""), - ["run", buildTarget], - { - cwd: moduleInfo.moduleBuildDir, - env, - shell: true, - stdio: "inherit", - }, - ); + const proc = childProcess.spawn("yarn" + (hakEnv.isWin() ? ".cmd" : ""), ["run", buildTarget], { + cwd: moduleInfo.moduleBuildDir, + env, + shell: true, + stdio: "inherit", + }); proc.on("exit", (code) => { code ? reject(code) : resolve(); }); diff --git a/package.json b/package.json index ce79c08..82ccdfc 100644 --- a/package.json +++ b/package.json @@ -18,19 +18,19 @@ "scripts": { "i18n": "matrix-gen-i18n && yarn i18n:sort && yarn i18n:lint", "i18n:sort": "jq --sort-keys '.' src/i18n/strings/en_EN.json > src/i18n/strings/en_EN.json.tmp && mv src/i18n/strings/en_EN.json.tmp src/i18n/strings/en_EN.json", - "i18n:lint": "prettier --write src/i18n/strings/ --ignore-path /dev/null", + "i18n:lint": "prettier --log-level=silent --write src/i18n/strings/ --ignore-path /dev/null", "i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json", "mkdirs": "mkdirp packages deploys", "fetch": "yarn run mkdirs && ts-node scripts/fetch-package.ts", "asar-webapp": "asar p webapp webapp.asar", "start": "yarn run build:ts && yarn run build:res && electron .", "lint": "yarn lint:types && yarn lint:js && yarn lint:workflows", - "lint:js": "yarn lint:js:src && yarn lint:js:test && yarn lint:js:scripts && yarn lint:js:hak", + "lint:js": "yarn lint:js:src && yarn lint:js:test && yarn lint:js:scripts && yarn lint:js:hak && prettier --check .", "lint:js:src": "eslint --max-warnings 0 src", "lint:js:test": "eslint --max-warnings 0 --config .eslintrc-test.js test", "lint:js:scripts": "eslint --max-warnings 0 --config .eslintrc-scripts.js scripts", "lint:js:hak": "eslint --max-warnings 0 --config .eslintrc-hak.js hak", - "lint:js-fix": "yarn lint:js-fix:src &&yarn lint:js-fix:test && yarn lint:js-fix:scripts && yarn lint:js-fix:hak", + "lint:js-fix": "yarn lint:js-fix:src &&yarn lint:js-fix:test && yarn lint:js-fix:scripts && yarn lint:js-fix:hak && prettier --log-level=warn --write .", "lint:js-fix:src": "eslint --fix --max-warnings 0 src", "lint:js-fix:test": "eslint --fix --max-warnings 0 --config .eslintrc-test.js test", "lint:js-fix:scripts": "eslint --fix --max-warnings 0 --config .eslintrc-scripts.js scripts", @@ -113,7 +113,7 @@ "node-pre-gyp": "^0.17.0", "pacote": "^17.0.0", "playwright": "1.37.1", - "prettier": "^2.8.1", + "prettier": "^3.0.0", "rimraf": "^5.0.0", "tar": "^6.1.2", "ts-jest": "^29.0.0", diff --git a/scripts/hak/hakEnv.ts b/scripts/hak/hakEnv.ts index 70c6708..724d419 100644 --- a/scripts/hak/hakEnv.ts +++ b/scripts/hak/hakEnv.ts @@ -41,7 +41,10 @@ export default class HakEnv { public runtimeVersion?: string; public dotHakDir: string; - public constructor(public readonly projectRoot: string, targetId: TargetId | null) { + public constructor( + public readonly projectRoot: string, + targetId: TargetId | null, + ) { const target = targetId ? TARGETS[targetId] : getHost(); if (!target) { diff --git a/src/electron-main.ts b/src/electron-main.ts index b5d13ac..3110934 100644 --- a/src/electron-main.ts +++ b/src/electron-main.ts @@ -165,10 +165,13 @@ async function loadConfig(): Promise { // Rip out all the homeserver options from the vector config global.vectorConfig = Object.keys(global.vectorConfig) .filter((k) => !homeserverProps.includes(k)) - .reduce((obj, key) => { - obj[key] = global.vectorConfig[key]; - return obj; - }, {} as Omit, keyof typeof homeserverProps>); + .reduce( + (obj, key) => { + obj[key] = global.vectorConfig[key]; + return obj; + }, + {} as Omit, keyof typeof homeserverProps>, + ); } global.vectorConfig = Object.assign(global.vectorConfig, localConfig); diff --git a/yarn.lock b/yarn.lock index 70bc2b5..1e5ed73 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6427,10 +6427,10 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@^2.8.1: - version "2.8.8" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-2.8.8.tgz#e8c5d7e98a4305ffe3de2e1fc4aca1a71c28b1da" - integrity sha512-tdN8qQGvNjw4CHbY+XXk0JgCXn9QiF21a55rBe5LJAU+kDyC4WQn4+awm2Xfk2lQMk5fKup9XgzTZtGkjBdP9Q== +prettier@^3.0.0: + version "3.1.1" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848" + integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== pretty-format@^29.0.0, pretty-format@^29.7.0: version "29.7.0"