Skip to content

Location Key Ordering Validation and Dependency Hygiene v4.4.45

Choose a tag to compare

released this 16 Oct 05:45
· 37 commits to working since this release

This release centers on introducing robust location-key ordering validation, improving fail-fast behavior, and tightening dependency hygiene across Fjell packages. It also adds developer-focused documentation and expands tests to protect against regressions in path construction for nested resources. The work spans internal utilities, test suites, and lockfile/package metadata to provide deterministic installs and clearer diagnostics in edge cases.

New Features

  • Runtime validation for location-key ordering (validateLocationKeyOrder) added to Utilities and wired into path construction (getPath).

    • Enforces correct parent-to-child sequencing based on pathNames and key order.
    • Fail-fast behavior: misordered keys now throws a descriptive error showing the expected order and the received order.
    • Validation applies to both LocKey/ComKey inputs and multi-level containment scenarios.
    • Documentation scaffolding added: LOCATION_KEY_ORDERING.md and LOCATION_KEY_VALIDATION_UPDATE.md to explain rules, examples, and debugging tips.
  • Documentation additions for location-key ordering

    • LOCATION_KEY_ORDERING.md: Comprehensive guide covering correct order expectations, error messages, and real-world examples.
    • LOCATION_KEY_VALIDATION_UPDATE.md: Summary of the validation feature, design rationale, test coverage, and user impact.

Improvements

  • Path-building logic simplified and consolidated

    • Reworked internal flow to a single, predictable path construction path, removing duplicated branches and complex reorder logic.
    • clearer mapping from key order to pathNames, reducing maintenance burden and potential for regressions.
  • Expanded test coverage for location-key ordering

    • New integration tests for Location Key Ordering in Utilities, covering root-to-leaf hierarchies (2- and 3-levels), multiple key types, and containment paths.
    • Positive and negative scenarios added to ensure correct path generation and informative errors on misorders.
    • Tests extended to ComKey-like scenarios to verify ordering across depth and key types.
  • Developer experience and fail-fast feedback

    • Path construction now validates orders up-front, preventing malformed URLs from propagating.
    • Improved diagnostic messages guide users to the exact order expected by pathNames.
    • Updated tests and docs align with the new validation contract.
  • ESLint and tooling updates as part of dependency hygiene

    • Upgraded or aligned ESLint tooling configurations to match new patch-level ranges, contributing to a cleaner and more predictable development environment.

Bug Fixes / Stability

  • Lockfile and dependency hygiene improvements

    • Removed duplicate/invalid entries for @fjell/registry and related dependencies to restore a clean, deterministic lock state.
    • Aligned runtime dependencies across core, http-api, logging, and registry to consistent patch-series versions.
    • Updated package-lock.json entries to reflect canonical versions, updated tarballs, and verified integrity hashes to prevent install drift.
    • Normalized package.json formatting (trailing newline handling) to ensure consistent diffs and tooling behavior.
  • Path-building and ordering contract cleanup

    • Refactor in src/Utilities.ts reduces branching and ensures a deterministic, single-pass path assembly.
    • Tests updated to reflect simplified logic and the new fail-fast validation behavior.

Documentation Updates

  • Added LOCATION_KEY_ORDERING.md and LOCATION_KEY_VALIDATION_UPDATE.md to document the new ordering rules, validation approach, and debugging tips.
  • Updated test documentation to reflect new coverage for location-key ordering and path construction behavior.

Impact and Scope

  • Public API surface remains effectively the same from a typing perspective; the change primarily improves error handling, diagnostics, and internal determinism around path construction.
  • Users and integrators will see clearer error messages when providing incorrectly ordered location keys, and can rely on more deterministic URL generation for nested queries.
  • CI/CD and local development benefit from a cleaner lockfile and more stable dependency resolutions across Fjell packages.

Notes on Release Size and Context

This is a large release with broad changes across internal utilities, tests, and package metadata. The focus is on improving correctness and developer feedback for complex location-key hierarchies, while also ensuring lockfile determinism and consistency across related Fjell packages.