Skip to content

Commit

Permalink
feat(FEC-10290): upgrade NPM packages (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Ziv authored Jul 26, 2020
1 parent 4330acb commit 261fc5e
Show file tree
Hide file tree
Showing 14 changed files with 5,635 additions and 6,323 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/
/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
1 change: 0 additions & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,3 @@
[libs]
node_modules/@playkit-js/playkit-js/flow-typed/
[options]
unsafe.enable_getters_and_setters=true
12 changes: 6 additions & 6 deletions .github/ISSUE_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@

##### Prerequisites

* [ ] Have you checked for duplicate [issues](https://github.com/kaltura/playkit-js-ima/issues): **\_\_**
* [ ] Which Plugin [version](https://github.com/kaltura/playkit-js-ima/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-ima/issues): **\_\_**
- [ ] Which Plugin [version](https://github.com/kaltura/playkit-js-ima/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
Expand Down
10 changes: 5 additions & 5 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ If the PR is related to an open issue please link to it.

### CheckLists

* [ ] 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
* [ ] Travis tests are passing (or test results are not worse than on master branch :))
* [ ] Docs have been updated
- [ ] 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
- [ ] Travis tests are passing (or test results are not worse than on master branch :))
- [ ] Docs have been updated
3 changes: 2 additions & 1 deletion .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@
CHANGELOG.md
yarn.lock
yarn-error.log
LICENSE
LICENSE
coverage
10 changes: 5 additions & 5 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ sudo: required
dist: xenial
language: node_js
node_js:
- "node"
- 'node'

addons:
chrome: stable
Expand Down Expand Up @@ -31,7 +31,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 @@ -77,13 +77,13 @@ jobs:
# Required tests
- stage: Tests
if: (branch = master) OR (tag IS present) OR (type = pull_request)
name: "Running 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"
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"
name: 'Running unit tests'
env: TRAVIS_MODE=unitTests
45 changes: 24 additions & 21 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,32 +48,35 @@ yarn run build
Finally, add the bundle as a script tag in your page, and initialize the player

```html
<script type="text/javascript" src="/PATH/TO/FILE/kaltura-{ovp/ott}-player.js"></script> <!--PlayKit player-->
<script type="text/javascript" src="/PATH/TO/FILE/playkit-ima-dai.js"></script> <!--PlayKit IMA-DAI plugin-->
<script type="text/javascript" src="/PATH/TO/FILE/kaltura-{ovp/ott}-player.js"></script>
<!--PlayKit player-->
<script type="text/javascript" src="/PATH/TO/FILE/playkit-ima-dai.js"></script>
<!--PlayKit IMA-DAI plugin-->
<div id="player-placeholder" style="height:360px; width:640px">
<script type="text/javascript">
var config = {
provider: {
partnerId: {YOUR_PARTNER_ID}
...
},
...
plugins: {
imadai: {
contentSourceId: '2477953',
videoId: 'tears-of-steel'
}
}
...
};
var player = KalturaPlayer.setup(config);
player.play();
</script>
<script type="text/javascript">
var config = {
provider: {
partnerId: {YOUR_PARTNER_ID}
...
},
...
plugins: {
imadai: {
contentSourceId: '2477953',
videoId: 'tears-of-steel'
}
}
...
};
var player = KalturaPlayer.setup(config);
player.play();
</script>
</div>
```

## Documentation

* **[Configuration & API](docs/api.md)**
- **[Configuration & API](docs/api.md)**

## Running the tests

Expand Down
2 changes: 1 addition & 1 deletion karma.conf.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const customLaunchers = {
}
};

module.exports = function(config) {
module.exports = function (config) {
let karmaConf = {
logLevel: config.LOG_INFO,
browserDisconnectTimeout: 30000,
Expand Down
127 changes: 76 additions & 51 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,20 @@
{
"name": "@playkit-js/playkit-js-ima-dai",
"version": "0.4.0",
"keywords": ["ad", "ads", "dai", "html5 player", "ima", "kaltura", "monetization", "player", "playkit-js", "playkit-js-ima", "vast", "vmap"],
"keywords": [
"ad",
"ads",
"dai",
"html5 player",
"ima",
"kaltura",
"monetization",
"player",
"playkit-js",
"playkit-js-ima",
"vast",
"vmap"
],
"homepage": "https://github.com/kaltura/playkit-js-ima-dai",
"bugs": {
"url": "https://github.com/kaltura/playkit-js-ima-dai/issues"
Expand All @@ -14,79 +27,91 @@
"main": "dist/playkit-ima-dai.js",
"scripts": {
"prebuild": "npm run clean",
"build": "NODE_ENV=production webpack",
"build": "webpack --mode production",
"clean": "rm -rf ./dist",
"precommit": "lint-staged",
"dev": "webpack-dev-server",
"dev": "webpack-dev-server --mode development",
"docs:generate": "documentation build flow-typed/** src/** -f md -o docs/api.md",
"docs:serve": "documentation serve flow-typed/** src/** --watch",
"eslint": "eslint . --color",
"flow": "flow check",
"precommit": "lint-staged",
"prettier:fix": "prettier --write .",
"pushTaggedRelease": "git push --follow-tags --no-verify origin master",
"release": "standard-version",
"test": "NODE_ENV=test karma start --color",
"watch": "webpack --progress --colors --watch"
"test": "NODE_ENV=test karma start --color --mode development",
"watch": "webpack --progress --colors --watch --mode development"
},
"lint-staged": {
"*.{js,jsx}": [
"eslint --fix",
"git add"
],
"*.{json,md,scss}": [
"prettier --write",
"git add"
]
},
"devDependencies": {
"@playkit-js/playkit-js": "0.59.5",
"babel-cli": "^6.18.0",
"babel-core": "^6.18.2",
"babel-eslint": "^7.1.1",
"babel-loader": "^6.2.7",
"babel-plugin-istanbul": "^4.0.0",
"babel-plugin-transform-class-properties": "^6.22.0",
"babel-plugin-transform-flow-strip-types": "^6.22.0",
"babel-preset-es2015": "^6.18.0",
"babel-register": "^6.23.0",
"chai": "^3.5.0",
"cross-env": "^3.1.4",
"css-loader": "^0.28.4",
"documentation": "^8.1.2",
"eslint": "^3.10.0",
"eslint-config-prettier": "^2.9.0",
"eslint-loader": "^1.6.1",
"eslint-plugin-flowtype": "^2.30.0",
"eslint-plugin-import": "^2.2.0",
"eslint-plugin-mocha-no-only": "^0.0.5",
"eslint-plugin-prettier": "^2.6.0",
"flow-bin": "latest",
"husky": "0.14.3",
"@babel/cli": "^7.10.5",
"@babel/core": "^7.10.5",
"@babel/plugin-proposal-class-properties": "^7.10.4",
"@babel/plugin-proposal-object-rest-spread": "^7.10.4",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-classes": "^7.10.4",
"@babel/plugin-transform-flow-strip-types": "^7.10.4",
"@babel/plugin-transform-property-mutators": "^7.10.4",
"@babel/preset-env": "^7.10.4",
"@babel/preset-flow": "^7.10.4",
"@babel/register": "^7.10.5",
"@playkit-js/playkit-js": "0.62.1-canary.724715e",
"babel-eslint": "^10.1.0",
"babel-loader": "^8.1.0",
"babel-plugin-istanbul": "^6.0.0",
"chai": "^4.2.0",
"cross-env": "^7.0.2",
"css-loader": "^3.6.0",
"eslint": "^7.4.0",
"eslint-config-prettier": "^6.11.0",
"eslint-loader": "^4.0.2",
"eslint-plugin-flowtype": "^5.2.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-mocha-no-only": "^1.1.0",
"eslint-plugin-prettier": "^3.1.4",
"flow-bin": "^0.129.0",
"husky": "^4.2.5",
"istanbul": "^0.4.5",
"karma": "^1.5.0",
"karma": "^5.1.0",
"karma-chai": "^0.1.0",
"karma-chrome-launcher": "^2.0.0",
"karma-cli": "^1.0.1",
"karma-coverage": "^1.1.1",
"karma-firefox-launcher": "^1.0.1",
"karma-chrome-launcher": "^3.1.0",
"karma-cli": "^2.0.0",
"karma-coverage": "^2.0.2",
"karma-firefox-launcher": "^1.3.0",
"karma-ie-launcher": "^1.0.0",
"karma-mocha": "^1.3.0",
"karma-mocha": "^2.0.1",
"karma-mocha-reporter": "^2.2.5",
"karma-safari-launcher": "^1.0.0",
"karma-sourcemap-loader": "^0.3.7",
"karma-webpack": "^2.0.2",
"lint-staged": "7.0.5",
"mocha": "^3.2.0",
"karma-webpack": "^4.0.2",
"lint-staged": "^10.2.11",
"mocha": "^8.0.1",
"mocha-cli": "^1.0.1",
"prettier": "^1.12.1",
"sinon": "^2.0.0",
"sinon-chai": "^2.8.0",
"standard-version": "^4.0.0",
"style-loader": "^0.18.2",
"uglifyjs-webpack-plugin": "^0.4.3",
"webpack": "latest",
"webpack-dev-server": "latest"
"prettier": "^2.0.5",
"sinon": "^9.0.2",
"sinon-chai": "^3.5.0",
"standard-version": "^8.0.2",
"style-loader": "^1.2.1",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.43.0",
"webpack-cli": "^3.3.12",
"webpack-dev-server": "^3.11.0"
},
"peerDependencies": {
"@playkit-js/playkit-js": "0.51.1"
"@playkit-js/playkit-js": "0.62.1-canary.724715e"
},
"publishConfig": {
"access": "public"
},
"kcc": {
"name": "playkit-ima-dai"
},
"lint-staged": {
"*.{js,jsx}": ["eslint --fix", "git add"],
"*.{json,md,scss}": ["prettier --write", "git add"]
}
}
5 changes: 4 additions & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ import {ImaDAI} from './ima-dai';
declare var __VERSION__: string;
declare var __NAME__: string;

const VERSION = __VERSION__;
const NAME = __NAME__;

export {ImaDAI as Plugin};
export {__VERSION__ as VERSION, __NAME__ as NAME};
export {VERSION, NAME};

const pluginName: string = 'imadai';

Expand Down
Loading

0 comments on commit 261fc5e

Please sign in to comment.