diff options
| author | Christopher Warner <cwarner@kernelcode.com> | 2026-10-10 18:47:24 -0400 |
|---|---|---|
| committer | Christopher Warner <cwarner@kernelcode.com> | 2026-10-10 18:47:24 -0400 |
| commit | 5c61196f27b9342e5f25414c11df5710f956f406 (patch) | |
| tree | c81f15f54c9baa35f61ce3c71b81f1c1e7b5f590 /tests/conventional-commits.test.sh | |
| parent | 78862ba855c6e66cac64a86c25dca6149d8fb2fd (diff) | |
| download | iphone-notes-5c61196f27b9342e5f25414c11df5710f956f406.tar.gz iphone-notes-5c61196f27b9342e5f25414c11df5710f956f406.tar.bz2 iphone-notes-5c61196f27b9342e5f25414c11df5710f956f406.tar.xz iphone-notes-5c61196f27b9342e5f25414c11df5710f956f406.zip | |
feat!: rewrite icloud-note CLI in Rust with chromiumoxide
Replace the Node/Playwright driver with a single Rust binary so create/status
stay headless without a visible browser. Move the previous implementation to
legacy/nodejs for reference.
BREAKING CHANGE: the supported CLI is the Rust `icloud-note` binary; the
Node entrypoint is no longer installed by setup.sh.
Co-authored-by: Cursor <cursoragent@cursor.com>
Diffstat (limited to 'tests/conventional-commits.test.sh')
| -rwxr-xr-x | tests/conventional-commits.test.sh | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/tests/conventional-commits.test.sh b/tests/conventional-commits.test.sh index 042b819..12c1f46 100755 --- a/tests/conventional-commits.test.sh +++ b/tests/conventional-commits.test.sh @@ -8,7 +8,6 @@ cd "$ROOT" fail() { echo "FAIL: $*" >&2; exit 1; } pass() { echo "ok: $*"; } -# Same rule as scripts/lib/note-helpers.mjs isConventionalCommitSubject RE='^(feat|fix|docs|style|refactor|perf|test|build|ci|chore|revert)(\([a-zA-Z0-9._/-]+\))?!?: .+' mapfile -t SUBJECTS < <(git log --format=%s) @@ -25,18 +24,9 @@ for s in "${SUBJECTS[@]}"; do done [[ "$bad" -eq 0 ]] || fail "one or more commits are not Conventional Commits" -# Unit helper agrees with git history -node --input-type=module -e ' -import { isConventionalCommitSubject } from "./scripts/lib/note-helpers.mjs"; -import { execSync } from "node:child_process"; -const subjects = execSync("git log --format=%s", { encoding: "utf8" }) - .trim().split("\n").filter(Boolean); -for (const s of subjects) { - if (!isConventionalCommitSubject(s)) { - console.error("helper rejected:", s); - process.exit(1); - } -} -' +# Cross-check with Rust helper unit tests +out="$(cargo test -q --lib helpers::tests::conventional_subjects -- --exact 2>&1)" +echo "$out" +echo "$out" | rg -q '1 passed' || fail "Rust conventional_subjects test did not run/pass" echo "All conventional-commit checks passed." |
