Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upes-check es5 does not catch Promise, Map, Set etc. #72
Comments
|
Hmm I just found another project that tries to accomplish this - I haven't tried it though. |
|
How did you write the script you tested with @dotnetCarpenter? ^ Questions asked to ensure it's not a potential feature that needs to be added. ES-check is built on acorn.js. I trust it. There are new features that are popping up though. So perhaps feature detection will become a thing that es-check supports. Es-feature-detection provides some interesting things that could potentially be provided by ES-Check. Thanks for sharing. |
|
The ones for globals like Map and Set will require some keeping track of the variables. For a single file, this can probably be done by walking the syntax tree with acorn-walker or something similar and looking for uses while making sure that they are not shadowed by something else in the scope. Stuff in ESTree like The story about new methods like Array.prototype.flatmap is a bit more frightening, since they are going to require type deduction and checking. An example of doing so is in the |
Requested Update
I was asked today if there was a tool to check if the transpiled code was ES5 and I referred to this project but I just checked and
es-check es5 ...does not catchPromisefrom ES2015.Why Is This Update Needed?
The reason I was asked is that they have continuous issues with bug reports because they forget to add polyfills to their projects. They need an automated way to check which polyfills they are missing from their transpiled code.
Are There Examples Of This Requested Update Elsewhere?