Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update preset env, drop IE11 and older browser support #7708

Merged
merged 6 commits into from
May 5, 2022

Conversation

alex-barstow
Copy link
Contributor

Description

This duplicates all changes in #7482 and updates them to be consistent with the browserslist specified in videojs/babel-config, as well as fixes a few problems caused by the removal of ES5 transpiling.

NOTE: Merge with BREAKING CHANGE header

src/js/extend.js Outdated

// If the provided super class is a native ES6 class,
// make the sub class one as well.
if (/^class/.test(superClass.toString())) {
Copy link
Contributor Author

@alex-barstow alex-barstow Apr 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since Video.js components are now un-transpiled ES6 classes, extend() needs to be able to handle them since videojs.extend(videojs.getComponent('Component'), {...}) is the most common usecase for this method.

This string check is apparently the only way to detect ES6 classes. It isn't future proof and supposedly will not work on some older platforms, but that is likely not a huge concern since we are 1) dropping support for most older platforms and 2) deprecating this method and encouraging the use of native classes instead.

@codecov
Copy link

codecov bot commented Apr 5, 2022

Codecov Report

Merging #7708 (9300ae4) into next (f20aa9a) will increase coverage by 0.02%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             next    #7708      +/-   ##
==========================================
+ Coverage   80.88%   80.90%   +0.02%     
==========================================
  Files         116      116              
  Lines        7454     7459       +5     
  Branches     1806     1809       +3     
==========================================
+ Hits         6029     6035       +6     
+ Misses       1425     1424       -1     
Impacted Files Coverage Δ
src/js/extend.js 86.36% <100.00%> (+4.01%) ⬆️
src/js/tracks/text-track.js 92.94% <0.00%> (+0.64%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f20aa9a...9300ae4. Read the comment docs.

"not kaios 2",
"not op_mini all",
"not op_mob 64"
],
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Question: Should we specify the minimum Safari version here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think last 3 major versions covers Safari adequately.

@@ -1,19 +1,19 @@
WEBVTT

00:00.700 --> 00:04.110
00:00.700 --> line:0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this file shouldn't have gotten checked in 😆

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not sure what's going on here...

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it was something I was playing around with back in the other PR and got copied over

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll remove. I copied all changes over from your PR.

@@ -27,10 +28,20 @@ import _inherits from '@babel/runtime/helpers/inherits';
* The new class with subClassMethods that inherited superClass.
*/
const extend = function(superClass, subClassMethods = {}) {
log.warn('The extend() method is deprecated. Please use native ES6 classes instead.');
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should add the deprecation to the jsdoc comments too

Copy link
Member

@misteroneill misteroneill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall, LGTM, but wondering about that VTT file.

@@ -1,19 +1,19 @@
WEBVTT

00:00.700 --> 00:04.110
00:00.700 --> line:0
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm not sure what's going on here...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants