Fix test failures caused by updated js-yaml and external link checks#3703
Merged
Conversation
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)
Contributor
There was a problem hiding this comment.
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(...)withyaml.load(...)when loading_config.ymlin 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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
Please note: we will close your PR without comment if you do not check the boxes above and provide ALL requested information.