Compare commits

...

7 Commits

Author SHA1 Message Date
68878e5556 chore(deps): update dependency @stylistic/eslint-plugin to v5.6.1 2025-12-31 16:48:59 +00:00
41bc03a737 Revert "fix macos build (?)"
This reverts commit 2ab6eff761.
2025-12-30 22:23:14 +02:00
2ab6eff761 fix macos build (?) 2025-12-30 22:17:18 +02:00
6c881a265a fix tests 2025-12-30 22:02:23 +02:00
2b15f0a87c chore(i18n): Translated using Weblate (Persian)
Currently translated at 99.5% (461 of 463 strings)

Translation: pear-devs/pear-desktop/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/fa/
2025-12-30 10:00:31 +01:00
1d6ab2a82b update eslint config 2025-12-29 17:04:25 +02:00
24e82e69d1 chore(i18n): Translated using Weblate (Polish)
Currently translated at 100.0% (463 of 463 strings)

Translation: pear-devs/pear-desktop/i18n
Translate-URL: https://hosted.weblate.org/projects/youtube-music/i18n/pl/
2025-12-28 21:00:38 +00:00
8 changed files with 144 additions and 72 deletions

View File

@ -18,51 +18,89 @@ export default tsEslint.config(
{
plugins: {
stylistic,
importPlugin
importPlugin,
},
languageOptions: {
parser: tsEslint.parser,
parserOptions: {
project: true,
project: ['tsconfig.json', 'tsconfig.test.json'],
sourceType: 'module',
ecmaVersion: 'latest'
}
ecmaVersion: 'latest',
},
},
rules: {
'stylistic/arrow-parens': ['error', 'always'],
'stylistic/object-curly-spacing': ['error', 'always'],
'stylistic/jsx-pascal-case': 'error',
'stylistic/jsx-curly-spacing': ['error', { when: 'never', children: true }],
'stylistic/jsx-curly-spacing': [
'error',
{ when: 'never', children: true },
],
'stylistic/jsx-sort-props': 'error',
'prettier/prettier': ['error', { singleQuote: true, semi: true, tabWidth: 2, trailingComma: 'all', quoteProps: 'preserve' }],
'prettier/prettier': [
'error',
{
singleQuote: true,
semi: true,
tabWidth: 2,
trailingComma: 'all',
quoteProps: 'preserve',
},
],
'@typescript-eslint/no-floating-promises': 'off',
'@typescript-eslint/no-misused-promises': ['off', { checksVoidReturn: false }],
'@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_' }],
'@typescript-eslint/no-misused-promises': [
'off',
{ checksVoidReturn: false },
],
'@typescript-eslint/no-unused-vars': [
'warn',
{ argsIgnorePattern: '^_' },
],
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/consistent-type-imports': ['error', {
fixStyle: 'inline-type-imports',
prefer: 'type-imports',
disallowTypeAnnotations: false,
}],
'@typescript-eslint/consistent-type-imports': [
'error',
{
fixStyle: 'inline-type-imports',
prefer: 'type-imports',
disallowTypeAnnotations: false,
},
],
'importPlugin/first': 'error',
'importPlugin/newline-after-import': 'off',
'importPlugin/no-default-export': 'off',
'importPlugin/no-duplicates': 'error',
'importPlugin/no-unresolved': ['error', { ignore: ['^virtual:', '\\?inline$', '\\?raw$', '\\?asset&asarUnpack'] }],
'importPlugin/order': ['error', {
'groups': ['builtin', 'external', ['internal', 'index', 'sibling'], 'parent', 'type'],
'newlines-between': 'always-and-inside-groups',
'alphabetize': { order: 'ignore', caseInsensitive: false }
}],
'importPlugin/no-unresolved': [
'error',
{
ignore: ['^virtual:', '\\?inline$', '\\?raw$', '\\?asset&asarUnpack'],
},
],
'importPlugin/order': [
'error',
{
'groups': [
'builtin',
'external',
['internal', 'index', 'sibling'],
'parent',
'type',
],
'newlines-between': 'always-and-inside-groups',
'alphabetize': { order: 'ignore', caseInsensitive: false },
},
],
'importPlugin/prefer-default-export': 'off',
'camelcase': ['error', { properties: 'never' }],
'class-methods-use-this': 'off',
'stylistic/lines-around-comment': ['error', {
beforeBlockComment: false,
afterBlockComment: false,
beforeLineComment: false,
afterLineComment: false,
}],
'stylistic/lines-around-comment': [
'error',
{
beforeBlockComment: false,
afterBlockComment: false,
beforeLineComment: false,
afterLineComment: false,
},
],
'stylistic/max-len': 'off',
'stylistic/no-mixed-operators': 'warn', // prettier does not support no-mixed-operators
'stylistic/no-multi-spaces': ['error', { ignoreEOLComments: true }],
@ -70,16 +108,20 @@ export default tsEslint.config(
'no-void': 'error',
'no-empty': 'off',
'prefer-promise-reject-errors': 'off',
'stylistic/quotes': ['error', 'single', {
avoidEscape: true,
allowTemplateLiterals: false,
}],
'stylistic/quotes': [
'error',
'single',
{
avoidEscape: true,
allowTemplateLiterals: 'never',
},
],
'stylistic/quote-props': ['error', 'consistent'],
'stylistic/semi': ['error', 'always'],
},
settings: {
'import/parsers': {
'@typescript-eslint/parser': ['.ts']
'@typescript-eslint/parser': ['.ts'],
},
'import/resolver': {
typescript: {},

View File

@ -142,7 +142,7 @@
"@eslint/js": "9.35.0",
"@malept/flatpak-bundler": "0.4.0",
"@playwright/test": "1.55.0",
"@stylistic/eslint-plugin": "5.3.1",
"@stylistic/eslint-plugin": "5.6.1",
"@total-typescript/ts-reset": "0.6.1",
"@types/electron-localshortcut": "3.1.3",
"@types/howler": "2.2.12",
@ -168,7 +168,6 @@
"eslint-plugin-solid": "0.14.5",
"glob": "11.1.0",
"node-gyp": "11.4.2",
"playwright": "1.55.1",
"ts-morph": "27.0.2",
"typescript": "5.9.3",
"typescript-eslint": "8.43.0",

53
pnpm-lock.yaml generated
View File

@ -266,8 +266,8 @@ importers:
specifier: 1.55.0
version: 1.55.0
'@stylistic/eslint-plugin':
specifier: 5.3.1
version: 5.3.1(eslint@9.35.0(jiti@2.6.1))
specifier: 5.6.1
version: 5.6.1(eslint@9.35.0(jiti@2.6.1))
'@total-typescript/ts-reset':
specifier: 0.6.1
version: 0.6.1
@ -343,9 +343,6 @@ importers:
node-gyp:
specifier: 11.4.2
version: 11.4.2
playwright:
specifier: 1.55.1
version: 1.55.1
ts-morph:
specifier: 27.0.2
version: 27.0.2
@ -744,8 +741,8 @@ packages:
cpu: [x64]
os: [win32]
'@eslint-community/eslint-utils@4.8.0':
resolution: {integrity: sha512-MJQFqrZgcW0UNYLGOuQpey/oTN59vyWwplvCGZztn1cKz9agZPPYpJB7h2OMmuu7VLqkvEjN8feFZJmxNF9D+Q==}
'@eslint-community/eslint-utils@4.9.1':
resolution: {integrity: sha512-phrYmNiYppR7znFEdqgfWHXR6NCkZEK7hwWDHZUjit/2/U0r6XvkDl0SYnoM51Hq7FhCGdLDT6zxCCOY1hexsQ==}
engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0}
peerDependencies:
eslint: ^6.0.0 || ^7.0.0 || >=8.0.0
@ -1261,8 +1258,8 @@ packages:
peerDependencies:
solid-js: ^1.6.12
'@stylistic/eslint-plugin@5.3.1':
resolution: {integrity: sha512-Ykums1VYonM0TgkD0VteVq9mrlO2FhF48MDJnPyv3MktIB2ydtuhlO0AfWm7xnW1kyf5bjOqA6xc7JjviuVTxg==}
'@stylistic/eslint-plugin@5.6.1':
resolution: {integrity: sha512-JCs+MqoXfXrRPGbGmho/zGS/jMcn3ieKl/A8YImqib76C8kjgZwq5uUFzc30lJkMvcchuRn6/v8IApLxli3Jyw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
peerDependencies:
eslint: '>=9.0.0'
@ -1410,6 +1407,10 @@ packages:
resolution: {integrity: sha512-vQ2FZaxJpydjSZJKiSW/LJsabFFvV7KgLC5DiLhkBcykhQj8iK9BOaDmQt74nnKdLvceM5xmhaTF+pLekrxEkw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/types@8.51.0':
resolution: {integrity: sha512-TizAvWYFM6sSscmEakjY3sPqGwxZRSywSsPEiuZF6d5GmGD9Gvlsv0f6N8FvAAA0CD06l3rIcWNbsN1e5F/9Ag==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
'@typescript-eslint/typescript-estree@8.43.0':
resolution: {integrity: sha512-7Vv6zlAhPb+cvEpP06WXXy/ZByph9iL6BQRBDj4kmBsW98AqEeQHlj/13X+sZOrKSo9/rNKH4Ul4f6EICREFdw==}
engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0}
@ -3902,21 +3903,11 @@ packages:
engines: {node: '>=18'}
hasBin: true
playwright-core@1.55.1:
resolution: {integrity: sha512-Z6Mh9mkwX+zxSlHqdr5AOcJnfp+xUWLCt9uKV18fhzA8eyxUd8NUWzAjxUh55RZKSYwDGX0cfaySdhZJGMoJ+w==}
engines: {node: '>=18'}
hasBin: true
playwright@1.55.0:
resolution: {integrity: sha512-sdCWStblvV1YU909Xqx0DhOjPZE4/5lJsIS84IfN9dAZfcl/CIZ5O8l3o0j7hPMjDvqoTF8ZUcc+i/GL5erstA==}
engines: {node: '>=18'}
hasBin: true
playwright@1.55.1:
resolution: {integrity: sha512-cJW4Xd/G3v5ovXtJJ52MAOclqeac9S/aGGgRzLabuF8TnIb6xHvMzKIa6JmrRzUkeXJgfL1MhukP0NK6l39h3A==}
engines: {node: '>=18'}
hasBin: true
plist@3.1.0:
resolution: {integrity: sha512-uysumyrvkUX0rX/dEVqt8gC3sTBzd4zoWfLeS29nb53imdaXVvLINYXTI2GNqzaMuvacNx4uJQ8+b3zXR0pkgQ==}
engines: {node: '>=10.4.0'}
@ -5304,7 +5295,7 @@ snapshots:
'@esbuild/win32-x64@0.25.9':
optional: true
'@eslint-community/eslint-utils@4.8.0(eslint@9.35.0(jiti@2.6.1))':
'@eslint-community/eslint-utils@4.9.1(eslint@9.35.0(jiti@2.6.1))':
dependencies:
eslint: 9.35.0(jiti@2.6.1)
eslint-visitor-keys: 3.4.3
@ -5891,10 +5882,10 @@ snapshots:
dependencies:
solid-js: 1.9.9
'@stylistic/eslint-plugin@5.3.1(eslint@9.35.0(jiti@2.6.1))':
'@stylistic/eslint-plugin@5.6.1(eslint@9.35.0(jiti@2.6.1))':
dependencies:
'@eslint-community/eslint-utils': 4.8.0(eslint@9.35.0(jiti@2.6.1))
'@typescript-eslint/types': 8.43.0
'@eslint-community/eslint-utils': 4.9.1(eslint@9.35.0(jiti@2.6.1))
'@typescript-eslint/types': 8.51.0
eslint: 9.35.0(jiti@2.6.1)
eslint-visitor-keys: 4.2.1
espree: 10.4.0
@ -6052,7 +6043,7 @@ snapshots:
'@typescript-eslint/project-service@8.43.0(typescript@5.9.3)':
dependencies:
'@typescript-eslint/tsconfig-utils': 8.43.0(typescript@5.9.3)
'@typescript-eslint/types': 8.43.0
'@typescript-eslint/types': 8.51.0
debug: 4.4.1
typescript: 5.9.3
transitivePeerDependencies:
@ -6081,6 +6072,8 @@ snapshots:
'@typescript-eslint/types@8.43.0': {}
'@typescript-eslint/types@8.51.0': {}
'@typescript-eslint/typescript-estree@8.43.0(typescript@5.9.3)':
dependencies:
'@typescript-eslint/project-service': 8.43.0(typescript@5.9.3)
@ -6099,7 +6092,7 @@ snapshots:
'@typescript-eslint/utils@8.43.0(eslint@9.35.0(jiti@2.6.1))(typescript@5.9.3)':
dependencies:
'@eslint-community/eslint-utils': 4.8.0(eslint@9.35.0(jiti@2.6.1))
'@eslint-community/eslint-utils': 4.9.1(eslint@9.35.0(jiti@2.6.1))
'@typescript-eslint/scope-manager': 8.43.0
'@typescript-eslint/types': 8.43.0
'@typescript-eslint/typescript-estree': 8.43.0(typescript@5.9.3)
@ -7482,7 +7475,7 @@ snapshots:
eslint@9.35.0(jiti@2.6.1):
dependencies:
'@eslint-community/eslint-utils': 4.8.0(eslint@9.35.0(jiti@2.6.1))
'@eslint-community/eslint-utils': 4.9.1(eslint@9.35.0(jiti@2.6.1))
'@eslint-community/regexpp': 4.12.1
'@eslint/config-array': 0.21.0
'@eslint/config-helpers': 0.3.1
@ -8933,20 +8926,12 @@ snapshots:
playwright-core@1.55.0: {}
playwright-core@1.55.1: {}
playwright@1.55.0:
dependencies:
playwright-core: 1.55.0
optionalDependencies:
fsevents: 2.3.2
playwright@1.55.1:
dependencies:
playwright-core: 1.55.1
optionalDependencies:
fsevents: 2.3.2
plist@3.1.0:
dependencies:
'@xmldom/xmldom': 0.8.11

View File

@ -320,6 +320,22 @@
"hostname": {
"label": "نام میزبان"
},
"https": {
"label": "HTTPS و گواهینامه‌ها",
"submenu": {
"cert": {
"dialogTitle": "پرونده گواهینامه HTTPS را انتخاب کنید",
"label": "پرونده گواهینامه (crt/.pem.)"
},
"enable-https": {
"label": "فعال کردن HTTPS"
},
"key": {
"dialogTitle": "پرونده کلید خصوصی HTTPS را انتخاب کنید",
"label": "پرونده کلید خصوصی (key/.pem)"
}
}
},
"port": {
"label": "پورت"
}

View File

@ -237,7 +237,8 @@
"submenu": {
"percent": "{{ratio}}%"
}
}
},
"enable-seekbar": "Zezwól stylowanie paska wyszukiwań"
},
"name": "Motyw kolorów albumu"
},
@ -320,6 +321,22 @@
"hostname": {
"label": "Nazwa hosta (IP)"
},
"https": {
"label": "HTTPS i Certyfikaty",
"submenu": {
"cert": {
"dialogTitle": "Wybierz plik certyfikatu HTTPS",
"label": "Certyfikat (.crt/.pem)"
},
"enable-https": {
"label": "Zezwól HTTPS"
},
"key": {
"dialogTitle": "Wybierz plik prywatnego klucza HTTPS",
"label": "Klucz prywatny (.key/.pem)"
}
}
},
"port": {
"label": "Port"
}
@ -461,8 +478,8 @@
"set-status-display-type": {
"label": "Opis statusu",
"submenu": {
"artist": "Słucha {artist}",
"application": "Słucha {{applicationName}}",
"artist": "Słucha {artist}",
"title": "Słucha {song title}"
}
}

View File

@ -1,7 +1,7 @@
import path from 'node:path';
import process from 'node:process';
import { _electron as electron } from 'playwright';
import { test, expect } from '@playwright/test';
import { test, expect, _electron as electron } from '@playwright/test';
process.env.NODE_ENV = 'test';
@ -32,7 +32,11 @@ test('Pear Desktop App - With default settings, app is launched and visible', as
// expect(title.replaceAll(/\s/g, ' ')).toEqual('Pear Desktop');
const url = window.url();
expect(url.startsWith('https://music.\u0079\u006f\u0075\u0074\u0075\u0062\u0065.com')).toBe(true);
expect(
url.startsWith(
'https://music.\u0079\u006f\u0075\u0074\u0075\u0062\u0065.com',
),
).toBe(true);
await app.close();
});

View File

@ -25,7 +25,8 @@
"exclude": ["./dist"],
"include": [
"electron.vite.config.mts",
"playwright.config.ts",
"./src/**/*",
"*.config.*js",
"*.config.*js"
]
}

8
tsconfig.test.json Normal file
View File

@ -0,0 +1,8 @@
{
"extends": "./tsconfig.json",
"exclude": ["./dist"],
"include": [
"playwright.config.ts",
"./tests/**/*"
]
}