diff --git a/DESCRIPTION b/DESCRIPTION index 13d91c5e73..f1ec22c1c7 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -24,4 +24,5 @@ Depends: shiny, tidyverse, webshot2, - yaml + yaml, + yaml12 diff --git a/docs/download/_download-older.yml b/docs/download/_download-older.yml index 946fd0e2fb..aaf32d9509 100644 --- a/docs/download/_download-older.yml +++ b/docs/download/_download-older.yml @@ -39,11 +39,6 @@ date: 2025-08-29 path: https://github.com/quarto-dev/quarto-cli/releases/tag/v1.7.34 changelog: "[Release Notes](changelog/1.7/)" -- id: version18 - title: 1.8.27 - date: 2026-01-16 - path: https://github.com/quarto-dev/quarto-cli/releases/tag/v1.8.27 - changelog: "[Release Notes](changelog/1.8/)" - id: version18 title: 1.8.27 date: 2026-01-16 diff --git a/renv.lock b/renv.lock index 7448bbf517..157a5f9b97 100644 --- a/renv.lock +++ b/renv.lock @@ -6231,6 +6231,40 @@ "Maintainer": "Hadley Wickham ", "Repository": "P3M" }, + "yaml12": { + "Package": "yaml12", + "Version": "0.1.0", + "Source": "Repository", + "Title": "Fast 'YAML' 1.2 Parser and Formatter", + "Authors@R": "c( person(\"Tomasz\", \"Kalinowski\", , \"tomasz@posit.co\", role = c(\"aut\", \"cre\")), person(\"Posit Software, PBC\", role = c(\"cph\", \"fnd\"), comment = c(ROR = \"03wc8by49\")), person(\"Authors of the dependency Rust crates\", role = \"cph\", comment = \"See inst/AUTHORS and LICENSE.note for vendored Rust dependency authors and licenses.\") )", + "Description": "A fast, correct, safe, and ergonomic 'YAML' 1.2 parser and generator written in 'Rust'. Convert between 'YAML' and simple 'R' objects with full support for multi-document streams, tags, anchors, and aliases. Offers opt-in handlers for custom tag behavior and round-trips common 'R' data structures. Implements the 'YAML' 1.2.2 specification from the 'YAML' Language Development Team (2021) . Proudly supported by Posit.", + "License": "MIT + file LICENSE", + "URL": "https://posit-dev.github.io/r-yaml12/, https://github.com/posit-dev/r-yaml12", + "BugReports": "https://github.com/posit-dev/r-yaml12/issues", + "Depends": [ + "R (>= 4.2)" + ], + "Suggests": [ + "jsonlite", + "knitr", + "rmarkdown", + "testthat (>= 3.0.0)", + "waldo", + "withr" + ], + "VignetteBuilder": "knitr", + "Config/Needs/website": "tidyverse/tidytemplate", + "Config/rextendr/version": "0.4.2.9000", + "Config/testthat/edition": "3", + "Config/testthat/parallel": "false", + "Encoding": "UTF-8", + "RoxygenNote": "7.3.3", + "SystemRequirements": "Cargo (Rust's package manager), rustc >= 1.70.0, xz", + "NeedsCompilation": "yes", + "Author": "Tomasz Kalinowski [aut, cre], Posit Software, PBC [cph, fnd] (ROR: 03wc8by49), Authors of the dependency Rust crates [cph] (See inst/AUTHORS and LICENSE.note for vendored Rust dependency authors and licenses.)", + "Maintainer": "Tomasz Kalinowski ", + "Repository": "P3M" + }, "zip": { "Package": "zip", "Version": "2.3.3", diff --git a/tools/release-notes.R b/tools/release-notes.R index 49b07ee4c7..57f363177a 100644 --- a/tools/release-notes.R +++ b/tools/release-notes.R @@ -3,6 +3,7 @@ library(stringr) library(glue) library(jsonlite) library(gh) +library(yaml12) downloads <- path("docs", "download") @@ -91,16 +92,39 @@ readLines(prerelease_page) |> old_abbr <- str_split(major_version, "\\.")[[1]] |> paste0(collapse = "") -# Add new item to download-older listing in docs/download/index.qmd +# Add or update item in download-older listing +older_file <- path(downloads, "_download-older.yml") + +# Preserve comment header, parse YAML data +file_lines <- readLines(older_file) +comment_lines <- file_lines[startsWith(file_lines, "#")] +yaml_text <- file_lines[!startsWith(file_lines, "#")] +entries <- parse_yaml(paste(yaml_text, collapse = "\n")) + +new_entry <- list( + id = paste0("version", old_abbr), + title = old_release, + date = format(as.Date(old_release_date), "%Y-%m-%d"), + path = paste0("https://github.com/quarto-dev/quarto-cli/releases/tag/v", old_release), + changelog = paste0("[Release Notes](changelog/", major_version, "/)") +) + +# Upsert: update existing entry or append new one +existing_idx <- which(vapply(entries, function(e) identical(e$title, old_release), logical(1))) + +if (length(existing_idx) > 0) { + entries[[existing_idx[1]]] <- new_entry + cat("Updated version", old_release, "in _download-older.yml\n") +} else { + entries <- c(entries, list(new_entry)) + cat("Added version", old_release, "to _download-older.yml\n") +} -glue(' -\n- id: version{ old_abbr } - title: { old_release } - date: { format(as.Date(old_release_date), "%Y-%m-%d") } - path: https://github.com/quarto-dev/quarto-cli/releases/tag/v{ old_release } - changelog: "[Release Notes](changelog/{ major_version }/)" -') |> - cat(file = path(downloads, "_download-older.yml"), append = TRUE) +# Write back: comments + formatted YAML +writeLines( + c(comment_lines, format_yaml(entries)), + older_file +) # Update version for prerelease-docs-url shortcode ------------------------- # _quarto.yml tracks the stable release version. Bumping it here on the