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 from 'flow' to Type Script' #225

Merged
merged 29 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 0 additions & 22 deletions .babelrc

This file was deleted.

3 changes: 0 additions & 3 deletions .eslintignore

This file was deleted.

76 changes: 55 additions & 21 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -1,26 +1,60 @@
{
"parser": "babel-eslint",
"extends": ["eslint:recommended", "plugin:flowtype/recommended"],
"plugins": ["prettier", "import", "flowtype", "mocha-no-only"],
"env": {
"browser": true,
"es6": true,
"mocha": true,
"amd": true,
"commonjs": true
"root": true,
"parser": "@typescript-eslint/parser",
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended"],
"plugins": ["@typescript-eslint"],
"rules": {
"indent": ["error", 2],
"react/prefer-stateless-function": "off",
"max-len": ["warn", { "code": 500 }],
"eol-last": "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": "warn",
JonathanTGold marked this conversation as resolved.
Show resolved Hide resolved
"@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",
"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"
}
]
},
"globals": {
"should": true,
"sinon": true,
"__VERSION__": true,
"__NAME__": true,
"process": true,
"__dirname": true
"overrides": [],
"settings": {
"jest": {
"version": 26
}
},
"rules": {
"prettier/prettier": "error",
"mocha-no-only/mocha-no-only": "off",
"require-jsdoc": ["error"],
"valid-jsdoc": ["error"]
"env": {
"browser": true,
"commonjs": true,
"es6": true
}
}
5 changes: 0 additions & 5 deletions .flowconfig

This file was deleted.

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'
31 changes: 26 additions & 5 deletions .github/workflows/run_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,41 @@ run-name: Player And Plugin Tests
on:
pull_request:
branches:
- "*"
- '*'

jobs:
running-tests:
build:
JonathanTGold marked this conversation as resolved.
Show resolved Hide resolved
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'
is-test: 'true'
46 changes: 7 additions & 39 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,41 +1,9 @@
# 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
node_modules
jspm_packages

# Optional npm cache directory
.npm

# Optional REPL history
.node_repl_history

dist
coverage
.idea

/dist/
*.log
lib
api-extractor/report/
api-extractor/report-temp/
api-extractor/playkit-js-providers.api.json
49 changes: 0 additions & 49 deletions .npmignore

This file was deleted.

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/types/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/index.d.ts"
},
"tsdocMetadata": {},
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"extractorMessageReporting": {
"default": {
"logLevel": "warning"
}
},
"tsdocMessageReporting": {
"default": {
"logLevel": "warning"
}
}
}
}
Loading