feat: add npm publish workflow with multi-platform binary distribution#4
Merged
feat: add npm publish workflow with multi-platform binary distribution#4
Conversation
- Add CI workflow for PR builds (typecheck + build + smoke test) - Add publish workflow for merging to main (auto version bump + publish) - Add bin/sentry Node.js launcher script for platform detection - Update build.ts to create npm package structure per platform - Add package.ts to create main @betegon/sentry package with optionalDependencies - Remove old fossilize-based build.yml The CLI is published as @betegon/sentry with platform-specific binaries: - sentry-darwin-arm64 - sentry-darwin-x64 - sentry-linux-arm64 - sentry-linux-x64 - sentry-windows-x64
4 tasks
BYK
added a commit
that referenced
this pull request
Mar 4, 2026
…parallelize cleanup Review Round 3 — 15 human review comments addressed: #1: login.ts — Replace await .catch() with proper try/await/catch blocks #2: whoami.ts + all commands — Export FRESH_ALIASES constant from list-command.ts to reduce boilerplate; update 15 command files to use it #3: response-cache.ts — Bump immutable TTL from 1hr to 24hr (events/traces never change once created) #4–6: response-cache.ts — Restructure URL_TIER_PATTERNS as Record<TtlTier, RegExp[]>, combine duplicate regex patterns into single alternations #7: response-cache.ts — Replace localeCompare with simple < comparison for ASCII URL query param sorting #8: response-cache.ts — Remove try-catch in normalizeUrl (URLs reaching the cache already came from a fetch, always valid) #9: response-cache.ts — Link immutableMinTimeToLive to FALLBACK_TTL_MS.immutable instead of hardcoded magic number #10: response-cache.ts — Use Object.fromEntries(headers.entries()) instead of manual forEach loop #11: response-cache.ts — Remove unnecessary await on fire-and-forget unlink in catch block #12: response-cache.ts — Add expiresAt field to CacheEntry for O(1) expiry checks during cleanup (no CachePolicy deserialization needed) #13–15: response-cache.ts — Parallelize cache I/O (collectEntryMetadata, deleteExpiredEntries, evictExcessEntries) using p-limit-style concurrency limiter (max 8 concurrent)
BYK
added a commit
that referenced
this pull request
Mar 4, 2026
…pans Review comments addressed: #1: issue/list.ts FRESH_ALIASES — verified no conflict, only log/list.ts has f: 'follow' and it doesn't use FRESH_ALIASES #2: cacheHeuristic 0.1 vs CLEANUP_PROBABILITY — different semantics, not shared (RFC heuristic vs probabilistic cleanup trigger) #3: Simplified parallel() — replaced custom wrapper with p-limit's built-in .map() method (cacheIO.map(items, fn)) at all 3 call sites #4: evictExcessEntries/deleteExpiredEntries — run both in parallel via Promise.all() since they operate on disjoint file sets #5: Added Sentry instrumentation — withCacheSpan() helper in telemetry.ts, cache.lookup and cache.store spans in response-cache.ts with URL attrs
BYK
added a commit
that referenced
this pull request
Mar 4, 2026
…pans Review comments addressed: #1: issue/list.ts FRESH_ALIASES — verified no conflict, only log/list.ts has f: 'follow' and it doesn't use FRESH_ALIASES #2: cacheHeuristic 0.1 vs CLEANUP_PROBABILITY — different semantics, not shared (RFC heuristic vs probabilistic cleanup trigger) #3: Simplified parallel() — replaced custom wrapper with p-limit's built-in .map() method (cacheIO.map(items, fn)) at all 3 call sites #4: evictExcessEntries/deleteExpiredEntries — run both in parallel via Promise.all() since they operate on disjoint file sets #5: Added Sentry instrumentation — withCacheSpan() helper in telemetry.ts, cache.lookup and cache.store spans in response-cache.ts with URL attrs
BYK
added a commit
that referenced
this pull request
Mar 4, 2026
…pans Review comments addressed: #1: issue/list.ts FRESH_ALIASES — verified no conflict, only log/list.ts has f: 'follow' and it doesn't use FRESH_ALIASES #2: cacheHeuristic 0.1 vs CLEANUP_PROBABILITY — different semantics, not shared (RFC heuristic vs probabilistic cleanup trigger) #3: Simplified parallel() — replaced custom wrapper with p-limit's built-in .map() method (cacheIO.map(items, fn)) at all 3 call sites #4: evictExcessEntries/deleteExpiredEntries — run both in parallel via Promise.all() since they operate on disjoint file sets #5: Added Sentry instrumentation — withCacheSpan() helper in telemetry.ts, cache.lookup and cache.store spans in response-cache.ts with URL attrs
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
How it works
On PR:
On merge to main:
Packages published
@betegon/sentrysentry-darwin-arm64sentry-darwin-x64sentry-linux-arm64sentry-linux-x64sentry-windows-x64Required secrets
Add these to GitHub repo settings → Secrets:
SENTRY_CLIENT_ID- OAuth client ID for authNPM_TOKEN- npm automation token for publishingUsage