Skip to content

Commit

Permalink
Revert "Merge development branch"
Browse files Browse the repository at this point in the history
This reverts commit bfde267.
  • Loading branch information
pkrasicki committed Dec 22, 2024
1 parent bfde267 commit 18cbb18
Show file tree
Hide file tree
Showing 308 changed files with 14,938 additions and 20,010 deletions.
2 changes: 1 addition & 1 deletion .babelrc
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"@babel/env",
{
"targets": {
"chrome": "130",
"chrome": "122",
"node": "20.9.0"
}
}
Expand Down
3 changes: 3 additions & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
_scripts
dist
127 changes: 127 additions & 0 deletions .eslintrc.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
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,

// https://eslint.org/docs/user-guide/configuring#specifying-environments
env: {
browser: true,
node: true
},

// https://eslint.org/docs/user-guide/configuring#specifying-parser
parser: 'vue-eslint-parser',

// https://eslint.vuejs.org/user-guide/#faq
parserOptions: {
parser: '@babel/eslint-parser',
ecmaVersion: 2022,
sourceType: 'module'
},

overrides: [
{
files: ['*.json'],
parser: 'jsonc-eslint-parser',
extends: ['plugin:jsonc/base'],
rules: {
'no-tabs': 'off',
'comma-spacing': 'off'
}
},
{
files: ['*.yaml', '*.yml'],
parser: 'yaml-eslint-parser',
extends: ['plugin:yml/recommended'],
rules: {
'yml/no-irregular-whitespace': 'off'
}
}
],

// https://eslint.org/docs/user-guide/configuring#extending-configuration-files
// order matters: from least important to most important in terms of overriding
// Prettier + Vue: https://medium.com/@gogl.alex/how-to-properly-set-up-eslint-with-prettier-for-vue-or-nuxt-in-vscode-e42532099a9c
extends: [
'prettier',
'eslint:recommended',
'plugin:vue/recommended',
'standard',
'plugin:jsonc/recommended-with-json',
'plugin:vuejs-accessibility/recommended',
'plugin:@intlify/vue-i18n/recommended'
],

// https://eslint.org/docs/user-guide/configuring#configuring-plugins
plugins: ['vue', 'vuejs-accessibility', 'n', 'unicorn', '@intlify/vue-i18n'],

rules: {
'space-before-function-paren': 'off',
'comma-dangle': ['error', 'only-multiline'],
'vue/no-v-html': 'off',
'no-console': ['error', { allow: ['warn', 'error'] }],
'no-unused-vars': 'warn',
'no-undef': 'warn',
'object-shorthand': 'off',
'vue/no-template-key': 'warn',
'vue/no-useless-template-attributes': 'off',
'vue/multi-word-component-names': 'off',
'vuejs-accessibility/no-onchange': 'off',
'vuejs-accessibility/label-has-for': ['error', {
required: {
some: ['nesting', 'id']
}
}],
'vuejs-accessibility/no-static-element-interactions': 'off',
'n/no-callback-literal': 'warn',
'n/no-path-concat': 'warn',
'unicorn/better-regex': 'error',
'unicorn/no-array-push-push': 'error',
'unicorn/prefer-keyboard-event-key': 'error',
'unicorn/prefer-regexp-test': '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']
}
],
// Only applicable when we upgrade to Vue 3 and vue-i18n 9+
'@intlify/vue-i18n/no-deprecated-tc': 'off',

