Default to yaml over js-yaml by jdmarshall · Pull Request #859 · node-config/node-config

📝 Walkthrough

Walkthrough

The PR replaces the js-yaml devDependency with the yaml package. The parser.js file is refactored to update the YAML parsing lazy-load flow, including adjustments to method calls (parse vs load) and error messaging to align with the new dependency.

Changes

Cohort / File(s) Summary
YAML Dependency Migration
package.json, parser.js
Replaced js-yaml ^3.2.2 with yaml ^2.8.2. Refactored lazy-load flow in parser: primary loader uses YAML_DEP for Yaml with parse(content), fallback loads JS_YAML_DEP into JSYaml with load(content). Error messages updated to reference "yaml" dependency.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

Poem

🐰 We've traded js-yaml for yaml's sweet way,
Lazy loads refactored for the new day,
Parse and load methods now in sight,
Dependencies dancing ever so light,
Hops of joy for this upgrade's might! 🌟

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main change: switching the default YAML parser from js-yaml to yaml, which is clearly demonstrated by the dependency replacement and parser refactoring throughout the changeset.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.