Does squint have promesa in it? Asking for a friend 😉
no, just use straight promises with js-await
will do
@borkdude What is your opinion about promesa in squit? Probably a lot of nbb users are using promesa, but looking into implementation or how big api is, it seems to me that it would be hard to make it squint compatible.
It can be accomplished using macros. I’ll get back to this
I've added a few macros to make an existing project more compatible with an existing CLJS library: https://github.com/squint-cljs/squint-macros/tree/main/src/applied_science https://github.com/nextjournal/clojure-mode/blob/d42c746dabfb18dbb5477125d29e5932b80c1ba9/package.json#L43 https://github.com/nextjournal/clojure-mode/blob/d42c746dabfb18dbb5477125d29e5932b80c1ba9/squint.edn#L2
Macros to make a project compatible with promesa could follow the same approach
at least for p/let etc
what a clever trick, using package.json and :paths as deps
I'm interested also your opinion about design, do you personally like abstractions in promesa, would you design it similarly?
in my opinion promesa primarily exists for CLJS since it doesn't have async/await. in squint I don't miss it
but yeah, it does assume you don't want to re-use the same code for nbb
for this you could write some macros like above
promesa does come with some performance overhead
but I never really cared about that for nbb scripts