@adamhl8/configs 2.7.0 → 2.8.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/configs/justfile.base.just +23 -3
- package/dist/configs/lefthook.base.yaml +1 -0
- package/package.json +7 -4
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 adamhl8
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -2,18 +2,25 @@
|
|
|
2
2
|
set unstable
|
|
3
3
|
set allow-duplicate-recipes
|
|
4
4
|
|
|
5
|
+
print-command(cmd) := f"echo {{ quote(style("command", cmd)) }}"
|
|
5
6
|
# runs cmd if the condition command succeeds, echoing cmd only when it runs
|
|
6
|
-
run-when(cmd, condition) := f"if {{ condition }}; then
|
|
7
|
+
run-when(cmd, condition) := f"if {{ condition }}; then {{ print-command(cmd) }}; {{ cmd }}; fi"
|
|
8
|
+
|
|
9
|
+
in-ci := '[ -n "${CI:-}" ]'
|
|
10
|
+
not-in-ci := '[ -z "${CI:-}" ]'
|
|
11
|
+
|
|
12
|
+
# lists tracked and untracked files as NUL-separated paths, skipping gitignored ones
|
|
13
|
+
ls-files := 'git ls-files -z --cached --others --exclude-standard'
|
|
7
14
|
|
|
8
15
|
# run if not in CI, the repo has a root module, and the aws profile exists on this machine
|
|
9
|
-
tofu-run-condition :=
|
|
16
|
+
tofu-run-condition := not-in-ci + ' && ls *.tofu >/dev/null 2>&1 && aws configure list-profiles 2>/dev/null | grep -qx adamhl8'
|
|
10
17
|
|
|
11
18
|
# public recipes are thin wrappers over private _recipes so an override can still call the original
|
|
12
19
|
# e.g. `prepare: _prepare` + extra lines
|
|
13
20
|
|
|
14
21
|
prepare: _prepare
|
|
15
22
|
_prepare:
|
|
16
|
-
@{{ run-when("lefthook install",
|
|
23
|
+
@{{ run-when("lefthook install", not-in-ci) }}
|
|
17
24
|
bun adamhl8-gitignore
|
|
18
25
|
bun adamhl8-bunfig
|
|
19
26
|
bun oxfmt bunfig.toml
|
|
@@ -35,12 +42,25 @@ _lint:
|
|
|
35
42
|
bun markdown-toc -i --bullets '-' --maxdepth 3 ./README.md
|
|
36
43
|
bun oxlint --fix --fix-suggestions --fix-dangerously
|
|
37
44
|
bun oxfmt
|
|
45
|
+
|
|
46
|
+
@# format all justfiles, excluding ones that are gitignored
|
|
47
|
+
@{{ ls-files }} ':(glob)**/[Jj]ustfile' ':(glob)**/.justfile' ':(glob)**/*.just' | xargs -0 -r -n1 just --fmt --justfile
|
|
48
|
+
@{{ print-command("just --fmt") }}
|
|
49
|
+
|
|
50
|
+
@# format all tofu files, excluding ones that are gitignored
|
|
51
|
+
@{{ ls-files }} ':(glob)**/*.tf' ':(glob)**/*.tofu' ':(glob)**/*.tfvars' ':(glob)**/*.tftest.hcl' ':(glob)**/*.tofutest.hcl' | xargs -0 -r tofu fmt
|
|
52
|
+
@{{ print-command("tofu fmt") }}
|
|
53
|
+
|
|
38
54
|
bun knip-bun
|
|
55
|
+
@{{ run-when("actionlint", "[ -d .github/workflows ]") }}
|
|
39
56
|
@just test
|
|
40
57
|
|
|
41
58
|
build: _build
|
|
59
|
+
# lint fixes and formatting are applied in place, so in CI fail if the build changed or created any files
|
|
60
|
+
# --intent-to-add makes untracked files show up in the diff
|
|
42
61
|
_build: lint && tofu-check
|
|
43
62
|
@{{ run-when("bun tsdown", "[ -f tsdown.config.ts ]") }}
|
|
63
|
+
@{{ run-when("git add --intent-to-add --all && git diff --exit-code", in-ci) }}
|
|
44
64
|
|
|
45
65
|
test: _test
|
|
46
66
|
_test:
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@adamhl8/configs",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "My shared configs for TS projects",
|
|
5
5
|
"homepage": "https://github.com/adamhl8/configs",
|
|
6
6
|
"bugs": {
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"adamhl8-gitignore": "./dist/adamhl8-gitignore/index"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
|
-
"
|
|
24
|
+
"dist/"
|
|
25
25
|
],
|
|
26
26
|
"type": "module",
|
|
27
27
|
"imports": {
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
"@commitlint/config-conventional": "^21.2.3",
|
|
50
50
|
"@commitlint/types": "^21.2.3",
|
|
51
51
|
"arkenv": "^0.12.3",
|
|
52
|
-
"arktype": "^2.2.
|
|
52
|
+
"arktype": "^2.2.5",
|
|
53
53
|
"es-toolkit": "^1.52.0",
|
|
54
54
|
"ts-explicit-errors": "^4.1.3",
|
|
55
55
|
"type-fest": "^5.10.0"
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"oxlint-tsgolint": "^7.0.2003",
|
|
67
67
|
"publint": "^0.3.24",
|
|
68
68
|
"release-it": "^21.1.0",
|
|
69
|
-
"release-it-git-cliff": "^0.
|
|
69
|
+
"release-it-git-cliff": "^0.2.0",
|
|
70
70
|
"tsdown": "^0.23.0",
|
|
71
71
|
"typescript": "^7.0.2"
|
|
72
72
|
},
|
|
@@ -86,6 +86,9 @@
|
|
|
86
86
|
"typescript": "^7.0.0"
|
|
87
87
|
},
|
|
88
88
|
"peerDependenciesMeta": {
|
|
89
|
+
"@arethetypeswrong/core": {
|
|
90
|
+
"optional": true
|
|
91
|
+
},
|
|
89
92
|
"publint": {
|
|
90
93
|
"optional": true
|
|
91
94
|
},
|