Changelog
Unreleased
Added
- AI kit.
llms.txt,llms-full.txt, and askills/folder (README,overview,reading,writing,recipes) for tool-assisted development. - Test suite. Vitest unit tests covering: object-form
set(deep merge), path-formset(dot-notation, intermediate object creation, numeric segments build arrays),get(existing paths, missing paths, default fallback, falsy values),list(returns live reference), and singleton sharing across importers. - CI. GitHub Actions workflow: Node 18/20/22 on Ubuntu, plus Node 20 on Windows.
vitest.config.tswith self-detecting sibling-alias: in the monorepo,@mongez/reinforcementsresolves to../reinforcements/srcfor live cross-package edits; in a standalone checkout, it falls back tonode_modulesso CI is hermetic.
Fixed (behavior)
config.set(string)with a single argument now throwsTypeErrorinstead of silently replacing the tree. Previously, shape detection wasarguments.length === 1, so callingconfig.set("api.url")flowed intomerge(data, "api.url")— and the underlying@mongez/reinforcementsmergereturns the latest non-plain-object source as-is, clobberingdatawith the string"api.url". Detection is nowtypeof key === "object" && key !== null && !Array.isArray(key); non-object single-arg calls raise a clear error directing callers to either pass an object (deep merge) or a(path, value)pair (path write). This is a behavioral break — calls that previously silently corrupted state now throw — but the prior behavior was always a bug; it’s a desirable break.
Documentation
- README rewrite. Marketing-style index with tagline, 30-second tour, API reference, examples, behavior notes, gotchas, related packages.
skills/folder for AI agents: per-feature reference cards plus cross-feature recipes.
Dependency bumps
@mongez/reinforcements: ^2.x.x→^3.1.0. Compatible API for the surfaces this package uses (get,set,merge). Themergearray strategy default is still"replace", matching prior behavior. See reinforcements v3 changelog for the full diff.
Notes
- Public API signatures unchanged.
config.set/config.get/config.listkeep their TypeScript signatures. The only behavioral change is the throw on invalid single-argsetcalls — see Fixed (behavior) above.