Skip to content

Commit

Permalink
feat(FEC-13371): Refactor: Migrate Kaltura Player to TypeScript (from…
Browse files Browse the repository at this point in the history
… Flow) (#661)

Refactor: Migrate Kaltura Player to TypeScript (from Flow)

solves FEC-13371
---------

Co-authored-by: JonathanTGold <jonathan.gold@[email protected]>
  • Loading branch information
JonathanTGold and JonathanTGold authored Dec 28, 2023
1 parent 22fa20a commit 4ba0ded
Show file tree
Hide file tree
Showing 240 changed files with 25,617 additions and 15,559 deletions.
22 changes: 0 additions & 22 deletions .babelrc

This file was deleted.

12 changes: 4 additions & 8 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
/flow-typed/**/*.js
/ts-typed/**/*.d.ts
types.d.ts
/coverage
/dist
karma.conf.js
dist/
types/
demo/
webpack.config.js
webpack.config.ovp.js
webpack.config.ott.js
tsconfig.json
85 changes: 59 additions & 26 deletions .eslintrc
Original file line number Diff line number Diff line change
@@ -1,32 +1,65 @@
{
"parser": "babel-eslint",
"parserOptions": {
"ecmaVersion": 6,
"sourceType": "module"
"root": true,
"parser": "@typescript-eslint/parser",
"extends": [
"plugin:prettier/recommended",
"plugin:@typescript-eslint/recommended",
"prettier"
],
"plugins": ["prettier", "@typescript-eslint"],
"rules": {
"react/prefer-stateless-function": "off",
"max-len": ["warn", { "code": 200 }],
"eol-last": "off",
"prettier/prettier": "warn",
"@typescript-eslint/explicit-function-return-type": "warn",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-unused-vars": "error",
// "@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/explicit-member-accessibility": [
"error",
{
"accessibility": "explicit",
"overrides": {
"accessors": "explicit",
"constructors": "no-public",
"methods": "explicit",
"properties": "explicit",
"parameterProperties": "explicit"
}
}
],
"block-scoped-var": "error",
"arrow-parens": "error",
"eqeqeq": "error",
"no-var": "error",
"no-console": "error",
"prefer-const": "error",
"prefer-arrow-callback": "error",
"no-trailing-spaces": "error",
"quotes": ["warn", "single", { "avoidEscape": true }],
"no-restricted-properties": [
"error",
{
"object": "describe",
"property": "only"
},
{
"object": "it",
"property": "only"
}
]
},
"overrides": [],
"settings": {
"jest": {
"version": 26
}
},
"extends": ["eslint:recommended", "plugin:flowtype/recommended"],
"plugins": ["prettier", "import", "flowtype", "mocha-no-only"],
"env": {
"browser": true,
"es6": true,
"mocha": true,
"amd": true,
"commonjs": true
},
"globals": {
"should": true,
"sinon": true,
"__VERSION__": true,
"__NAME__": true,
"__PACKAGE_URL__": true,
"__CONFIG_DOCS_URL__": true
},
"rules": {
"prettier/prettier": "error",
"no-console": "error",
"no-alert": "error",
"mocha-no-only/mocha-no-only": "off",
"require-jsdoc": ["error"],
"valid-jsdoc": ["error"]
"commonjs": true,
"es6": true
}
}
20 changes: 0 additions & 20 deletions .flowconfig

This file was deleted.

10 changes: 4 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,8 @@
Please add a detailed description of the change, whether it's an enhancement or a bugfix.
If the PR is related to an open issue please link to it.

### CheckLists
**Issue:**

- [ ] 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
**Fix:**

#### Resolves FEC-[Please add the ticket reference here]
3 changes: 2 additions & 1 deletion .github/workflows/run_canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,8 @@ jobs:
uses: kaltura/playkit-js-common/.github/workflows/canary_player.yaml@master
secrets: inherit
with:
node-version: "20.x"
player-type: "ovp tv"
schema-type: "playerV3Versions"
tests-yarn-run-to-execute: 'build eslint flow test'
tests-yarn-run-to-execute: 'build lint type-check test'
yarn-upgrade-list: "@playkit-js/playkit-js@canary @playkit-js/playkit-js-dash@canary @playkit-js/playkit-js-hls@canary @playkit-js/playkit-js-ui@canary @playkit-js/playkit-js-providers@canary"
28 changes: 0 additions & 28 deletions .github/workflows/run_canary_full_flow.yaml

This file was deleted.

7 changes: 4 additions & 3 deletions .github/workflows/run_prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,11 @@ jobs:
PLAYER_MSTEAMS_WEBHOOK: ${{ secrets.PLAYER_MSTEAMS_WEBHOOK }}
PLAYER_GITHUB_BOT_TOKEN: ${{ secrets.PLAYER_GITHUB_BOT_TOKEN }}
with:
node-version: "20.x"
type: "player"
env: "prod"
player-type: "ovp tv"
schema-type: "playerV3Versions"
tests-yarn-run-to-execute: 'build eslint flow test'
yarn-upgrade-list: "@playkit-js/playkit-js @playkit-js/playkit-js-dash @playkit-js/playkit-js-hls @playkit-js/playkit-js-ui @playkit-js/playkit-js-providers"
tests-yarn-run-to-execute: 'build lint type-check test'
yarn-upgrade-list: "@playkit-js/playkit-js @playkit-js/playkit-js-dash @playkit-js/playkit-js-hls @playkit-js/playkit-js-ui @playkit-js/playkit-js-providers"

28 changes: 24 additions & 4 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,38 @@ on:
- "*"

jobs:
running-tests:
build:
uses: kaltura/ovp-pipelines-pub/.github/workflows/player_tests.yaml@master
with:
yarn-run-to-execute: 'build eslint flow test'
node-version: '20.x'
yarn-run-to-execute: 'build'
test:
uses: kaltura/ovp-pipelines-pub/.github/workflows/player_tests.yaml@master
with:
node-version: '20.x'
yarn-run-to-execute: 'test'
type-check:
uses: kaltura/ovp-pipelines-pub/.github/workflows/player_tests.yaml@master
with:
node-version: '20.x'
yarn-run-to-execute: 'type-check'
build-types:
uses: kaltura/ovp-pipelines-pub/.github/workflows/player_tests.yaml@master
with:
node-version: '20.x'
yarn-run-to-execute: 'build:types'
lint:
uses: kaltura/ovp-pipelines-pub/.github/workflows/player_tests.yaml@master
with:
node-version: '20.x'
yarn-run-to-execute: 'lint'
notification:
if: always()
uses: kaltura/ovp-pipelines-pub/.github/workflows/notification.yaml@master
needs: running-tests
needs: [build, test, type-check, lint]
secrets:
PLAYER_MSTEAMS_WEBHOOK: ${{ secrets.PLAYER_MSTEAMS_WEBHOOK }}
with:
failure-status: ${{ contains(needs.*.result, 'failure') }}
cancelled-status: ${{ contains(needs.*.result, 'cancelled') }}
is-test: 'true'

47 changes: 6 additions & 41 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,42 +1,7 @@
# Logs
logs
*.log
npm-debug.log*

# Runtime data
pids
*.pid
*.seed

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# node-waf configuration
.lock-wscript

# Compiled binary addons (http://nodejs.org/api/addons.html)
build/Release

# Dependency directories
dist
lib/
api-extractor/report/
api-extractor/report-temp/
api-extractor/kaltura-player-js.api.json
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

.idea

/dist/
.DS_Store
*.log
49 changes: 0 additions & 49 deletions .npmignore

This file was deleted.

13 changes: 9 additions & 4 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,13 @@
/dist
/src/index.html
dist/
lib/
docs/
.github/
flow-typed/
samples/
coverage/
CHANGELOG.md
yarn.lock
yarn-error.log
LICENSE
/samples
/coverage
README.md

7 changes: 2 additions & 5 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,9 @@
{
"printWidth": 150,
"tabWidth": 2,
"useTabs": false,
"semi": true,
"singleQuote": true,
"trailingComma": "none",
"bracketSpacing": false,
"jsxBracketSameLine": true,
"arrowParens": "avoid",
"proseWrap": "preserve"
"proseWrap": "preserve",
"arrowParens": "always"
}
1 change: 0 additions & 1 deletion _config.yml

This file was deleted.

Loading

0 comments on commit 4ba0ded

Please sign in to comment.