-
-
Notifications
You must be signed in to change notification settings - Fork 48
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
Convenience module for CommonJS #131
Comments
v9 switched to ES modules which is from my personal view also the future. You should also go there in the long run. Until then v8 and the wikidata-sdk convenience module are the way to go? But thats my own opinion. Maybe maxlath has other opinions. |
|
(So, I will indeed continue to use v8 but I was wondering if it was possible to get a |
If const wdk = require('wikibase-sdk')({
instance: 'https://www.wikidata.org',
sparqlEndpoint: 'https://query.wikidata.org/sparql'
}) or is there any added benefit of I can't look deeper into that these days, sorry, but I guess as Typescript compiles the code anyway, it could also produce a CJS build, no? It would add to the already much increased complexity of this module though, so if we can avoid it, I would indeed prefer that. |
Not really. |
TypeScript can do that but it would be vastly different from "just removing the type annotations". As its already ES module output and its closer to the input I would also stay at ES module output for simplicity. All major runtimes and browsers support ES modules for years now (if it doesn't it's probably a security nightmare) and basically everything is migrating towards ES modules. It would be weird to return to CommonJS after already migrating to ESM with this library. |
Do you have statistics to back that up? Again, I don't have a problem with ES modules except that I don't want to force the users of my libraries to use them. |
No I don't have actual numbers for that. But it is what I observe. Also other pre-ESM systems get removed like Gnome 45 does with their move from GJS to ESM so its not only CommonJS that gets replaced by JavaScripts own module system.
I didn't question that. Its a good cause and the reason why I haven't migrated my own libraries so far. (But I probably should on breaking changes?) |
Now that
wikidata-sdk
is deprecated on npm, could we have a convenience module (akin towikibase-sdk/wikidata.org
) for the CommonJS release line? I cannot convert my libraries to ESM-only.The text was updated successfully, but these errors were encountered: