@columenlabs/lumen-ship 0.1.157 → 0.1.159

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/README.md CHANGED
@@ -100,7 +100,7 @@ lumen-ship check kit-neutral [paths] # no name from LUMEN_FORBIDDEN_NAMES (def
100
100
  lumen-ship check suppressions # a useExhaustiveDependencies suppression needs a reason of 3+ words
101
101
  lumen-ship check settings-copy # a Settings section description is one plain line of 64 characters or less
102
102
  lumen-ship check magic-numbers # hard-coded px/rem class values may only go down
103
- lumen-ship check parts <folders> # the kit's part pages: hint-text, text-action, raw-overlay may only go down
103
+ lumen-ship check parts <folders> # the kit's part pages: hint-text, text-action, raw-overlay, settings-page may only go down
104
104
  ```
105
105
 
106
106
  Run each from a package folder in its `lint` script; run `parts` from the repo root with the app folders (`lumen-ship check parts apps/*/web/src`). `magic-numbers` reads the repo's `scripts/magic-numbers.baseline` (or `LUMEN_SHIP_BASELINE`): one `<folder> <count>` a line, lowered in the change that removes one. `parts` reads `scripts/parts.baseline` (or `LUMEN_SHIP_PARTS_BASELINE`): one `<folder> <rule> <count>` a line; `--write-baseline` writes today's counts on a first run. Each rule is explained, with what to write instead, at https://lumen.columenlabs.com/parts/README.md.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@columenlabs/lumen-ship",
3
- "version": "0.1.157",
3
+ "version": "0.1.159",
4
4
  "description": "Lumen's shipping kit: release notes, the What's new changelog and lint guards.",
5
5
  "license": "MIT",
6
6
  "type": "module",
@@ -7,6 +7,8 @@
7
7
  # hint-text a grey line under a field or title: <p className="... text-xs ... text-muted-foreground ...">
8
8
  # text-action a <Button> whose text is an action: an IconButton (or SaveButton) instead
9
9
  # raw-overlay an import of the kit's raw ui/sheet, ui/dialog, ui/select, ui/command or ui/combobox
10
+ # settings-page a route, link or nav item to a page of its own named settings: settings are sections
11
+ # of the one Settings dialog (LumenShell settings, opened at ?settings=<section>)
10
12
  set -euo pipefail
11
13
  write=0
12
14
  if [ "${1:-}" = "--write-baseline" ]; then
@@ -18,7 +20,7 @@ if [ $# -eq 0 ]; then
18
20
  exit 1
19
21
  fi
20
22
  baseline=${LUMEN_SHIP_PARTS_BASELINE:-$(git rev-parse --show-toplevel)/scripts/parts.baseline}
21
- rules="hint-text text-action raw-overlay"
23
+ rules="hint-text text-action raw-overlay settings-page"
22
24
 
23
25
  # Prints `file:line` for each break of one rule in one folder.
24
26
  hits() {
@@ -31,6 +33,8 @@ hits() {
31
33
  $re = qr/<p\s[^>]*className="(?=[^"]*\btext-xs\b)(?=[^"]*\btext-muted-foreground\b)[^"]*"/;
32
34
  } elsif ($rule eq "text-action") {
33
35
  $re = qr/<Button\b[^>]*>\s*(?:<[A-Z]\w*[^>]*\/>\s*)?(?:\{[^}]*\?\s*)?\x27?(?:Save|Run|Test|Send|Sync|Refresh|Copy|Edit|Delete|Remove|Retry|Reset)\b/;
36
+ } elsif ($rule eq "settings-page") {
37
+ $re = qr/\b(?:path|to|href)\s*[:=]\s*\{?\s*[\x27"`](?:[^\x27"`]*\/)?settings(?=[\/?#\x27"`])/i;
34
38
  } else {
35
39
  $re = qr/from\s+[\x27"]\@columenlabs\/lumen-ui\/ui\/(?:sheet|dialog|select|command|combobox)[\x27"]/;
36
40
  }