-
Notifications
You must be signed in to change notification settings - Fork 18
Design Architecture of @dojo/shim #91
Comments
I would add to this that there is at least one shim that is not anywhere near stage 3 (Observables) that is pretty key to our efforts. Also, streams itself is a shim for a WHATWG proposal.. while that is now in a separate package, I guess the bigger point is that we may find ourselves shimming things that are not part of the ES process but W3C or others, which don't have the same stage 0-4 process. For example, there's the pointer events polyfill (which to be fair we're just importing wholesale), there's Globalize which currently does not but will likely eventually wrap EC402 (which it turns out does have the same staging process), and then there's the IntersectionObserver API which we're strongly considering using for dgrid. So I'm not sure what the right answer is, other than we probably do not want to restrict ourselves to Stage 3 or 4. Also, do we need to support all stage 4 proposals? What if they all have a working implementation, or what if it's a feature we probably won't use? Also, I'm not sure if it's even possible to shim shared memory and atomics, but assuming it was, would we really bother to shim it without knowing if we need to use it. Longer term, we probably need a plan for deprecation of shims in future major releases. I assume we'll base it on browser versions and usage statistics, but at what point do we get rid of forOf, and does this have any impact when people upgrade and need to start using for...of? |
PR #101 will provide a better overall architecture that should support downstream projects targeting ES6 and fairly efficient build optimization using |
PR #101 is a breaking change in quite a few ways (Promise being global, tighter typings on collections). We need to stage PRs across the rest of the packages to deal with this.
|
@kitsonk I believe these are all taken care of! |
WOOT! 🎉 👐 (Jazz hands) |
Discussion
We need to codify what we include in
@dojo/shim
and its overall design. We should include this in ourREADME
and other appropriate documentation.My suggestion is that we have the following guidelines for this package:
@dojo/shim/iterators/forOf
forfor ... of
).@dojo/core
.Promise
andSymbol
)@dojo/shim/array.includes()
)The text was updated successfully, but these errors were encountered: