This repository was archived by the owner on Jul 30, 2018. It is now read-only.
Release v2.0.0 Beta2 3
Pre-release
Pre-release
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
| undefinedwhen getting values. This may break previously working code which may have been unsafe by not properly guarding againstundefined. - BREAKING CHANGE The
Promiseshim is fully global. This allows easier support ofasync/awaitin 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 likeimport 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/shimor only parts of@dojo/coreit may make sense to import the module for side-effects likeimport '@dojo/shim/Promise';. Also, when targeting ES5, thelibcompiler option should be used and thees2015.promiselib 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.
- BREAKING CHANGE Aligns shim types to match more recent native types from TypeScript libraries. The biggest change is that collections now properly return an
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.