Skip to contents

cffr (development version)

  • Internal code and documentation were reviewed and refactored with AI assistance to improve maintainability, consistency and user-facing messages.
  • Tests were improved with AI assistance to reduce dependence on external services and make internal fixtures more robust.

cffr 1.4.0

CRAN release: 2026-05-04

  • DOIs in inst/CITATION url fields are detected, including those matching the pattern .*dx.doi.org/.
  • The website field in definitions.person and definitions.entity uses ROR as a fallback.
  • cff_read() correctly handles a single languages value (#105).
  • cff_validate() now uses the ajv validation engine via jsonvalidate::json_validate(), which returns more informative error messages.

cffr 1.3.0

CRAN release: 2026-03-13

  • The minimum required R version is now 4.1.0.
  • Vignettes were migrated to Quarto.

cffr 1.2.1

CRAN release: 2026-01-12

cffr 1.2.0

CRAN release: 2025-01-25

  • cff_write() gains a new r_citation argument. When it is set to TRUE, an R citation file (inst/CITATION) is generated or updated with the information from the generated CITATION.cff file. No backup copy is created. For more control, use cff_write_citation() (#79).
  • repository-code now also recognizes Codeberg as a valid repository (#88).
  • repository-code recognizes repositories regardless of casing. Lowercase is still recommended as a good practice for R developers.

cffr 1.1.1

CRAN release: 2024-08-16

  • ORCID extraction was adapted for R > 4.4.1.

cffr 1.1.0

CRAN release: 2024-07-23

  • cffr now automatically adds DOIs to packages on CRAN (e.g. https://doi.org/10.32614/CRAN.package.cffr):
    • If the package has a CITATION file providing a DOI, the CITATION DOI is used as the main CITATION.cff doi and the CRAN DOI is added as an identifier.
    • Otherwise, the CRAN DOI is used as doi.
    • When extracting dependencies (e.g. cff_create(dependencies = TRUE)) and the package dependency is on CRAN, the CRAN DOI is used for the dependency in the references key.
  • commit is extracted from RemoteSha.
  • The cran_to_spdx dataset was updated.

cffr 1.0.1

CRAN release: 2024-04-09

  • cff_write() gains a new encoding argument to make it work with different encodings. See iconv().
  • Fixed NOTEs caused by empty lines in docs.

cffr 1.0.0

CRAN release: 2024-03-12

This is a major release with some notable changes. The main change affects non-core functions. The natural workflow (cff_create()cff_write()cff_validate()) should not be affected.

Major changes

Classes and methods

cffr now implements a new class system for definitions.reference, definitions.person and definitions.entity objects:

  • A list of definitions.reference objects (e.g. references) has class cff_ref_lst, cff and individual elements (e.g. preferred-citation or each member of references) have class cff_ref, cff.
  • A list of definitions.person or definitions.entity objects (e.g. authors, contact) has class cff_pers_lst, cff and individual elements (e.g. publisher or each member of authors) have class cff_pers, cff.

This change allows writing specific S3 methods and extends the capabilities of the package.

API

The API has been completely revised to provide more clarity on function naming and to facilitate internal maintenance. This change only affects non-core functions. Each function now does fewer things but does them better. The old API has been deprecated and now warns when used, providing advice on the replacement function.

Deprecation

New capabilities

Other changes

  • The minimum required R version is now 4.0.0.
  • The BibTeX crosswalk was updated (see vignette("bibtex-cff", package = "cffr")), with corresponding changes in the mapping performed by as_bibtex() and cff_parse_citation():
    • @inbook and @book gain a new value in CFF when series is provided: collection-type: book-series.
    • cffr can now handle BibLaTeX @inbook, which differs significantly from BibTeX @inbook.

cffr 0.5.0

CRAN release: 2023-05-05

Lifecycle

New features

  • write_citation() is a new function that can generate an inst/CITATION file from a cff object (#51).

Enhancements

  • Additional authors of an R package can now be included based on roles in the DESCRIPTION file, via the authors_roles argument (#49).

  • The message interface now uses cli.

  • The invisible result of cff_validate() now includes the summary of errors (if any) as an attributes() named "error", as jsonvalidate::json_validate() does when verbose = TRUE:

    Be verbose? If TRUE, then an attribute "errors" will list validation failures as a data frame.

  • Improved extraction of date-released.

cffr 0.4.1

CRAN release: 2023-01-30

  • Replaced the crayon dependency with cli (#46).
  • cff_validate() performance was improved.

cffr 0.4.0

CRAN release: 2022-11-17

  • Fixed typo (#40, thanks to @dpprdan).
  • Added cff_from_bibtex().
  • Dependency URLs now behave consistently when RSPM is the default repository (for example, on GitHub Actions or RStudio Cloud).

cffr 0.3.0

CRAN release: 2022-09-23

  • preferred-citation is only produced when a CITATION R file has been provided with the package (#37).
  • Improved email handling for authors.
  • Added cff_read(). This functionality was already implemented in cff(), but the new function provides clarity.

cffr 0.2.3

CRAN release: 2022-08-15

  • Fixed the HTML5 issue as requested by CRAN.

cffr 0.2.2

CRAN release: 2022-04-08

  • cffr now uses a local copy of schema.json for validation (#33).

cffr 0.2.1

CRAN release: 2022-01-16

  • The GitHub Action now runs only on the master or main branch.
  • References are handled better.

cffr 0.2.0

CRAN release: 2022-01-04

cffr 0.1.1

CRAN release: 2021-11-11

cffr 0.1.0

CRAN release: 2021-11-04

  • First CRAN release.

cffr 0.0.2

cffr 0.0.1

  • First stable release.