@barmark/render 0.19.0 → 0.19.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -6,6 +6,16 @@ package uses [semantic versioning](https://semver.org/).
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.19.1] - 2026-11-12
10
+
11
+ ### Fixed
12
+
13
+ - **A chart whose composer is "Traditional"** (or "Trad.", "Traditional, 16th
14
+ century") now prints that credit as written, not "Music by
15
+ Traditional"; the same name for words and music prints once, as written,
16
+ not "Words and music by Traditional". A real name, or one that only starts with "Trad", still
17
+ reads "Music by …"; the lyricist and arranger lines are unchanged.
18
+
9
19
  ## [0.19.0] - 2026-11-10
10
20
 
11
21
  ### Added
@@ -525,7 +535,8 @@ that needs no script or as the `<barmark-chart>` web component. Requires
525
535
  zoom without sideways scrolling, the element renders and re-renders, and
526
536
  a screen reader hears "bar 9: D". Run them with `bun run test:browser`.
527
537
 
528
- [Unreleased]: https://github.com/kevinpeckham/barmark/compare/render-v0.19.0...HEAD
538
+ [Unreleased]: https://github.com/kevinpeckham/barmark/compare/render-v0.19.1...HEAD
539
+ [0.19.1]: https://github.com/kevinpeckham/barmark/compare/render-v0.19.0...render-v0.19.1
529
540
  [0.19.0]: https://github.com/kevinpeckham/barmark/compare/render-v0.18.0...render-v0.19.0
530
541
  [0.18.0]: https://github.com/kevinpeckham/barmark/compare/render-v0.17.1...render-v0.18.0
531
542
  [0.17.1]: https://github.com/kevinpeckham/barmark/compare/render-v0.17.0...render-v0.17.1
package/dist/credits.js CHANGED
@@ -5,14 +5,21 @@ function names(list) {
5
5
  return `${list.slice(0, -1).join(", ")} and ${list.at(-1)}`;
6
6
  }
7
7
  const same = (a, b) => a.length === b.length && a.every((x, i) => x === b[i]);
8
+ /** "Traditional", "Trad.", "Traditional, 16th century": already a credit, so no "Music by". */
9
+ const traditional = /^trad(\.|itional\b)/i;
8
10
  /** The header's credit lines, as a score sets them; the copyright goes to the foot. */
9
11
  export function creditsText(credits) {
10
12
  const { composer, lyricist, arranger } = credits;
11
13
  const lines = [];
12
- if (composer.length > 0 && same(composer, lyricist))
14
+ const asWritten = composer.length === 1 && traditional.test(composer[0]);
15
+ if (asWritten && same(composer, lyricist))
16
+ lines.push(composer[0]);
17
+ else if (composer.length > 0 && same(composer, lyricist))
13
18
  lines.push(`Words and music by ${names(composer)}`);
14
19
  else {
15
- if (composer.length > 0)
20
+ if (asWritten)
21
+ lines.push(composer[0]);
22
+ else if (composer.length > 0)
16
23
  lines.push(`Music by ${names(composer)}`);
17
24
  if (lyricist.length > 0)
18
25
  lines.push(`Words by ${names(lyricist)}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@barmark/render",
3
- "version": "0.19.0",
3
+ "version": "0.19.1",
4
4
  "description": "Render barmark chord charts as a clean, accessible bar grid: HTML with Declarative Shadow DOM, or the <barmark-chart> web component.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -47,7 +47,7 @@
47
47
  "url": "https://github.com/kevinpeckham/barmark/issues"
48
48
  },
49
49
  "dependencies": {
50
- "barmark": "^0.23.0"
50
+ "barmark": "^0.23.1"
51
51
  },
52
52
  "scripts": {
53
53
  "build": "rm -rf dist && tsc -p tsconfig.build.json",