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

Patch 2025.01.1 #2562

Merged
merged 54 commits into from
Jan 8, 2025
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
60f3604
Upgrade eslint config
freearhey Jan 1, 2025
5b280df
Fixes linter issues
freearhey Jan 1, 2025
1aeaf49
Update broken_guide_down.js
freearhey Jan 1, 2025
7322f9e
Update broken_guide_warning.js
freearhey Jan 1, 2025
a5b8fa1
Update tests/__data__
freearhey Jan 1, 2025
a37973f
Update update.test.ts
freearhey Jan 1, 2025
ad80c82
Merge branch 'freearhey-patch-5' into freearhey-patch-4
freearhey Jan 1, 2025
3db2e6a
Update update.test.ts
freearhey Jan 1, 2025
7840829
Delete broken_guide_down.js
freearhey Jan 1, 2025
65c1447
Create broken_guide_down.mjs
freearhey Jan 1, 2025
c9f730b
Delete broken_guide_warning.js
freearhey Jan 1, 2025
b99765c
Create broken_guide_warning.mjs
freearhey Jan 1, 2025
9af374c
Update issueLoader.ts
freearhey Jan 1, 2025
4788ff1
Update .prettierrc.js
freearhey Jan 1, 2025
784216a
Update eslint.config.mjs
freearhey Jan 1, 2025
d6d20b6
Update package.json
freearhey Jan 1, 2025
5df982b
Fix linter issues in sites/
freearhey Jan 1, 2025
66be6c5
Install husky
freearhey Jan 1, 2025
b0c8dff
Update package.json
freearhey Jan 1, 2025
2f670a5
Create check.yml
freearhey Jan 1, 2025
222e65b
Update CONTRIBUTING.md
freearhey Jan 1, 2025
d134f2d
Update check.yml
freearhey Jan 1, 2025
5c3df01
Update check.yml
freearhey Jan 1, 2025
cbeac9d
Update tests/__data__
freearhey Jan 3, 2025
bb36840
Update lint.test.ts
freearhey Jan 3, 2025
3525735
Update lint.ts
freearhey Jan 3, 2025
a89e268
Merge branch 'master' into freearhey-patch-5
freearhey Jan 3, 2025
382d4a3
Fix pluto.tv linter issues
freearhey Jan 3, 2025
e2bf048
Update pre-commit
freearhey Jan 3, 2025
532386a
Update lint.test.ts
freearhey Jan 3, 2025
786e95a
Update lint.ts
freearhey Jan 3, 2025
fef6c50
Update package.json
freearhey Jan 3, 2025
7e303db
Update check.yml
freearhey Jan 3, 2025
a3caf23
Merge branch 'master' into freearhey-patch-5
BellezaEmporium Jan 3, 2025
dfdac39
Merge branch 'master' into freearhey-patch-5
freearhey Jan 3, 2025
4aad812
Update sky.com.config.js
freearhey Jan 4, 2025
8b0952b
Merge branch 'master' into freearhey-patch-5
freearhey Jan 4, 2025
e8f89b2
Fix linter issues
freearhey Jan 4, 2025
ae7b32b
Fix "test" error on Windows
freearhey Jan 4, 2025
c8055f1
Add "debug" mode to tests
freearhey Jan 5, 2025
0f92463
Update editor.test.ts
freearhey Jan 5, 2025
25093cb
Update update.test.ts
freearhey Jan 5, 2025
e7bbc7d
Update parse.ts
freearhey Jan 5, 2025
e15d812
Replace path.resolve with pathToFileURL
freearhey Jan 5, 2025
ded5e88
Fix sites:update test on Windows
freearhey Jan 6, 2025
7171e11
Delete .sites/_table.md from repo
freearhey Jan 6, 2025
0b8782a
Update grab.test.ts
freearhey Jan 6, 2025
bb9248d
Update grab.test.ts
freearhey Jan 6, 2025
cfb53d7
Install jest-offline
freearhey Jan 7, 2025
e1ffd61
Replace ts-jest with @swc/jest
freearhey Jan 7, 2025
4c44d44
sync with master
BellezaEmporium Jan 7, 2025
3c858ec
Minor changes to the tests
freearhey Jan 7, 2025
d7e28ae
Merge branch 'freearhey-patch-5' of https://github.com/iptv-org/epg i…
freearhey Jan 7, 2025
c436e75
Increase timeout for the test
freearhey Jan 7, 2025
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
39 changes: 0 additions & 39 deletions .eslintrc.json

This file was deleted.

