-
Notifications
You must be signed in to change notification settings - Fork 431
feat: add writeMulti option for yaml #1894
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
thx for the review. i don't think the failing test is mine |
@roelarents Ill rerun it. |
another try? |
@roelarents could you try to update to the main branch and see if it fixes it for you? |
8b05e57
to
6234f2e
Compare
@@ -87,7 +96,11 @@ export function createYamlJSONataTransformAction(): TemplateAction<{ | |||
if (ctx.input.as === 'object') { | |||
resultHandler = rz => rz; | |||
} else { | |||
resultHandler = rz => YAML.stringify(rz, ctx.input.options); | |||
if (ctx.input.writeMulti) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
MINOR: A ternary would be a bit more concise here and match the implementation in the handler below.
This PR has been automatically marked as stale because it has not had recent activity from the author. It will be closed if no further activity occurs. If the PR was closed and you want it re-opened, let us know and we'll re-open the PR so that you can continue the contribution! |
YAML util actions could load multidoc YAML (with
loadAll
) but not write it yet. Added an optionwriteMulti
to write an array as multidoc (---
) YAML.✔️ Checklist
yarn changeset
in the root)