Skip to content

chore(deps): bump js-yaml to 5.3.0 - #12486

Merged
mergify[bot] merged 1 commit into
mainfrom
devs/jd/jd/js-yaml-5/bump-js-yaml-5-3-0--67baaa31
Aug 24, 2026
Merged

chore(deps): bump js-yaml to 5.3.0#12486
mergify[bot] merged 1 commit into
mainfrom
devs/jd/jd/js-yaml-5/bump-js-yaml-5-3-0--67baaa31

Conversation

@jd

@jd jd commented Aug 21, 2026

Copy link
Copy Markdown
Member

Supersedes #12345, which only moves the version and so is red on build,
lint, test and config-examples. v5 is a breaking release and the two
call sites have to move with it.

scripts/validate-config-examples.mjs now imports js-yaml as a namespace.
v5 dropped the CommonJS default export, so import yaml from 'js-yaml' failed
to load at all. That was also behind the three test failures: yaml was
undefined, yaml.load threw a TypeError, the script caught it and reported
"invalid YAML", so an example that should have failed AJV schema validation
failed at the parse step instead. All three pass on the import fix alone — no
v5 parsing behaviour change is involved.

OptionsTable.tsx drops noCompatMode: true, which v5 removed. It suppressed
YAML-1.1-compat quoting of yes/no/on/off and base-60 values. None of
the 136 defaults in the schema are one of those, so this is a no-op today; v5
quotes them by default and offers no way to opt out, so a future default of
no would start rendering as "no".

OptionsTable.tsx also renames quotingType: '"' to quoteStyle: 'double',
and this is the reason the bump is not mechanical. v5 renamed that option and
flipped its default to 'single', so just deleting the two options tsc
rejects silently reflows four published defaults. The worst is
post_check.title, whose value contains single quotes:

before  "'{{ check_rule_name }}'{% if check_status == 'success' %} …"
after   '''{{ check_rule_name }}''{% if check_status == ''success'' %} …'

Equivalent YAML, unreadable in a table people copy-paste from.

@types/js-yaml is dropped rather than bumped: v5 ships its own types, so the
stub is now a mismatched duplicate.

This goes to 5.3.0 rather than the 5.2.3 in #12345 because ^5.2.3 resolves to
5.3.0 anyway, and 5.3.0 only adds a custom-tag API this repo does not touch —
dump output is byte-identical between the two.

Verification: built the site on main and on this branch and diffed the
output — all 385 pages are byte-identical, so nothing readers see moves. Every
schema default also renders identically through dumpDefault. pnpm check,
pnpm test (172), pnpm check:config-examples (122 examples) and
pnpm check:internal-leaks are green, and a full build with OG generation on
produces 137 cards, same as main.

Supersedes #12345, which only moves the version and so is red on `build`,
`lint`, `test` and `config-examples`. v5 is a breaking release and the two
call sites have to move with it.

`scripts/validate-config-examples.mjs` now imports js-yaml as a namespace.
v5 dropped the CommonJS default export, so `import yaml from 'js-yaml'` failed
to load at all. That was also behind the three test failures: `yaml` was
`undefined`, `yaml.load` threw a `TypeError`, the script caught it and reported
"invalid YAML", so an example that should have failed AJV schema validation
failed at the parse step instead. All three pass on the import fix alone — no
v5 parsing behaviour change is involved.

`OptionsTable.tsx` drops `noCompatMode: true`, which v5 removed. It suppressed
YAML-1.1-compat quoting of `yes`/`no`/`on`/`off` and base-60 values. None of
the 136 defaults in the schema are one of those, so this is a no-op today; v5
quotes them by default and offers no way to opt out, so a future default of
`no` would start rendering as `"no"`.

`OptionsTable.tsx` also renames `quotingType: '"'` to `quoteStyle: 'double'`,
and this is the reason the bump is not mechanical. v5 renamed that option *and*
flipped its default to `'single'`, so just deleting the two options `tsc`
rejects silently reflows four published defaults. The worst is
`post_check.title`, whose value contains single quotes:

    before  "'{{ check_rule_name }}'{% if check_status == 'success' %} …"
    after   '''{{ check_rule_name }}''{% if check_status == ''success'' %} …'