'vue/require-explicit-emits': 'error',
'vue/no-unused-emit-declarations': 'error',
},
settings: {
'vue-i18n': {
localeDir: `./static/locales/{${activeLocales.join(',')}}.yaml`,
messageSyntaxVersion: '^8.0.0'
}
}
}
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/config.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
blank_issues_enabled: false
contact_links:
- name: Discussions
url: https://github.com/FreeTubeApp/FreeTube/discussions/categories/general
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
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
Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ body:
- type: textarea
attributes:
label: Alternatives Considered
description: A clear and concise description of any alternative solutions or features you've considered.
description: A clear and concise description of any alternative solutions or features you've considered.
validations:
required: true
- type: dropdown
Expand Down
2 changes: 0 additions & 2 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,8 @@ updates:
patterns:
- "eslint"
- "eslint-*"
- "@eslint/*"
- "yaml-eslint-parser"
- "vue-eslint-parser"
- "neostandard"
stylelint:
patterns:
- "stylelint"
Expand Down
55 changes: 19 additions & 36 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ jobs:
- win-x64
- win-arm64
- osx-x64
- osx-arm64
# `osx-arm64` disabled due to "macOS gatekeeper"
# See details in https://github.com/FreeTubeApp/FreeTube/pull/2113
# - osx-arm64
include:
- runtime: linux-x64
os: ubuntu-latest
Expand All @@ -34,8 +36,8 @@ jobs:
- runtime: osx-x64
os: macOS-latest

- runtime: osx-arm64
os: macOS-latest
# - runtime: osx-arm64
# os: macOS-latest

- runtime: win-x64
os: windows-latest
Expand Down Expand Up @@ -84,9 +86,10 @@ jobs:
with:
version: ${{ steps.versionNumber.outputs.result }}


- name: Install libarchive-tools
if: startsWith(matrix.os, 'ubuntu')
run: sudo apt update; sudo apt -y install libarchive-tools; echo "Version Number ${{ toJson(job) }} ${{ toJson(needs) }}"
run: sudo apt -y install libarchive-tools; echo "Version Number ${{ toJson(job) }} ${{ toJson(needs) }}"

- name: Build x64 with Node.js ${{ matrix.node-version}}
if: contains(matrix.runtime, 'x64')
Expand All @@ -100,19 +103,6 @@ jobs:
if: contains(matrix.runtime, 'arm64')
run: yarn run build:arm64

- name: Convert X64 AppImage to static runtime
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64')
run: |
sudo apt install desktop-file-utils
cd build
appimage="FreeTube-${{ steps.versionNumber.outputs.result }}.AppImage"
wget "https://github.com/AppImage/appimagetool/releases/download/continuous/appimagetool-x86_64.AppImage" -O ./appimagetool.AppImage
chmod +x ./"$appimage" ./appimagetool.AppImage
./"$appimage" --appimage-extract && rm -f ./"$appimage"
./appimagetool.AppImage --comp zstd --mksquashfs-opt -Xcompression-level --mksquashfs-opt 20 \
-n ./squashfs-root ./"$appimage"
rm -rf ./squashfs-root ./appimagetool.AppImage
- name: Upload Linux .zip x64 Artifact
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'ubuntu') && startsWith(matrix.runtime, 'linux-x64')
Expand Down Expand Up @@ -311,12 +301,12 @@ jobs:
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@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 arm64 .dmg Artifact
# 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@v4
Expand All @@ -332,16 +322,9 @@ jobs:
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@v4
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64')
with:
name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.zip
path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-mac.zip

- name: Upload Mac arm64 .7z Artifact
uses: actions/upload-artifact@v4
if: startsWith(matrix.os, 'macos') && startsWith(matrix.runtime, 'osx-arm64')
with:
name: freetube-${{ steps.versionNumber.outputs.result }}-mac-arm64.7z
path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-mac.7z
# - name: Upload Mac arm64 .zip Artifact
# 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
# path: build/freetube-${{ steps.versionNumber.outputs.result }}-arm64-mac.zip
5 changes: 3 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ jobs:
# If you wish to specify custom queries, you can do so here or in a config file.
# By default, queries listed here will override any specified in a config file.
# Prefix the list here with "+" to use these queries and those in the config file.

# Details on CodeQL's query packs refer to : https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs
# queries: security-extended,security-and-quality


