Friday, April 24, 2020

ClojureScript 1.10.741

We’re happy to announce a significant new feature - the :bundle target. This target generates output that can be fed directly into popular JavaScript bundlers such as Webpack and Metro (for React Native). Not only does this greatly ease usage of Node modules, library creators can now distribute ClojureScript artifacts that depend on Node modules and be confident that users can consume these artifacts regardless of which build tool they may prefer.

There’s much more to say about the :bundle target, and we’ll be releasing a separate post and guide soon.

Iterator Support

It is now possible to call seq on any object implementing JavaScript’s Iterator protocol. A new core predicate, cljs.core/js-iterable? is introduced with this feature.

For example, (js-iterable? (js/Set.)) is true and

(-> (doto (js/Set.) (.add 1) (.add 2)) seq)

Symbol Support

A new core predicate cljs.core/js-symbol? has been added and printing has been revised to allow printing of symbols:

cljs.user=> (js/Symbol "abc") #object[Symbol(abc)]


from Hacker News https://clojurescript.org/news/2020-04-24-release

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.