Skip to content

Modernize dependencies, fix bugs, clean up tests, add CI#76

Merged
dkzlv merged 6 commits into
mainfrom
indent-2026-03-19-agents-md-and-refresh-plan
Mar 19, 2026
Merged

Modernize dependencies, fix bugs, clean up tests, add CI#76
dkzlv merged 6 commits into
mainfrom
indent-2026-03-19-agents-md-and-refresh-plan

Conversation

@dkzlv
Copy link
Copy Markdown
Member

@dkzlv dkzlv commented Mar 19, 2026

Summary

Dependencies & build

  • Update all dependencies to current versions: vite 5->6, vitest 1->3, react 18->19, nanostores 0.10->1.2, typescript 5.4->5.8, happy-dom 14->17, @testing-library/react 14->16, @rollup/plugin-replace 5->6, @nanostores/react 0.7->1.1, lefthook 1->2
  • Drop EOL Node 14/16 from the engines field (now >=20.0.0)
  • Add GitHub Actions CI -- full build+test suite on Node latest, plus a matrix job for Node 20 and 22

Bug fixes

  • Fix duplicate setKey bug in createMutatorStore -- the error handler called both safeKeySet("error", ...) and store.setKey("error", ...), bypassing the listener-count guard on unsubscribed stores
  • Fix React Native module resolution (Cannot find module '@nanostores/query/react-native' #67) -- add import and default conditions to ./react-native subpath export, add default fallback to main export

Test improvements

  • Remove all console.log debug logging from factory.ts -- these were stripped in production builds but flooded test output with hundreds of lines of noise
  • Rewrite advance() test helper to use vi.advanceTimersByTimeAsync() instead of the old hack (self-described as "I don't know what I'm doing") that manually flushed microtasks with repeated new Promise(r => r()) calls
  • Simplify test patterns -- removed dozens of redundant multi-advance flush sequences, removed empty placeholder test
  • Fix React 19 act() warning in the conditional render integration test

Documentation

  • Fix README typos: "Automaticallty" -> "Automatically", "createMutationStore" -> "createMutatorStore", "accept and argument" -> "accept an argument", extra double-spaces, outdated size claim
  • Document all store states (Document all store states #75) -- added tables for both fetcher and mutator stores covering every possible {loading, data, error} combination and key behaviors
  • Fix misleading usage example (Update docs: loading state is false on first render #69) -- noted that initial state before subscription is {loading: false}, updated all code examples to check data first and handle error explicitly
  • Add Agents.md documenting architecture, source structure, build system, and conventions
  • Add REFRESH_PLAN.md with prioritized improvement roadmap

Addresses

Test plan

  • All 55 tests pass locally (4 test files, 0 type errors)
  • Build succeeds (pnpm build)
  • Size-limit check passes (1.91 KB, under 1.92 KB budget)
  • CI workflow passes on GitHub Actions

Generated with Indent - session link

dkzlv and others added 2 commits March 19, 2026 09:27
Agents.md documents the architecture, source structure, build system, and conventions for AI-assisted development. REFRESH_PLAN.md outlines 13 prioritized improvements covering CI, dependency updates, bug fixes, module resolution, documentation, and feature requests.

Generated with [Indent](https://indent.com)
Co-Authored-By: Indent <noreply@indent.com>
- Update all dev dependencies: vite 5→6, vitest 1→3, react 18→19,
  nanostores 0.10→1.2, typescript 5.4→5.8, happy-dom 14→17, etc.
- Fix duplicate setKey call in createMutatorStore error handler
- Remove all console.log debug noise from factory.ts (was stripped in
  prod builds but polluted test output)
- Replace fragile advance() test helper with vi.advanceTimersByTimeAsync,
  remove redundant multi-flush patterns throughout tests
- Fix React 19 act() warning in integration tests
- Add GitHub Actions CI workflow (full test on latest + matrix for 20/22)
- Drop EOL Node 14/16 from engines field
- Add tsconfig.vitest-temp.json to .gitignore

Generated with [Indent](https://indent.com)
Co-Authored-By: Indent <noreply@indent.com>
@dkzlv dkzlv added the indent label Mar 19, 2026 — with indent
dkzlv and others added 4 commits March 19, 2026 09:44
Generated with [Indent](https://indent.com)
Co-Authored-By: Indent <noreply@indent.com>
- Fix typos: "Automaticallty" → "Automatically", "createMutationStore"
  → "createMutatorStore", "accept and argument" → "accept an argument",
  extra spaces, outdated size claim
- Fix React Native module resolution (#67): add `import` and `default`
  conditions to `./react-native` exports, add `default` to main export
- Document all store states (#75) with tables for fetcher and mutator
  stores covering every possible {loading, data, error} combination
- Fix misleading usage example (#69): note that initial state is
  {loading: false} before subscription, update examples to check data
  first and handle error explicitly

Generated with [Indent](https://indent.com)
Co-Authored-By: Indent <noreply@indent.com>
…, size-limit 12, @types/node 25

Generated with [Indent](https://indent.com)
Co-Authored-By: Indent <noreply@indent.com>
Generated with [Indent](https://indent.com)
Co-Authored-By: Indent <noreply@indent.com>
@dkzlv dkzlv merged commit 397da9a into main Mar 19, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant