@sablier/devkit 1.8.1 → 1.9.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.
package/just/csv.just CHANGED
@@ -6,7 +6,7 @@ import "./settings.just"
6
6
 
7
7
  # Check CSV/TSV files using qsv: https://github.com/dathere/qsv
8
8
  [group("checks"), script("python3")]
9
- _csv-check globs="data/*/*.csv" ext="csv" schema="" ignore="*.csv.invalid|*.csv.valid|*validation-errors.csv":
9
+ _csv-check glob="data/*/*.{csv,tsv}" schema="" ignore="*.invalid *.valid *validation-errors.*":
10
10
  import fnmatch
11
11
  import glob as globmod
12
12
  import subprocess
@@ -18,19 +18,18 @@ _csv-check globs="data/*/*.csv" ext="csv" schema="" ignore="*.csv.invalid|*.csv.
18
18
  print("Install it: https://github.com/dathere/qsv")
19
19
  sys.exit(1)
20
20
 
21
- ext = "{{ ext }}" or "csv"
22
- ignore_patterns = "{{ ignore }}".split("|") if "{{ ignore }}" else []
21
+ ignore_patterns = "{{ ignore }}".split() if "{{ ignore }}" else []
23
22
  schema = "{{ schema }}" or None
24
- globs = "{{ globs }}"
23
+ globs = "{{ glob }}"
25
24
 
26
- print(f"Validating {ext} files...")
25
+ print(f"Validating CSV/TSV files...")
27
26
  files = globmod.glob(globs)
28
27
 
29
28
  # Filter ignored files
30
29
  files = [f for f in files if not any(fnmatch.fnmatch(f, p) for p in ignore_patterns)]
31
30
 
32
31
  if not files:
33
- print(f"ℹ️ No {ext} files found to validate")
32
+ print(f"ℹ️ No CSV/TSV files found to validate")
34
33
  sys.exit(0)
35
34
 
36
35
  for file in files:
@@ -40,14 +39,14 @@ _csv-check globs="data/*/*.csv" ext="csv" schema="" ignore="*.csv.invalid|*.csv.
40
39
  result = subprocess.run(cmd, capture_output=True)
41
40
  if result.returncode != 0:
42
41
  print(f"❌ Validation failed for: {file}")
43
- subprocess.run(["just", "_csv-show-errors", file, ext])
42
+ subprocess.run(["just", "_csv-show-errors", file])
44
43
  sys.exit(1)
45
44
 
46
- print(f"✅ All {ext} files are valid")
45
+ print(f"✅ All CSV/TSV files are valid")
47
46
 
48
47
  # Show validation errors for a CSV/TSV file
49
48
  [group("checks"), script("python3")]
50
- _csv-show-errors file ext="csv":
49
+ _csv-show-errors file:
51
50
  import os
52
51
  import subprocess
53
52
  import sys
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "description": "Configuration files and reusable scripts for Sablier repositories",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
- "version": "1.8.1",
6
+ "version": "1.9.0",
7
7
  "author": {
8
8
  "name": "Sablier Labs Ltd",
9
9
  "url": "https://sablier.com"
package/just/tsv.just DELETED
@@ -1,15 +0,0 @@
1
- import "./csv.just"
2
-
3
- # ---------------------------------------------------------------------------- #
4
- # TSV WRAPPERS #
5
- # ---------------------------------------------------------------------------- #
6
-
7
- # Check TSV files using qsv: https://github.com/dathere/qsv
8
- [group("checks")]
9
- _tsv-check globs="data/*/*.tsv" ext="TSV" schema="" ignore="*.tsv.invalid|*.tsv.valid|*validation-errors.tsv":
10
- @just _csv-check "{{ globs }}" "{{ ext }}" "{{ schema }}" "{{ ignore }}"
11
-
12
- # Show validation errors for a TSV file
13
- [group("checks")]
14
- _tsv-show-errors file:
15
- @just _csv-show-errors "{{ file }}" "TSV"