Equivalent YAML, unreadable in a table people copy-paste from.

`@types/js-yaml` is dropped rather than bumped: v5 ships its own types, so the
stub is now a mismatched duplicate.

This goes to 5.3.0 rather than the 5.2.3 in #12345 because `^5.2.3` resolves to
5.3.0 anyway, and 5.3.0 only adds a custom-tag API this repo does not touch —
`dump` output is byte-identical between the two.

Verification: built the site on `main` and on this branch and diffed the
output — all 385 pages are byte-identical, so nothing readers see moves. Every
schema default also renders identically through `dumpDefault`. `pnpm check`,
`pnpm test` (172), `pnpm check:config-examples` (122 examples) and
`pnpm check:internal-leaks` are green, and a full build with OG generation on
produces 137 cards, same as `main`.

Change-Id: I67baaa318cc15d45ff7f1d6dcf4e8bff693a2cb2
Copilot AI lite review requested due to automatic review settings August 21, 2026 20:32
@mergify
mergify Bot deployed to Mergify Merge Protections August 21, 2026 20:32 Active
@mergify

mergify Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 6 merge protections satisfied — ready to merge.

Show 6 satisfied protections

🟢 🤖 Continuous Integration

  • all of:
    • check-success = build
    • check-success = lint
    • check-success = test
    • any of:
      • check-success = test-broken-links
      • label = ignore-broken-links
    • any of:
      • check-success=Cloudflare Pages
      • -head-repo-full-name~=^Mergifyio/

🟢 👀 Review Requirements

  • any of:
    • #approved-reviews-by >= 2
    • author = dependabot[bot]
    • all of:
      • author = mergify-ci-bot
      • -head ~= ^docs-agent/

🟢 Enforce conventional commit

Make sure that we follow https://www.conventionalcommits.org/en/v1.0.0/

  • title ~= ^(fix|feat|internal|docs|style|refactor|perf|test|build|ci|chore|revert|ui)(?:\(.+\))?!?:

🟢 🔎 Reviews

  • #changes-requested-reviews-by = 0
  • #review-requested = 0
  • #review-threads-unresolved = 0

🟢 📕 PR description

  • body ~= (?ms:.{48,})

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Updates the repo to js-yaml@5.3.0 (a breaking major), and aligns the two runtime call sites with the v5 ESM export shape and dumper option changes, while removing the now-redundant @types/js-yaml package.

Changes:

  • Bump js-yaml to ^5.3.0 and update the lockfile accordingly.
  • Fix ESM import style in scripts/validate-config-examples.mjs to use a namespace import compatible with v5.
  • Update OptionsTable.tsx’s dump() options for v5 (remove noCompatMode, switch to quoteStyle), preserving the intended output formatting.

Reviewed changes

Copilot reviewed 3 out of 4 changed files in this pull request and generated no comments.

File Description
src/components/Tables/OptionsTable.tsx Adjust yaml.dump() options for js-yaml v5, keeping double-quote rendering for readable template defaults.
scripts/validate-config-examples.mjs Switch to import * as yaml from 'js-yaml' to match v5’s lack of default ESM export.
package.json Bump js-yaml to v5 and remove @types/js-yaml now that v5 ships types.
pnpm-lock.yaml Lockfile updates reflecting js-yaml@5.3.0 and removal of @types/js-yaml.
Files not reviewed (1)
  • pnpm-lock.yaml: Generated file

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@mergify
mergify Bot requested a review from a team August 21, 2026 20:36
@jd
jd marked this pull request as ready for review August 24, 2026 06:45
@mergify
mergify Bot requested a review from a team August 24, 2026 07:34
@mergify

mergify Bot commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

This pull request spent 3 minutes 37 seconds in the queue, including 2 minutes 41 seconds running CI.

Required conditions to merge

@mergify mergify Bot added the queued label Aug 24, 2026
@mergify
mergify Bot merged commit 5f877a2 into main Aug 24, 2026
11 checks passed
@mergify
mergify Bot deleted the devs/jd/jd/js-yaml-5/bump-js-yaml-5-3-0--67baaa31 branch August 24, 2026 08:42
@mergify mergify Bot removed the queued label Aug 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

4 participants