Closed SirkoS closed 5 years ago
hey @SirkoS, thanks for this PR! unfortunately, there is already a branch addressing this issue, and more generally getting rid of wikidata.org coupling and renaming the module wikibase-edit
. The approach taken by this branch is to query properties datatypes only when needed, and directly from the Wikibase API: even less configuration to do \o/ could you give it a try?
NB: there are several yet undocumented breaking changes, so you can also just wait for the new version to be documented and published
I missed that. I just saw some comments here and there about that split, but didn't spot the branch.
I'll try to test that branch with my code. Any ETA for when you'll publish that version will be available via npm?
@SirkoS hopefully in the coming week
Sounds good!
I was able to rewrite my code using you branch. So from my side everything seems fine.
While looking through your code for the mentioned changes, I noted some things:
the check in wrappers_utils.js/validateAndEnrichConfig() seems wrong right now. I'm guessing you moved username/password under credentials
in the config
object, so that line should look like this:
if (config.credentials.oauth && (config.credentials.username || config.credentials.password)) {
you currently rely on your own (?) request wrapper bluereq
. why not just use the "official" one request-promise-native
? This would also remove the (indirect) bluebird
dependency. As you use native promises on other occasions already, there is no need for bluebird
in my eyes.
following the previous note: if you bump the supported node version a little, you could make use of asnyc/await
, which would also simplify the code in my eyes.
validateAndEnrichConfig
has been fixed in 5b1b634async/await
means no transition work and better support for older NodeJS versions, so while I see the readability benefit, I would like to keep procrastinating a bit on this :)@SirkoS wikibase-edit v3.0.1 has been published! see changelogs
@SirkoS wikibase-edit v3.0.1 has been published! see changelogs
Great! I'm sorry about abusing this thread and my constant nagging, but I found two other minor issues:
(I'll close the request here)
@SirkoS changelog and banner fixed, thanks for reporting!
this adds the option to set the properties used by
wikibase-edit
within the runtime configuration instead of having to update the dependency manually.when working with other wikibase instances I guess this makes it easier to maintain a custom set of properties without having to fiddle around in the dependencies.