Skip to content

Release v0.3.0-alpha#20

Merged
Ivanmw97 merged 5 commits intoreleasefrom
develop
Feb 20, 2026
Merged

Release v0.3.0-alpha#20
Ivanmw97 merged 5 commits intoreleasefrom
develop

Conversation

@Ivanmw97
Copy link
Copy Markdown
Collaborator

Summary

Full API parity alignment across Web (TypeScript), Android (Kotlin), and Flutter (Dart) for v0.3.0-alpha.0. This PR includes a formal API parity contract, breaking refactors to debounce and formatCurrency, structural cleanup, documentation improvements, expanded test coverage, and a version bump.

Type of Change

  • Bug fix
  • New feature
  • Dependency update
  • Documentation update
  • Refactor / code quality

Platforms Affected

  • Web (TypeScript)
  • Android (Kotlin)
  • Flutter (Dart)

Changes

API — debounce (breaking)

  • All platforms: returns a Debounced object with cancel() method
  • TypeScript: typed Debounced interface, renamed t → timer, v → value
  • Kotlin: action moved to first param, scope last (trailing lambda idiom), Debounced class with cancel()
  • Dart: Debounced class with typed call(T) and cancel(), removed debounceVoid (use debounce instead)

API — formatCurrency (breaking)

  • All platforms: default locale changed es-ES → en-US, accept BCP 47 strings
  • Kotlin: converts BCP 47 string to Locale internally — callers no longer pass Locale objects
  • Dart: normalizes en-US → en_US for intl internally, adds ISO 4217 regex validation
  • TypeScript: invalid currency throws RangeError; invalid locale falls back silently (V8 behavior, documented)

Structural cleanup

  • Removed duplicate lib/src/kompkit_core.dart, unused themes/, docs/index.md
  • Renamed contributing.md → CONTRIBUTING.md
  • Fixed build command typo and Flutter export path in CONTRIBUTING.md
  • Fixed CHANGELOG "local development only" inaccuracy
  • Added SECURITY.md and CODE_OF_CONDUCT.md
  • Added exports map, sideEffects: false, engines: ">=20" to web package.json
  • Added Flutter (pub) to Dependabot config, all ecosystems set to monthly

Documentation

  • ARCHITECTURE.md: added formal API Parity Contract section and Platform Divergence table
  • README.md: added Why KompKit, Target Audience, Stability Policy, Platform Differences sections; fixed version badge
  • docs/roadmap.md: rewritten to reflect current state and realistic milestones
  • docs/recipes.md: updated all examples for new debounce API (cancel() cleanup, new param order), BCP 47 locales

Tests

  • Web: 4 → 19 tests (debounce rapid-call + cancel(), isEmail edge cases, formatCurrency real output + error cases)
  • Kotlin: 3 → 17 tests across 3 classes
  • Flutter: all 4 test files updated for Debounced API, cancel(), BCP 47 locales, removed debounceVoid tests

Checklist

  • Web build/tests pass (npm run test:web && npm run build:web)
  • Android build/tests pass (cd packages/core/android && ./gradlew test)
  • Flutter build/tests pass (cd packages/core/flutter && flutter test)
  • API parity maintained across all affected platforms
  • Docs updated (if needed)
  • CHANGELOG updated (if needed)
  • Version bumped (if releasing) — 0.2.0-alpha.0 → 0.3.0-alpha.0

…rovements

PART 1 - API Parity Contract:
- Add formal API Parity Contract section to ARCHITECTURE.md
- Document what is guaranteed (names, behavior, defaults, cancel)
- Document what may differ (param style, coroutine scope, locale conversion)
- Add Platform Divergence table with all known divergences

PART 2 - debounce refactor (breaking):
- TypeScript: add Debounced<T> interface with cancel(), rename t->timer, rename v->value, constrain T to void-returning functions
- Kotlin: reorder params (action first, scope last), add Debounced<T> class with cancel()
- Dart: replace untyped Function return with Debounced<T> class with cancel(), remove debounceVoid (use debounce<void>), remove conflicting VoidCallback typedef

PART 3 - formatCurrency standardization (breaking):
- All platforms: change default locale from es-ES to en-US
- All platforms: accept BCP 47 locale strings (e.g. en-US)
- Kotlin: convert BCP 47 string to java.util.Locale internally
- Dart: normalize hyphen->underscore for intl package internally
- Kotlin/Dart: throw on invalid currency/locale (consistent error contract)
- TypeScript: V8 silently falls back on unknown locales (documented divergence)

PART 4 - Structural cleanup:
- Remove duplicate lib/src/kompkit_core.dart (dead code)
- Fix stale version badge in README (0.1.0-alpha -> 0.2.0-alpha.0)
- Rename contributing.md -> CONTRIBUTING.md (GitHub auto-link)
- Fix contributing.md: build:web command (was docs:web), Flutter export path
- Fix CHANGELOG: remove false local-only claim, add accurate Android note
- Add SECURITY.md with scope and reporting instructions
- Add CODE_OF_CONDUCT.md (Contributor Covenant)
- Add exports map, sideEffects:false, engines>=20 to web package.json
- Remove unused themes/ directory and docs/index.md

PART 5 - Documentation:
- Add Why KompKit? and Target Audience sections to README
- Add Stability Policy section to README
- Add Platform Differences table to README
- Rewrite roadmap to reflect current state and realistic milestones

PART 6 - Tests:
- Web: expand to 19 tests covering isEmail edge cases, formatCurrency real output + error cases, debounce rapid-call and cancel()
- Kotlin: expand to 16 tests across 3 classes covering same behavioral surface
- Flutter: update all 4 test files for new Debounced<T> API, BCP 47 locales, cancel() coverage, remove debounceVoid tests
- Update recipes.md: add cancel() cleanup in React useEffect, update Kotlin debounce to new param order, add dispose() in Flutter widget
… behavior

- Kotlin Format.kt: remove locale validation (JVM Locale.forLanguageTag is lenient,
  unknown locales fall back to root locale rather than throwing)
- Kotlin CoreTests.kt: replace throwsForInvalidLocale with unrecognizedLocaleFallsBackGracefully
- Dart format.dart: add explicit ISO 4217 regex validation (3 uppercase letters) since
  intl's NumberFormat.currency(name:) does not validate currency codes
- Flutter format_test.dart: restore throwsArgumentError for invalid locale (intl does
  throw via verifiedLocale()), fix invalid currency test to use 'INVALID' (7 chars)
- ARCHITECTURE.md: correct divergence table — Dart/intl throws on unknown locales,
  TypeScript/V8 and Kotlin/JVM fall back silently; document currency validation differences
@Ivanmw97 Ivanmw97 merged commit a210a63 into release Feb 20, 2026
3 checks passed
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