Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(FEC-13371): Refactor: Migration to TypeScript (from Flow) #837

Closed
wants to merge 53 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
499376f
upgrade webpack deps and the coorsponding conf
Nov 13, 2023
bede944
all dirs exept componebts
Nov 14, 2023
66f131c
add scss suppurt and some components
Nov 15, 2023
3eebe4b
40% fix event classes dups
Nov 16, 2023
320bc54
icon
Nov 16, 2023
7c052bf
live tag and ineractive
Nov 16, 2023
ce21961
more comps
Nov 19, 2023
603052a
seekbar comps
Nov 20, 2023
ce54073
coms complete
Nov 20, 2023
c8e0619
index to ts
Nov 20, 2023
2736a8c
complete
Nov 21, 2023
cd8010b
remove redundent alias webpack
Nov 21, 2023
5a6dab4
state types
Nov 22, 2023
5e32b45
fix webpakc - react settings
Nov 22, 2023
12a7965
fix tests
Nov 26, 2023
52f7a4c
lint + types generate + ci cd
Nov 27, 2023
4f0ea77
reomve api extractor files
Nov 27, 2023
80923c9
add them to gitignore
Nov 27, 2023
bb00741
Merge remote-tracking branch 'origin/master' into FEC-13371
Nov 27, 2023
bd858b3
fix lint
Nov 27, 2023
526f824
ci cd concurrency improvement
Nov 27, 2023
fdef0da
fix invalid yaml
Nov 27, 2023
d0f2309
fix
Dec 11, 2023
9631096
webpack preact
Dec 11, 2023
96248ed
fix jsx error - missing config & and fix style broken error - missing…
Dec 12, 2023
5df9bac
fix
Dec 19, 2023
8434acd
update yarn and set webpack
Dec 19, 2023
96f1e56
Merge branch 'master' into FEC-13371
Dec 19, 2023
00c3cb3
fix merge master
Dec 19, 2023
cff480e
fix css sourc map
Dec 20, 2023
5439799
Review
Dec 21, 2023
fa5f236
fix types
Dec 24, 2023
c4e8cf0
Addressing Sivan comments & add browserlist
Dec 26, 2023
67ec818
upgrade playkit to the latest canary, and use temp local .tgz file fo…
Dec 27, 2023
6e771d1
fix
Dec 27, 2023
8d56eb8
fix
Dec 27, 2023
5afd46b
fix
Dec 27, 2023
476e3a1
fix
Dec 27, 2023
f04965e
fix
Dec 27, 2023
0e46c5f
fix
Dec 27, 2023
1949281
feat(FEC-13371): Refactor: Migrate to TypeScript (from Flow) (#815)
JonathanTGold Dec 27, 2023
e20dcd3
fix(FEC-13371): fix TS types CSS export issue
Dec 28, 2023
50ba8a8
Merge remote-tracking branch 'origin/master' into FEC-13371
Dec 28, 2023
baef7a9
fix template
Dec 28, 2023
d8497ca
fix temlate
Dec 28, 2023
a2e9935
fix(FEC-13371): fix TS types CSS export issue (#829)
JonathanTGold Dec 28, 2023
3011d8c
Merge remote-tracking branch 'origin/master' into FEC-13371
Dec 28, 2023
d82abb9
fix
Dec 28, 2023
262640d
fix(FEC-13361): Export typings on package.json (#830)
JonathanTGold Dec 28, 2023
b70d97c
Merge remote-tracking branch 'origin/master' into FEC-13371
Dec 28, 2023
853ae41
fix(FEC-13371): Update browser-list dep
Dec 28, 2023
9b27090
fix
Dec 28, 2023
f9ad890
fix
Dec 28, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
40 changes: 0 additions & 40 deletions .babelrc

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

100 changes: 60 additions & 40 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,69 @@
{
"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": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"plugins": ["@typescript-eslint"],
"rules": {
"prettier/prettier": "error",
"mocha-no-only/mocha-no-only": "off",
"flowtype/define-flow-type": 2,
"react/prop-types": 0,
"require-jsdoc": [
"indent": ["error", 2],
"react/prefer-stateless-function": "off",
"max-len": ["warn", {"code": 500}],
"eol-last": "off",
"prettier/prettier": "off",
"@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": "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",
"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
}
},
"env": {
"browser": true,
"commonjs": true,
"es6": true
}
}
18 changes: 0 additions & 18 deletions .flowconfig

This file was deleted.

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
49 changes: 0 additions & 49 deletions .npmignore

This file was deleted.

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