Client API v4.4.36 — dependency updates, Utilities & allAction simplifications, CI/tooling changes
This release advances the client API to version 4.4.36 and consolidates a set of maintenance, API-surface, tooling, and internal logic changes completed across multiple commits. The work in this release is intended to: keep runtime and dev-tooling dependencies up to date, simplify path-building and action handling logic, formalize the "affected items" tuple in the TypeScript API, and streamline CI/publish workflows and linting rules. The release includes both behavioral alignments (API types and response handling) and internal refactors that reduce duplicated logic and special-case handling.
New in this release
- Package version updated to 4.4.36 (package.json normalized)
- Runtime dependency bumps for several @fjell packages (core, http-api, logging, registry) across package.json and package-lock.json
- Type-level and runtime support for returning "affected items" as a tuple from action/allAction APIs
- Simplification and consolidation of Utilities path-building logic
- Removal of an Express-specific empty-object workaround from allAction and corresponding test updates
- CI/publish workflow simplified by removing a dedicated build job and decoupling publish steps
- Tooling and linting updates, including stricter test linting and esbuild version pinning
New Features
- Affected-items tuple in client API types and docs
- The client API now documents and types action and allAction results as tuples [primaryResult, affectedItems].
- Type updates applied to: src/ClientApi.ts, src/CItemAPI.ts, src/PItemAPI.ts and operation modules (src/ops/action.ts, src/ops/allAction.ts).
- Public documentation updated (docs/public/api-reference.md) to describe the tuple return shape with examples and guidance for processing the second element (affected items).
- Tests updated where mocks or expectations previously assumed single-value returns.
- Rationale: makes indirectly affected items explicit in the API surface so callers can inspect both primary results and related/affected keys.
Improvements
-
Utilities path-building cleanup (src/Utilities.ts)
- Collapsed duplicated branches and removed shadowed variables in getPath/addPath flows.
- Unified matching/fallback behavior for selecting a pathName (singular/plural/case handling); when no exact match is found the first available pathName is chosen deterministically.
- Simplified recursion/nextBase construction and made id extraction consistent for primary vs location keys.
- Removed multiple debug/log branches and redundant early returns while preserving targeted logger calls for the chosen pathName/nextBase.
- Impact: same external behavior intent but with much clearer, maintainable implementation and fewer accidental code paths.
-
Simplify allAction operation surface and behavior (src/ops/allAction.ts)
- Removed special-case handling that converted an empty-object response ("{}") into [[], []] and removed the corresponding warning log.
- now relies on the server's response shape (destructures response directly into [items, affectedItems]).
- Tests updated to match the normalized upstream server behavior and to assert expected handling of tuple and edge-case responses.
- Rationale: upstream responses are normalized; server-side normalization allows removing client-side workaround and reduces code complexity.
-
Linting and test-related alignment
- Removed the test-level ESLint override for "no-undefined" in eslint.config.mjs and eliminated file-level "/* eslint-disable no-undefined */" comments in two test files (tests/http/HttpWrapper.test.ts and tests/ops/errorHandling.test.ts). Tests are now aligned with stricter linting rules.
- Simplified function signature for allAction factory where applicable, reducing unnecessary outer parameters to a simpler parameter list.
-
Package.json and package-lock.json normalization
- Multiple commits normalized whitespace and EOF in package.json and removed duplicated dependency lines.
- Runtime dependency updates performed mainly for @fjell/core, @fjell/http-api, @fjell/logging, and @fjell/registry to bring them to newer patch/patch-plus versions.
- package-lock.json entries updated so node_modules blocks reflect bumped resolved tarballs and integrity checks.
Bug fixes
- Fix variable shadowing and inconsistent id extraction in Utilities path-building code (see src/Utilities.ts). This reduces risk of subtle path construction bugs caused by shadowed variables.
- Removed fragile special-case response handling in allAction which could misrepresent server responses; tests cover the expected response patterns now.
- Resolved esbuild version mismatch in docs/build
- esbuild pinned to exact version 0.25.9 and npm overrides added where needed to force version consistency.
- CI steps updated to use npm ci to produce reproducible installs.
Refactoring
-
src/Utilities.ts refactor
- Significant cleanup that simplifies control flow and consolidates path selection and recursion logic. No intended change in API; behavior retained but implemented more clearly.
-
src/ops/allAction.ts refactor
- Removed previous workaround and simplified destructuring of server response into the expected tuple.
-
Minor API surface simplifications
- Simplified factory signatures for getAllActionOperation/allAction factory so outer parameter blocks are reduced where they were redundant.
Developer experience & tooling
-
CI / GitHub Actions changes
- .github/workflows/npm-publish.yml: the separate
buildjob was removed. Thepublish-npmjob was simplified and no longer depends on a dedicatedbuildjob. - The change decouples publishing from running a pre-flight build/test job in the workflow; consumers should note CI now runs a simpler publish job by default.
- .github/workflows/npm-publish.yml: the separate
-
Precommit script removed
- The package.json
precommitscript that ran clean/lint/build/test on precommit was deleted. Local developer flows that relied on that precommit hook should add or replace equivalent checks in their own tooling if desired.
- The package.json
-
ESLint/tooling updates
- Dev tooling entries added/updated: @eslint/eslintrc and @eslint/js ensured at newer versions; @fjell/eslint-config bumped.
- Tests updated to comply with stricter lint settings after removal of test-level exceptions.
-
esbuild pin and npm overrides
- esbuild pinned to 0.25.9 and npm overrides added to force a consistent esbuild across packages. This resolves previous CI/CD failures caused by version mismatches.
Documentation updates
- docs/public/api-reference.md updated to document the affected-items tuple return shape and examples for action/allAction.
- TypeScript types and signature changes propagated across relevant modules to match documented API shape.
- Tests updated in multiple places to reflect new typing and response-shape expectations.
Breaking changes / Migration notes
-
API surface: action/allAction return type now formally includes affected items as a second tuple element. Callers that previously assumed a single return value should update to handle [primaryResult, affectedItems] tuple. Files/types to review:
- src/ClientApi.ts, src/CItemAPI.ts, src/PItemAPI.ts
- src/ops/action.ts, src/ops/allAction.ts
- Any consumer code or tests that awaited a single value from action/allAction should be updated to destructure the tuple accordingly.
-
Response handling: client no longer rewrites or special-cases server responses that are empty objects ("{}"). If any server variants still emit non-tuple shapes, callers may now receive those shapes directly; servers should be normalized to return the documented tuple shape where appropriate.
-
CI behavior: publishing workflow no longer runs a dedicated build/test job prior to publish. If the prior publishing process depended on the
buildjob to run tests/builds, update CI or add checks elsewhere to restore that guard. -
Local hooks: removal of the
precommitscript means precommit checks previously enforced by the repo will not run by default. If those checks are required, add local/precommit tooling or a git hook provider to reinstate them.
Files and areas affected (high level)
- package.json — version bumped to 4.4.36; dependencies updated and formatting normalized; precommit script removed.
- package-lock.json — multiple node_modules blocks updated to reflect bumped patch versions and updated integrity/resolved fields.
- src/Utilities.ts — major internal simplification of path construction logic (getPath/addPath).
- src/ops/allAction.ts and src/ops/action.ts — signature/type and response handling changes; Express empty-object workaround removed.
- src/ClientApi.ts, src/CItemAPI.ts, src/PItemAPI.ts — TypeScript type updates to include affected-items tuples.
- docs/public/api-reference.md — documentation for affected-items tuple and examples.
- .github/workflows/npm-publish.yml — removed build job and simplified publish job.
- ESLint config and tests — test-level lint exceptions removed; tests updated accordingly.
- CI and build tooling — esbuild pinned to 0.25.9; npm ci enforced in GitHub Actions where relevant.
Recommended action for users and integrators
- Update any consumer code that depends on action/allAction return values to destructure or otherwise handle the [primaryResult, affectedItems] tuple.
- If CI previously relied on the removed
buildjob in the npm publish workflow to gate publishing, add equivalent checks to your pipeline or reintroduce a guarded workflow step if required. - If local workflows relied on the package precommit script, add a local hook or task runner to restore any desired precommit checks.
- Verify any server endpoints return the documented tuple shapes; the client will now consume server responses directly and no longer applies an empty-object workaround.
- If your build or docs pipeline previously failed due to esbuild mismatches, the pinned esbuild + npm overrides should mitigate those issues — ensure lockfiles and overrides are honored in CI.
If more detail is required for any specific change (for example, a walkthrough of how to update client call sites to the new tuple return shape, or the precise Utilities path-building logic before/after), point to the relevant file(s) noted above and a follow-up summary can be provided outlining exact code-level migration steps.