← Back to all sparks
V

vcr

ANALYTICS
Velocity0.0

Record and replay HTTP requests. Contribute to ropensci/vcr development by creating an account on GitHub.

Added the HTTP client everyone moved to, then deleted a decade of its own public surface.

testinghttp-mockingbreaking-changeapi-cleanupropensci
Current state
vcr records HTTP interactions to disk so R package tests can replay them without network access. Two releases define its current state. Version 1.6.0 added httr2 support alongside the existing httr and crul backends, following the R ecosystem's migration to httr2. Version 2.0 then removed a large amount of accumulated public surface — the logging functions, vcr_last_error(), the exported R6 classes including RequestHandler, Request, VcrResponse and HTTPInteractionList, and several configuration options that had stopped working or could not be implemented correctly.
Where it's heading
The package is consolidating after years of additive growth. The 2.0 removals are almost all things that were exported without needing to be, or options that promised behaviour the implementation could not guarantee — check_cassette_names() was deprecated precisely because it cannot be made correct. Cassette maintenance is being simplified too, with re_record_interval now the single mechanism for expiring recordings.
Prediction
Expect the post-2.0 releases to be about migration support and fallout from the removed API, since the breaking list is long enough that reverse dependencies will surface problems. Async support for httr2 stays blocked until req_perform_parallel gains a mocking hook, which the entries note is upstream work.

Recent moves

  1. 8mo ago

    2.0 removes the logging API and the exported R6 classes

    ⚡ SPARK

    The package's largest deliberate contraction: internals that had been exported for years are withdrawn, options that never worked properly are dropped, and cassette expiry collapses to a single setting. It ends the additive phase that ran from 1.0.0 through 1.6.0 and settles what vcr's public surface actually is.

    View source ↗
  2. 1y ago

    Maintainer email address updated

    A CRAN-required administrative release with no functional content. It is the only release between the httr2 work and the 2.0 cleanup.

    View source ↗
  3. 2y ago

    Adds httr2 support alongside httr and crul

    ⚡ SPARK

    Extends recording to the HTTP client the R ecosystem was migrating to, which determines whether packages written today can use vcr at all. Async crul support arrives at the same time, through a hook merged upstream rather than a change here.

    View source ↗
  4. 3y ago

    Drops compilation; test setup moves back to helper files

    Replacing the package's single C++ function with pure R removes the compilation requirement, which meaningfully lowers the install cost for a test-time dependency. use_vcr() also reverts to creating helper-vcr.R so setup loads under devtools::load_all() and interactive test runs behave the same as automated ones.

    View source ↗
  5. 3y ago

    Fixes request matching with escaped characters

    Request matching no longer breaks on special-character escaping, and vcr_test_path() looks in the testthat directory rather than tests. Small correctness fixes in the matching path.

    View source ↗
  6. 5y ago

    vcr_test_path() finds the package root correctly

    A single path-resolution fix. The second consecutive release patching vcr_test_path(), which suggests the surrounding directory conventions were the underlying problem.

    View source ↗