fix externs.js and the exported symbols by thheller · Pull Request #216 · tonsky/datascript

Not sure if that related but I also had problems with datascript, compiling with shadow-cljs.

For example, this code works without optimizations, but doesn't work with :advanced enabled, i.e. in :realease mode:

(d/q '[:find [?atom ...] :in $ ?url
                         :where [?e :url ?url]
                                [?e :atom ?atom]]
                   @db url)

I've solved it without patching anything by adding contents of datascript/externs.js to my manual-externs.js file I already had for externs:

Related part of shadow-cljs.edn:

:release {:compiler-options {:externs ["manual-externs.js"]
                             :optimizations :advanced}}