For AI agents: the complete documentation index is available at https://open-spaced-repetition.github.io/ts-fsrs/llms.txt, the full documentation bundle is available at https://open-spaced-repetition.github.io/ts-fsrs/llms-full.txt, and this page is available as Markdown at https://open-spaced-repetition.github.io/ts-fsrs/updates/index.md.

Updates

Published package releases, changelogs, and npm downloads.

6.0.0

This is a major update with breaking changes. ts-fsrs v6 introduces FSRS-7, the default model for DefaultScheduler; see the quick start to get started. For existing integrations, we recommend following the migration guide and using llms.txt as the documentation entry point for AI-assisted migration.

Breaking Changes

  • Change FSRSVersion from v${version} using FSRS-6.0 to v${version}. This export remains supported and reports only the package version; update code that parses the old suffix. Read the selected model name from scheduler.definition.model.name. (#576) Thanks @ishiko732!
  • Move algorithm operations to explicit model entries. Import models and parameter helpers from ts-fsrs/models/fsrs-3, fsrs-4, fsrs-4dot5, fsrs-5, fsrs-6, or fsrs-7. The root FSRSAlgorithm, computeDecayFactor, clipParameters, migrateParameters, and forgetting_curve exports and the legacy facade's next_state, next_interval, and get_retrievability methods are removed. The inherited algorithm API, including interval_modifier, calculate_interval_modifier, apply_fuzz, and the seed setter, is no longer available on FSRS. Use model step, nextInterval, forgettingCurve, and forward; retrievability returns a number, so format percentages at the call site. FSRS, IFSRS, and fsrs() remain exported but deprecated and use FSRS-6. (#377, #375, #356) Thanks @ishiko732!
  • Remove afterHandler callbacks from createEmptyCard, repeat, next, rollback, and forget, and remove recordLogHandler from legacy reschedule. Transform returned results at the call site. (#374) Thanks @ishiko732 and @Copilot!
  • Remove global Date.prototype extensions and deprecated fixDate, fixState, and fixRating helpers. Use standalone date helpers and TypeConvert.time/state/rating for legacy integrations. Remove Card.elapsed_days and ReviewLog.elapsed_days/last_elapsed_days; derive elapsed time from actual review timestamps, not the scheduled due date. (#341, #342) Thanks @ishiko732!
  • Replace Alea with FNV-1a and Mulberry32, changing fuzzed interval sequences. The new scheduler seeds fuzzing with cardId + reps; the legacy scheduler still derives its seed from review time, repetition count, difficulty, and stability. Remove DefaultInitSeedStrategy, GenSeedStrategyWithCardId, StrategyMode.SEED, and TSeedStrategy. Use schedulerFuzzingMiddleware or createSchedulerFuzzingMiddleware({ fuzzingRange, rng }). (#409) Thanks @ishiko732!
  • Require Node.js 24 or later. (#406) Thanks @ishiko732!
  • Replace BasicLearningStepsStrategy with calculateLearningSteps and TLearningStepsStrategy with LearningStepsResolver. Custom StrategyMode.LEARNING_STEPS handlers now receive camelCase learningSteps/relearningSteps config and return scheduledMinutes/nextStep instead of scheduled_minutes/next_step. Replace default_learning_steps and default_relearning_steps imports with defaultLearningSteps and defaultRelearningSteps. (#407) Thanks @ishiko732!
  • Replace the numeric TypeScript enums Rating and State with frozen constant objects and numeric union types. Numeric values remain unchanged, but reverse lookups such as Rating[3] and State[2] no longer work; replace enum-member type annotations such as Rating.Good with typeof Rating.Good. (#457) Thanks @ishiko732!
  • Rename FSRSReview.delta_t to deltaT and narrow its rating to Grade (Again through Easy, excluding Manual). Custom legacy schedulers now receive (card, now, model, parameters, strategies) instead of (card, now, algorithm, strategies); subclasses must use the model and separate parameters rather than this.algorithm. (#377) Thanks @ishiko732!
  • Change declaration files from dist/index.d.ts to format-specific .d.mts/.d.cts files and remove the umd package-export condition. Use package imports for declaration resolution and update tooling that hard-codes the old declaration path; the UMD bundle is still built. (#346) Thanks @ishiko732!

Deprecations

  • Add explicit @deprecated annotations and replacement guidance to legacy card/parameter helpers, AbstractScheduler, strategy APIs, FSRS/IFSRS members, and legacy card, review-log, config, and scheduling types. These exports remain available for compatibility. Use DefaultScheduler or defineScheduler, model-specific parameter helpers, inferred scheduler types, and Reschedule from ts-fsrs/reschedule for new integrations. (#576) Thanks @ishiko732!
  • Deprecate TypeConvert and its methods, legacy date helpers, Grades, and CLAMP_PARAMETERS. Use explicit input conversion and schemas, the selected scheduler's chrono, application-level date formatting, grades from srs-kit, and model-specific parameter helpers. Replacements are not universally interchangeable: preserve date units, rounding, output formats, and the New-card retrievability boundary when migrating. (#576) Thanks @ishiko732!

New Features

  • Add the asynchronous DefaultScheduler(options) factory backed by @open-spaced-repetition/srs-kit. It defaults to FSRS-7; select version: 'FSRS-6' to retain the previous model. The new API uses newCard, preview, review, rollback, forget, retrievability, and nextInterval, with camelCase card/config fields and { card, revlog } review results. (#451, #531, #526) Thanks @ishiko732!
  • Add FSRS-3, FSRS-4, FSRS-4.5, FSRS-5, and FSRS-7 model entries alongside FSRS-6. FSRS-7 uses 34 weights, a stabilityFast memory field, and fractional-day intervals. Its standalone curve returns retrievability and total mixture weight; parameter bounds are also exported. (#401, #400, #399, #378, #520, #541, #556) Thanks @ishiko732!
  • Expose defineModel, defineScheduler, defineChrono, defineMiddleware, chrono presets, scheduling schemas, and srs-kit types for custom integrations. Built-in middleware is available from the root and ts-fsrs/middlewares, including desired retention, fuzzing, statistics, scheduled days, learning steps, maximum/monotonic intervals, leech suspension, and Cost ADR. Leech suspension uses scheduleStatus: 'suspended'; Cost ADR and leech middleware are opt-in. (#445, #469, #509, #539, #412, #461, #528) Thanks @ishiko732!
  • Support per-grade desired retention and direct nextInterval queries through interval middleware. Add graduatingInterval and allowModelOverride to learning-step scheduling. DefaultScheduler defaults to learning steps ['1m', '10m'], relearning steps ['10m'], and model override enabled only for FSRS-7. Disabling explicit learning steps does not disable FSRS-7's intrinsic fast trace. (#527, #526, #561) Thanks @ishiko732!
  • Add Reschedule at ts-fsrs/reschedule for replaying review history into memory states or rescheduling cards and review logs. (#426, #439) Thanks @ishiko732 and @Eijnewgnaw!
  • Separate parameter migration, clipping, and validation, and accept readonly parameter arrays. (#398, #492, #515) Thanks @ishiko732 and @Luc-Mcgrady!

Fixes

  • Enforce maximum intervals independently of fuzzing, preserve explicit learning steps and second precision, and keep graduation intervals monotonic. Correct FSRS-7 sub-day scheduling states. (#454, #456, #484, #540) Thanks @ishiko732!
  • Clamp FSRS-4.5 through FSRS-6 initial stability to configured bounds, and validate numeric bounds and learning-step inputs. (#477, #549) Thanks @ishiko732!
  • Preserve pre-review chronology during rollback, improve inferred card/revlog type displays, and avoid redundant interval calculations. (#522, #473, #443) Thanks @ishiko732!

Build and Tooling

  • Replace Rollup/esbuild with tsdown (Rolldown), and stop emitting source maps and minified bundles. (#346) Thanks @ishiko732!
  • Add the build-time TS_FSRS_DISABLE_ROUNDING switch for custom builds. Published builds keep rounding enabled; this is not a runtime environment setting. (#547) Thanks @ishiko732!
  • Migrate the repository's root TypeScript toolchain to TypeScript 7 (tsgo). srs-kit retains its package-local TypeScript 6 development dependency. This is a development-toolchain change, not a new TypeScript 7 requirement for consumers. (#403) Thanks @zi-gae!

Migration

Upgrading the package and upgrading the model are separate operations. Keep FSRS-6 explicitly when migrating an existing FSRS-6 integration. To move learned cards to FSRS-7, use FSRS-7 weights and rebuild memory from complete review history since creation or the latest memory reset; do not reuse FSRS-6 weights or invent stabilityFast. Select the post-reset history explicitly: replay() filters Manual records but does not interpret reset events. Use Reschedule.replay() to rebuild memory while preserving existing due dates, learning progress, counters, and historical logs; reschedule() instead replays scheduling policy and can change the schedule. The new scheduler's forget clears statistics by default; set clearStatsOnForget: false when those statistics must be retained.

When adopting the new scheduler, migrate due/last_review to dueAt/lastReviewAt, learning_steps to learningStep, and { card, log } to { card, revlog }; persist scheduleStatus and retain a stable cardId. Date-based inputs require valid Date objects after deserialization. Review logs distinguish the pre-review lastReviewAt, pre-review dueAt, and actual reviewTime; do not blindly rename old log.due or use old-model logs for FSRS-7 rollback. Learned cards without complete history must remain on FSRS-6 rather than receiving an invented FSRS-7 state.

See the v6 and FSRS-7 migration guide for card/config mappings and rollback timestamp requirements. (#543) Thanks @ishiko732!

5.4.0

Minor Changes

  • #365 ab44ee9 Thanks @ishiko732! - feat(fsrs): Add FSRSError base classes and use FSRSValidationError for package validation errors.

Patch Changes

  • #365 ab44ee9 Thanks @ishiko732! - fix(checkParameters): reject NaN parameter values during validation.

  • #357 c0ffcce Thanks @ishiko732! - refactor(fsrs): extract applyAfterHandler helper to deduplicate afterHandler plumbing in repeat, next, rollback, forget, and reschedule

5.3.3

Patch Changes

  • #353 fce96ee Thanks @ishiko732! - fix(clipParameters): clamp w[11]/w[13]/w[14] before computing the w[17]/w[18] ceiling so that out-of-range inputs (e.g. 0 or negative values) no longer produce NaN/-Infinity via Math.log, and avoid invoking CLAMP_PARAMETERS twice by reusing the same clip ranges.

5.3.0

Minor Changes

  • #266 17fb34d Thanks @ishiko732! - Non-decreasing SInc(Hard) in same-day reviews — sync with fsrs-rs#376 changes

Patch Changes

Older entries below were imported from GitHub Releases and preserve the original release-note wording where practical.

5.2.3

Historical Release Notes

  • Released: 2025-09-05
  • Source: GitHub Release
  • Permit mock date objects that convert to Date values by @runarberg in #PR215
  • Bump the devdependencies group across 1 directory with 6 updates by @dependabot[bot] in #PR218

5.2.2

Historical Release Notes

  • Released: 2025-08-11
  • Source: GitHub Release
  • Convert jest config to typescript by @joshdavham in #PR211
  • Bump @biomejs/biome from 2.0.6 to 2.1.3 in the devdependencies group across 1 directory by @dependabot[bot] in #PR212
  • Fix/clamp the minimum of w[19] by @ishiko732 in #PR213

Page 1 of 6 · Older →