Skip to content

Fix test failures caused by updated js-yaml and external link checks#3703

Merged
ahpook merged 2 commits into
mainfrom
ahpook/20260710-fix-failures
Jul 11, 2026
Merged

Fix test failures caused by updated js-yaml and external link checks#3703
ahpook merged 2 commits into
mainfrom
ahpook/20260710-fix-failures

Conversation

@ahpook

@ahpook ahpook commented Jul 11, 2026

Copy link
Copy Markdown
Contributor

Tests were throwing the error:

Error: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default.
at Object.safeLoad (/home/runner/work/opensource.guide/opensource.guide/test/node_modules/js-yaml/index.js:8:11)
at Object. (/home/runner/work/opensource.guide/opensource.guide/test/prose:59:25)

Additionally, CI usually fails on the remote URL checks, so this disables running them as part of the normal test suite and only turns them on if an env variable is set, which can happen async on a scheduled workflow.

  • Have you followed the contributing guidelines?
  • Have you explained what your changes do, and why they add value to the Guides?

Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.


Tests were throwing the error:

Error: Function yaml.safeLoad is removed in js-yaml 4. Use yaml.load instead, which is now safe by default.
    at Object.safeLoad (/home/runner/work/opensource.guide/opensource.guide/test/node_modules/js-yaml/index.js:8:11)
    at Object.<anonymous> (/home/runner/work/opensource.guide/opensource.guide/test/prose:59:25)
@ahpook ahpook requested a review from a team as a code owner July 11, 2026 00:24
Copilot AI review requested due to automatic review settings July 11, 2026 00:24
@ahpook ahpook temporarily deployed to Pages Preview July 11, 2026 00:24 — with GitHub Actions Inactive
@ahpook ahpook temporarily deployed to Pages Preview July 11, 2026 00:25 — with GitHub Actions Inactive

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 prose test harness to be compatible with newer js-yaml versions by replacing the removed yaml.safeLoad API with yaml.load, aligning with the error message shown in the PR description.

Changes:

  • Replace yaml.safeLoad(...) with yaml.load(...) when loading _config.yml in the prose tests.
Show a summary per file
File Description
test/prose Updates YAML parsing call to use yaml.load instead of the removed yaml.safeLoad.

Review details

Tip

Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Low

HTMLProofer remote URL checks frequently fail in CI due to rate
limiting on third-party sites. Make external checks opt-in via the
CHECK_EXTERNAL_LINKS env var (default off) so normal CI runs stay
fast and reliable, and add a weekly scheduled workflow that runs the
full external link check.

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
@ahpook ahpook temporarily deployed to Pages Preview July 11, 2026 00:35 — with GitHub Actions Inactive
@ahpook ahpook changed the title Fix test failures caused by updated js-yaml Fix test failures caused by updated js-yaml and external link checks Jul 11, 2026
@ahpook ahpook requested a review from Copilot July 11, 2026 00:40

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Review details

  • Files reviewed: 4/4 changed files
  • Comments generated: 1
  • Review effort level: Medium

Comment thread test/prose
@ahpook ahpook merged commit 6f33669 into main Jul 11, 2026
8 checks passed
@ahpook ahpook deleted the ahpook/20260710-fix-failures branch July 11, 2026 00:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants