The full Dojo 1.9 source is distributed as part of the common-ui plugin and made available through common-ui's RequireJS configuration for anyone to use.
Migrating custom Pentaho solutions based on Dojo in 5.1
If you've built Platform Plugins based on the older version of Dojo that we used to ship, you'll have to migrate your code to work with the new AMD loader syntax. The Dojo foundation has a very comprehensive guide on how to migrate from the old Dojo syntax and loader here: Dojo 2.0 Migration.
RequireJS "pen." Namespace Deprecated
Prior to 5.1 we had to namespace the RequireJS "require" and "define" functions as "pen.require" and "pen.define". This was done to avoid conflict with the older 1.6. Dojo. This conflict has been eliminated in 5.1. You can now use the standard "require" and "define" functions per the AMD spec. The "pen.*" form will continue to function to maintain backwards compatibility with existing scripts.
RequireJS Optimizer Build
5.1 sees r.js updated to the latest version which enables more options for tuning the build. Subfloor-js has been enhanced to detect the availability of NodeJS and prefer it over the default Rhino-based build, which provides up to a 5x decrease in build time. Other enhancements to our build profiles have been made to further reduce the build time.