browser-acl
browser-acl copied to clipboard
feat: support async rules
Thanks for implementing that feature Changes and tests are OK but what you're going to do regarding existing applications?
let's say an application expects boolean
to be returned from a can()
call. If we change it to async it will return a Promise and can break the existing application.
Are you going to release a separate breaking version?
let's say an application expects
boolean
to be returned from acan()
call. If we change it to async it will return a Promise and can break the existing application.Are you going to release a separate breaking version?
Yeah, that's my concern. I was thinking making a v2.0
I also considered creating a can + canSync version ala the way node fs package works. But that would still require a v2 and I'm not sure it is worth to maintain the extra complexity.
FYI, I made an earlier version where there were no changes to can
(except I remove the Boolean() calls). That way only some, every was promise based.
The advantage of that is that it wouldn't break any apps. But you, as a user, would have to write checks on the return type. Not interested in that either.