Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 2.78 KB

File metadata and controls

48 lines (37 loc) · 2.78 KB

Changelog

All notable changes to Gofakeit JS are documented in this file.

The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.

[2.5.0]

Added

  • Framework-safe value setting. Generated values are written through the native HTMLInputElement / HTMLTextAreaElement / HTMLSelectElement setters, so frameworks that install an own value/checked tracker (for example React's onChange) observe the change. input and change are still dispatched.
  • Autocomplete-aware resolution. Standard autocomplete tokens (given-name, family-name, email, tel, street-address, postal-code, cc-number, and more) map to exact generators before any fuzzy search runs.
  • New AutofillSettings for constraining resolution: typeFunctions, minSearchScore, minSearchScoreMargin, excludedFunctions, and resolveFunction.
  • onFunctionDetermined callback plus score, reasons, and resolvedBy on every AutofillElement, so callers can see which function was chosen and why.
  • dryRun mode: resolve functions and generate values without writing anything to the DOM.
  • Constraint awareness: generated text respects maxlength / minlength, and numbers respect min / max / step.
  • Transport options (apiBaseUrl, timeout, retries) on Autofill, and FetchOptions / DEFAULT_API_BASE exported from the API client, with timeout handling and bounded retries for network errors, 429, and 5xx.
  • AutofillResolvedBy type describing how a function was chosen.

Changed

  • Search results are mapped back to elements by the id echoed by the API instead of by array position, so responses can be reordered or batched without misassigning functions.
  • Element dedupes search queries and no longer sends the raw generic input type (text, search, ...), which was low-signal noise in the ranking.
  • minSearchScoreMargin now defaults to 1.25. Close calls where the top two candidates score within 25% fall back to the deterministic type function instead of silently picking a possibly wrong generator.

Fixed

  • email, tel, url, and password inputs are resolved by their exact generator and are no longer routed through fuzzy search. This fixes the case where <input type="email"> with a "body" or "message" label was resolved to email_text and filled with a full Subject: ... message.
  • A structural guard prevents multi-line / message-body generators (email_text, paragraph) from being chosen for single-line inputs.
  • Search failures, rejected candidates, and unanswered requests now fall back to the deterministic type function instead of leaving a function unset.

[2.4.1]

Previous release. See the repository history for details.