Skip to content

Commit

Permalink
Yarn 4 (#3772)
Browse files Browse the repository at this point in the history
* Update to yarn 4, and pin the version

* Use yarn to invoke prettier, as yarn 4 is not setting +x

* Fix a few peer dependency warnings
  • Loading branch information
dae authored Jan 26, 2025
1 parent 2ef46af commit 7884edf
Show file tree
Hide file tree
Showing 5 changed files with 7,307 additions and 4,671 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ node_modules
/extra
yarn-error.log
ts/.svelte-kit
.yarn
1 change: 1 addition & 0 deletions .yarnrc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nodeLinker: node-modules
3 changes: 2 additions & 1 deletion build/ninja_gen/src/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,10 +214,11 @@ pub struct Prettier {

impl BuildAction for Prettier {
fn command(&self) -> &str {
"$prettier --cache $mode $pattern"
"$yarn prettier --cache $mode $pattern"
}

fn files(&mut self, build: &mut impl build::FilesHandle) {
build.add_inputs("yarn", inputs![":yarn:bin"]);
build.add_inputs("prettier", inputs![":node_modules:prettier"]);
build.add_inputs("", &self.inputs);
build.add_variable("pattern", r#""**/*.svelte""#);
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@
"@types/jqueryui": "^1.12.13",
"@types/lodash-es": "^4.17.4",
"@types/marked": "^5.0.0",
"@types/node": "^16.10.2",
"@types/node": "^20",
"@typescript-eslint/eslint-plugin": "^5.60.1",
"@typescript-eslint/parser": "^5.60.1",
"caniuse-lite": "^1.0.30001431",
"cross-env": "^7.0.2",
"diff": "^5.0.0",
"dprint": "^0.47.2",
"esbuild": "^0.18.10",
"esbuild": "^0.19.10",
"esbuild-sass-plugin": "^2",
"esbuild-svelte": "^0.8.1",
"eslint": "^8.44.0",
Expand Down Expand Up @@ -89,5 +89,6 @@
"Chrome 77",
"iOS 14.5"
],
"type": "module"
"type": "module",
"packageManager": "[email protected]"
}
Loading

0 comments on commit 7884edf

Please sign in to comment.