42 changes: 42 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: check
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened, edited]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- uses: tj-actions/changed-files@v45
id: files
with:
since_last_remote_commit: true
files_yaml: |
js:
- tests/**/*.{js,ts}
- scripts/**/*.{js,ts}
- sites/**/*.{js,ts}
channels:
- sites/**/*.channels.xml
- uses: actions/setup-node@v4
if: ${{ !env.ACT && (steps.files.outputs.js_any_changed == 'true' || steps.files.outputs.channels_any_changed == 'true') }}
with:
node-version: 22
cache: 'npm'
- name: install dependencies
if: steps.files.outputs.js_any_changed == 'true' || steps.files.outputs.channels_any_changed == 'true'
run: SKIP_POSTINSTALL=1 npm install
- name: check changed js-files
if: steps.files.outputs.js_any_changed == 'true'
run: |
npx eslint ${{ steps.files.outputs.js_all_changed_files }}
- name: check changed *.channels.xml
if: steps.files.outputs.channels_any_changed == 'true'
run: |
npm run channels:lint -- ${{ steps.files.outputs.channels_all_changed_files }}
2 changes: 2 additions & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
npm run lint
npm run channels:lint
2 changes: 1 addition & 1 deletion .prettierrc.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
module.exports = {
tabWidth: 2,
useTabs: false,
endOfLine: 'lf',
endOfLine: 'crlf',
semi: false,
singleQuote: true,
printWidth: 100,
Expand Down
1 change: 1 addition & 0 deletions .sites/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
_table.md
207 changes: 0 additions & 207 deletions .sites/_table.md

This file was deleted.

8 changes: 4 additions & 4 deletions .sites/template.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sites

<!-- prettier-ignore -->
#include "./.sites/_table.md"
# Sites
<!-- prettier-ignore -->
#include "./.sites/_table.md"
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ For scripts to work, you must have [Node.js](https://nodejs.org/en) installed on

To run scripts use the `npm run <script-name>` command.

- `act:check`: allows to test the [check](https://github.com/iptv-org/iptv/blob/master/.github/workflows/check.yml) workflow locally. Depends on [nektos/act](https://github.com/nektos/act).
- `act:update`: allows to test the [update](https://github.com/iptv-org/iptv/blob/master/.github/workflows/update.yml) workflow locally. Depends on [nektos/act](https://github.com/nektos/act).
- `api:load`: downloads the latest channels data from the [iptv-org/api](https://github.com/iptv-org/api).
- `api:generate`: generates a JSON file with all channels for the [iptv-org/api](https://github.com/iptv-org/api) repository.
Expand Down
52 changes: 52 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
import typescriptEslint from '@typescript-eslint/eslint-plugin'
import globals from 'globals'
import tsParser from '@typescript-eslint/parser'
import path from 'node:path'
import { fileURLToPath } from 'node:url'
import js from '@eslint/js'
import { FlatCompat } from '@eslint/eslintrc'

const __filename = fileURLToPath(import.meta.url)
const __dirname = path.dirname(__filename)
const compat = new FlatCompat({
baseDirectory: __dirname,
recommendedConfig: js.configs.recommended,
allConfig: js.configs.all
})

export default [
...compat.extends('eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'),
{
plugins: {
'@typescript-eslint': typescriptEslint
},

languageOptions: {
globals: {
...globals.node,
...globals.jest
},

parser: tsParser,
ecmaVersion: 'latest',
sourceType: 'module'
},

rules: {
'@typescript-eslint/no-require-imports': 'off',
'@typescript-eslint/no-var-requires': 'off',
'no-case-declarations': 'off',
'linebreak-style': ['error', 'windows'],

quotes: [
'error',
'single',
{
avoidEscape: true
}
],

semi: ['error', 'never']
}
}
]
70 changes: 63 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 9 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"name": "epg",
"scripts": {
"act:check": "act pull_request -W .github/workflows/check.yml",
"act:update": "act workflow_dispatch -W .github/workflows/update.yml",
"api:load": "npx tsx scripts/commands/api/load.ts",
"api:generate": "npx tsx scripts/commands/api/generate.ts",
Expand All @@ -11,11 +12,12 @@
"sites:update": "npx tsx scripts/commands/sites/update.ts",
"grab": "npx tsx scripts/commands/epg/grab.ts",
"serve": "npx serve",
"lint": "npx eslint \"{scripts,tests}/**/*.{ts,js}\"",
"lint": "npx eslint \"{scripts,tests,sites}/**/*.{ts,js}\"",
"test": "run-script-os",
"test:win32": "SET \"TZ=Pacific/Nauru\" && npx jest --runInBand",
"test:default": "TZ=Pacific/Nauru npx jest --runInBand",
"postinstall": "npm run api:load"
"postinstall": "skip-postinstall || npm run api:load",
"prepare": "husky"
},
"private": true,
"author": "Arhey",
Expand All @@ -29,6 +31,8 @@
},
"dependencies": {
"@alex_neo/jest-expect-message": "^1.0.5",
"@eslint/eslintrc": "^3.2.0",
"@eslint/js": "^9.17.0",
"@freearhey/core": "^0.3.1",
"@freearhey/search-js": "^0.1.1",
"@ntlab/sfetch": "^1.0.0",
Expand Down Expand Up @@ -60,6 +64,8 @@
"form-data": "^4.0.0",
"fs-extra": "^10.0.1",
"glob": "^7.2.0",
"globals": "^15.14.0",
"husky": "^9.1.7",
"iconv-lite": "^0.4.24",
"inquirer": "^8.2.6",
"jest": "^29.7.0",
Expand All @@ -77,6 +83,7 @@
"pdf-parse": "^1.1.1",
"serve": "^14.2.4",
"signale": "^1.4.0",
"skip-postinstall": "^1.0.0",
"srcset": "^4.0.0",
"table2array": "^0.0.2",
"tabletojson": "^2.0.7",
Expand Down
Loading
Loading