@@ -4,7 +4,7 @@ import { type FormatterKey, type LinterKey } from './map'
4
4
5
5
export type CommitLinter = 'commitlint' | 'commitlint_config_conventional'
6
6
7
- type PM = 'npm' | 'rustup' | 'cargo' | 'pipx ' | 'docker'
7
+ type PM = 'npm' | 'rustup' | 'cargo' | 'uv ' | 'docker'
8
8
9
9
type Setups = Record < PM , string [ ] >
10
10
@@ -17,6 +17,9 @@ type Tools = Record<
17
17
}
18
18
>
19
19
20
+ // NOTE:
21
+ // The `#!/bin/sh` in the install scripts for
22
+ // `cargo-binstall` and `uv` doesn't actually work.
20
23
export async function installer (
21
24
name : CommitLinter | FormatterKey | LinterKey ,
22
25
version : string ,
@@ -30,12 +33,12 @@ export async function installer(
30
33
`rustup toolchain install ${ version } --profile minimal` ,
31
34
`rustup default ${ version } ` ,
32
35
] ,
33
- // NOTE: `#!/bin/sh` not found.
34
36
cargo : [
35
37
'curl -fsSL https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | sh' ,
36
38
] ,
37
- // NOTE: Permission denied.
38
- pipx : [ 'sudo chown -R "$(whoami)" /opt/pipx/venvs/yamllint' ] ,
39
+ uv : [
40
+ 'curl -fsSL https://github.com/astral-sh/uv/releases/latest/download/uv-installer.sh | sh' ,
41
+ ] ,
39
42
docker : [ ] ,
40
43
}
41
44
@@ -91,13 +94,9 @@ export async function installer(
91
94
] ,
92
95
} ,
93
96
yamllint : {
94
- pm : 'pipx' ,
95
- setup : setups . pipx ,
96
- cmd : [
97
- 'install' ,
98
- '--force' ,
99
- version === 'latest' ? 'yamllint' : `yamllint==${ version } ` ,
100
- ] ,
97
+ pm : 'uv' ,
98
+ setup : setups . uv ,
99
+ cmd : [ 'tool' , 'install' , `yamllint@${ version } ` ] ,
101
100
} ,
102
101
actionlint : {
103
102
pm : 'docker' ,
0 commit comments