Skip to content
This repository has been archived by the owner on Jul 30, 2018. It is now read-only.

Release v2.0.0 Beta2 3

Pre-release
Pre-release
Compare
Choose a tag to compare
@kitsonk kitsonk released this 27 Jul 09:29
· 63 commits to master since this release
9ba602e

Changes

  • Improve shims (#101)
    • BREAKING CHANGE Aligns shim types to match more recent native types from TypeScript libraries. The biggest change is that collections now properly return an | undefined when getting values. This may break previously working code which may have been unsafe by not properly guarding against undefined.
    • BREAKING CHANGE The Promise shim is fully global. This allows easier support of async/await in code as well as makes it possible for downstream projects to target an emit of ES2015 or beyond without running into type conflicts. This does mean that a "local" promise should no longer be imported like import Promise from '@dojo/shim/Promise'; and only needs to be imported for side effects once by a project. Most users of other Dojo 2 packages will not have an issue with this, but if only using @dojo/shim or only parts of @dojo/core it may make sense to import the module for side-effects like import '@dojo/shim/Promise';. Also, when targeting ES5, the lib compiler option should be used and the es2015.promise lib should be added.
    • BREAKING CHANGE the /native/ modules have been removed, instead all the shim modules have been reworked so that they can be more easily build optimised using the features in dojo/cli-build-webpack#172.
    • BREAKING CHANGE the feature detection flags for the Has API have been reworked to be more concise.

Fixes

  • Add detection for buggy MutationObserver implementations (#104)
    • Internet Explorer 11 has a unreliable implementation of MutationObserver. This was being used in the async queuing library used by the Promise shim. Under certain conditions, the queue would not drain, causing Promises not to be resolved. This fix detects the buggy version and asserts that the platform does not have MutationObservers, which then defaults the async queuing library to use other mechanisms to resolve promises.