Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Activity
Eric Prud'hommeaux
@ericprud
The RDF spec documents how the outside world should interact with RDF graphs. The practical programmer interface can be much more intimate.
Eric Prud'hommeaux
@ericprud
I believe that not having bnodes in the process would mean you can't use bnodes. If you get a quad with a bnode back from getQuads(), you expect to be able to identify that bnode in subsequent getQuads(), removeMatching(), addAll(), etc
otherwise, getting a bnode back would basically be a dead end.
Austin Wright
@awwright
New version of "rdf" out with Dataset, Quad, factory, Graph#simplyEntails, TermMap, PrefixMap, and several improvements: https://yarnpkg.com/en/package/rdf
Please test and submit feedback :)
elf Pavlik
@elf-pavlik
:clap: :clap: :clap:
Angelo Veltens
@angelo-v
Hi, I am trying to use fetch-lite in a browser environment. What I got from the readme it is meant to work there.
Unfortunately I am getting an error, because the finished imported here from readable-stream is undefined.
finished is somehow not exported in the browsers version, see https://github.com/nodejs/readable-stream/blob/master/readable-browser.js
cc @bergos
Tomasz Pluskiewicz
@tpluscode
would be nice if you could share a stackblitz or smth which reproduces the problem
readable-stream is yet another package? how are you serving your code? webpack?
Angelo Veltens
@angelo-v
yep tested with webpack dev server so far, I could prepare an example, just wanted to be sure that this is nothing obvious
Tomasz Pluskiewicz
@tpluscode
have not had this myself and I've used those packages in web projects
Angelo Veltens
@angelo-v
ok, good to know this :thumbsup:
getting a different error at stackblitz... https://stackblitz.com/edit/react-5hkahd?file=index.js
Tomasz Pluskiewicz
@tpluscode
well damn ;)
victor felder
@vhf
I think you have to tell webpack to transpile fetch-lite
Tomasz Pluskiewicz
@tpluscode
doesn't stackblitz do that?
victor felder
@vhf
I'd be suprised it does by default, node_modules should default to being excluded from transpilation steps
This seems relevant: facebook/create-react-app#6195
Angelo Veltens
@angelo-v
transpile to what? Its ES5 already if I see this correctly
Thomas Bergwinkl
@bergos
@angelo-v i'm not an webpack expert, but if the readable-browser.js code is used for readable stream, then the original package, which is also for the browser, got overwritten. here the package.json: https://github.com/rdfjs/fetch-lite/blob/master/package.json#L29 and the actual code which should be used: https://www.npmjs.com/package/readable-stream
Angelo Veltens
@angelo-v
You are right, @bergos this is the library, but it is actually used. The thing is, it overrides the readable.js with a readable-browser.js in it's own package.json (see https://github.com/nodejs/readable-stream/blob/c7dee8c4d0e7315ab7ebf6ea3eb3c9669f00fb96/package.json#L57). And the readable-browser.js does not export finished for some reason. Not sure if this is intentionally or a bug, I will file an issue there to clarify this
Angelo Veltens
@angelo-v
victor felder
@vhf

transpile to what? Its ES5 already if I see this correctly

It's ES2017 (which makes it ES8 I guess) but more importantly the transpile step could add the polyfills for Buffer, etc.

Angelo Veltens
@angelo-v
yeah, the polyfills seam to be missing at stackblitz, but this is not the case in my real app. There I just have the issue with the missing finished from readable-stream.
Thomas Bergwinkl
@bergos
@angelo-v thanks for creating the issue. i started to use the function also in some other packages (not rdfjs), hopefully prevents any trouble for these packages.
also i still don't get why it get's overwritten with the code you posted the link to. the idea of the readable-stream package is to have a stream implementation which is consistent on all node versions and in the browser. if it gets overwritten, it's almost like using the stream package and rely on the node version people are using.
Angelo Veltens
@angelo-v
The code base that is re-exported in readable-browser.js is the same as in readable.js so it should be no difference. It's just that some parts in readable-browser.js are missing for unknown reason. But good question, why even having the readable-browser.js if it exports the same?
Thomas Bergwinkl
@bergos
yes. i think the code is there to map the stream package to readable-browser.js. maybe made sense once, but maybe it's better now to just map stream to readable-stream.
Tomasz Pluskiewicz
@tpluscode
oh bugger, I just got the same problem with finished
@angelo-v what do I need to do?
Angelo Veltens
@angelo-v
@tpluscode you need to support this PR :)
Tomasz Pluskiewicz
@tpluscode
really. anything we can do on our end @bergos ?
Thomas Bergwinkl
@bergos
@tpluscode i'm not an webpack expert, but maybe it could be solved somehow via the resolve logic/config: https://webpack.js.org/configuration/resolve/
Angelo Veltens
@angelo-v
I do not think so. Even if we manage to enforce readable.js instead of readable-browser.js, it will fail in the browser, because there is no process.env
Thomas Bergwinkl
@bergos
maybe if you configure resolve to use a file in your own codebase, use @angelo-v version of https://github.com/angelo-v/readable-stream/blob/master/readable-browser.js and replace ./lib/ with readable-stream/lib/?
Angelo Veltens
@angelo-v
might work, but I would prefer when they just merge the **%# PR
Thomas Bergwinkl
@bergos
sure, my proposal is just a workaround
Angelo Veltens
@angelo-v
after I took the effort and migrated some tests they finally merged it nodejs/readable-stream#409
let's hope for a quick release....
Tomasz Pluskiewicz
@tpluscode
woo hoo
elf Pavlik
@elf-pavlik
:clap:
Angelo Veltens
@angelo-v
here we go, please update your dependencies :) https://github.com/nodejs/readable-stream/releases/tag/v3.4.0
Adrian Gschwend
@ktk
Am I right that there is currently no RDFa parser that implements the new RDFJS stream interface?
Ruben Taelman
@rubensworks
It already passes all spec tests, just need to cleanup some things, optimize, and document.
Adrian Gschwend
@ktk
yay!
@rubensworks we will use it in the same issue in rdf-vocabularies, some only return RDFa :)