diff --git a/.babelrc b/.babelrc index abf4798b246eb..bca0e3c2c303e 100644 --- a/.babelrc +++ b/.babelrc @@ -4,8 +4,8 @@ "@babel/env", { "targets": { - "chrome": "106", - "node": "16.16.0" + "chrome": "122", + "node": "20.9.0" } } ] diff --git a/.eslintrc.js b/.eslintrc.js index 2729411b7e10b..f342b62dd1104 100644 --- a/.eslintrc.js +++ b/.eslintrc.js @@ -1,3 +1,8 @@ +const path = require('path') +const { readFileSync } = require('fs') + +const activeLocales = JSON.parse(readFileSync(path.join(__dirname, './static/locales/activeLocales.json'))) + module.exports = { // https://eslint.org/docs/user-guide/configuring#using-configuration-files-1 root: true, @@ -47,11 +52,12 @@ module.exports = { 'plugin:vue/recommended', 'standard', 'plugin:jsonc/recommended-with-json', - 'plugin:vuejs-accessibility/recommended' + 'plugin:vuejs-accessibility/recommended', + 'plugin:@intlify/vue-i18n/recommended' ], // https://eslint.org/docs/user-guide/configuring#configuring-plugins - plugins: ['vue', 'vuejs-accessibility', 'n', 'unicorn'], + plugins: ['vue', 'vuejs-accessibility', 'n', 'unicorn', '@intlify/vue-i18n'], rules: { 'space-before-function-paren': 'off', @@ -77,6 +83,42 @@ module.exports = { 'unicorn/no-array-push-push': 'error', 'unicorn/prefer-keyboard-event-key': 'error', 'unicorn/prefer-regexp-test': 'error', - 'unicorn/prefer-string-replace-all': 'error' + 'unicorn/prefer-string-replace-all': 'error', + '@intlify/vue-i18n/no-dynamic-keys': 'error', + // TODO: enable at a later date. currently disabled to prevent massive conflicts for initial PR + // '@intlify/vue-i18n/no-unused-keys': [ + // 'error', + // { + // extensions: ['.js', '.vue', 'yaml'] + // } + // ], + '@intlify/vue-i18n/no-duplicate-keys-in-locale': 'error', + '@intlify/vue-i18n/no-raw-text': [ + 'error', + { + attributes: { + '/.+/': [ + 'title', + 'aria-label', + 'aria-placeholder', + 'aria-roledescription', + 'aria-valuetext', + 'tooltip', + 'message' + ], + input: ['placeholder', 'value'], + img: ['alt'] + }, + ignoreText: ['-', '•', '/', 'YouTube', 'Invidious', 'FreeTube'] + } + ], + 'vue/require-explicit-emits': 'error', + 'vue/no-unused-emit-declarations': 'error', + }, + settings: { + 'vue-i18n': { + localeDir: `./static/locales/{${activeLocales.join(',')}}.yaml`, + messageSyntaxVersion: '^8.0.0' + } } } diff --git a/.github/ISSUE_TEMPLATE/bug_report.yaml b/.github/ISSUE_TEMPLATE/bug_report.yaml index c81ab531cd995..aef914ee3f668 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.yaml +++ b/.github/ISSUE_TEMPLATE/bug_report.yaml @@ -80,26 +80,29 @@ body: - type: dropdown attributes: label: Installation Method + description: When you select an unofficial installation method, you must have verified that the bug is also present in one of the official installation methods. Please make sure you uninstall the unofficial installation before installing one of the official installations. If you can't reproduce this in one of the official installation methods, you should report the bug to the maintainer of the unofficial installation method you used. options: - .apk (Alpine Linux Package) - - .apk (Android, FreeTubeCordova) - .AppImage - - AUR - - Chocolatey - .deb - .dmg - .exe - Flathub - - MPR - - Nix - .pacman - Portable - - PortableApps - .rpm - - Scoop - - Snapcraft - - winget - .zip + - .apk (FreeTubeAndroid Unofficial) + - AUR (Unofficial) + - Chocolatey (Unofficial) + - Homebrew (Unofficial) + - MPR (Unofficial) + - Nix (Unofficial) + - PortableApps (Unofficial) + - Scoop (Unofficial) + - Snapcraft (Unofficial) + - WAPT (Unofficial) + - winget (Unofficial) - other validations: required: true diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index 3ba13e0cec6cb..65a5c0f0ce04e 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1 +1,17 @@ blank_issues_enabled: false +contact_links: + - name: Discussions + url: https://github.com/FreeTubeApp/FreeTube/discussions/categories/general + about: View discussions or start one yourself + - name: Questions + url: https://github.com/FreeTubeApp/FreeTube/discussions/categories/q-a + about: Ask and answer questions + - name: Matrix Community + url: https://matrix.to/#/+freetube:matrix.org + about: 'Join our Matrix chatroom - "Note: Bugs and Feature requests should be made on GitHub and not in the Matrix room"' + - name: Translate FreeTube + url: https://hosted.weblate.org/engage/free-tube/ + about: Help translate FreeTube on Weblate + - name: FreeTube Documentation + url: https://docs.freetubeapp.io/ + about: View the Documentation to find all relevant information about FreeTube diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6fbd40c95d04f..cb49b32397ef2 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -8,6 +8,27 @@ updates: - "PR: waiting for review" - "PR: dependencies" open-pull-requests-limit: 15 + groups: + babel: + patterns: + - "@babel/*" + - "babel-*" + eslint: + patterns: + - "eslint" + - "eslint-*" + - "yaml-eslint-parser" + - "vue-eslint-parser" + stylelint: + patterns: + - "stylelint" + - "stylelint-*" + - "postcss" + - "postcss-*" + - "@double-great/stylelint-a11y" + fortawesome: + patterns: + - "@fortawesome/*" - package-ecosystem: "github-actions" directory: "/" schedule: diff --git a/.github/issue-labeler.yml b/.github/issue-labeler.yml new file mode 100644 index 0000000000000..38178571e5d68 --- /dev/null +++ b/.github/issue-labeler.yml @@ -0,0 +1,65 @@ +'B: visual': + - '(visual bug)' + +'B: Unofficial Download': + - '(AUR \(Unofficial\)|Chocolatey \(Unofficial\)|\.apk \(FreeTubeAndroid Unofficial\)|Homebrew \(Unofficial\)|PortableApps \(Unofficial\)|WAPT \(Unofficial\)|winget \(Unofficial\)|Scoop \(Unofficial\)|Snapcraft \(Unofficial\)|MPR \(Unofficial\)|Nix \(Unofficial\))' + +'B: keyboard control': + - '(keyboard control not working)' + +'B: text/string': + - '(text/string issue)' + +'B: content not loading': + - '(content not loading)' + +'B: accessibility': + - '(accessibility issue)' + +'B: usability': + - '(usability issue)' + +'B: crash': + - '(causes crash)' + +'B: feature stopped working': + - '(feature stopped working)' + +'B: inconsistent behavior': + - '(inconsistent behavior)' + +'B: data loss': + - '(data loss)' + +'B: race condition': + - '(race condition)' + +'B: API issue': + - '(API issue)' + +'B: developer mode': + - '(only happens in developer mode)' + +'E: improvement existing feature': + - '(improvement to existing feature)' + +'E: new optional setting': + - '(new optional setting)' + +'E: visual improvement': + - '(visual improvement)' + +'E: display more information': + - '(display more information to user)' + +'E: ease of use improvement': + - '(ease of use improvement)' + +'E: support external software': + - '(support for external software)' + +'E: new feature': + - '(new feature)' + +'E: keyboard shortcut': + - '(new keyboard shortcut)' diff --git a/.github/labeler.yml b/.github/labeler.yml deleted file mode 100644 index dff087046453f..0000000000000 --- a/.github/labeler.yml +++ /dev/null @@ -1,19 +0,0 @@ -'PR: waiting for review': - - '*' - - '.babelrc' - - '.editorconfig' - - '.eslintignore' - - '.eslintrc.js' - - '.gitignore' - - '.prettierrc' - - '.whitesource' - - '.github/**/*' - - '.vscode/**/*' - - '_icons/**/*' - - '_scripts/**/*' - - 'src/**/*' - - 'static/**/*' - -'PR: dependencies': - - 'yarn.lock' - - 'package.json' diff --git a/.github/pr-labeler.yml b/.github/pr-labeler.yml new file mode 100644 index 0000000000000..a6f19b9ca8c3c --- /dev/null +++ b/.github/pr-labeler.yml @@ -0,0 +1,8 @@ +'PR: waiting for review': +- changed-files: + - any-glob-to-any-file: '**' + +'PR: dependencies': +- any: + - changed-files: + - any-glob-to-any-file: ['yarn.lock', 'package.json'] diff --git a/.github/workflows/autoLabelDuplicate.yml b/.github/workflows/autoLabelDuplicate.yml index 4bbbc9b4cf622..56fa8681e7074 100644 --- a/.github/workflows/autoLabelDuplicate.yml +++ b/.github/workflows/autoLabelDuplicate.yml @@ -5,10 +5,10 @@ on: jobs: test: + if: github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' runs-on: ubuntu-latest steps: - name: Check Comment Author - if: github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER' uses: Amwam/issue-comment-action@v1.3.1 with: keywords: '["duplicate of #", "duplicate of https://github.com/FreeTubeApp/FreeTube/issues/", "duplicate of https://github.com/FreeTubeApp/FreeTube/pulls/"]' diff --git a/.github/workflows/autoLabelIssue.yaml b/.github/workflows/autoLabelIssue.yaml deleted file mode 100644 index d0b61a4549111..0000000000000 --- a/.github/workflows/autoLabelIssue.yaml +++ /dev/null @@ -1,104 +0,0 @@ -name: "Set Issue Label and Assignee" -on: - issues: - types: [opened] - -jobs: - label_issue: - runs-on: ubuntu-latest - steps: - - uses: Naturalclar/issue-action@v2.0.2 - with: - title-or-body: "body" - parameters: >- - [ - { - "keywords": ["visual bug"], - "labels": ["B: visual"] - }, - { - "keywords": ["AUR", "Chocolatey", "FreeTubeCordova", "PortableApps", "winget", "Scoop", "Snapcraft", "MPR", "Nix"], - "labels": ["B: Unofficial Download"] - }, - { - "keywords": ["keyboard control not working"], - "labels": ["B: keyboard control"] - }, - { - "keywords": ["text/string issue"], - "labels": ["B: text/string"] - }, - { - "keywords": ["content not loading"], - "labels": ["B: content not loading"] - }, - { - "keywords": ["accessibility issue"], - "labels": ["B: accessibility"] - }, - { - "keywords": ["usability issue"], - "labels": ["B: usability"] - }, - { - "keywords": ["causes crash"], - "labels": ["B: crash"] - }, - { - "keywords": ["feature stopped working"], - "labels": ["B: feature stopped working"] - }, - { - "keywords": ["inconsistent behavior"], - "labels": ["B: inconsistent behavior"] - }, - { - "keywords": ["data loss"], - "labels": ["B: data loss"] - }, - { - "keywords": ["race condition"], - "labels": ["B: race condition"] - }, - { - "keywords": ["API issue"], - "labels": ["B: API issue"] - }, - { - "keywords": ["only happens in developer mode"], - "labels": ["B: developer mode"] - }, - { - "keywords": ["improvement to existing feature"], - "labels": ["E: improvement existing feature"] - }, - { - "keywords": ["new optional setting"], - "labels": ["E: new optional setting"] - }, - { - "keywords": ["visual improvement"], - "labels": ["E: visual improvement"] - }, - { - "keywords": ["display more information to user"], - "labels": ["E: display more information"] - }, - { - "keywords": ["ease of use improvement"], - "labels": ["E: ease of use improvement"] - }, - { - "keywords": ["support for external software"], - "labels": ["E: support external software"] - }, - { - "keywords": ["new feature"], - "labels": ["E: new feature"] - }, - { - "keywords": ["new keyboard shortcut"], - "labels": ["E: keyboard shortcut"] - } - ] - github-token: "${{ secrets.GITHUB_TOKEN }}" diff --git a/.github/workflows/autoMerge.yml b/.github/workflows/autoMerge.yml index c979c741475ad..db334ad2232fb 100644 --- a/.github/workflows/autoMerge.yml +++ b/.github/workflows/autoMerge.yml @@ -5,11 +5,11 @@ on: jobs: build: + if: ${{ !github.event.pull_request.draft && (contains(github.event.pull_request.base.ref, 'development') || contains(github.event.pull_request.base.ref, 'RC')) }} runs-on: ubuntu-latest steps: - name: Auto Merge PR - if: ${{ !github.event.pull_request.draft && (contains(github.event.pull_request.base.ref, 'development') || contains(github.event.pull_request.base.ref, 'RC')) }} run: | echo ${{ secrets.PUSH_TOKEN }} >> auth.txt gh auth login --with-token < auth.txt diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6a14f1678372..3bbef663018de 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -12,7 +12,7 @@ jobs: build: strategy: matrix: - node-version: [18.x] + node-version: [20.x] runtime: - linux-x64 - linux-armv7l @@ -48,9 +48,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: "yarn" @@ -64,7 +64,7 @@ jobs: - name: Set Version Number Variable id: versionNumber - uses: actions/github-script@v6 + uses: actions/github-script@v7 env: IS_DEV: ${{ contains(github.ref, 'development') }} IS_RC: ${{ contains(github.ref, 'RC') }} @@ -108,91 +108,91 @@ jobs: run: yarn run build:arm64 - name: Upload Linux .zip x64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_x64 path: build/freetube-${{ steps.versionNumber.outputs.result }}.zip - name: Upload Linux .7z x64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_x64.7z path: build/freetube-${{ steps.versionNumber.outputs.result }}.7z - name: Upload Linux .zip ARMv7l Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') with: name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_armv7l path: build/freetube-${{ steps.versionNumber.outputs.result }}-armv7l.zip - name: Upload Linux .7z ARMv7l Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') with: name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_armv7l.7z path: build/freetube-${{ steps.versionNumber.outputs.result }}-armv7l.7z - name: Upload Linux .zip ARM64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_arm64 path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.zip - name: Upload Linux .7z ARM64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_linux_portable_arm64.7z path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.7z - name: Upload .deb x64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_amd64.deb path: build/freetube_${{ steps.versionNumber.outputs.result }}_amd64.deb - name: Upload .deb ARMv7l Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') with: name: freetube_${{ steps.versionNumber.outputs.result }}_armv7l.deb path: build/freetube_${{ steps.versionNumber.outputs.result }}_armv7l.deb - name: Upload .deb ARM64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_arm64.deb path: build/freetube_${{ steps.versionNumber.outputs.result }}_arm64.deb - name: Upload AppImage x64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_amd64.AppImage path: build/FreeTube-${{ steps.versionNumber.outputs.result }}.AppImage - name: Upload AppImage ARMv7l Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') with: name: freetube_${{ steps.versionNumber.outputs.result }}_armv7l.AppImage path: build/FreeTube-${{ steps.versionNumber.outputs.result }}-armv7l.AppImage - name: Upload AppImage ARM64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_arm64.AppImage path: build/FreeTube-${{ steps.versionNumber.outputs.result }}-arm64.AppImage - name: Upload .rpm x64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_amd64.rpm @@ -201,133 +201,133 @@ jobs: # rpm are not built for armv7l - name: Upload .rpm ARM64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_arm64.rpm path: build/freetube-${{ steps.versionNumber.outputs.result }}.aarch64.rpm - name: Upload Alpine .apk x64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_alpine_amd64.apk path: build/freetube-${{ steps.versionNumber.outputs.result }}.apk - name: Upload Alpine .apk ARMv7l Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-armv7l') with: name: freetube_${{ steps.versionNumber.outputs.result }}_alpine_armv7l.apk path: build/freetube-${{ steps.versionNumber.outputs.result }}-armv7l.apk - name: Upload Alpine .apk ARM64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-arm64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_alpine_arm64.apk path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.apk - name: Upload Pacman .pacman x64 Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') with: name: freetube_${{ steps.versionNumber.outputs.result }}_amd64.pacman path: build/freetube-${{ steps.versionNumber.outputs.result }}.pacman # - name: Upload Web Build - # uses: actions/upload-artifact@v3 + # uses: actions/upload-artifact@v4 # if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64') # with: # name: freetube_${{ steps.versionNumber.outputs.result }}_static_web # path: dist/web - name: Upload Windows x64 .exe Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-setup-x64.exe path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe - name: Upload Windows arm64 .exe Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-setup-arm64.exe path: build/freetube Setup ${{ steps.versionNumber.outputs.result }}.exe - name: Upload Windows x64 .zip Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-win-x64-portable path: build/freetube-${{ steps.versionNumber.outputs.result }}-win.zip - name: Upload Windows x64 .7z Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-win-x64-portable.7z path: build/freetube-${{ steps.versionNumber.outputs.result }}-win.7z - name: Upload Windows arm64 .zip Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-win-arm64-portable path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-win.zip - name: Upload Windows arm64 .7z Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-win-arm64-portable.7z path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-win.7z - name: Upload Windows x64 Portable Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-x64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-portable-x64.exe path: build/freetube ${{ steps.versionNumber.outputs.result }}.exe - name: Upload Windows arm64 Portable Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'windows') && startsWith(matrix.runtime, 'win-arm64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-portable-arm64.exe path: build/freetube ${{ steps.versionNumber.outputs.result }}.exe - name: Upload Mac x64 .dmg Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.dmg path: build/freetube-${{ steps.versionNumber.outputs.result }}.dmg # - name: Upload Mac arm64 .dmg Artifact -# uses: actions/upload-artifact@v3 +# uses: actions/upload-artifact@v4 # if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') # with: # name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.dmg # path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64.dmg - name: Upload Mac x64 .zip Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.zip path: build/freetube-${{ steps.versionNumber.outputs.result }}-mac.zip - name: Upload Mac x64 .7z Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-x64') with: name: freetube-${{ steps.versionNumber.outputs.result }}-mac-x64.7z path: build/freetube-${{ steps.versionNumber.outputs.result }}-mac.7z # - name: Upload Mac arm64 .zip Artifact -# uses: actions/upload-artifact@v3 +# uses: actions/upload-artifact@v4 # if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64') # with: # name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.zip diff --git a/.github/workflows/calibreapp-image-actions.yml b/.github/workflows/calibreapp-image-actions.yml index bf2ed2886edcc..d336cad2328ab 100644 --- a/.github/workflows/calibreapp-image-actions.yml +++ b/.github/workflows/calibreapp-image-actions.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout Repo - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Compress Images id: calibre uses: calibreapp/image-actions@main @@ -20,7 +20,7 @@ jobs: compressOnly: true - name: Create New Pull Request If Needed if: steps.calibre.outputs.markdown != '' - uses: peter-evans/create-pull-request@v5 + uses: peter-evans/create-pull-request@v6 with: title: Compressed Images Nightly branch-suffix: timestamp diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f7c01e4fa4aae..521082d630464 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -27,11 +27,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v2 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -45,7 +45,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v2 + uses: github/codeql-action/autobuild@v3 # ℹ️ Command-line programs to run using the OS shell. # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun @@ -58,6 +58,6 @@ jobs: # ./location_of_script_within_repo/buildscript.sh - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 + uses: github/codeql-action/analyze@v3 with: category: "/language:${{matrix.language}}" diff --git a/.github/workflows/flatpak.yml b/.github/workflows/flatpak.yml index 74d4a0f475882..9f926e9737198 100644 --- a/.github/workflows/flatpak.yml +++ b/.github/workflows/flatpak.yml @@ -15,7 +15,7 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: repository: flathub/io.freetubeapp.FreeTube token: ${{ secrets.FLATHUB_TOKEN }} @@ -36,7 +36,7 @@ jobs: - name: Install xmlstarlet run: sudo apt -y install xmlstarlet - name: Create Version Variable - uses: bluwy/substitute-string-action@v2 + uses: bluwy/substitute-string-action@v3 id: sub with: _input-text: ${{ fromJson(steps.api_results.outputs.result).tag_name }} @@ -103,7 +103,7 @@ jobs: rm freetube-${{ steps.sub.outputs.result }}-linux-portable-x64.zip rm freetube-${{ steps.sub.outputs.result }}-linux-portable-arm64.zip - name: Commit Files - uses: stefanzweifel/git-auto-commit-action@v4 + uses: stefanzweifel/git-auto-commit-action@v5 with: # Optional but recommended # Defaults to "Apply automatic changes" diff --git a/.github/workflows/label-issue.yml b/.github/workflows/label-issue.yml new file mode 100644 index 0000000000000..24e42dc04f3c9 --- /dev/null +++ b/.github/workflows/label-issue.yml @@ -0,0 +1,18 @@ +name: "Issue Labeler" +on: + issues: + types: [opened] + +permissions: + issues: write + contents: read + +jobs: + triage: + runs-on: ubuntu-latest + steps: + - uses: github/issue-labeler@v3.4 + with: + configuration-path: .github/issue-labeler.yml + enable-versioned-regex: 0 + repo-token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/label-pr.yml b/.github/workflows/label-pr.yml index dc2ce54205e5b..5c9c9927693d3 100644 --- a/.github/workflows/label-pr.yml +++ b/.github/workflows/label-pr.yml @@ -11,6 +11,7 @@ jobs: runs-on: ubuntu-latest if: ${{ !github.event.pull_request.draft }} steps: - - uses: actions/labeler@v4 + - uses: actions/labeler@v5 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" + configuration-path: .github/pr-labeler.yml diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index fa58643dd86d3..962a5f55de4c6 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -17,11 +17,15 @@ jobs: # Steps represent a sequence of tasks that will be executed as part of the job steps: - - uses: actions/checkout@v3 - - name: Use Node.js 18.x - uses: actions/setup-node@v3 + - uses: actions/checkout@v4 + - name: Use Node.js 20.x + uses: actions/setup-node@v4 with: - node-version: 18.x + node-version: 20.x cache: "yarn" - run: yarn run ci - run: yarn run lint + # let's verify that webpack is able to package the project + - run: yarn run pack + # verify that webpack is able to package the project using the web config + - run: yarn run pack:web diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index a2b08ad6e3e3b..87237a364258d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,7 +12,7 @@ jobs: build: strategy: matrix: - node-version: [18.x] + node-version: [20.x] runtime: - linux-x64 - linux-armv7l @@ -48,9 +48,9 @@ jobs: runs-on: ${{ matrix.os }} steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v4 with: node-version: ${{ matrix.node-version }} cache: "yarn" diff --git a/.github/workflows/remove-outdated-labels.yml b/.github/workflows/remove-outdated-labels.yml index c72ce19e1e2d4..8ea7ee1d48d40 100644 --- a/.github/workflows/remove-outdated-labels.yml +++ b/.github/workflows/remove-outdated-labels.yml @@ -11,7 +11,7 @@ jobs: if: github.event.pull_request.merged runs-on: ubuntu-latest steps: - - uses: mondeja/remove-labels-gh-action@v1.1.1 + - uses: mondeja/remove-labels-gh-action@v2.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} labels: | @@ -27,7 +27,7 @@ jobs: if: github.event_name == 'pull_request_target' && (! github.event.pull_request.merged) && (github.event.action != 'converted_to_draft') && (github.event.action != 'ready_for_review') runs-on: ubuntu-latest steps: - - uses: mondeja/remove-labels-gh-action@v1.1.1 + - uses: mondeja/remove-labels-gh-action@v2.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} labels: | @@ -43,7 +43,7 @@ jobs: if: github.event_name == 'pull_request_target' && github.event.action == 'converted_to_draft' runs-on: ubuntu-latest steps: - - uses: mondeja/remove-labels-gh-action@v1.1.1 + - uses: mondeja/remove-labels-gh-action@v2.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} labels: | @@ -54,7 +54,7 @@ jobs: if: github.event_name == 'pull_request_target' && github.event.action == 'ready_for_review' runs-on: ubuntu-latest steps: - - uses: mondeja/remove-labels-gh-action@v1.1.1 + - uses: mondeja/remove-labels-gh-action@v2.0.0 with: token: ${{ secrets.GITHUB_TOKEN }} labels: | diff --git a/.github/workflows/report.yml b/.github/workflows/report.yml index cbe16d3bd5ed4..834da028dd957 100644 --- a/.github/workflows/report.yml +++ b/.github/workflows/report.yml @@ -13,7 +13,7 @@ jobs: # For bug reports - name: New bug issue - uses: alex-page/github-project-automation-plus@v0.8.3 + uses: alex-page/github-project-automation-plus@v0.9.0 if: contains(github.event.issue.labels.*.name, 'bug') && github.event.action == 'opened' with: project: Bug Reports @@ -22,7 +22,7 @@ jobs: action: update - name: Bug issue closed - uses: alex-page/github-project-automation-plus@v0.8.3 + uses: alex-page/github-project-automation-plus@v0.9.0 if: github.event.action == 'closed' || github.event.action == 'deleted' with: action: delete @@ -31,7 +31,7 @@ jobs: repo-token: ${{ secrets.PUSH_TOKEN }} - name: Bug issue reopened - uses: alex-page/github-project-automation-plus@v0.8.3 + uses: alex-page/github-project-automation-plus@v0.9.0 if: contains(github.event.issue.labels.*.name, 'bug') && github.event.action == 'reopened' with: project: Bug Reports @@ -41,7 +41,7 @@ jobs: # For feature requests - name: New feature issue - uses: alex-page/github-project-automation-plus@v0.8.3 + uses: alex-page/github-project-automation-plus@v0.9.0 if: contains(github.event.issue.labels.*.name, 'enhancement') && github.event.action == 'opened' with: project: Feature Requests @@ -50,7 +50,7 @@ jobs: action: update - name: Feature request issue closed - uses: alex-page/github-project-automation-plus@v0.8.3 + uses: alex-page/github-project-automation-plus@v0.9.0 if: github.event.action == 'closed' || github.event.action == 'deleted' with: action: delete @@ -59,7 +59,7 @@ jobs: repo-token: ${{ secrets.PUSH_TOKEN }} - name: Feature request issue reopened - uses: alex-page/github-project-automation-plus@v0.8.3 + uses: alex-page/github-project-automation-plus@v0.9.0 if: contains(github.event.issue.labels.*.name, 'enhancement') && github.event.action == 'reopened' with: project: Feature Requests diff --git a/.github/workflows/stale.yml b/.github/workflows/stale.yml index 5fd8db421addb..6945419318d9a 100644 --- a/.github/workflows/stale.yml +++ b/.github/workflows/stale.yml @@ -11,7 +11,7 @@ jobs: stale: runs-on: ubuntu-latest steps: - - uses: actions/stale@v8 + - uses: actions/stale@v9 with: stale-issue-message: 'This issue is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 7 days.' stale-pr-message: 'This PR is stale because it has been open 28 days with no activity. Remove stale label or comment or this will be closed in 14 days.' diff --git a/.stylelintrc.json b/.stylelintrc.json index bf2da3b109eeb..e32dc52314fb9 100644 --- a/.stylelintrc.json +++ b/.stylelintrc.json @@ -1,5 +1,5 @@ { - "plugins": ["stylelint-high-performance-animation", "@double-great/stylelint-a11y"], + "plugins": ["stylelint-use-logical-spec", "@double-great/stylelint-a11y"], "extends": ["stylelint-config-standard", "stylelint-config-sass-guidelines"], "overrides": [ { @@ -17,9 +17,12 @@ } ], "rules": { + "selector-no-qualifying-type": [ + true, { + "ignore": ["attribute"] + }], "selector-class-pattern": null, "selector-id-pattern": null, - "plugin/no-low-performance-animation-properties": null, "selector-pseudo-class-no-unknown": [ true, { @@ -27,7 +30,6 @@ } ], "a11y/no-outline-none": true, - "a11y/selector-pseudo-class-focus": true, - "a11y/font-size-is-readable": true + "liberty/use-logical-spec": ["always", { "except": ["float"] }] } } diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000000000..2f3cb81cc2abd --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,23 @@ +{ + "version": "0.2.0", + "configurations": [ + { + "name": "dev-runner (Electron)", + "type": "node", + "request": "launch", + "program": "${workspaceFolder}/_scripts/dev-runner.js", + "args": ["--remote-debug"] + }, + { + "name": "Attach to renderer process (Electron)", + "type": "chrome", + "request": "attach", + "port": 9223, + "webRoot": "http://localhost:9080", + "sourceMapPathOverrides": { + "webpack://freetube/./~/*": "${workspaceFolder}/node_modules/*", + "webpack://freetube/./*": "${workspaceFolder}/*" + } + } + ] +} diff --git a/.vscode/tasks.json b/.vscode/tasks.json deleted file mode 100644 index 3c0971b857e18..0000000000000 --- a/.vscode/tasks.json +++ /dev/null @@ -1,19 +0,0 @@ -{ - // See https://go.microsoft.com/fwlink/?LinkId=733558 - // for the documentation about the tasks.json format - "version": "2.0.0", - "tasks": [ - { - "type": "npm", - "script": "dev", - "problemMatcher": [] - }, - { - "type": "npm", - "script": "dev-runner", - "problemMatcher": [], - "label": "npm: dev-runner", - "detail": "node _scripts/dev-runner.js" - } - ] -} diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 10f6618953db1..32a86cb197dd2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -20,7 +20,7 @@ Please follow these guidelines before sending your pull request and making contr * Please test your code. Make sure new features work as well as existing core features such as watching videos or loading subscriptions. New features need to work with both the Local API as well as the Invidious API * Please make sure your code does not violate any standards set by our linter. It's up to you to make fixes whenever necessary. You can run `npm run lint` to check locally and `npm run lint-fix` to automatically fix smaller issues. * Please limit the amount of Node Modules that you introduce into the project. Only include them when **absolutely necessary** for your code to work (Ex: Using nedb for databases) or if a module provides similar functionality to what you are trying to achieve (Ex: Using autolinker to create links to outside URLs instead of writing the functionality myself). -* Please try to stay involved with the community and maintain your code. We are only two developers working on FreeTube in our spare time. We do not have time to work on everything, and it would be nice if you can maintain your code when necessary. +* Please try to stay involved with the community and maintain your code. We are only a handful of developers working on FreeTube in our spare time. We do not have time to work on everything, and it would be nice if you can maintain your code when necessary. # Setting up Your Environment diff --git a/README.md b/README.md index 8c538e9df15a0..1969609485ef7 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ FreeTube is an open source desktop YouTube player built with privacy in mind. Use YouTube without advertisements and prevent Google from tracking you with their cookies and JavaScript. -Available for Windows, Mac & Linux thanks to Electron. +Available for Windows (10 and later), Mac (macOS 10.15 and later) & Linux thanks to Electron.
@@ -21,17 +21,20 @@ Available for Windows, Mac & Linux thanks to Electron.
Website • Blog • Documentation • FAQ • Discussions
{{ formattedViews }} | +|
+ {{ $t('Global.Videos') }} + | +{{ formattedVideos }} | +
---|---|