videojs / videojs-errors

A video.js plugin that displays error messages to video viewers.
Other
87 stars 29 forks source link

ES6 Syntax not being transpiled in .es.js #124

Closed chrisboustead closed 6 years ago

chrisboustead commented 6 years ago

Description

v4.1.1 is not transpiling es6 syntax correctly. Specifically, arrow functions are not being transpiled. Not an issue in v4.1.0

Steps to reproduce

Explain in detail the exact steps necessary to reproduce the issue.

  1. git clone git@github.com:brightcove/videojs-errors.git

  2. cd videojs-errors

  3. npm i

  4. npm run build

  5. grep "=>" ./dist/videojs-errors.es.js

  6. Observe that there are remaining arrow functions.

  7. git fetch --all --tags --prune

  8. git checkout tags/v4.1.0 -b v410

  9. npm i

  10. npm build

  11. grep "=>" ./dist/videojs-errors.es.js

  12. Observe that there no are remaining arrow functions.

Results

Expected

Expected to see es5 friendly syntax.

Actual

Expected to see es6 syntax, specifically arrow functions.

Error output

If there are any errors at all, please include them here.

Additional Information

Please include any additional information necessary here. Including the following:

versions

videojs

^6.8.0 || ^7.0.0

browsers

what browser are affected? cli only.

OSes

what platforms (operating systems and devices) are affected? OSX 10.13.3

plugins

are any videojs plugins being used on the page? If so, please list them below. No.

brandonocasey commented 6 years ago

We are working on a fix for this, it was caused by an update to the generator and my incorrect assumptions. Sorry about that

chrisboustead commented 6 years ago

Thanks! I submitted a PR which fixes this specific issue, but by the looks of how extensive the changes were between 4.1.0 and 4.1.1, there is potentially more which needs to be addressed.