-
Notifications
You must be signed in to change notification settings - Fork 1
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
Migrates to json-event-parser #43
base: master
Are you sure you want to change the base?
Conversation
The CI should work when |
Pull Request Test Coverage Report for Build 2993246318
💛 - Coveralls |
Pull Request Test Coverage Report for Build 3180161106
💛 - Coveralls |
@Tpt Is this ready for review? Or just for initial testing of the new lib, and only to be used upon first stable release? |
Yes, it should be ready for review. |
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.
Nice work!
Just some general questions on where everything should be located.
@surilindur could you test this version on your end to see if it fixes comunica/comunica#1052 and #42 (in the jQuery widget without polyfills)?
@@ -96,6 +96,17 @@ describe('SparqlJsonParser', () => { | |||
`)))).toEqual([]); | |||
}); | |||
|
|||
it('should convert a slightly invalid empty SPARQL JSON response (common PHP error)', async () => { |
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.
Why is this slightly invalid? (looks valid to me at first glance)
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.
Because the "bindings"
key value should be an array and not an object.
I am sorry, I completely forgot this! With the changes here, I could no longer reproduce comunica/comunica#1052. The |
@surilindur Amazing news! Thank you! @rubensworks Do you want to release a new beta of |
Done! Released v1.0.0-beta.2. |
Makes bindings parsing work really in streaming
@rubensworks Thank you! I have updated the PR to use the beta 2. |
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.
Nice! This one should be ready to merge then, once json-event-parser
is out of beta.
@@ -32,6 +32,7 @@ | |||
"devDependencies": { | |||
"@types/jest": "^28.0.0", | |||
"@types/minimist": "^1.2.0", | |||
"@types/readable-stream": "^2.3.14", |
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.
I guess this one should be added as non-dev dep to json-event-parser
.
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.
Not sure it's required. json-event-parser
works from plain JS projects without needing @types/readable-stream
. What do you think about it?
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.
The convention in TS is that typings packages are included as non-dev deps, so that downstream users don't have to include all of these typing packages manually (which can incur in a lot of overhead for many transitive deps). And since typings packages are usually very small, this is not a problem for non-TS projects.
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.
Thank you! Done: comunica/json-event-parser.js#2
Is there anything left to be done to get the |
@LuisAverhoff Not much. I believe it's good to go as a MVP. At worst we can easily push a 2.0. |
Do ping me when you think it's good to go :-) |
I believe that when comunica/json-event-parser.js#2 is merged, the codebase should be ready to be released. |
@Tpt Great! Before we release, could you look into configuring coveralls in GH Actions, and a badge in the readme (see some of my other repos as example)? I also see coverage is not 100% yet. Would it be feasible to bump this to 100%? Does the current implementation cover all of the requirements of rubensworks/jsonld-streaming-parser.js#76? (it's ok if this is not the case if this is planned for a next version, we just have to keep backwards-compat in mind then) |
Sure, working on it. I'm also going to make the parser validates the JSON a bit more carefully to avoid bad surprises (very invalid numbers...).
I think so. The basic parser seems to be working. I might just have to write some utilities on top of it but they are likely to be layers on top of the |
Nice :-) Would be good to have some test in the JSON-LD parser repo to validate this. |
Makes bindings parsing work really in streaming