@adamhl8/configs 0.34.0 → 0.35.0

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.
@@ -5,8 +5,8 @@ set allow-duplicate-recipes
5
5
 
6
6
  export PATH := justfile_directory() + "/node_modules/.bin:" + env("PATH")
7
7
 
8
- # runs cmd if the [ ] condition holds, echoing cmd only when it runs
9
- run-when(cmd, condition) := f"if [ {{condition}} ]; then echo {{style("command", cmd)}}; {{cmd}}; fi"
8
+ # runs cmd if the condition command succeeds, echoing cmd only when it runs
9
+ run-when(cmd, condition) := f"if {{condition}}; then echo {{style("command", cmd)}}; {{cmd}}; fi"
10
10
 
11
11
  # public recipes are thin wrappers over private _recipes so an override can still call the original
12
12
  # e.g. `prepare: _prepare` + extra lines
@@ -24,7 +24,8 @@ _bump-deps:
24
24
 
25
25
  tofu-check: _tofu-check
26
26
  _tofu-check:
27
- @{{ run-when("tofu plan -detailed-exitcode -concise -compact-warnings", '-z "${CI:-}"') }}
27
+ @# run if not in CI, the repo has a root module, and the aws profile exists on this machine
28
+ @{{ run-when("tofu plan -detailed-exitcode -concise -compact-warnings", '[ -z "${CI:-}" ] && ls *.tofu >/dev/null 2>&1 && aws configure list-profiles 2>/dev/null | grep -qx adamhl8') }}
28
29
 
29
30
  lint: _lint
30
31
  _lint:
@@ -32,11 +33,11 @@ _lint:
32
33
  oxlint --fix --fix-suggestions --fix-dangerously
33
34
  oxfmt
34
35
  knip
35
- @{{ run-when("just test", "-f vitest.config.ts") }}
36
+ @{{ run-when("just test", "[ -f vitest.config.ts ]") }}
36
37
 
37
38
  build: _build
38
39
  _build: lint && tofu-check
39
- @{{ run-when("tsdown", "-f tsdown.config.ts") }}
40
+ @{{ run-when("tsdown", "[ -f tsdown.config.ts ]") }}
40
41
 
41
42
  test: _test
42
43
  _test:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@adamhl8/configs",
3
- "version": "0.34.0",
3
+ "version": "0.35.0",
4
4
  "description": "My shared configs for TS projects",
5
5
  "homepage": "https://github.com/adamhl8/configs",
6
6
  "bugs": {