# 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
Expand All @@ -49,7 +50,7 @@ jobs:
# ℹ️ 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

# If the Autobuild fails above, remove it and uncomment the following three lines.
# If the Autobuild fails above, remove it and uncomment the following three lines.
# modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance.

# - run: |
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/conflicts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ jobs:
repoToken: "${{ secrets.GITHUB_TOKEN }}"
commentOnDirty: "This pull request has conflicts, please resolve those before we can evaluate the pull request."
commentOnClean: "Conflicts have been resolved. A maintainer will review the pull request shortly."

8 changes: 4 additions & 4 deletions .github/workflows/flatpak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -77,22 +77,22 @@ jobs:
date +"%Y-%m-%d" >> $GITHUB_ENV
echo 'EOF' >> $GITHUB_ENV
- name: Update x64 File Location in yml File
uses: mikefarah/[email protected].6
uses: mikefarah/[email protected].3
with:
# The Command which should be run
cmd: yq -i '.modules[0].sources[0].url = "https://github.com/FreeTubeApp/FreeTube/releases/download/v${{ steps.sub.outputs.result }}-beta/freetube-${{ steps.sub.outputs.result }}-linux-portable-x64.zip"' io.freetubeapp.FreeTube.yml
- name: Update x64 Hash in yml File
uses: mikefarah/[email protected].6
uses: mikefarah/[email protected].3
with:
# The Command which should be run
cmd: yq -i '.modules[0].sources[0].sha256 = "${{ env.HASH_X64 }}"' io.freetubeapp.FreeTube.yml
- name: Update ARM File Location in yml File
uses: mikefarah/[email protected].6
uses: mikefarah/[email protected].3
with:
# The Command which should be run
cmd: yq -i '.modules[0].sources[1].url = "https://github.com/FreeTubeApp/FreeTube/releases/download/v${{ steps.sub.outputs.result }}-beta/freetube-${{ steps.sub.outputs.result }}-linux-portable-arm64.zip"' io.freetubeapp.FreeTube.yml
- name: Update ARM Hash in yml File
uses: mikefarah/[email protected].6
uses: mikefarah/[email protected].3
with:
# The Command which should be run
cmd: yq -i '.modules[0].sources[1].sha256 = "${{ env.HASH_ARM64 }}"' io.freetubeapp.FreeTube.yml
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Linter
# events but only for the master branch
on:
pull_request:
branches: [ master, development, '**-RC' ]
branches: [ master, development ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
Expand Down
48 changes: 24 additions & 24 deletions .github/workflows/no-response.yml
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
name: No Response

# Both `issue_comment` and `scheduled` event types are required for this Action
# to work properly.
on:
issue_comment:
types: [created]
schedule:
# Run daily at midnight.
- cron: '0 0 * * *'

jobs:
noResponse:
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/[email protected]
with:
token: ${{ github.token }}
closeComment: >
This issue has been automatically closed because there has been no response to our request for more information from the original author.
With only the information that is currently in the issue, we don't have enough information to take action.
Please reach out if you have or find the answers we need so that we can investigate further.
daysUntilClose: 7
responseRequiredLabel: "U: Waiting for Response from Author"
name: No Response

# Both `issue_comment` and `scheduled` event types are required for this Action
# to work properly.
on:
issue_comment:
types: [created]
schedule:
# Run daily at midnight.
- cron: '0 0 * * *'

jobs:
noResponse:
runs-on: ubuntu-latest
steps:
- uses: lee-dohm/[email protected]
with:
token: ${{ github.token }}
closeComment: >
This issue has been automatically closed because there has been no response to our request for more information from the original author.
With only the information that is currently in the issue, we don't have enough information to take action.
Please reach out if you have or find the answers we need so that we can investigate further.
daysUntilClose: 14
responseRequiredLabel: "U: Waiting for Response from Author"
Loading

0 comments on commit 18cbb18

Please sign in to comment.