-
-
Notifications
You must be signed in to change notification settings - Fork 69
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
Add support for additional file types via any-json
#66
Add support for additional file types via any-json
#66
Conversation
@jessedc @epoberezkin I'm happy to give this library some love if you'd like :) I've also got a Weird; pretty sure coverage was already at least 20% down before adding this :/ |
Hey - this package is definitely happy to get more love than it’s getting from me. I will check what’s happening here with the coverage. It may be that coveralls changed the way it’s counted if there were no large changes? |
@epoberezkin cheers - let me know what you find, or if there's anything I can do to help.
Awesome, I"ll put this on my list of things to look into when I get some bandwidth. Personally I'm quite keen on this library as I work at a primarily ruby & php heavy shop, so being able to have a line like |
@epoberezkin I'd say something def has changed w/ coveralls, as I just opened this PR oclif/config#90 (comment) moving a package from |
@epoberezkin have you had a chance to look at what's causing coverage problems? Would be cool to get this out the door so we can start the love giving & move off pajv :D |
tests pass, needs to be covered in docs. |
@epoberezkin light ping - I know you're pretty busy, but would be great to get this across so I can start giving further love :) |
@G-Rath I like the idea of supporting multiple formats, but There are quite a few synchronous parsers that parse these formats - yml probably being the most important anyway - I would rather we use them then any-json that is for some reason asynchronous. Another viable option is to refactor the code to async and use promises directly. But using synchronous parsers seems better in this case. |
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.
see comment
that's exactly what it's doing: from memory, it's exploiting the fact that C++ libs are allowed to say if they're sync or async, and so uses a lib binding to say "take an async promise, block, and return its results as sync". I'm not a fan of it either, but since the feature worked as-is I aimed for getting it landed before doing any refactoring that might change behaviour; but since you're on board with having a larger PR I'm more than happy to look to refactor it to be sync. (This ties in well with moving off |
I'd rather we just use sync parser for yaml to be honest, other formats are not that needed. |
@epoberezkin I've reimplemented this PR to use the The others either required more complex implementation (i.e ini had some array conditional checking), used promises (i.e csv), or were overly large (i.e cson, which was 80kb and ships with a cli that handles converting to json, so you should be able to just pipe the two together) |
Great, thank you, Gareth! |
@epoberezkin or @jessedc, thanks for this great repo. Would you mind bringing this version to npm? I would really like to use this feature. |
@PascalPflaum will do |
released |
It all works pretty well considering; I've adjusted it so that it shouldn't be a breaking change - i.e you can still use a javascript file.
Not too happy about
deasync-promise
, since it's binary package, but I think this a good first step.To eliminate it,
ajv-cli
would need to be refactored to use promises - it's not a big change, but it's a knock on effect that requires the whole general chain of methods to be touched, so I'd prefer to get a thumbs up before sinking time into.Resolves #61