chore: adopt devkit baseline (CI, security, Claude rules) + fix 2 type errors - #10
Merged
Conversation
…e errors Implements the punch list from issue #8. == CI/CD (none previously) == - .github/workflows/ci.yml: fmt + lint + check (mod.ts) on PR/main pushes. Tests intentionally NOT in CI right now — 7 pre-existing test failures on main predate this PR (AssertionError in language_alternates_schema and markdown_metadata test files). Tracking separately to keep this PR scope-bounded. - .github/dependabot.yml: weekly github-actions + npm (docs-site) updates. NO publish.yml — hibana publishes to deno.land/x via webhook on tag push (not JSR). Per project memory, JSR is intentionally not used because Lume's dev resists JSR (no http imports support), and hibana follows Lume's hosting choice. == Security == - .github/workflows/security.yml: wrapper triggering local vendored workflow on push/PR/weekly cron/dispatch. - .github/workflows/secrets-and-sast-vendored.yml: 451-line copy of eSolia/devkit/.github/workflows/secrets-and-sast.yml@main as of 2026-04-29. Vendored because hibana is public + cross-org from eSolia/devkit (private) — GitHub blocks public consumers from calling private reusable workflows AND blocks cross-org private calls. Same vendored pattern as RickCogley/pub-cogley, RickCogley/tedasuke, eSolia/marquis. == Claude tooling == - .claude/rules/change-management.md: copy of devkit's shared rule. Also fixed .gitignore to allow tracking .claude/rules/ (was ignoring all of .claude/). == Type-error fixes (2 from main) == - processors/vento_heading_anchors.ts:120 and processors/vento_toc.ts:163 both had `Required<...Options>` annotations on options merging, but `containerSelector` is genuinely optional (undefined means "scan whole document"). Aligned the annotations to Pick out containerSelector as optional, matching the existing pattern in the corresponding `defaults` declarations. == Deno hygiene == - Drop misleading `name: "@rick/hibana"` from deno.json — JSR-style scope but hibana doesn't publish to JSR (verified: jsr.io 404 for this name). Field was confusing readers about the publish target. - Add `preflight` task: deno fmt && deno check mod.ts && deno lint. - Scope the `check` task to `deno check mod.ts` instead of `deno check **/*.ts` — the glob picked up docs-site/ Astro internals and root-level scripts and produced 11k+ unrelated errors. mod.ts is the public entry point and what JSR-style consumers care about. - Commit deno.lock for reproducibility (was untracked on main; both global and project .gitignore had been ignoring it). - .gitignore overrides for `!deno.lock` (global gitignore_global ignores) and `!.github/workflows/*secret*` (global pattern matches the vendored filename). == Out of scope (flagged for follow-up) == - Fix the 7 failing tests in language_alternates_schema and markdown_metadata. The user has confirmed they were not aware of these — likely surfaced by recent upgrades. Will be tracked in a separate issue. - Remove `no-explicit-any` lint exclusion and fix the ~18 `any` usages (real cleanup work, not baseline scope). - Move root-level scripts (release.ts, generate_readme.ts, generate_readme2.ts, update_lume_version.ts) into scripts/. - Investigate whether generate_readme2.ts is dead code. Closes #8 InfoSec: brings continuous SAST + secret scanning + SBOM coverage to a repo that previously had zero security automation. The 2 type errors fixed are correctness improvements (avoids potential undefined access on `options.containerSelector` later in the code, though the runtime checks at usage sites already guard).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements the punch list from #8. Closes #8.
Hibana publishes to deno.land/x (not JSR) — per project memory and the README, JSR is intentionally not used because Lume's dev resists JSR (no http imports support), and hibana follows Lume's hosting choice. So no
publish.ymlhere. The deno.land/x webhook handles publish on tag push.What's in this PR
CI / Security (none previously)
.github/workflows/ci.yml.github/workflows/security.yml.github/workflows/secrets-and-sast-vendored.yml.github/dependabot.ymlClaude tooling
.claude/rules/change-management.md(copy from devkit shared-rules; adapted to mention deno.land/x publishing flow).gitignoreupdated to allow tracking.claude/rules/(was ignoring all of.claude/)Type-error fixes
Two pre-existing type errors fixed (both same root cause):
processors/vento_heading_anchors.ts:120processors/vento_toc.ts:163Both had
Required<...Options>annotations on options merging, butcontainerSelectoris genuinely optional (undefined means "scan whole document"). Aligned the annotations to Pick outcontainerSelectoras optional, matching the existing pattern in the correspondingdefaultsdeclarations.Deno hygiene
name: "@rick/hibana"fromdeno.json— JSR-style scope but hibana doesn't publish to JSR (verified: jsr.io 404). Field was misleading about the publish target.preflighttask.checktask todeno check mod.tsinstead ofdeno check **/*.ts— the glob picked updocs-site/Astro internals and root-level scripts and produced 11k+ unrelated errors. mod.ts is the public entry point.deno.lockfor reproducibility (was untracked; both global and project gitignore had been ignoring it)..gitignoreoverrides for!deno.lock(global ignores it) and!.github/workflows/*secret*(global pattern matches the vendored filename).Tests deliberately not in CI yet
CI is fmt + lint + check only —
deno testis not in the workflow because 7 tests fail onmainof v1.3.0 (pre-existing, not caused by this PR). All seven are in:preprocessors/__tests__/language_alternates_schema.test.ts(4 failing)preprocessors/__tests__/markdown_metadata.test.ts(3 failing)All fail with
AssertionError: Values are not equal— looks like value drift after recent upgrades.Tracked in #9 (with acceptance criteria including re-enabling
deno testinci.ymlonce they're fixed).Out of scope (flagged in commit message)
no-explicit-anylint exclusion + fix the ~18anyusagesrelease.ts,generate_readme*.ts,update_lume_version.ts) intoscripts/generate_readme2.tsis dead codeTest plan
deno fmt --checkpassesdeno lintpassesdeno check mod.tspasses (was failing with 2 errors on main; this PR fixes them)deno test --allow-read --unstable-temporal— 13 passed, 7 failing pre-existing (tracked in test: 7 pre-existing test failures in preprocessors (likely upgrade drift) #9)InfoSec: brings continuous SAST + secret scanning + SBOM coverage to a repo that previously had zero security automation. The 2 type-error fixes are correctness improvements (avoid undefined access on
options.containerSelectorlater in the code).