Repository navigation
Fix YAML block scalar AST massage - #19758
Closed
rushijagani-dev wants to merge 1 commit into
Closed
rushijagani-dev wants to merge 1 commit into
rushijagani-dev wants to merge 1 commit into
Conversation
✅ Deploy Preview for prettier ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify project configuration. |
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.
Description
Fixes #19256.
YAML AST massage was changing
blockLiteralandblockFoldednode values to hide trailing whitespace and newline differences. This removes that value rewrite so AST comparison sees the parser value directly. The existing folded block strip fixture currently remains AST-unstable because the printer still drops trailing space-only content, so it is recorded in the AST-unstable fixture list instead of being hidden by massage.Validation:
FULL_TEST=1 yarn jest tests/format/yaml/block-literal tests/format/yaml/block-folded --runInBand- passed; 2 suites, 364 tests, 60 snapshots.yarn jest tests/format/yaml/block-literal tests/format/yaml/block-folded --runInBand- passed; 2 suites, 62 tests, 60 snapshots.yarn prettier --check src/language-yaml/massage-ast/index.js tests/config/format-test/failed-format-tests.js- passed.yarn eslint src/language-yaml/massage-ast/index.js tests/config/format-test/failed-format-tests.js- passed.yarn lint:format-test- passed.Blockers:
yarn testandyarn lintwere not run locally; this change is limited to YAML AST massage and the format-test unstable fixture registry.UNABLE_TO_GET_ISSUER_CERT_LOCALLY; dependencies were installed with the repo-pinned Yarn release usingNODE_TLS_REJECT_UNAUTHORIZED=0 yarn install --immutable, with no lockfile changes.Checklist
docs/directory).changelog_unreleased/*/XXXX.mdfile followingchangelog_unreleased/TEMPLATE.md.