Skip to content

Commit

Permalink
feat(FEC-10290): upgrade NPM packages (#43)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Ziv committed Jul 27, 2020
1 parent 9b23ae1 commit 04ac722
Show file tree
Hide file tree
Showing 18 changed files with 5,406 additions and 3,294 deletions.
23 changes: 12 additions & 11 deletions .babelrc
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
{
"presets": [
"es2015"
],
"plugins": [
"transform-flow-strip-types",
"transform-class-properties"
],
"env": {
"test": {
"plugins": [
"istanbul"
]
"plugins": ["istanbul"]
}
}
},
"ignore": ["node_modules/**/*"],
"plugins": [
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-flow-strip-types",
"@babel/plugin-transform-property-mutators",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-transform-classes"
],
"presets": ["@babel/preset-env", "@babel/preset-flow"]
}
2 changes: 0 additions & 2 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
/flow-typed/**/*.js
/coverage
/dist
karma.conf.js
webpack.config.js
4 changes: 3 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@
"should": true,
"sinon": true,
"__VERSION__": true,
"__NAME__": true
"__NAME__": true,
"process": true,
"__dirname": true
},
"rules": {
"prettier/prettier": "error",
Expand Down
3 changes: 1 addition & 2 deletions .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
.*/node_modules
[include]
[libs]
node_modules/playkit-js/flow-typed/
node_modules/@playkit-js/playkit-js/flow-typed/
node_modules/playkit-js-providers/flow-typed/
[options]
unsafe.enable_getters_and_setters=true
18 changes: 12 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,22 +1,28 @@
<!-- If you are raising a bug playing a stream, you must fill out the following or your issue may not be responded to. For features or improvements, you may delete this. -->

##### Prerequisites
- [ ] Have you checked for duplicate [issues](https://github.com/kaltura/playkit-js-kanalytics/issues): ______
- [ ] Which Plugin [version](https://github.com/kaltura/playkit-js-kanalytics/releases) are you using: ______
- [ ] Can you reproduce the issue with our latest release version: ______
- [ ] Can you reproduce the issue with the latest code from master: ______
- [ ] What browser and OS names and versions are you using: ______
- [ ] If applicable, add test code or test page to reproduce:

- [ ] Have you checked for duplicate [issues](https://github.com/kaltura/playkit-js-kanalytics/issues): **\_\_**
- [ ] Which Plugin [version](https://github.com/kaltura/playkit-js-kanalytics/releases) are you using: **\_\_**
- [ ] Can you reproduce the issue with our latest release version: **\_\_**
- [ ] Can you reproduce the issue with the latest code from master: **\_\_**
- [ ] What browser and OS names and versions are you using: **\_\_**
- [ ] If applicable, add test code or test page to reproduce:

```
Paste test code here
```

##### Expected behavior

What you expected to happen

##### Actual behavior

What actually happened

##### Console output

```
Paste the contents of the browser console here.
```
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ If the PR is related to an open issue please link to it.

- [ ] changes have been done against master branch, and PR does not conflict
- [ ] new unit / functional tests have been added (whenever applicable)
- [ ] test are passing in local environment
- [ ] test are passing in local environment
- [ ] Travis tests are passing (or test results are not worse than on master branch :))
- [ ] Docs have been updated
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ CHANGELOG.md
yarn.lock
yarn-error.log
LICENSE
coverage
22 changes: 11 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: required
dist: trusty
language: node_js
node_js:
- "node"
- 'node'

addons:
chrome: stable
Expand All @@ -14,9 +14,9 @@ cache:
- node_modules

before_install:
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- chmod +x ./scripts/travis.sh
- export DISPLAY=:99.0
- sh -e /etc/init.d/xvfb start
- chmod +x ./scripts/travis.sh

script: ./scripts/travis.sh

Expand All @@ -30,7 +30,7 @@ jobs:
include:
# https://docs.travis-ci.com/user/build-stages/deploy-github-releases/
- stage: Release
name: "Releasing a new version"
name: 'Releasing a new version'
if: tag IS present
env: TRAVIS_MODE=release
deploy:
Expand Down Expand Up @@ -67,13 +67,13 @@ jobs:
# Required tests
- stage: Tests
if: (branch = master) OR (tag IS present) OR (type = pull_request)
name: "Running lint"
env: TRAVIS_MODE=lint
name: 'Running lint'
env: TRAVIS_MODE=lint
- stage: Tests
if: (branch = master) OR (tag IS present) OR (type = pull_request)
name: "Running Flow type check"
env: TRAVIS_MODE=flow
name: 'Running Flow type check'
env: TRAVIS_MODE=flow
- stage: Tests
if: (branch = master) OR (tag IS present) OR (type = pull_request)
name: "Running unit tests"
env: TRAVIS_MODE=unitTests
name: 'Running unit tests'
env: TRAVIS_MODE=unitTests
31 changes: 16 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,21 +56,22 @@ Finally, add the bundle as a script tag in your page, and initialize the player
<script type="text/javascript" src="/PATH/TO/FILE/playkit.js"></script>
<script type="text/javascript" src="/PATH/TO/FILE/playkit-kanalytics.js"></script>
<div id="player-placeholder" style="height:360px; width:640px">
<script type="text/javascript">
var playerContainer = document.querySelector("#player-placeholder");
var config = {
...
plugins: {
kanalytics: {
serviceUrl: 'http://stats.kaltura.com/api_v3/index.php'
}
}
...
};
var player = playkit.core.loadPlayer(config);
playerContainer.appendChild(player.getView());
player.play();
</script>
<script type="text/javascript">
var playerContainer = document.querySelector("#player-placeholder");
var config = {
...
plugins: {
kanalytics: {
serviceUrl: 'http://stats.kaltura.com/api_v3/index.php'
}
}
...
};
var player = playkit.core.loadPlayer(config);
playerContainer.appendChild(player.getView());
player.play();
</script>
</div>
```

## Configuration
Expand Down
2 changes: 1 addition & 1 deletion flow-typed/modules/playkit-js.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// @flow
declare module 'playkit-js' {
declare module '@playkit-js/playkit-js' {
declare module.exports: any;
}
8 changes: 6 additions & 2 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
let webpackConfig = require('./webpack.config.js');
//Need to remove externals otherwise they won't be included in test
delete webpackConfig.externals;
// Need to define inline source maps when using karma
webpackConfig.devtool = 'inline-source-map';

const isWindows = /^win/.test(process.platform);
const isMacOS = /^darwin/.test(process.platform);
Expand All @@ -12,9 +14,11 @@ const customLaunchers = {
}
};

module.exports = function(config) {
module.exports = function (config) {
let karmaConf = {
logLevel: config.LOG_INFO,
browserDisconnectTimeout: 50000,
browserNoActivityTimeout: 70000,
browsers: ['Chrome', 'Firefox'],
concurrency: 1,
singleRun: true,
Expand All @@ -33,7 +37,7 @@ module.exports = function(config) {
client: {
mocha: {
reporter: 'html',
timeout: 50000
timeout: 70000
}
}
};
Expand Down
Loading

0 comments on commit 04ac722

Please sign in to comment.