Skip to content

Conversation

@amtoine
Copy link
Member

@amtoine amtoine commented Nov 13, 2024

Description

i was playing with the NDNUON format and using local definitions of from ndnuon and to ndnuon but then i thought they could live in the standard library next to from ndjson and to ndjson 😋

User-Facing Changes

users can now add the following to their configs and get NDNUON ready to go

use std formats ["from ndnuon" "to ndnuon"]

Tests + Formatting

i did simply mimic the tests for from ndjson and to ndjson, i hope it's fine since the recent big change to the standard library

After Submitting

@amtoine
Copy link
Member Author

amtoine commented Nov 13, 2024

i couldn't try the tests locally so let's see if the CI is happy 😏

@amtoine
Copy link
Member Author

amtoine commented Nov 13, 2024

omg i did not export the commands 🤣 👀

Copy link
Contributor

@NotTheDr01ds NotTheDr01ds left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I haven't tested personally, but the code and tests look good overall. Just some minor suggestions on the comment/doc wording.

lines | each { from nuon }
}

# Convert structured data to NDNUON, i.e. newline-delimited NUON
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Convert structured data to NDNUON, i.e. newline-delimited NUON
# Convert structured data to NDNUON (newline-delimited NUON)

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed in 0e7e3c0

@sholderbach sholderbach added A:file-format Parsing/Writing of file formats/protocols A:std-library Defining and improving the standard library written in Nu labels Nov 15, 2024
@amtoine
Copy link
Member Author

amtoine commented Nov 20, 2024

I haven't tested personally, but the code and tests look good overall. Just some minor suggestions on the comment/doc wording.

here is an example 😉

running to ndnuon on the output of the following in the Nushell repo on this PR branch

ls | first 3 | reject modified

gives

{name: CITATION.cff, type: file, size: 812b}
{name: CODE_OF_CONDUCT.md, type: file, size: 3444b}
{name: CONTRIBUTING.md, type: file, size: 11224b}

Copy link
Contributor

@WindSoilder WindSoilder left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I think it's good to go

@WindSoilder WindSoilder merged commit 547c436 into nushell:main Nov 27, 2024
13 checks passed
@github-actions github-actions bot added this to the v0.101.0 milestone Nov 27, 2024
@amtoine
Copy link
Member Author

amtoine commented Nov 27, 2024

noice, thanks @WindSoilder for the merge 🙏

@amtoine amtoine deleted the add-nuon-format-commands-to-stdlib branch November 27, 2024 18:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A:file-format Parsing/Writing of file formats/protocols A:std-library Defining and improving the standard library written in Nu

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants