Skip to content

fix: correct README API examples, add tests, switch codecov to OIDC#3

Merged
kolkov merged 4 commits into
mainfrom
fix/readme-tests-codecov
Mar 3, 2026
Merged

fix: correct README API examples, add tests, switch codecov to OIDC#3
kolkov merged 4 commits into
mainfrom
fix/readme-tests-codecov

Conversation

@kolkov

@kolkov kolkov commented Mar 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix README: all code examples now use the actual API (New, Computed, Effect with explicit deps) instead of draft names (NewSignal, NewComputed, NewEffect with auto-tracking)
  • Add 11 tests: computed cleanup/panic, readonly subscribe, Update+EqualFunc, effect default panic handlers, internal type erasure (float32, byte, struct, Signal[any], invalid deps)
  • Switch Codecov to OIDC: tokenless auth via GitHub OIDC, no more CODECOV_TOKEN secret needed

Details

README fixes

What Before After
Constructor names NewSignal, NewComputed, NewEffect New, Computed, Effect
Dependency tracking "Automatic tracking" "Explicit dependencies"
Cleanup pattern WithCleanup() + effect.Cleanup() EffectWithCleanup(fn) + eff.Stop()
Stats 51 tests, 67.9% coverage 55 tests, 94.5% coverage, 28 benchmarks
Broken links 4 "coming soon" links to docs/guides/ Removed
ROADMAP link docs/dev/ROADMAP.md ROADMAP.md
Comparison table "Angular-Compatible" "Angular-Inspired"

New tests

File Tests added
computed_test.go Cleanup, Cleanup_Idempotent, SubscriberPanic, SubscriberPanicWithHandler
signal_test.go Readonly_Subscribe, Update_WithEqualFunc
effect_test.go CleanupPanic_DefaultHandler, PanicRecovery_DefaultHandler
internal_test.go (new) NonCommonTypes (float32/byte/struct), InvalidDependency (nil/int/string), AnyTypeSignal

CI change

Codecov upload switched from token: ${{ secrets.CODECOV_TOKEN }} to use_oidc: true with id-token: write permission.

Test plan

  • go test -v -cover ./... — 55 tests pass, 94.5% coverage
  • go vet ./... — clean
  • gofmt -l . — no output
  • CI passes on GitHub (tests + codecov OIDC upload)

- Fix all README code examples to match actual API (New, Computed, Effect)
- Remove broken 'coming soon' doc links
- Update stats: 55 tests, 94.5% coverage, 28 benchmarks
- Fix Angular compatibility table: explicit deps, correct function names
- Add 11 new tests covering computed cleanup, panic recovery, readonly,
  Update with EqualFunc, effect default panic handlers, internal type erasure
- Switch Codecov from token auth to OIDC (tokenless)
@codecov

codecov Bot commented Mar 3, 2026

Copy link
Copy Markdown

Welcome to Codecov 🎉

Once you merge this PR into your default branch, you're all set! Codecov will compare coverage reports and display results in all future pull requests.

ℹ️ You can also turn on project coverage checks and project coverage reporting on Pull Request comment

Thanks for integrating Codecov - We've got you covered ☂️

@kolkov kolkov merged commit c33e68d into main Mar 3, 2026
7 checks passed
@kolkov kolkov deleted the fix/readme-tests-codecov branch March 3, 2026 17:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant