Lots of exciting things are happening with Aurelia these days. We've got a new set of updates that bring along many bug fixes as well as a few new features. We've also managed to decrease the minimal size of the library by a significant amount.
Most of the new features in this release deal with edge cases or will be transparent or indirectly used by most developers. Here's a few brief explanations:
as-element- In certain circumstances you may need to write a
trelement or even a
divbut you would like it to act as if it were a particular custom element. You can now accomplish this with the
as-elementattribute, by providing the custom element tag name as its value. Here's a simple example:
processAttributes- We've added a new hook into the custom element compilation process, similar to
processAttributeshook allows a developer to see the HTML attribute values before the compiler does. This enables altering the attributes and their values based on run-time conditions.
CompositionTransaction- Since the days of Durandal v1.0, we've been wanting to find a way to eliminate the visual "popping" that happens when
composeis used. Because it can asynchronously render dynamic content, the DOM can sometimes "pop" visually in an undesired way. The new CompositionTransaction has been plumbed into the core of the templating engine and is used by app startup, the
composeelement and the
router-view. It allows asynchronous UI composition events to enlist in the overall composition and tell it when they have completed thier work. This ensures that a root level composition will not be rendered until all child compositions are complete. Developers don't need to do anything for this to work. It's a new internal capability that should improve these scenarios overall.
refbindings - You can now use assignable binding expressions in ref bindings. This means that you can do something like this
ref="$.foo"if you want to place your references on a sub object of your component view model, for example. This works for all reference binding types.
- Improved Router Pipeline - We've made the router pipeline easier to plug custom steps into by standardizing the plugin points and providing discreet API calls to add steps into each stage.
Thanks to the great community effort of Martijn Boland we've got some new experimental support for Webpack (both v1 and v2). We're still working out the final details, but we wanted to let you know that is coming very, very soon :)
As usual, there have been lots of bugs fixed in this release. However, there's one major improvement I'm very happy about...
From the early days of Aurelia, almost all of our libraries have had a hard-dependency on CoreJS. CoreJS provides a full es5/es6/es7 set of polyfills along with helper methods. It can be quite large, anywhere from roughly 60k to 100k minified. With this set of releases, we've made some important changes:
- We've removed all hard dependencies on CoreJS. No Aurelia library references CoreJS any longer.
- We've analyzed our codebase to determine the minimal set of JS polyfills required for Aurelia to run. The list of polyfills is quite small and includes only the following:
- We've created a new library, aurelia-polyfills, which includes only the minimal set of polyfills listed above. When minified, this library is less than 6kb.
- We've configured Aurelia's bootstrapper to load aurelia-polyfills before initializing the platform.
- We've configured our unit tests to use our own polyfills (via a dev dependency).
The result of all this is that Aurelia now has no hard depdencies on any external library. If you don't need additional polyfills, Aurelia's size just got significantly reduced as well. This also opens up new possibilities for developers. Since we don't have the hard dependency on CoreJS, if you want to add more polyfills, you now can choose your favorite library. If you like, you can add CoreJS back in and use all of its features. You could also use ES6 Shim instead. As always, you can create your own collection of polyfills to suit the unique needs of your app.
This isn't technically a breaking change in Aurelia, however, if you were using additional polyfills from CoreJS, then after updating, you may see some errors. To remove those errors, simply add CoreJS to your index.html or import it in your main.js file. You may want to work through any "errors" to discover what polyfills you may be using that you weren't aware of. Perhaps there's only one or two. You may want to manually polyfill those with your own code rather than taking a library dependency.
In our march towards Beta 2, there are now only three items left:
- JSPM 0.17 Update - As mentioned in a previous post, JSPM 0.17.x is a major breaking change from 0.16.x. We've been working hard to make sure our libraries are configured to work with either 0.16.x or 0.17.x. We believe we have worked out the configuration issues and that we have solutions for the final set of runtime issues. We'll be updating you shortly once everything is confirmed and we're ready for you to give JSPM 0.17 a try. It shouldn't be long.
- Babel 6 - Also as previously mentioned, the Babel 6 release caused a lot of problems for a lot of projects. Thus far we haven't been able to update to the new version. However, we are very close to getting all tooling updates and infrastructure updated. We expect to begin work on updating our codebase very soon.
- Shadow DOM v1 - All major vendors have finally reached consensus on the Shadow DOM v1 specification. Once our updates to JSPM and Babel are complete, this will be the final feature update which will mark the Beta 2 release. We've been waiting a bit for the spec to solidify while making implementation plans. Things are just about settled and we'll begin work on this soon.
Community and Traction Update
The Aurelia community is growing at an astounding rate. It's really exciting! In the last week, we crossed 3,000 developers in our Gitter chat room with almost 223k messages. We're the seventh largest room in the world with the second highest amount of activity. Additionally, we crossed 300 unique contributors to the Aurelia project. This is in addition to our core team. To put it in perspective, this is over 100 contributors more than Angular 2 and about half as many as Ember and React, which have been around for much longer. Keep in mind, Aurelia was only first announced as alpha about one year ago.
2016 is going to be a very exciting year!
As we move closer to Beta 2, Aurelia is getting smaller, faster and more rich in its capabilities. We're really excited about what the future holds. More exciting news is coming in the next few months. Stay tuned and don't forget to sign up for our newsletter.
- logging: fix the interface (6276c3b0)
buildQueryString, parseQueryString: object serialization/deserialization
This allows using buildQueryString and parseQueryString methods to
serialize and deserialize complex objects and arrays with multiple
levels of nesting.
- all: remove core-js dependency (f91bd742)
- all: remove core-js (7eb2303d)
- all: remove core-js dependency (3a300a87)
- all: remove duplicate code and use new polyfills (ec2b65ee)
- all: remove core-js dependency (209629f8)
- route-recognizer: Support multiple names per route (6b5637d2)
- all: remove core-js dependency (4dff5f15)
- *-observation: allow binding extended Map/Set (a79f1486)
- all: remove core-js dependency (a48268df)
- bower: remove core-js (3076972b)
- decorator-observable: TypeScript (98219be8)
- element-observation: handle extra spacing around css properties (cb8a9074, closes #325)
- all: remove core-js dependency (dfb7784a)
- all: remove core-js (44c5e848)
- bower: remove core-js (52fe3fef)
- all: remove core-js (0e264f85)
- bower: remove core-js (942c4b66)
- composition-transaction: simplify (82f52aaa)
- decorators: hyphenate behavior names with warning (473ca6af, closes #279)
all: remove core-js dependency (213fbfe4)
- InterpolationBinding: add method to update one-time children (243aa759)
ref: support expressions (a98860b6)
- all: remove core-js dependency (54e09743)
- bower: remove core-js (3cf2c8d9)
- hide: export hide (e48cec4e, closes #192)
- repeat: ensure one-time interpolation bindings update (a280d27f)
- all: update jspm meta; core-js; aurelia deps (f3f0ffac)
- signal: allow multiple names (620614ed, closes #170, #172)
- router-view: simplify composition transaction use (76cdc978)
- router-view: connect to composition transaction (b95667e0)
- aurelia: integrate composition transaction (38851185)
- CssAnimator: stagger only child elements (219b5c79)
- all: remove core-js (60ef61a5)
- index: use aurelia polyfills (c77c982b)
- ScrollHandler: make ScrollHandler transient (afd6436b, closes #15)
- all: remove core-js and fix package for jspm (4cec9f13)
- array-virtual-repeat-array-strategy: support iterating custom elements (6381eb27)
- correctly remove EventListener (fd39c211)
- blank rows when swapping arrays with different lengths (2eadedef)
- issue when scrolled to bottom and new items added (561e1422)
- set isLastIndex to false on detached (4ff76899)
- reset sizes on deteched (cdee18db)
- sync scroll margin with scroll animation (e9a27a60)