Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 19, 2025

js-yaml 4.x removed safeDump() (replaced with dump() which is now safe by default) and changed string quoting behavior, causing test failures.

Changes

  • API migration: Replaced yaml.safeDump() with yaml.dump() in src/box-command.js

  • Updated test fixtures: Modified YAML test fixtures to match js-yaml 4.x native output format:

    • Removed quotes from URLs (e.g., 'https://www.box.com'https://www.box.com) - js-yaml 4.x no longer quotes URLs
    • Added quotes to leading-zero numeric strings (e.g., 098765432109'098765432109') - js-yaml 4.x quotes these per YAML 1.2 spec
  • Reverted test file: Restored test/fixtures/bulk/saveTest.txt to its original state

This approach uses js-yaml 4.x's native output format directly without post-processing for a cleaner, more maintainable solution. All 996 tests are passing.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@CLAassistant
Copy link

CLAassistant commented Nov 19, 2025

CLA assistant check
All committers have signed the CLA.

@congminh1254
Copy link
Member

@copilot Revert the file test/fixtures/bulk/saveTest.txt, and instead of adjust to be v3 backward compatibility, we can change the fixtures to match with the v4

Copilot AI changed the title [WIP] Bump js-yaml from 3.14.1 to 4.1.1 Fix js-yaml 4.x compatibility by replacing safeDump and adjusting quoting behavior Nov 19, 2025
Copilot AI requested a review from congminh1254 November 19, 2025 11:13
Copy link
Contributor Author

Copilot AI commented Nov 19, 2025

@copilot Revert the file test/fixtures/bulk/saveTest.txt, and instead of adjust to be v3 backward compatibility, we can change the fixtures to match with the v4

Done! I've:

  1. Reverted test/fixtures/bulk/saveTest.txt to its original state ("foo") - Commit: 6a31d5b
  2. Removed the v3 backward compatibility post-processing from src/box-command.js
  3. Updated all YAML test fixtures to match js-yaml 4.x output (removed quotes from URLs, added quotes to leading-zero numeric strings) - Commit: 2aa165b

This is a cleaner approach that uses js-yaml 4.x's native output format directly without post-processing. All 996 tests are passing.

Copilot AI changed the title Fix js-yaml 4.x compatibility by replacing safeDump and adjusting quoting behavior Fix js-yaml 4.x compatibility by replacing safeDump and updating fixtures Nov 19, 2025
@congminh1254 congminh1254 changed the base branch from dependabot/npm_and_yarn/js-yaml-4.1.1 to main November 19, 2025 11:29
@congminh1254 congminh1254 changed the title Fix js-yaml 4.x compatibility by replacing safeDump and updating fixtures chore: Bump js-yaml from 3.14.1 to 4.1.1 Nov 19, 2025
@congminh1254 congminh1254 marked this pull request as ready for review November 19, 2025 11:30
@congminh1254 congminh1254 requested a review from a team November 19, 2025 11:30
@coveralls
Copy link

coveralls commented Nov 19, 2025

Pull Request Test Coverage Report for Build 19499953363

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.04%) to 85.625%

Totals Coverage Status
Change from base Build 19498701312: 0.04%
Covered Lines: 4610
Relevant Lines: 5191

💛 - Coveralls

@congminh1254 congminh1254 merged commit 7d3c19f into main Nov 19, 2025
16 checks passed
@congminh1254 congminh1254 deleted the copilot/sub-pr-606 branch November 19, 2025 13:17
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.

5 participants