Fix condenseFlow for objects#371
Conversation
|
That's not self-sufficient and strange. Like attempt to fix one kludge with another kludge. Why not fix |
|
I could also just have fixed the option by not doing anything with dumped objects, true. |
|
@puzrin if you look at the tests this actually does fix |
|
I'm strongly against adding options "just for fun". Dumper should provide correct output. If |
|
I don't think it is "just for fun", but another step towards supporting the whole yaml spec with this library. I'm don't think |
|
@puzrin please read my comment above, this actually fixes The Hope this makes it more clear. |
|
If i start add everything possible to imagine, api will become messy very quickly. So, i prefer to be gready. There were no requests for new quoting option. The only consumers are you, with specific use case for condenceFlow (invented by you too). I think, it will be better to introduce condenced format improvement and keep api simple. If this PR contains fix for |
I count two requests :) As an open source maintainer myself I totally understand that API bloat is a thing and you want to keep the API minimal, but I think the option is justified here. Structured URL serialisation formats are becoming more common as applications become more complex, e.g. this is a URL I just copied from Expensify (could be so much prettier in YAML): While some users may want a super-minimal YAML parser, I think they are already well served with options like tj/js-yaml (389 lines). This project on the other hand already has a lot of options for greater flexibility, and the PR only adds a minimal amount of new code lines. And I guess this PR is proof itself that there is continuous interest and willingness to maintain this ;) I would be happy to get both the fix and the option merged. |
|
I still stay, that:
Right now IMHO it worth to add keys quoting to |
|
Updated it to just fix the problem as of now, please let me know what else to do to merge quickly :) |
|
Published |
* master: (58 commits) Check for leading newlines when determining if block indentation indicator is needed (nodeca#404) Add property based tests to assess load reverses dump (nodeca#398) 3.11.0 released Browser files rebuild Dumper: fix negative integers in bin/octal/hex formats, close nodeca#399 support es6 arrow functions, fixes nodeca#389 (nodeca#393) Fix typo in README.md (nodeca#373) 3.10.0 released Browser files rebuild Add test for astrals dump Combine surrogate pairs into one escape sequence when encoding. (nodeca#369) Fix condenseFlow for objects (nodeca#371) correct spelling mistake (nodeca#367) More meaningful error for loader (nodeca#361) Fix typo and format code. (nodeca#365) 3.9.1 released Browser files rebuild Ensure stack is present for custom errors (fixes nodeca#351) (nodeca#360) 3.9.0 released Browser files rebuild ...
Closes #370