Conversation
…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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Platforms Affected
Changes
API — debounce (breaking)
t → timer,v → valueactionmoved to first param,scopelast (trailing lambda idiom), Debounced class with cancel()debounceVoid(use debounce instead)API — formatCurrency (breaking)
es-ES → en-US, accept BCP 47 stringsLocaleinternally — callers no longer passLocaleobjectsen-US → en_USforintlinternally, adds ISO 4217 regex validationRangeError; invalid locale falls back silently (V8 behavior, documented)Structural cleanup
lib/src/kompkit_core.dart, unusedthemes/, docs/index.mdcontributing.md → CONTRIBUTING.mdexportsmap,sideEffects: false,engines: ">=20"to web package.jsonpub) to Dependabot config, all ecosystems set to monthlyDocumentation
Tests
debounceVoidtestsChecklist
npm run test:web && npm run build:web)cd packages/core/android && ./gradlew test)cd packages/core/flutter && flutter test)0.2.0-alpha.0 → 0.3.0-alpha.0