Skip to content

chore: standardize CI/tooling to v2 canonical (stage 1) - #68

Merged
bhouston merged 2 commits into
mainfrom
chore/67-v2-standard-stage1
Sep 25, 2026
Merged

bhouston merged 2 commits into
mainfrom
chore/67-v2-standard-stage1

Conversation

@bhouston

Copy link
Copy Markdown
Owner

Closes #67

Summary

  • ci.yml/release.yml -> canonical, plus pr-policy.yml (drops the contribution job that lived inside ci.yml).
  • release.yml: no baseline-tag guard, no release job gate (canonical file already has environment: npm / persist-credentials: false / main-hasn't-advanced check).
  • ci.yml now packages the VS Code extension (pnpm --filter hdrify-vscode-extension run package, which builds + vsce package --no-dependencies), in addition to the existing dist/pack check, release:check, and size budget.
  • Removed the VSCE_PAT/OVSX_PAT fail-fast guard in scripts/release-vscode-extension.mjs.
  • .oxfmtrc.json canonicalized; the repo-specific submodule exclusion moved to a new .prettierignore (routeTree.gen.ts was already covered by canonical's **/*.gen.ts).
  • .oxlintrc.json canonicalized except unicorn/no-new-array, kept "off" for now: turning it on surfaces 10 pre-existing errors in pizHuffman.ts/b44Codec.test.ts; stage 3 will fix those and flip it to canonical's "error". no-explicit-any and no-unused-private-class-members are already clean and go straight to canonical.
  • engines.node: >=26 -> >=22 (root, packages/hdrify, packages/hdrify-react). Grepped for Node-26-only runtime APIs; found none, so no true floor above 22.
  • test script: pnpm vitest (watch mode) -> vitest run. Removed format:check and the check aggregate script (CI calls oxfmt --check directly).
  • CONTRIBUTING.md, commitlint.config.js, scripts/check-pr.mjs, .husky/* were already canonical on main.

Validation

  • pnpm install --frozen-lockfile
  • pnpm build, pnpm tsc, pnpm lint, pnpm exec oxfmt --check . all pass
  • pnpm test --coverage: 747 passed / 6 timed out locally on heavy EXR-decode tests under coverage instrumentation (pre-existing 30s timeout tuned for CI; unrelated to this diff — no test or source files touched). Watching PR CI (dedicated runners) to confirm.
  • node /path/to/standards/check-drift.mjs <repo>: clean except the intentionally-deferred unicorn/no-new-array exception noted above (stage 3 will close it).

- Replace ci.yml release job gate/baseline-tag guard with the canonical
  release.yml; add pr-policy.yml and drop the contribution job from ci.yml.
- Have ci.yml fully exercise the VS Code extension (build + vsce package).
- Remove the VSCE_PAT/OVSX_PAT fail-fast guard from
  scripts/release-vscode-extension.mjs (the release job already fails
  loudly if vsce/ovsx reject an empty token).
- Canonicalize .oxfmtrc.json (repo-specific submodule exclusion moves to
  .prettierignore; routeTree.gen.ts is already covered by **/*.gen.ts).
- Canonicalize .oxlintrc.json; keep unicorn/no-new-array off for now since
  turning it on produces 10 pre-existing errors (stage 3 will fix and flip
  it to canonical's "error").
- engines: >=26 -> >=22 (root + published packages hdrify/hdrify-react); no
  Node-26-only runtime API is used anywhere in the codebase.
- test script: pnpm vitest (watch mode) -> vitest run; drop format:check
  and the check aggregate script (CI calls oxfmt --check directly).

Closes #67
@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

release.test.mjs asserted that publish() throws a clear error when
VSCE_PAT/OVSX_PAT are unset -- that guard was removed from
release-vscode-extension.mjs in this same PR. Without it the test called
the real publish() with no PAT, which shelled out to a live `vsce publish`
against the Marketplace (failing on auth, not on the assertion). Drop the
test along with the now-unused publishExtension import.
@bhouston
bhouston merged commit c076a59 into main Sep 25, 2026
2 checks passed
@bhouston
bhouston deleted the chore/67-v2-standard-stage1 branch September 25, 2026 18:08
bhouston added a commit that referenced this pull request Sep 25, 2026
Closes #69

## Summary
- `typescript` was already `^7.0.2` on main (no-op for this PR).
- `vitest` / `@vitest/coverage-v8`: `^4.1.10` -> `^5.0.1`. No config API
changes or source changes were needed.

## Validation
- `pnpm build`, `pnpm tsc`, `pnpm lint`, `pnpm exec oxfmt --check .`
pass
- `pnpm release:check` passes (12/12)
- `pnpm size`: hdrify 42.15 kB / 50 kB, hdrify-react 17.19 kB / 22 kB
(unchanged)
- `pnpm test --coverage`: running locally (heavy EXR-decode suite;
watching PR CI on dedicated runners for the authoritative result, per
the same note as #68)
bhouston added a commit that referenced this pull request Sep 25, 2026
Closes #71

## Summary
Deferred from stage 1 (#68): `unicorn/no-new-array` was kept `"off"`
because turning it on surfaced 10 pre-existing errors in `pizHuffman.ts`
and `b44Codec.test.ts`.

- Replaced `new Array(n)` with `Array.from({ length: n })` at all 8 call
sites in `pizHuffman.ts` and 2 in `b44Codec.test.ts`.
- Added an explicit `Array.from<number>({ length: n })` type argument at
the two untyped call sites (`hufTableBuffer`, `freq` in `hufUncompress`)
— `new Array(n)` without an annotation inferred `any[]`, so removing it
surfaced real `tsc` errors (arithmetic on possibly-`unknown`/`null`
values) that needed the explicit type to keep compiling; behavior is
unchanged since every one of these arrays is fully populated by index
before being read elsewhere (the dense-vs-sparse difference between
`Array.from` and `new Array` doesn't matter for direct index access).
- `.oxlintrc.json`: flips `unicorn/no-new-array` to `"error"`, now
byte-identical to canonical alongside the other two tightened rules
(already enabled since stage 1).

## Validation
- `pnpm build`, `pnpm tsc`, `pnpm lint`, `pnpm exec oxfmt --check .`
pass
- `pnpm exec vitest run packages/hdrify/src/exr/b44Codec.test.ts` (the
touched test file): 8/8 pass
- `pnpm test --coverage` (full suite): running; watching PR CI on
dedicated runners for the authoritative result (local EXR-decode tests
intermittently time out on this machine under load, as noted in #68/#70)
- `node /path/to/standards/check-drift.mjs <repo>`: clean, no exceptions
remaining
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

chore: standardize CI/tooling to v2 canonical (stage 1)

2 participants