Skip to content

FjellHttpError and extensive dev workflow updates

Choose a tag to compare

released this 19 Oct 22:48
· 40 commits to working since this release

This release encompasses a wide range of changes spanning a new structured error handling mechanism for Fjell HTTP responses, substantial dependency bumps, and sweeping updates to the development workflow, tests, and CI/CD processes. The changes improve error visibility and debugging, standardize and simplify tooling, and align with updated linting and logging configurations. The release is organized to reflect the focus on developer experience, testing reliability, and streamlined publishing and docs workflows.

New Features

  • Introduced FjellHttpError to encapsulate server errors with rich, structured context
    • New FjellHttpError.ts including ErrorInfo type, FjellHttpError class, and helper utilities (isFjellHttpError, extractErrorInfo)
    • toJSON, getUserMessage, isRetryable, and getCode helpers for structured error payloads
    • Public API exports updated to expose FjellHttpError for downstream consumers
    • HTTP client updated to recognize structured Fjell errors and throw FjellHttpError
    • Removed obsolete internal error guard and legacy unwrap logic
    • Added test scaffolding for FjellHttpError and integration tests for http error flows

Improvements

  • Development tooling and test configuration
    • Major refactor of Vitest setup/config to simplify and modernize test wiring (setup.ts replacement, cleaner vitest.config.ts)
    • Removed test-specific ESLint overrides and test-focused disables to standardize linting across codebase
    • Removed precommit script; CI/Publish workflow simplified to rely on explicit validation steps elsewhere
    • Updated package.json and exports to reflect module changes, added type/module considerations, and ensured EOF/newline formatting consistency
  • Dependency bumps and lockfile hygiene
    • Bumped core dependencies and related @fjell/* packages (e.g., @fjell/logging, @fjell/eslint-config) across multiple iterations
    • Updated package-lock.json metadata to align with dependency bumps; no behavioral changes
    • Documentation and docs tooling updated to reflect new dependency ranges and simplified workflows
  • Documentation and docs tooling
    • Documentation workflow adjustments and explicit node script invocation for docs copy process
    • Minor doc package updates to keep docs publishing aligned with code changes

Bug Fixes / Resolved Issues

  • No user-facing behavioral changes beyond the structured error handling and improved error reporting introduced by FjellHttpError
  • Lockfile and dependency alignment fixes to ensure consistent installs across environments

Developer Experience

  • Release-related housekeeping improvements: consistent trailing newlines, EOF formatting, and clearer module exports
  • API surface adjustments to expose FjellHttpError and associated utilities for easier integration in consumer codebases
  • Cleaner test configuration for Vitest and ESLint, reducing test friction and potential lint/test conflicts

Testing Improvements

  • Added tests for FjellHttpError: constructor behavior, user message retrieval, retryability checks, code extraction, and JSON serialization
  • Added integration tests to validate both structured and legacy error flows in HTTP errors
  • Simplified test setup to reduce complexity and improve reliability of test runs

Configuration Changes

  • ESLint configuration: removal of test overrides and test-specific disables; encourages uniform linting rules across repository
  • Vitest configuration: streamlined setup and simplified coverage/config checks to focus on core test results
  • Docs and docs-copy flow updated to use explicit Node script invocation

Breaking Changes

  • ESLint/test configuration changes may require updates to local environments or CI configurations if overrides were previously relied upon
  • Public API changes to export FjellHttpError require downstream imports to reference the new error types; ensure downstream code uses the new structured error pattern

Notes for Users and Integrators

  • The new structured FjellHttpError enables richer error diagnostics from server responses and improves error handling ergonomics in client code
  • Dependency bumps may impact environments that pin exact versions; ensure lockfile is refreshed and CI pipelines rerun to pick up the new versions
  • The removal of the precommit script and test-specific lint overrides may require local adjustments in development workflows or CI scripts that previously relied on those hooks

Files and Areas Affected (high level)

  • src/errors/FjellHttpError.ts and related exports
  • HTTP client error handling paths and tests
  • Vitest and ESLint configuration files; related test scaffolding
  • package.json and package-lock.json for dependency bumps and formatting changes
  • docs-copy and docs tooling configuration