cffr (development version)
-
as_bibentry()now returns abibentryobject whenxisNULL, using metadata from the package in the current working directory. -
as_cff.bibentry()now selects the firstissnof eachbibentry(). -
as_cff.bibentry()now preserves single keywords and generic institutions, removes empty keyword values, restorescollection-type: book-seriesfor @book and @inbook series, preserves legal commas in URLs, removes duplicate URLs and extracts DOI resolver URLs only when their paths are valid DOI values. Partial BibLaTeX publication dates retain their available year and month, while unsupported date values remain available for CFF validation. Resolver query and fragment components are excluded from DOI values, while original URL metadata is retained. -
[.cff_ref_lst()and[.cff_pers_lst()now preserve their collection classes for subsets of any length. -
cff_create()no longer creates duplicate identifiers when merging inferred CRAN metadata withCITATIONmetadata. -
cff_create()now adds inferred CRAN DOIs only to packages available from CRAN. Dependency references retain extracted titles, abstracts, authors and citation years while adding their declared scope and version constraint, plus URLs and repository information from installed package metadata. A release date takes precedence over a citation year when available (#114). -
cff_create()now preserves every recognized alternative license fromDESCRIPTIONinstead of limiting the CFF output to two SPDX identifiers. -
cff_create()now trims, removes empty and duplicateX-schema.org-keywordsvalues and preserves a single value as a one-item CFF keyword array. -
cff_read_cff_citation()now preserves YAML sequences with one element, includingkeywords, while retaining invalid scalar values for CFF validation. -
cff_read_citation()now makes every field supplied inmeta, including customDESCRIPTIONfields, available toCITATIONfiles and no longer retries with metadata from the base package when reading fails (#114).
cffr 1.4.2
CRAN release: 2026-08-24
- The JOSS paper is now linked as an external pkgdown article instead of being rebuilt as a package vignette.
- cli messages now use more precise semantic markup, pluralization and public-facing error contexts.
-
cff_gha_update()now usespathwhen updating.Rbuildignore. -
cff_read_bib_text()now rejects vectors that mix BibTeX entries with.bibfile paths. -
cff_write_bib()andcff_write_citation()now stop before modifying an existing file when its backup cannot be created, and backup numbering is no longer limited to 100 files. -
cff_write()now formats theinst/CITATIONupdate message correctly.
cffr 1.4.1
CRAN release: 2026-06-17
- 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/CITATIONurlfields are detected, including those matching the pattern.*dx.doi.org/. - The
websitefield indefinitions.personanddefinitions.entityuses ROR as a fallback. -
cff_read()correctly handles a singlelanguagesvalue (#105). -
cff_validate()now uses the ajv validation engine throughjsonvalidate::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
-
as_cff_person()improves comment detection and parsing across its function family. -
cff_gha_update()now runs inubuntu-latestby default to save GitHub Actions quota (#90, thanks to @Pakillo). - The mapping of CRAN packages to SPDX codes was updated.
cffr 1.2.0
CRAN release: 2025-01-25
-
cff_write()gains a newr_citationargument. When it is set toTRUE, an R citation file (inst/CITATION) is generated or updated with the information from the generatedCITATION.cfffile. No backup copy is created. For more control, usecff_write_citation()(#79). -
repository-codenow also recognizes Codeberg as a valid repository (#88). -
repository-coderecognizes repositories regardless of casing. Lowercase is still recommended as a good practice for R developers.
cffr 1.1.0
CRAN release: 2024-07-23
-
cffr now automatically adds DOIs to packages on CRAN (for example, https://doi.org/10.32614/CRAN.package.cffr):
- If the package has a
CITATIONfile providing a DOI, theCITATIONDOI is used as the mainCITATION.cffdoiand the CRAN DOI is added as anidentifier. - Otherwise, the CRAN DOI is used as
doi. - When extracting dependencies (for example,
cff_create(dependencies = TRUE)) and the package dependency is on CRAN, the CRAN DOI is used for the dependency in thereferenceskey.
- If the package has a
-
commitis extracted fromRemoteSha. - The
cran_to_spdxdataset was updated.
cffr 1.0.1
CRAN release: 2024-04-09
-
cff_write()gains a newencodingargument to make it work with different encodings. Seeiconv(). - Fixed NOTEs caused by empty lines in documentation.
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.referenceobjects, such asreferences, has classcff_ref_lst, cff. Individual elements, such aspreferred-citationor each member ofreferences, have classcff_ref, cff. - A list of
definitions.personordefinitions.entityobjects, such asauthorsorcontact, has classcff_pers_lst, cff. Individual elements, such aspublisheror each member ofauthors, have classcff_pers, cff.
This change enables specific S3 methods and extends the capabilities of the package.
-
as_cff()is a new S3 generic that replacesas.cff()and coerces R objects tocffclass format. Current methods provided are:-
as_cff.Bibtex(). -
as_cff.bibentry(), replacingcff_parse_citation(). -
as_cff.person(), similar toas_cff_person()but only forpersonobjects. We recommend usingas_cff_person()since it can also coerce strings representing authors in BibTeX markup ("{von Neumen}, James"), which cannot be captured properly through methods.
-
-
as_bibentry()is a new method for a variety of classes (character,list,NULLand classes defined by cffr). -
as_cff_person()is a new method. - The following base and utils package methods now support the
cffclass:-
as.data.frame.cff(). -
as.person(), although only fordefinitions.personordefinitions.entity, such asauthors,contacts,editorsorpublisher. -
head.cff(),tail.cff(). -
toBibtex.cff().
-
API
The API has been completely revised to clarify function naming and simplify 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
-
cff_to_bibtex()andcff_extract_to_bibtex(): replaced by theas_bibentry()S3 generic. -
cff_parse_person()andcff_parse_person_bibtex(): replaced by theas_cff_person()S3 generic. -
cff_parse_citation(): replaced by theas_cff()S3 generic. -
cff_from_bibtex(): replaced bycff_read_bib()(for*.bibfiles) andcff_read_bib_text()(for character strings). -
write_bib()andwrite_citation(): replaced bycff_write_bib()andcff_write_citation(), respectively. - Argument
pathincff()is also deprecated, usecff_read()instead.
New capabilities
-
cff_read()now reads only from external files. It is designed to fit all supported file types in a single entry point, along with more specific readers used internally bycff_read(): -
cff_modify()is a new function for updating and modifyingcffobjects easily.
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 bytoBibtex()andcff_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.
-
@inbook and @book gain a new value in CFF when series is provided:
cffr 0.5.0
CRAN release: 2023-05-05
Lifecycle
-
cff_to_bibtex()andcff_extract_to_bibtex()have been merged.cff_extract_to_bibtex()is now soft-deprecated.
New features
-
write_citation()is a new function that can generate aninst/CITATIONfile from acffobject (#51).
Enhancements
Additional authors of an R package can now be included based on roles in the
DESCRIPTIONfile, through theauthors_rolesargument (#49).The message interface now uses cli.
-
The invisible result of
cff_validate()now includes the summary of errors (if any) as anattributes()named"error", asjsonvalidate::json_validate()does whenverbose = 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-citationis only produced wheninst/CITATIONhas been provided with the package (#37). - Improved email handling for authors.
- Added
cff_read(). This functionality was already implemented incff(), but the new function provides clarity.
cffr 0.2.1
CRAN release: 2022-01-16
- The GitHub Actions workflow now runs only on the
masterormainbranch. - References are handled better.
cffr 0.2.0
CRAN release: 2022-01-04
-
cffr now also extracts information about package dependencies and adds the main citation of the dependencies to the
referenceskey, usingcitation(auto = TRUE).- Added the
dependenciesargument tocff_create()andcff_write().
- Added the
- Other improvements to
cff_parse_citation()include:-
cff_parse_citation()extracts more information about authors, based on the fields provided in theDESCRIPTIONfile. -
cff_parse_citation()does a better job extracting information frombibentry()/BibTeX and mapping it to thepreferred-citationandreferencesCFF keys.
-
- Added new functions for working with git pre-commit hooks
:
- Added new BibTeX functions:
- Added a new dependency: lifecycle.
cffr 0.1.1
CRAN release: 2021-11-11
- Accepted by JOSS.
- Added
pagestocff_parse_citation(). - Added the
gh_keywordsargument tocff_create()/cff_write(). IfTRUE, it includes GitHub repository topics as keywords.
cffr 0.0.2
- cffr is now part of rOpenSci.
- Updated documentation and README.
- Added fuzzy matching for the
keysargument. - Added the
cran_to_spdxdataset. - Added the DOI https://doi.org/10.5281/zenodo.5509766.
- Installed package citations are extracted using
citation(). - The
preferred-citationkey is automatically generated fromDESCRIPTION. - Renamed
cff_schema_definitions_reference()tocff_schema_definitions_refs(). -
repositorykey is supported. - Added the
vignette("r-cff", package = "cffr")vignette. - Added support for Bioconductor packages.
- Added
cff_gha_update().
