Skip to content

v1.16.0

Choose a tag to compare

@github-actions github-actions released this 28 Oct 00:32
9fddeb9

Added

  • RIS import. Paste a reference manager's RIS export, a whole .ris file or single records, and each record imports as a citation. Records can sit in one paste with DOIs and formatted citations, and Zotero's CRLF line endings are fine. Borges reads RIS with @citation-js/plugin-ris (MIT, editor only), which follows the RIS specification as Zotero does; it also keeps a web page's Y2 access date, which the plugin drops. Tested against Zotero 10 and Mendeley Reference Manager RIS exports in the reference-manager corpus, the sample library they were made from (checked against Zotero's own CSL JSON of it), and a round trip through Borges's RIS export.
  • wp borges duplicates. A read-only report of repeated citations across the whole site, or in the posts you name: one row per later copy of a work in the same bibliography (what wp borges deduplicate would remove) and per work listed in two bibliographies of one post (which deduplicate leaves alone). It changes nothing, and follows the read commands' rules: no --user checks no capabilities, and --user skips posts that user cannot edit. See docs/wp-cli.md.

Changed

  • Bulk deduplicate keeps every field. Before it drops a later copy of a work, it copies any field the kept copy lacks, such as a DOI, pages, or a volume, into it, and formats that entry again. A field the kept copy has is never overwritten. Each removed entry lists what it gave in mergedFields, and wp borges deduplicate gains a merged column.
  • Development dependencies refreshed to clear the zod (GHSA-mrhx-c7xc-m3w5), qs, serialize-javascript, katex, and smol-toml advisories. @wordpress/scripts moves from 31 to 37, which retires the interim zod override, and tools/markup-value moves to Lighthouse 13.5.0. None of them ship in the plugin.
  • Build tooling: @wordpress/scripts 37 lints with ESLint 10, so the repo gains a flat eslint.config.js that keeps Jest's rules and globals for tests (the default now assumes Vitest), and npm test runs Jest through wp-scripts test-unit-jest. Catch bindings that were never read are dropped, JSDoc Function and * types are spelled out, and the visually hidden styles use clip-path: inset(50%) in place of the deprecated clip.
  • Code style: JavaScript and JSON now follow the WordPress JavaScript coding standards' spacing inside parentheses and brackets (foo( bar[ 0 ] )). The repo formats with wp-prettier, the fork @wordpress/scripts uses, in place of upstream Prettier 2.8. The reformat changes only spaces and line breaks.
  • Containers in JSON-LD for magazines, newspapers, and the web. As a page renders, a magazine or newspaper article's JSON-LD is now part of a schema.org Periodical (with its ISSN, volume, and issue, as journal articles already were), and a web page or blog post part of a WebSite, each named by the citation's container title. Before, those container titles were left out of the structured data (#204).
  • Conference papers in JSON-LD. A conference paper is now part of its proceedings, a Book, rather than an Event, which schema.org's isPartOf does not accept. The conference itself, from the citation's event title and place, is linked through recordedAt (#205).
  • Every author and the PMID in COinS. As a page renders, each entry's COinS span now lists every author after the first, in order, as rft.au, and a PubMed ID (rft_id=info:pmid/…), so Zotero's browser connector and other COinS readers import the whole author list. The first author keeps rft.aulast and rft.aufirst and is not repeated, which in Zotero listed it twice; when a later author shares its last name, every author is written as rft.au instead. Organizations and one-part names after the first author are written as rft.au with a trailing comma, so Zotero keeps them whole and in place (it moves every rft.aucorp name to the front). Checked against Zotero's own OpenURL reader (tools/markup-value, npm run zotero). The new bibliography_builder_enrich_coins filter turns this off (#206).

All three apply at render time, like the 1.13.0 JSON-LD enrichment: saved blocks are unchanged and stay valid, and published posts get the fields without being edited.

Fixed

  • Titles with straight apostrophes are italicized. A book title or journal name stored with a straight apostrophe or straight double quotes, such as "Ted Nelson's Computer Paradigm", now saves in italics. citeproc prints those marks curly (’ “ ”), so the stored title was not found in the formatted entry and stayed roman; titles are now matched with quotation marks folded, in save() and its PHP port alike. A saved bibliography stays valid and takes the italics the next time it is edited (#192).
  • BC years in CSL-JSON. A pasted CSL-JSON date whose BC year is a string, as Better CSL JSON writes it ("date-parts": [["-334"]]), now imports as the integer -334, on the editor and REST sides alike. Before, the year was dropped: a year-only date was refused, and a full date kept only its month and day. Found in Better BibTeX's own export tests (the reference-manager corpus).
  • Years before 1000 in every style. The formatter's library (citeproc-php) printed nothing for any year below 1000, so "Aristotle. Politics. 334 BCE." and Bede's 731 lost their dates. Such a date is now printed as its year alone, "334 BCE" (ABNT: "334 AEC"), "731", or "100–44 BCE" and "4 BCE–30 CE" for a range; month and day are left out. Saved bibliographies keep their stored text and pick this up the next time they are formatted.
  • Notes styles put a single author first. In Chicago notes-bibliography and OSCOLA, a single-author work now sorts before co-authored works that begin with the same name, so "Gessner, Conrad" precedes "Gessner, Conrad, and Josias Simler", as CMOS 17th ed. 14.67–14.70 asks. Co-authored works then sort by their next author, and different authors who share a family name (Smith, Adam and Smith, John) sort by given name, not by title. This is the author-chain comparison author-date styles already used, in save() and its PHP port alike. A saved bibliography stays valid and takes the new order the next time it is edited (#212).
  • ABNT sorts titles without Portuguese leading articles. A reference that opens with its title now files under the first word after O, A, Os, As, Um, Uma, Uns, or Umas, so "O Guarani" sorts under G, as ABNT's alphabetical-order standard NBR 6033 (§3.4, "Artigos iniciais") asks; English A, An, and The were already skipped, in every style. Same-author works with the same year are lettered in that order. Other styles are unchanged. A saved ABNT bibliography stays valid and takes the new order the next time it is edited.
  • Comments in JabRef files. Pasting a whole .bib file that holds @string, @comment, or @preamble blocks no longer reports the plain-text comments between its entries as citations Borges couldn't read, or leaves them in the paste box. BibTeX ignores text outside entries, and JabRef keeps such comments in the files it saves. Pastes without those blocks still read text between entries as citations.
  • Thesis and report types from BibTeX. A BibTeX @mastersthesis, @phdthesis, or @techreport, or a BibLaTeX type holding a standard type key such as mathesis or patentde, now imports with a readable genre ("Master's thesis", "PhD thesis", "technical report", "German patent"). Before, the bare key was stored, so a style that prints the genre showed "[mathesis]". Found in Zotero's own BibTeX export.
  • EndNote BibTeX without cite keys. EndNote's BibTeX export can write entries with no key (@article{ straight into the fields), and Mendeley writes @misc{, for an item without one. Borges couldn't read either; it now imports them, and export builds a key from the author and year.
  • Pasted XML exports. Pasting an EndNote XML or Word bibliography XML file saved the markup as a free-text citation. Borges now says it can't read XML exports and suggests BibTeX or CSL JSON.
  • Place of publication from Mendeley BibTeX. Mendeley Reference Manager writes the place into a nonstandard city field, which was dropped, so its books, chapters, and reports imported with no place. Borges now reads city when the entry has no address or location. Only field names count, never text inside a value, so a title such as "Why city = culture matters" imports unchanged, and a value that mentions address = does not block the place.

Testing

  • Real reference-manager exports. src/lib/reference-manager-corpus.test.js runs real exporter output through the parser: 13 files from Better BibTeX's own tests (Better BibTeX, Better BibLaTeX, and Better CSL JSON) and a JabRef database file, both MIT-licensed. manifest.json records each file's source, license, and expected entry and error counts, and the suite snapshots the CSL-JSON every file yields. Maintainers' own exports go in contributed/, which now holds Zotero 10's BibTeX, BibLaTeX, CSL JSON, and RIS exports of a 12-work sample library (contributed/borges-sample.ris), and Mendeley Reference Manager 2.150's BibTeX and RIS exports of the 9 works its RIS import kept; see the corpus README. Public EndNote samples: a user's EndNote BibTeX export from Better BibTeX's import tests, and an EndNote 20 XML export from JabRef's tests.

What's Changed

  • chore(deps-dev): bump the npm_and_yarn group across 1 directory with 2 updates by @dependabot[bot] in #187
  • Add real reference-manager exports to the parser corpus by @dknauss in #195
  • Add wp borges duplicates and fill kept copies in bulk deduplicate by @dknauss in #194
  • Sort ABNT titles without Portuguese leading articles by @dknauss in #196
  • Add Zotero 10 exports to the corpus and readable BibTeX genres by @dknauss in #197
  • Accept BC years written as strings in CSL-JSON, and print years before 1000 by @dknauss in #198
  • Add Mendeley and public EndNote exports to the corpus, with the import fixes they exposed by @dknauss in #199
  • Italicize titles stored with straight quotation marks by @dknauss in #201
  • Add tools/markup-value: measure what Borges markup gives machines by @dknauss in #203
  • Import RIS records and whole .ris exports by @dknauss in #202
  • Clear zod and qs advisories without the wp-scripts 37 jump by @dknauss in #210
  • Read Mendeley's city field only where BibTeX allows a field name by @dknauss in #213
  • Mark Phase 05 complete in the planning docs by @dknauss in #214
  • Sort a single author first in notes styles by @dknauss in #215
  • Move to @wordpress/scripts 37, keeping the current code style by @dknauss in #216
  • Format JavaScript and JSON with WordPress paren spacing by @dknauss in #217
  • Skip the paren-spacing reformat in git blame by @dknauss in #218
  • Close JSON-LD and COinS markup gaps at render time by @dknauss in #211
  • Release 1.16.0 by @dknauss in #219

Full Changelog: v1.15.0...v1.16.0