I'd like to propose removing es6-shim as a dependency for @blueprintjs/table.
Most modern desktop browsers are at the point where they cover everything that es6-shim covers, and the inclusion of a shim should be as the discretion of applications consuming @blueprintjs/table (if it's not necessary for an app's compat guarantees, all it does is contribute to an app's bundle size).
Ok, yeah, I'm down for this. Unfortunately it is a small breaking change, so we should wait until 2.0 (as Antoine indicated with the milestone).
Is ie11 ready for this???? There's no Promise, the Set and Map implementations are lacking, no Array.find/etc, and I don't think TS does downlevel emits for those does it?
@hellochar it's more of the application's responsibility to include the shim, not the library's.
We're effectively saying table is es6 only, correct? It just sounds like a pretty big decision; would we make it for core as well?
React already takes a similar stance, see https://facebook.github.io/react/blog/#javascript-environment-requirements https://reactjs.org/docs/javascript-environment-requirements.html
We're effectively saying table is es6 only, correct
No, we're not compiling to ESM modules (not yet anyway, and when we do with #309, it'll be _in addition_ to CommonJS modules). As @rcchen states, it's the application's responsibility to determine its runtime environment support and provide shims as necessary (maybe they only want to run in the latest Chrome browser and not include the cruft of es6-shim, that's up to them).
Ok fair. I'm still a little shaky on the details:
I guess I'm just not sure from this ticket alone what the original issue is, other than the abstract "it's not our responsibility".
@hellochar
@blueprintjs/core 2.0."lib": ["dom", "es2015.collection"] in tsconfig.json is the right way to get typings.The intent of original issue is to provide more flexibility to consuming applications. Making this change allows them to use the shim of their choosing (e.g. core-js is also very common) and reduce bundle size (we don't use all of es6-shim).
Just bumping this issue as we ran into this today. We removed es6-shim from our application because we didn't need it in our environment, but because we use blueprint-table, it still gets pulled in.
I concur that blueprint-table shouldn't automatically pull in the shim. However, it should be strongly documented that ES6 features are in use and that some shim is required if you want to run on older browsers.
Most helpful comment
Ok, yeah, I'm down for this. Unfortunately it is a small breaking change, so we should wait until 2.0 (as Antoine indicated with the milestone).