mirror of
https://github.com/CringeStudios/element-desktop.git
synced 2025-01-18 15:34:59 +01:00
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>
This commit is contained in:
parent
29550847f9
commit
3bfe26a1f8
@ -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).
|
||||
|
@ -28,16 +28,12 @@ export default async function (hakEnv: HakEnv, moduleInfo: DependencyInfo): Prom
|
||||
|
||||
console.log("Running yarn install");
|
||||
await new Promise<void>((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<void>((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();
|
||||
});
|
||||
|
@ -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",
|
||||
|
@ -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) {
|
||||
|
@ -165,10 +165,13 @@ async function loadConfig(): Promise<void> {
|
||||
// Rip out all the homeserver options from the vector config
|
||||
global.vectorConfig = Object.keys(global.vectorConfig)
|
||||
.filter((k) => !homeserverProps.includes(<any>k))
|
||||
.reduce((obj, key) => {
|
||||
obj[key] = global.vectorConfig[key];
|
||||
return obj;
|
||||
}, {} as Omit<Partial<(typeof global)["vectorConfig"]>, keyof typeof homeserverProps>);
|
||||
.reduce(
|
||||
(obj, key) => {
|
||||
obj[key] = global.vectorConfig[key];
|
||||
return obj;
|
||||
},
|
||||
{} as Omit<Partial<(typeof global)["vectorConfig"]>, keyof typeof homeserverProps>,
|
||||
);
|
||||
}
|
||||
|
||||
global.vectorConfig = Object.assign(global.vectorConfig, localConfig);
|
||||
|
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user