Dojo 2 updates – Week ending Jan. 13, 2017

We’ve accomplished a lot on Dojo 2 over the past few months, which has meant a fair amount of churn and improvements. Rather than trying to recap everything, we’re going to start covering some of the highlights in more frequent, shorter blog posts than we did in 2016.

Dojo 2 roadmap update

We have a new Dojo 2 roadmap. It’s currently more accurate about the things we’ve finished than it is about the things that are upcoming. We’re in the process of splitting out the remaining items into things that block the first Dojo 2 beta, and those that will follow it.

Scoped packages

With npm, the first package to choose a name wins, and in the past this has led to things like dgrid, dstore, and even util and themes not being able to have the same name in npm as they do in our own repositories. npm does not make it easy to provide aliases between names, so there’s been a fair amount of workarounds needed to provide a consistent installation experience for npm and non-npm users.

A while back, npm added support for scoped packages, so that it would be easy enough to refer to something as @dojo/core rather than dojo-core. We had resisted going this route as we were still aiming to support bower, but with a significant decrease in adoption of bower, and a heavy reliance on npm for the Dojo 2 development approach, we’ve made the decision to drop bower support for Dojo 2 and we’ve started using scoped packages.

In your code, the main change will be with how you include and reference dependencies. A dojo/core commit shows how this works in practice, but the things to note are:

  • The source package remains in the same location, e.g. dojo/loader is still found at
  • When including that package as a dependency, you will now include it as @dojo/loader instead of dojo-loader in both your package.json as well as within any ES6 module import statements, as well as via any npm install commands, e.g. npm install @dojo/loader

Besides being able to keep short and consistent package names, all officially supported Dojo 2 packages will be included under this scope.

Leave a Reply

Your email address will not be published. Required fields are marked *