Skip to content

Client API v4.4.35 — dependency bumps, path logic simplification, API tuple typing, and CI/workflow updates

Choose a tag to compare

released this 10 Oct 14:01
· 46 commits to working since this release

This release finalizes the 4.4.35 patch cycle and collects a set of coordinated maintenance, API-type, behavior-simplification, and CI/workflow changes. The primary themes are: normalizing version and package metadata, bumping Fjell runtime and tooling dependencies, simplifying path-building and action handling code, formalizing the "affected items" tuple in the client API types and docs, and adjusting CI/publish behavior and linting rules. The changes include code simplifications (Utilities, allAction), test and linting updates, locking/esbuild fixes for reproducible builds, and multiple coordinated package.json / package-lock.json updates to keep runtime and lockfile versions aligned.

New Features

  • Documented and typed "affected items" return shape across the client API
    • Public docs updated to describe action/allAction returning a tuple [primaryResult, affectedItems].
    • TypeScript types updated to reflect the second tuple element (LocKeyArray / PriKey / ComKey where applicable) in: src/ClientApi.ts, src/CItemAPI.ts, src/PItemAPI.ts.
    • Operation modules updated (src/ops/action.ts, src/ops/allAction.ts) to accept and return the extended tuple types.
    • Tests updated to match the new tuple semantics where unit tests previously expected single-value returns.
    • Rationale: surfaces items indirectly affected by an action in the client API and provides examples and guidance in the public API reference (docs/public/api-reference.md).

Improvements

  • Simplified and consolidated path-building logic in Utilities (src/Utilities.ts)

    • Removed duplicated and contradictory branches for PriKey vs LocKey handling.
    • Collapsed matching/fallback logic into a single deterministic flow that:
      • Determines current key and keyType once
      • Searches for matching pathName (handles singular/plural/case variants)
      • Falls back to the first available pathName when no match is found
      • Consistently builds nextBase using the appropriate id (primary or location key) and proceeds recursively
    • Eliminated variable shadowing and redundant early returns; preserved a targeted logging call that reports chosen pathName and nextBase.
    • Scope: behavior was preserved where only one localPathName is appended later; the change focuses on clarity and maintainability rather than API behavior changes.
  • allAction surface and behavior simplification (src/ops/allAction.ts)

    • Removed Express-specific empty-object workaround that converted {} or "{}" into [[], []]. The module now relies on the server to return the normalized tuple shape directly.
    • Simplified factory signature and response destructuring so code consumes [items, affectedItems] directly.
    • Tests for allAction updated to cover normal tuple responses and edge-case scenarios consistent with the new expectation.
    • Rationale: server responses were normalized upstream; the client no longer needs special-case handling.

Bug Fixes

  • Consistent package version entries and formatting

    • package.json version was normalized and finalized to "4.4.35" (removed development suffix), ensuring the published package metadata matches the intended release.
    • Multiple commits normalized EOF/newline and removed duplicate blank lines in package.json and package-lock.json to keep file formatting consistent.
  • Dependency and lockfile alignment

    • Updated runtime and lockfile entries for several @fjell packages to synchronized patch levels across package.json and package-lock.json. Notable bumps include:
      • @fjell/registry: ^4.4.40 -> ^4.4.41 (finalized in this release)
      • Updates to @fjell/core, @fjell/http-api, @fjell/logging were coordinated across previous bumps to maintain patch-level consistency in the lockfile.
    • package-lock.json entries were normalized: updated resolved tarball URLs and integrity checksums and removed duplicated dependency lines to keep installs deterministic.
  • Fix esbuild version conflicts in docs build and CI

    • esbuild pinned to exact version 0.25.9 where required; npm overrides were added to force a single esbuild version across packages.
    • GitHub Actions workflows updated to use npm ci for reproducible installs in CI.
    • Rationale: resolves esbuild version mismatch errors previously observed in docs/CI builds.

