@sablier/devkit 1.0.0 → 1.1.2

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/just/base.just CHANGED
@@ -13,7 +13,7 @@ nlx := require("nlx")
13
13
  # CONSTANTS #
14
14
  # ---------------------------------------------------------------------------- #
15
15
 
16
- GLOBS_PRETTIER := "**/*.{md,mdx,yaml,yml}"
16
+ GLOBS_PRETTIER := "\"**/*.{md,mdx,yaml,yml}\""
17
17
 
18
18
  # ---------------------------------------------------------------------------- #
19
19
  # RECIPES #
@@ -21,14 +21,17 @@ GLOBS_PRETTIER := "**/*.{md,mdx,yaml,yml}"
21
21
 
22
22
  # Clean files
23
23
  [no-cd]
24
- clean +globs:
24
+ clean:
25
+ just _clean ".DS_Store"
26
+ [no-cd]
27
+ _clean +globs:
25
28
  nlx del-cli "{{ globs }}"
26
29
 
27
30
  # Clear node_modules recursively
28
- [confirm("Are you sure you want to delete all node_modules, including in subdirectories? y/n")]
31
+ [confirm("Are you sure you want to delete all node_modules, including in subdirectories? Y/n")]
29
32
  [no-cd]
30
- clean-modules:
31
- nlx del-cli "node_modules" "**/node_modules"
33
+ clean-modules +globs="node_modules **/node_modules":
34
+ nlx del-cli {{ globs }}
32
35
 
33
36
  # Install the Node.js dependencies; run with --frozen to install the dependencies with the frozen lockfile
34
37
  [no-cd]
@@ -41,34 +44,40 @@ tsc-build:
41
44
  na tsc -p tsconfig.build.json
42
45
 
43
46
  # ---------------------------------------------------------------------------- #
44
- # CHECK #
47
+ # CHECKs #
45
48
  # ---------------------------------------------------------------------------- #
46
49
 
47
50
  # Check code with Biome
48
51
  [group("checks")]
49
52
  [no-cd]
50
- biome-check paths=".":
51
- na biome check {{ paths }}
53
+ biome-check +globs=".":
54
+ na biome check {{ globs }}
52
55
  alias bc := biome-check
53
56
 
54
57
  # Fix code with Biome
58
+ # The `noUnusedImports` rule is disabled by default to allow unused imports during development
55
59
  [group("checks")]
56
60
  [no-cd]
57
- biome-write paths=".":
58
- na biome check --write {{ paths }}
59
- na biome lint --unsafe --write --only correctness/noUnusedImports {{ paths }}
61
+ biome-write +globs=".":
62
+ na biome check --write {{ globs }}
63
+ na biome lint --unsafe --write --only correctness/noUnusedImports {{ globs }}
60
64
  alias bw := biome-write
61
65
 
62
66
  # Run all code checks
63
67
  [group("checks")]
64
68
  [no-cd]
65
- full-check: biome-check prettier-check tsc-check
69
+ full-check:
70
+ just biome-check
71
+ just prettier-check
72
+ just tsc-check
66
73
  alias fc := full-check
67
74
 
68
75
  # Run all code fixes
69
76
  [group("checks")]
70
77
  [no-cd]
71
- full-write: biome-write prettier-write
78
+ full-write:
79
+ just biome-write
80
+ just prettier-write
72
81
  alias fw := full-write
73
82
 
74
83
  # Run knip checks
@@ -88,19 +97,19 @@ alias kw := knip-write
88
97
  # Check Prettier formatting
89
98
  [group("checks")]
90
99
  [no-cd]
91
- prettier-check globs=GLOBS_PRETTIER:
92
- na prettier --check --cache "{{ globs }}"
100
+ prettier-check +globs=GLOBS_PRETTIER:
101
+ na prettier --check --cache {{ globs }}
93
102
  alias pc := prettier-check
94
103
 
95
104
  # Format using Prettier
96
105
  [group("checks")]
97
106
  [no-cd]
98
- prettier-write globs=GLOBS_PRETTIER:
99
- na prettier --write --cache "{{ globs }}"
107
+ prettier-write +globs=GLOBS_PRETTIER:
108
+ na prettier --write --cache {{ globs }}
100
109
  alias pw := prettier-write
101
110
 
102
111
  # Type check with TypeScript
103
112
  [group("checks")]
104
113
  [no-cd]
105
- tsc-check:
106
- na tsc --noEmit
114
+ @tsc-check project="tsconfig.json":
115
+ na tsc --noEmit --project {{ project }}
package/just/evm.just CHANGED
@@ -48,16 +48,22 @@ clean globs=GLOBS_CLEAN:
48
48
  alias c := clean
49
49
 
50
50
  # Clear node_modules recursively
51
- [confirm("Are you sure you want to delete all node_modules, including in subdirectories? y/n")]
51
+ [confirm("Are you sure you want to delete all node_modules, including in subdirectories? Y/n")]
52
52
  clean-modules:
53
53
  just base::clean-modules
54
54
 
55
55
  # Run all code checks
56
- full-check: solhint-check fmt-check prettier-check
56
+ full-check:
57
+ just solhint-check
58
+ just fmt-check
59
+ just prettier-check
57
60
  alias fc := full-check
58
61
 
59
62
  # Run all code fixes
60
- full-write: solhint-write fmt-write prettier-write
63
+ full-write:
64
+ just solhint-write
65
+ just fmt-write
66
+ just prettier-write
61
67
  alias fw := full-write
62
68
 
63
69
  # Install the Node.js dependencies
package/just/tsv.just ADDED
@@ -0,0 +1,42 @@
1
+ import "./settings.just"
2
+
3
+ # ---------------------------------------------------------------------------- #
4
+ # SCRIPTS #
5
+ # ---------------------------------------------------------------------------- #
6
+
7
+ # Check TSV files using qsv: https://github.com/dathere/qsv
8
+ [group("checks")]
9
+ [script]
10
+ _tsv-check globs="data/*/*.tsv" schema="":
11
+ if ! command -v qsv >/dev/null 2>&1; then
12
+ echo "✗ qsv CLI not found"
13
+ echo "Install it: https://github.com/dathere/qsv"
14
+ exit 1
15
+ fi
16
+
17
+ echo "Validating TSV files..."
18
+ found=0
19
+ for file in {{ globs }}; do
20
+ # Skip validation artifact files
21
+ case "$file" in
22
+ *.tsv.invalid|*.tsv.valid|*validation-errors.tsv)
23
+ continue
24
+ ;;
25
+ esac
26
+
27
+ # Skip if no files match the pattern
28
+ [ -e "$file" ] || continue
29
+
30
+ found=$((found + 1))
31
+ if ! qsv validate "$file" {{ schema }} > /dev/null 2>&1; then
32
+ echo "❌ Validation failed for: $file"
33
+ echo "See $file.validation-errors.tsv for details"
34
+ exit 1
35
+ fi
36
+ done
37
+
38
+ if [ "$found" -eq 0 ]; then
39
+ echo "ℹ️ No TSV files found to validate"
40
+ else
41
+ echo "✅ All TSV files are valid"
42
+ fi
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@sablier/devkit",
3
3
  "description": "Configuration files and reusable scripts for Sablier repositories",
4
- "version": "1.0.0",
4
+ "version": "1.1.2",
5
5
  "author": {
6
6
  "name": "Sablier Labs Ltd",
7
7
  "url": "https://sablier.com"