From f11fb744b94a50ccddcf9e5febf2480a61f720f7 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Tue, 9 Mar 2021 01:25:52 -0500 Subject: [PATCH 1/5] pin to ubuntu 18 --- .github/workflows/ci.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 3d612030fb..4989bed70e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,7 +5,7 @@ on: [push, pull_request] jobs: should-skip: continue-on-error: true - runs-on: ubuntu-latest + runs-on: ubuntu-18.04 # Map a step output to a job output outputs: should-skip-job: ${{steps.skip-check.outputs.should_skip}} @@ -21,7 +21,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest] + os: [ubuntu-18.04] env: BROWSER_STACK_USERNAME: ${{secrets.BROWSER_STACK_USERNAME}} BROWSER_STACK_ACCESS_KEY: ${{secrets.BROWSER_STACK_ACCESS_KEY}} From 0f98ae7fb3f67a0bd958658196c3754fe3c190ec Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Tue, 9 Mar 2021 01:29:50 -0500 Subject: [PATCH 2/5] update karma-config --- package-lock.json | 41 +++++++++++++---------------------------- package.json | 2 +- 2 files changed, 14 insertions(+), 29 deletions(-) diff --git a/package-lock.json b/package-lock.json index e29bda1b7e..faccf5f381 100644 --- a/package-lock.json +++ b/package-lock.json @@ -6877,9 +6877,9 @@ }, "dependencies": { "debug": { - "version": "3.2.6", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", - "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", "dev": true, "requires": { "ms": "^2.1.1" @@ -8693,9 +8693,9 @@ } }, "karma-qunit": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/karma-qunit/-/karma-qunit-4.1.1.tgz", - "integrity": "sha512-sl4rSTGK1fXWyXdNu8ySQvsf77OuJ1gQg9gbHIj0V05h4FvcNogpirO7R4ijU4L7ioXk8WupvSJZHE7QI9B7uQ==", + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/karma-qunit/-/karma-qunit-4.1.2.tgz", + "integrity": "sha512-taTPqBeHCOlkeKTSzQgIKzAUb79vw3rfbCph+xwwh63tyGjNtljwx91VArhIM9DzIIR3gB9G214wQg+oXI9ycw==", "dev": true }, "karma-safari-applescript-launcher": { @@ -14841,9 +14841,9 @@ "integrity": "sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA==" }, "videojs-generate-karma-config": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/videojs-generate-karma-config/-/videojs-generate-karma-config-7.0.0.tgz", - "integrity": "sha512-nC3SZeVx3OtNiCtdjkC+GT4imfuDhGhpaxr/sfNJv2QmvzKhAhGkySRrh01+SLF85e+yAaCeitDYkXP5QlqtJg==", + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/videojs-generate-karma-config/-/videojs-generate-karma-config-7.1.0.tgz", + "integrity": "sha512-j3ed19T+Aidjho+KmzMNKc0k8ySXW45vX+ON3YWR0HOxRFF5VATokIyZv3z0Z/aR5ImoiQAANDs8/zuRafC/mw==", "dev": true, "requires": { "is-ci": "^2.0.0", @@ -14857,30 +14857,15 @@ "karma-safari-applescript-launcher": "~0.1.0", "karma-static-server": "^1.0.0", "karma-teamcity-reporter": "^1.1.0", - "qunit": "~2.12.0" + "qunit": "~2.13.0" }, "dependencies": { - "ci-info": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-2.0.0.tgz", - "integrity": "sha512-5tK7EtrZ0N+OLFMthtqOj4fI2Jeb88C4CAZPu25LDVUgXJ0A3Js4PMGqrn0JU1W0Mh1/Z8wZzYPxqUrXeBboCQ==", - "dev": true - }, "commander": { "version": "6.2.0", "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.0.tgz", "integrity": "sha512-zP4jEKbe8SHzKJYQmq8Y9gYjtO/POJLgIdKgV7B9qNmABVFVc+ctqSX6iXh4mCpJfRBOabiZ2YKPg8ciDw6C+Q==", "dev": true }, - "is-ci": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-ci/-/is-ci-2.0.0.tgz", - "integrity": "sha512-YfJT7rkpQB0updsdHLGWrvhBJfcfzNNawYDNIyQXJz0IViGf75O8EBPKSdvw2rF+LGCsX4FZ8tcr3b19LcZq4w==", - "dev": true, - "requires": { - "ci-info": "^2.0.0" - } - }, "js-reporters": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/js-reporters/-/js-reporters-1.2.3.tgz", @@ -14894,9 +14879,9 @@ "dev": true }, "qunit": { - "version": "2.12.0", - "resolved": "https://registry.npmjs.org/qunit/-/qunit-2.12.0.tgz", - "integrity": "sha512-Lu3tbKziVzXTfseoEtTiiSAbSPB6SGU4Emc2uo8n+fbsXuRCLzfqPwJfAVJwKu9NdukX1V/L0qWf2UvmPX+QeA==", + "version": "2.13.0", + "resolved": "https://registry.npmjs.org/qunit/-/qunit-2.13.0.tgz", + "integrity": "sha512-RvJquyNKbMSn5Qo28S2wKWxHl1Ku8m0zFLTKsXfq/WZkyM+b28gpEs6YkKN1fOCV4S+979+GnevD0FRgQayo3Q==", "dev": true, "requires": { "commander": "6.2.0", diff --git a/package.json b/package.json index 1a221860e4..80de416861 100644 --- a/package.json +++ b/package.json @@ -149,7 +149,7 @@ "tui-jsdoc-template": "^1.2.2", "uglify-js": "^3.6.0", "unified": "^7.0.2", - "videojs-generate-karma-config": "^7.0.0", + "videojs-generate-karma-config": "^7.1.0", "videojs-languages": "^2.0.0", "videojs-standard": "^8.0.3", "webpack": "^1.15.0" From d0e8f962e948aa3ec8eae09929898867bb7547a3 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Tue, 9 Mar 2021 01:30:08 -0500 Subject: [PATCH 3/5] play.test.js --- test/unit/play.test.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/test/unit/play.test.js b/test/unit/play.test.js index d87be24f18..afede86ca2 100644 --- a/test/unit/play.test.js +++ b/test/unit/play.test.js @@ -409,6 +409,8 @@ const mainModule = function(playReturnValue, middlewareTermination, subhooks) { }); } + this.clock.tick(1000); + this.finish(assert); }); @@ -429,9 +431,9 @@ const mainModule = function(playReturnValue, middlewareTermination, subhooks) { playerReady: true, playCalls: 1 }); - }); - this.finish(assert); + this.finish(assert); + }); }); }; From 54d5c77b462b1f3ffcdec9699637254e43aac664 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Tue, 9 Mar 2021 01:30:54 -0500 Subject: [PATCH 4/5] vidoejs-integration.test.js, separate module, dont dispose in a player.ready handler --- test/unit/videojs-integration.test.js | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/test/unit/videojs-integration.test.js b/test/unit/videojs-integration.test.js index 159058cee9..ea0fd64597 100644 --- a/test/unit/videojs-integration.test.js +++ b/test/unit/videojs-integration.test.js @@ -4,6 +4,8 @@ import window from 'global/window'; import document from 'global/document'; import * as Fn from '../../src/js/utils/fn'; +QUnit.module('videojs-integration'); + /** * This test is very important for dom-data memory checking * as it runs through a basic player lifecycle for real. @@ -74,11 +76,14 @@ QUnit.test('create a real player and dispose', function(assert) { assert.ok(player.tech_, 'tech exists'); assert.equal(player.textTracks().length, 1, 'should have one text track'); - player.dispose(); + // only dispose after a timeout + player.setTimeout(() => { + player.dispose(); - Object.keys(old).forEach(function(k) { - Fn[`stub_${k}`](old[k]); - }); - done(); + Object.keys(old).forEach(function(k) { + Fn[`stub_${k}`](old[k]); + }); + done(); + }, 100); }, true); }); From 81a3640394e322e42f7578538e617d027cc19190 Mon Sep 17 00:00:00 2001 From: Gary Katsevman Date: Tue, 9 Mar 2021 01:39:22 -0500 Subject: [PATCH 5/5] switch rollup replace plugin --- package-lock.json | 84 +++++++++++++++++++++++++++++++++++++++++++++-- package.json | 2 ++ rollup.config.js | 2 +- 3 files changed, 85 insertions(+), 3 deletions(-) diff --git a/package-lock.json b/package-lock.json index faccf5f381..5dabf1a9b7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1156,6 +1156,46 @@ "integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==", "dev": true }, + "@rollup/plugin-replace": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-replace/-/plugin-replace-2.4.1.tgz", + "integrity": "sha512-XwC1oK5rrtRJ0tn1ioLHS6OV5JTluJF7QE1J/q1hN3bquwjnVxjtMyY9iCnoyH9DQbf92CxajB3o98wZbP3oAQ==", + "dev": true, + "requires": { + "@rollup/pluginutils": "^3.1.0", + "magic-string": "^0.25.7" + }, + "dependencies": { + "magic-string": { + "version": "0.25.7", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.7.tgz", + "integrity": "sha512-4CrMT5DOHTDk4HYDlzmwu4FVCcIYI8gauveasrdCu2IKIFOJ3f0v/8MDGJCDL9oD2ppz/Av1b0Nj345H9M+XIA==", + "dev": true, + "requires": { + "sourcemap-codec": "^1.4.4" + } + } + } + }, + "@rollup/pluginutils": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/@rollup/pluginutils/-/pluginutils-3.1.0.tgz", + "integrity": "sha512-GksZ6pr6TpIjHm8h9lSQ8pi8BE9VeubNT0OMJ3B5uZJ8pz73NPiqOtCog/x2/QzM1ENChPKxMDhiQuRHsqc+lg==", + "dev": true, + "requires": { + "@types/estree": "0.0.39", + "estree-walker": "^1.0.1", + "picomatch": "^2.2.2" + }, + "dependencies": { + "estree-walker": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-1.0.1.tgz", + "integrity": "sha512-1fMXF3YP4pZZVozF8j/ZLfvnR8NSIljt56UhbZ5PeeDmmGHpgpdwQt7ITlGvYaQukCvuBRMLEiKiYC+oeIg4cg==", + "dev": true + } + } + }, "@samverschueren/stream-to-observable": { "version": "0.3.0", "resolved": "https://registry.npmjs.org/@samverschueren/stream-to-observable/-/stream-to-observable-0.3.0.tgz", @@ -1201,6 +1241,12 @@ "integrity": "sha512-+iTbntw2IZPb/anVDbypzfQa+ay64MW0Zo8aJ8gZPWMMK6/OubMVb6lUPMagqjOPnmtauXnFCACVl3O7ogjeqQ==", "dev": true }, + "@types/estree": { + "version": "0.0.39", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.39.tgz", + "integrity": "sha512-EYNwp3bU+98cpU4lAWYYL7Zz+2gryWH1qbdDTidVd6hkiR6weksdbMadyXKXNPEkQFhXM+hVO9ZygomHXp+AIw==", + "dev": true + }, "@types/events": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/@types/events/-/events-3.0.0.tgz", @@ -6743,6 +6789,14 @@ "pinkie-promise": "^2.0.0" } }, + "hashish": { + "version": "0.0.4", + "resolved": "https://registry.npmjs.org/hashish/-/hashish-0.0.4.tgz", + "integrity": "sha1-bWC8b/r3Ebav1g5CbQd5iAFOZVQ=", + "requires": { + "traverse": ">=0.2.4" + } + }, "hmac-drbg": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", @@ -12252,6 +12306,14 @@ "xtend": "^4.0.1" } }, + "remove": { + "version": "0.1.5", + "resolved": "https://registry.npmjs.org/remove/-/remove-0.1.5.tgz", + "integrity": "sha1-CV/9gn1lyfQa2X0z5BanWBEHmVU=", + "requires": { + "seq": ">= 0.3.5" + } + }, "remove-markdown": { "version": "0.2.2", "resolved": "https://registry.npmjs.org/remove-markdown/-/remove-markdown-0.2.2.tgz", @@ -12950,6 +13012,25 @@ } } }, + "seq": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/seq/-/seq-0.3.5.tgz", + "integrity": "sha1-rgKvOkJHk9jMvyEtaRdODFTf/jg=", + "requires": { + "chainsaw": ">=0.0.7 <0.1", + "hashish": ">=0.0.2 <0.1" + }, + "dependencies": { + "chainsaw": { + "version": "0.0.9", + "resolved": "https://registry.npmjs.org/chainsaw/-/chainsaw-0.0.9.tgz", + "integrity": "sha1-EaBRAtHEx4W20EFdM21aOhYSkT4=", + "requires": { + "traverse": ">=0.3.0 <0.4" + } + } + } + }, "serve-static": { "version": "1.14.1", "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.14.1.tgz", @@ -14046,8 +14127,7 @@ "traverse": { "version": "0.3.9", "resolved": "https://registry.npmjs.org/traverse/-/traverse-0.3.9.tgz", - "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=", - "dev": true + "integrity": "sha1-cXuPIgzAu3tE5AUUwisui7xw2Lk=" }, "trim": { "version": "0.0.1", diff --git a/package.json b/package.json index 80de416861..8052c667f3 100644 --- a/package.json +++ b/package.json @@ -87,6 +87,7 @@ "@videojs/xhr": "2.5.1", "global": "4.3.2", "keycode": "^2.2.0", + "remove": "^0.1.5", "rollup-plugin-replace": "^2.2.0", "safe-json-parse": "4.0.0", "videojs-font": "3.2.0", @@ -97,6 +98,7 @@ "@babel/plugin-transform-object-assign": "^7.8.3", "@babel/plugin-transform-runtime": "^7.9.0", "@babel/preset-env": "^7.9.0", + "@rollup/plugin-replace": "^2.4.1", "access-sniff": "^3.2.0", "autoprefixer": "^9.6.0", "bestzip": "^2.1.4", diff --git a/rollup.config.js b/rollup.config.js index 6606000160..a3fa9eb314 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -12,7 +12,7 @@ import pkg from './package.json'; import multiEntry from 'rollup-plugin-multi-entry'; import stub from 'rollup-plugin-stub'; import isCI from 'is-ci'; -import replace from 'rollup-plugin-replace'; +import replace from '@rollup/plugin-replace'; const compiledLicense = _.template(fs.readFileSync('./build/license-header.txt', 'utf8')); const bannerData = _.pick(pkg, ['version', 'copyright']);