Improvements to CI, Publish Workflow, and Scripts

  • npm-publish workflow simplified

    • The separate build job was removed from .github/workflows/npm-publish.yml.
    • The publish-npm job was decoupled from the former build job by removing needs: build; publish now starts directly with checkout on ubuntu-latest.
    • Result: publish job no longer waits for a dedicated build/test/codecov job. (Note: CI behavior intentionally simplified in this release; consumers running publishing workflows should be aware the workflow no longer runs a separate build job by default.)
  • Removed precommit script from package.json

    • The precommit script that ran clean/lint/build/test on precommit was deleted. This reduces local precommit overhead but moves responsibility for those checks to CI or developer workflows.

Developer Experience & Testing

  • ESLint and test linting changes

    • Removed test-level ESLint override for "no-undefined" from eslint.config.mjs and removed file-level "/* eslint-disable no-undefined */" comments from several tests. Tests were adjusted to conform to stricter linting rules.
    • Added or ensured dev tooling entries: @eslint/eslintrc and @eslint/js in package.json (used to align with current eslint rules).
  • Tests updated to match API changes

    • Tests affected by the API tuple change and by removal of Express workaround were updated: tests/ops/allAction.test.ts, tests/AItemAPI.test.ts, tests/PItemAPI.test.ts, tests/http/HttpWrapper.test.ts, tests/ops/errorHandling.test.ts (lint adjustments).
    • New/adjusted unit tests ensure the client handles tuple-shaped responses and that utilities are invoked as expected.

Documentation

  • API reference updated for affected-items tuples
    • docs/public/api-reference.md updated to describe the new "Affected Items" feature and show examples for action and allAction return types.
    • Examples and guidance added for handling the second tuple element in client code.

Refactoring

  • allAction factory signature simplified
    • The outer factory signature was reduced to the necessary parameters; redundant outer parameter blocks were removed.
    • This reduces surface area and clarifies the expected invocation pattern for action factories.

Performance Enhancements

  • No direct performance micro-optimizations are expected from these changes; improvements are focused on correctness, determinism (lockfile), and maintainability.

Breaking Changes and Migration Notes

  • API return shape formalized to tuple: existing code that expected single-value returns from action/allAction must be updated to handle the [primaryResult, affectedItems] tuple. Tests and types in this release already reflect that change; please update any downstream callers accordingly.

  • Publish workflow and precommit behavior

    • The npm-publish workflow no longer includes a separate build job; if your process relied on the prior build job in GitHub Actions, update your workflow or reintroduce an explicit build step where needed.
    • The precommit script was removed from package.json. Developers who relied on precommit checks should run lint/test/build in their preferred way (local scripts, editor hooks, or CI).

Security

  • No specific security vulnerabilities are addressed by this release beyond dependency patch bumps included in the lockfile.

Files and Components Affected (high-level)

  • package.json — version set to 4.4.35; various @fjell dependency bumps and dev tooling entries adjusted; precommit script removed; formatting normalized.
  • package-lock.json — multiple entries updated to bump patch versions and normalize resolved/integrity data.
  • src/Utilities.ts — path-building logic simplified and consolidated.
  • src/ops/allAction.ts — response handling simplified; Express {} workaround removed; factory signature simplified.
  • src/ops/action.ts, src/ClientApi.ts, src/CItemAPI.ts, src/PItemAPI.ts — TypeScript types and signatures updated for affected-items tuple.
  • docs/public/api-reference.md — documented affected-items tuple and examples.
  • .github/workflows/npm-publish.yml — build job removed; publish job decoupled.
  • Tests under tests/ — updated to follow new API shapes and lint rules (including removal of test-specific no-undefined exceptions).

Notes and Rationale

  • The release focuses on consistency and maintainability: dependency patches and lockfile normalization reduce install surprises; type and doc changes make the "affected items" API explicit; simplifications in Utilities and allAction reduce duplicated code and edge-case handling that are no longer required by upstream behavior.

If you maintain code that calls action/allAction, audit call sites and adjust to destructure the returned tuple: const [result, affectedItems] = await api.action(...). For CI/publish automation, confirm any required build/test steps are present in workflows or CI consumers now that the dedicated build job was removed.

For more details, consult the changed files referenced above (package.json, package-lock.json, src/Utilities.ts, src/ops/*, docs/public/api-reference.md) and run the test suite to validate integration with local changes.