Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.3] - 2026-02-08 (@git-stunts/alfred)

### Fixed

- **Premature process exit**: `SystemClock.sleep()` no longer calls `timer.unref()`. The unref'd timer could become the sole event-loop handle during retry backoff or timeout races, causing Node.js to exit before the operation completed. Callers that need graceful shutdown should use `AbortSignal` instead.

## [0.10.2] - 2026-02-06 (@git-stunts/alfred)

### Changed
Expand Down Expand Up @@ -180,6 +186,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.3] - 2026-02-08 (@git-stunts/alfred-live)

### Changed

- Version bump to keep lockstep alignment with the Alfred package family (no API changes).

## [0.10.2] - 2026-02-06 (@git-stunts/alfred-live)

### Added
Expand Down
6 changes: 6 additions & 0 deletions alfred-live/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.3] - 2026-02-08

### Changed

- Version bump to keep lockstep alignment with the Alfred package family (no API changes).

## [0.10.2] - 2026-02-06

### Added
Expand Down
2 changes: 1 addition & 1 deletion alfred-live/jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@git-stunts/alfred-live",
"version": "0.10.2",
"version": "0.10.3",
"description": "In-memory control plane for Alfred: adaptive values, config registry, command router.",
"license": "Apache-2.0",
"exports": {
Expand Down
4 changes: 2 additions & 2 deletions alfred-live/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@git-stunts/alfred-live",
"version": "0.10.2",
"version": "0.10.3",
"description": "In-memory control plane for Alfred: adaptive values, config registry, command router.",
"type": "module",
"sideEffects": false,
Expand All @@ -16,7 +16,7 @@
"alfredctl": "./bin/alfredctl.js"
},
"dependencies": {
"@git-stunts/alfred": "0.10.2"
"@git-stunts/alfred": "0.10.3"
},
"engines": {
"node": ">=20.0.0"
Expand Down
6 changes: 6 additions & 0 deletions alfred/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.10.3] - 2026-02-08

### Fixed

- **Premature process exit**: `SystemClock.sleep()` no longer calls `timer.unref()`. The unref'd timer could become the sole event-loop handle during retry backoff or timeout races, causing Node.js to exit before the operation completed. Callers that need graceful shutdown should use `AbortSignal` instead.

## [0.10.2] - 2026-02-06

### Changed
Expand Down
2 changes: 1 addition & 1 deletion alfred/jsr.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@git-stunts/alfred",
"version": "0.10.2",
"version": "0.10.3",
"description": "Production-grade resilience patterns for async ops: retry/backoff+jitter, circuit breaker, bulkhead, timeout.",
"license": "Apache-2.0",
"exports": {
Expand Down
2 changes: 1 addition & 1 deletion alfred/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@git-stunts/alfred",
"version": "0.10.2",
"version": "0.10.3",
"description": "Production-grade resilience patterns for async ops: retry/backoff+jitter, circuit breaker, bulkhead, timeout.",
"type": "module",
"sideEffects": false,
Expand Down
1 change: 0 additions & 1 deletion alfred/src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,6 @@ export class Policy {

/**
* System clock using real time.
* Uses runtime-aware timer management for clean process exits.
*/
export class SystemClock {
/** Returns current time in milliseconds since Unix epoch. */
Expand Down
10 changes: 1 addition & 9 deletions alfred/src/utils/clock.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

/**
* System clock using real time.
* Uses runtime-aware timer management (unref) to allow clean process exits.
*/
export class SystemClock {
/**
Expand All @@ -22,19 +21,12 @@ export class SystemClock {

/**
* Sleeps for the specified duration.
* Timer is unref'd to prevent blocking process exit.
* @param {number} ms - Milliseconds to sleep
* @returns {Promise<void>}
*/
async sleep(ms) {
return new Promise((resolve) => {
const timer = setTimeout(resolve, ms);
if (typeof timer === 'object' && typeof timer.unref === 'function') {
timer.unref();
} else if (typeof Deno !== 'undefined' && typeof Deno.unrefTimer === 'function') {
// Deno returns a number ID
Deno.unrefTimer(timer);
}
setTimeout(resolve, ms);
});
}
}
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.