Repository navigation
CI: lint + test on ubuntu/windows (issue #6) - #12
Merged
Merged
Conversation
First dependency in the repo — dev-only, never shipped to end users (the installer/plugin runtime stays pure stdlib per ADR 0004/0005). Fixes the two lint errors it surfaced: missing Buffer/fetch globals in eslint.config.js, and a genuinely unused import in user-prompt-submit.test.js.
…ease/** (issue #6) Matrix ubuntu-latest + windows-latest, per ADR 0005. No live calls to Anthropic's usage endpoint (tests already mock fetch/fs). Triggers on pull_request (any base) and push to release/** only — never on pull_request:closed, which belongs entirely to #7's release-creation workflow.
…CI (issue #6) \`import.meta.url === \`file://\${process.argv[1]}\`\` never matches on Windows: process.argv[1] is a backslash path (D:\a\...), but import.meta.url is a properly-encoded file:// URL (file:///D:/a/.../hook.js). Every hook.js/bin/install.js entrypoint would have silently never run main() when actually invoked by Claude Code on Windows — caught live by feat/ci's first PR run (Windows job failed the installer's fresh-install seam with ENOENT, since bin/install.js never wrote settings.json). Fixed with pathToFileURL(process.argv[1]).href, which normalizes separators/encoding correctly on both platforms — the standard Node idiom for ESM main-module detection.
Owner
Author
|
Verification update: the workflow's first run on this PR (31291138849) went That's a stronger red→green proof than a deliberately-broken test would |
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.
Closes #6
Summary
.github/workflows/ci.yml— matrixubuntu-latest+windows-latest,triggers on
pull_request(any base) andpushtorelease/**. Neveron
pull_request: closed— that's Release automation: create version on release/* → main merge #7's release-creation workflow, nooverlap.
npm ci,npm run lint,npm test— both fail the build onerror.
eslintas the repo's first devDependency (dev-only, never shipped— the installer/plugin runtime is still pure stdlib per ADR 0004/0005).
Fixed the 2 real lint errors it found (missing globals in
eslint.config.js, one genuinely unused import in a test file).api.anthropic.com— already true, the existingsuite mocks
fetch/fsat the true boundary.Test plan
npm run lintandnpm testboth green locally.ticket's own TDD note — CI trigger behavior isn't unit-testable).
Will confirm the Actions run goes green on both OSes once opened, then
push one deliberately-broken commit to confirm it goes red, then
revert before merging.