Skip to content

Commit

Permalink
feat(FEC-13614): Refactor: Migration to TypeScript - Regression fix (#…
Browse files Browse the repository at this point in the history
…838)

### Description of the Changes

#### solves FEC-13371 FEC-13614

Related prs: 
kaltura/kaltura-player-js#690

---------

Co-authored-by: JonathanTGold <jonathan.gold@[email protected]>
  • Loading branch information
JonathanTGold and JonathanTGold authored Jan 8, 2024
1 parent b393b99 commit 20f8b3d
Show file tree
Hide file tree
Showing 321 changed files with 8,825 additions and 7,993 deletions.
40 changes: 0 additions & 40 deletions .babelrc

This file was deleted.

88 changes: 49 additions & 39 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,59 @@
{
"parser": "babel-eslint",
"extends": ["eslint:recommended", "plugin:flowtype/recommended", "plugin:react/recommended"],
"parserOptions": {
"sourceType": "module"
},
"settings": {
"react": {
"pragma": "h",
"version": "16.0"
}
},
"plugins": ["prettier", "import", "flowtype", "mocha-no-only", "react"],
"env": {
"browser": true,
"es6": true,
"mocha": true,
"amd": true,
"commonjs": true
},
"globals": {
"should": true,
"sinon": true,
"process": true,
"__dirname": true,
"__VERSION__": true,
"__NAME__": true,
"__CSS_MODULE_PREFIX__": true
},
"root": true,
"parser": "@typescript-eslint/parser",
"extends": ["plugin:prettier/recommended", "plugin:@typescript-eslint/recommended", "prettier"],
"plugins": ["prettier", "@typescript-eslint"],
"rules": {
"max-len": [
"error",
{
"code": 150,
"ignoreComments": true,
"ignoreStrings": true,
"ignoreUrls": true,
"ignoreTemplateLiterals": true,
"ignoreRegExpLiterals": true
}
],
"eol-last": "off",
"prettier/prettier": "error",
"mocha-no-only/mocha-no-only": "off",
"flowtype/define-flow-type": 2,
"react/prop-types": 0,
"require-jsdoc": [
"@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",
{
"require": {
"FunctionDeclaration": true,
"MethodDefinition": true,
"ClassDeclaration": true,
"ArrowFunctionExpression": true
"accessibility": "explicit",
"overrides": {
"accessors": "explicit",
"constructors": "no-public",
"methods": "explicit",
"properties": "explicit",
"parameterProperties": "explicit"
}
}
],
"valid-jsdoc": ["error"],
"react/no-deprecated": "off"
"@typescript-eslint/ban-types": [
"error",
{
"extendDefaults": true,
"types": {
"Function": false // Overrides the rule for "Function" type only
}
}
],
"block-scoped-var": "error",
"eqeqeq": "error",
"no-var": "error",
"no-console": "error",
"prefer-const": "error"
},
"overrides": [],
"settings": {},
"env": {
"browser": true,
"es6": true
}
}
12 changes: 6 additions & 6 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
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:**

**Fix:**

#### Resolves FEC-[Please add the ticket reference here]


- [ ] 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
5 changes: 3 additions & 2 deletions .github/workflows/run_canary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,6 @@ jobs:
uses: kaltura/playkit-js-common/.github/workflows/canary_dependency.yaml@master
secrets: inherit
with:
schema-type: "playerV3Versions"
tests-yarn-run-to-execute: 'build eslint flow test'
node-version: '20.x'
schema-type: 'playerV3Versions'
tests-yarn-run-to-execute: 'build lint type-check test'
28 changes: 0 additions & 28 deletions .github/workflows/run_canary_full_flow.yaml

This file was deleted.

9 changes: 5 additions & 4 deletions .github/workflows/run_prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ jobs:
PLAYER_MSTEAMS_WEBHOOK: ${{ secrets.PLAYER_MSTEAMS_WEBHOOK }}
PLAYER_GITHUB_BOT_TOKEN: ${{ secrets.PLAYER_GITHUB_BOT_TOKEN }}
with:
type: "dependency"
env: "prod"
schema-type: "playerV3Versions"
tests-yarn-run-to-execute: 'build eslint flow test'
node-version: '20.x'
type: 'dependency'
env: 'prod'
schema-type: 'playerV3Versions'
tests-yarn-run-to-execute: 'build lint type-check test'
29 changes: 25 additions & 4 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,38 @@ run-name: Player And Plugin Tests
on:
pull_request:
branches:
- "*"
- '*'

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:prod'
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:
Expand Down
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -43,3 +43,7 @@ jspm_packages
.idea

dist/
lib/
api-extractor/report/
api-extractor/report-temp/
api-extractor/playkit-js-ui.api.json
13 changes: 10 additions & 3 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,14 @@
/dist
/src/index.html
dist/
lib/
docs/
api-extractor/
.github/
flow-typed/
samples/
coverage/
CHANGELOG.md
yarn.lock
yarn-error.log
LICENSE
coverage
README.md

37 changes: 37 additions & 0 deletions api-extractor.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/lib/src/index.d.ts",
"bundledPackages": [],
"compiler": {},
"apiReport": {
"enabled": true,
"reportFolder": "<projectFolder>/api-extractor/report",
"reportTempFolder": "<projectFolder>/api-extractor/report-temp"
},
"docModel": {
"enabled": true,
"apiJsonFilePath": "<projectFolder>/api-extractor/<unscopedPackageName>.api.json"
},
"dtsRollup": {
"enabled": true,
"untrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>.d.ts"
},
"tsdocMetadata": {},
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"extractorMessageReporting": {
"default": {
"logLevel": "none"
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "none"
}
}
}
}
Loading

0 comments on commit 20f8b3d

Please sign in to comment.