Skip to content

Commit 9c948e1

Browse files
authored
Restore pre-3.3 local_snapshotter() argument order (#2309)
Part of r-lib/devtools#2631
1 parent c19279f commit 9c948e1

4 files changed

Lines changed: 4 additions & 3 deletions

File tree

β€ŽNEWS.mdβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* `expect_snapshot()` and friends only emit the `snapshot_download_gh()` hint when running in a job named "R-CMD-check" (#2300).
88
* `expect_snapshot_file()` correctly reports file name if duplicated (@MichaelChirico, #2296).
99
* `expect_success()` and `expect_failure()` are more clear about what the expectation actually did (#2297).
10+
* `local_snapshotter()` now returns to `snap_dir` as the first argument for compatibility with devtools 2.4.6.
1011
* `LlmReporter()` is a new reporter designed for LLMs to read. It's currently used automatically inside Claude Code, Cursor, and Gemini CLI, and you can set `AGENT=1` to use with any coding agent (#2287).
1112
* `local_mocked_s3_method()` and `local_mocked_s4_method()` can now mock methods that don't already exist, and can use `definition = NULL` to temporarily remove a method. `local_mocked_s4_method()` now also works when the generic is defined in another package (#2302).
1213
* `test_dir()` will no longer run tests in parallel if only a single file is being tested (#2305).

β€ŽR/snapshot-reporter.Rβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,8 +231,8 @@ get_snapshotter <- function() {
231231
#' @export
232232
#' @keywords internal
233233
local_snapshotter <- function(
234-
reporter = SnapshotReporter,
235234
snap_dir = "_snaps",
235+
reporter = SnapshotReporter,
236236
cleanup = FALSE,
237237
desc = NULL,
238238
fail_on_new = NULL,

β€ŽR/test-files.Rβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,7 +318,7 @@ test_files_reporter <- function(
318318
snap_base <- SnapshotReporter
319319
}
320320
snap <- local_snapshotter(
321-
snap_base,
321+
reporter = snap_base,
322322
fail_on_new = on_ci(),
323323
desc = desc,
324324
frame = frame

β€Žman/local_snapshotter.Rdβ€Ž

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
Β (0)