diff --git a/Gemfile.lock b/Gemfile.lock index fdf0f07a..8fa393b2 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -18,11 +18,11 @@ GEM base64 (0.3.0) bigdecimal (4.1.3) concurrent-ruby (1.3.8) - connection_pool (3.0.2) + connection_pool (3.0.3) drb (2.2.3) i18n (1.15.2) concurrent-ruby (~> 1.0) - json (3.1.0) + json (3.2.0) language_server-protocol (3.17.0.6) lint_roller (1.1.0) logger (1.7.0) @@ -30,16 +30,16 @@ GEM drb (~> 2.0) prism (>= 1.5, < 3) parallel (2.3.0) - parser (3.3.13.0) + parser (3.3.14.0) ast (~> 2.4.1) racc prettier_print (1.2.1) - prism (1.9.0) + prism (2.1.0) racc (1.8.1) - rack (3.2.8) + rack (3.2.9) rainbow (3.1.1) - regexp_parser (2.13.1) - rubocop (1.92.2) + regexp_parser (2.13.4) + rubocop (1.93.0) json (>= 2.3) language_server-protocol (~> 3.17.0.2) lint_roller (~> 1.1.0) @@ -47,16 +47,18 @@ GEM parser (>= 3.3.0.2) rainbow (>= 2.2.2, < 4.0) regexp_parser (>= 2.11.3, < 3.0) - rubocop-ast (>= 1.49.0, < 2.0) + rubocop-ast (>= 1.54.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 2.4.0, < 4.0) - rubocop-ast (1.50.0) + rubocop-ast (1.54.0) + ast (~> 2.4) parser (>= 3.3.7.2) - prism (~> 1.7) + prism (>= 1.7) + racc rubocop-capybara (3.1.0) lint_roller (~> 1.1) rubocop (~> 1.89) - rubocop-discourse (4.0.0) + rubocop-discourse (4.1.0) activesupport (>= 6.1) lint_roller (>= 1.1.0) rubocop (>= 1.82.0) @@ -77,10 +79,9 @@ GEM rack (>= 1.1) rubocop (>= 1.89.0, < 2.0) rubocop-ast (>= 1.44.0, < 2.0) - rubocop-rspec (3.10.2) + rubocop-rspec (3.11.0) lint_roller (~> 1.1) - regexp_parser (>= 2.0) - rubocop (~> 1.86, >= 1.86.2) + rubocop (~> 1.92) rubocop-rspec_rails (2.33.0) lint_roller (~> 1.1) rubocop (~> 1.89) diff --git a/lib/discourse_disteleplus/telegram_api.rb b/lib/discourse_disteleplus/telegram_api.rb index 59121aad..045015cb 100644 --- a/lib/discourse_disteleplus/telegram_api.rb +++ b/lib/discourse_disteleplus/telegram_api.rb @@ -71,9 +71,13 @@ def download_file(file_id, max_bytes:) uri = URI("#{BASE}/file/bot#{@token}/#{file_path}") tempfile = Tempfile.new(["disteleplus", File.extname(file_path)], binmode: true) - Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http| - http.open_timeout = OPEN_TIMEOUT - http.read_timeout = READ_TIMEOUT + Net::HTTP.start( + uri.host, + uri.port, + use_ssl: true, + open_timeout: OPEN_TIMEOUT, + read_timeout: READ_TIMEOUT, + ) do |http| http.request(Net::HTTP::Get.new(uri.request_uri)) do |response| raise "unexpected #{response.code}" unless response.code.to_i == 200 response.read_body do |chunk| @@ -96,11 +100,13 @@ def download_file(file_id, max_bytes:) private def perform(uri, request) - Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http| - http.open_timeout = OPEN_TIMEOUT - http.read_timeout = READ_TIMEOUT - http.request(request) - end + Net::HTTP.start( + uri.host, + uri.port, + use_ssl: true, + open_timeout: OPEN_TIMEOUT, + read_timeout: READ_TIMEOUT, + ) { |http| http.request(request) } end def parse_response(response) diff --git a/package.json b/package.json index 6c3c5193..09821397 100644 --- a/package.json +++ b/package.json @@ -1,20 +1,20 @@ { "private": true, "devDependencies": { - "@discourse/lint-configs": "3.9.1", - "@glint/ember-tsc": "1.14.3", - "@types/node": "^26.6.6", - "concurrently": "^10.0.6", + "@discourse/lint-configs": "3.12.0", + "@glint/ember-tsc": "1.14.4", + "@types/node": "^26.6.11", + "concurrently": "^10.0.7", "discourse": "npm:@discourse/types@2026.10.0-a5125163", "esbuild": "0.28.2", "eslint": "10.6.0", "espree": "11.2.0", "jiti": "^2.7.0", - "lucide-static": "1.69.0", - "playwright-core": "1.65.0", - "postcss": "8.5.32", + "lucide-static": "1.83.0", + "playwright-core": "1.65.1", + "postcss": "8.5.34", "prettier": "3.8.1", - "sass": "1.107.1", + "sass": "1.108.2", "sharp": "0.35.5", "stylelint": "17.5.0", "typescript": "5.9.3" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 2c84bd06..1b43ade1 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,17 +13,17 @@ importers: .: devDependencies: '@discourse/lint-configs': - specifier: 3.9.1 - version: 3.9.1(eslint@10.6.0(jiti@2.7.0))(postcss@8.5.32)(prettier@3.8.1)(stylelint@17.5.0(typescript@5.9.3)) + specifier: 3.12.0 + version: 3.12.0(eslint@10.6.0(jiti@2.7.0))(postcss@8.5.34)(prettier@3.8.1)(stylelint@17.5.0(typescript@5.9.3)) '@glint/ember-tsc': - specifier: 1.14.3 - version: 1.14.3(typescript@5.9.3) + specifier: 1.14.4 + version: 1.14.4(typescript@5.9.3) '@types/node': - specifier: ^26.6.6 - version: 26.6.6 + specifier: ^26.6.11 + version: 26.6.11 concurrently: - specifier: ^10.0.6 - version: 10.0.6 + specifier: ^10.0.7 + version: 10.1.0 discourse: specifier: npm:@discourse/types@2026.10.0-a5125163 version: '@discourse/types@2026.10.0-a5125163' @@ -40,23 +40,23 @@ importers: specifier: ^2.7.0 version: 2.7.0 lucide-static: - specifier: 1.69.0 - version: 1.69.0 + specifier: 1.83.0 + version: 1.83.0 playwright-core: - specifier: 1.65.0 - version: 1.65.0 + specifier: 1.65.1 + version: 1.65.1 postcss: - specifier: 8.5.32 - version: 8.5.32 + specifier: 8.5.34 + version: 8.5.34 prettier: specifier: 3.8.1 version: 3.8.1 sass: - specifier: 1.107.1 - version: 1.107.1 + specifier: 1.108.2 + version: 1.108.2 sharp: specifier: 0.35.5 - version: 0.35.5(@types/node@26.6.6) + version: 0.35.5(@types/node@26.6.11) stylelint: specifier: 17.5.0 version: 17.5.0(typescript@5.9.3) @@ -362,8 +362,8 @@ packages: peerDependencies: postcss-selector-parser: ^7.1.1 - '@discourse/lint-configs@3.9.1': - resolution: {integrity: sha512-8AKysdyxJnNoSSFKKLk0k6q+cX/M9AUNAad5bTfMGcyaAiVO+fy94Kf9z3nexPUmy4ALWEuaTdEp4aW+Xfsjmw==} + '@discourse/lint-configs@3.12.0': + resolution: {integrity: sha512-8PT9EVI8v0CLJyb4zapZjesNwUogf1U7XlDnPQu0N+l1fcrtSqq55TMQHC6iOyyC0keGAkJ5RL8gfbTZZmFNbw==} peerDependencies: eslint: 10.6.0 prettier: 3.8.1 @@ -595,8 +595,8 @@ packages: '@glimmer/syntax@0.97.0': resolution: {integrity: sha512-uDUqlAxU40eJHJjMUR6ffdpDp6W53gNvS9YZNrBbf77sUL5xUFsBAaReB3FuyVPbwRg09p5rviioUJ8nyg7BBA==} - '@glint/ember-tsc@1.14.3': - resolution: {integrity: sha512-/NHLni6c5o1KsV6l+P6k0qzmijJmVCs3qZ+4Slrxx2ps8/T7NWIB2PUNvCV27A3JcPcLd/Jr5x5LeysoW3YPTA==} + '@glint/ember-tsc@1.14.4': + resolution: {integrity: sha512-yWWMiu5aGcSrXodSjnrM38RY8Kph5gPSUb9oauczoE7VkcD4duVlamGU47xuKBIUUtNQjUVA9zRnSKF4CTMgbA==} hasBin: true peerDependencies: ember-source: '>=3.28.0' @@ -1053,8 +1053,8 @@ packages: '@types/json-schema@7.0.15': resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} - '@types/node@26.6.6': - resolution: {integrity: sha512-MzQj+8Kx3XI40OmUAE6Qoh58ZMNstNNMwn2nfd3qWsfe7nDNSqJNzes4njhz6AHwrSHOffSLwXU6yb474Q4aog==} + '@types/node@26.6.11': + resolution: {integrity: sha512-uUyQ2XLEz+EXh34lmS3GhKrkqn/8FU7KUiKRpk347At2bmnMVWss45yz8b4FG/tUtmV1tV/+TVkITItPROyeeQ==} '@typescript-eslint/eslint-plugin@8.72.1': resolution: {integrity: sha512-5CokTWXpmbylfFabsbvHC0CAw3XLaGnoa+nFJX5FR592h/LoZsENUE6p/rg5xvkKrFEXz6pYmgI29AgXc2N3BQ==} @@ -1275,9 +1275,9 @@ packages: caniuse-lite@1.0.30001820: resolution: {integrity: sha512-gfWD6MxqVCqAOwmODfZf7DchWvlrA+SRdNX7ceLfg3xRqe5ssjjpF7EgslC/0tiLiNTajdaNN/q8c/5u/7Gz8w==} - chalk@5.6.2: - resolution: {integrity: sha512-7NzBL0rN6fMUW+f7A6Io4h40qQlG+xGmtMxfbnH/K7TAtt8JQWVQK+6g0UXKMeVJoyV5EkkNsErQ8pVD3bLHbA==} - engines: {node: ^12.17.0 || ^14.13 || >=16.0.0} + chalk@6.0.1: + resolution: {integrity: sha512-/Ce6KNm3vIbWdMlNna6RVIZ/ICQxnJxCicet5LBKK9ZffBkqzDw0xh9EiKSljdRtiIQ1S1z4YgcscUUGzNCWrA==} + engines: {node: '>=22'} chokidar@5.0.0: resolution: {integrity: sha512-TQMmc3w+5AxjpL8iIiwebF73dRDF4fBIieAqGn9RGCWaEVwQ6Fb2cGe31Yns0RRIzii5goJ1Y7xbMwo1TxMplw==} @@ -1301,8 +1301,8 @@ packages: resolution: {integrity: sha512-H+y0Jo/T1RZ9qPP4Eh1pkcQcLRglraJaSLoyOtHxu6AapkjWVCy2Sit1QQ4x3Dng8qDlSsZEet7g5Pq06MvTgw==} engines: {node: '>=20'} - concurrently@10.0.6: - resolution: {integrity: sha512-qgICXXFp2/3nAebRLmxcINKEXM1mLK3ij/y31P02VTs/KIkddIeC05n73DxOXsXMB9LFSqNU1/na3lDlOhcbIw==} + concurrently@10.1.0: + resolution: {integrity: sha512-Zg+cmqvXKtvYnrticZHTusSBbkerXjBJUjvta/ujFIskBX3luCQrKIX/yTuFC42XS/6x6Voe/NeAjwsfrdFz0g==} engines: {node: '>=22'} hasBin: true @@ -1811,8 +1811,8 @@ packages: lru-cache@5.1.1: resolution: {integrity: sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==} - lucide-static@1.69.0: - resolution: {integrity: sha512-n51UItv/qDzvu/UQixn0eSkp3hXppIJg0sRvtltb+rEO0XH2tyqFmtLsaUWu3SiAD0/7NHj/LH0eJlJJL5F4Ew==} + lucide-static@1.83.0: + resolution: {integrity: sha512-GOJktV2eBckh8MAHAOajiW+DErsADmQrGHNoyT57Un6F/Xrq2MP3IwIhgIUHaekyCtKNawJjSCXMI5ND3yRxbQ==} mathml-tag-names@4.0.0: resolution: {integrity: sha512-aa6AU2Pcx0VP/XWnh8IGL0SYSgQHDT6Ucror2j2mXeFAlN3ahaNs8EZtG1YiticMkSLj3Gt6VPFfZogt7G5iFQ==} @@ -1917,8 +1917,8 @@ packages: resolution: {integrity: sha512-qcJu88Q2IWqJsDD529JKMdwGm/dvInW4HvQnRwiH9JtihJvzGOscDtHE3x1pBKeUOTysQ8kVmLnJ2kJu7yhcGA==} engines: {node: '>=12'} - playwright-core@1.65.0: - resolution: {integrity: sha512-vNSKgH6YqtN7cdT/L334zo0a+YwkrpicyrHJlWWPIm/Q+Nn2SWInil01oT0mbu96U4GgoRtCYQD9CzJQgju+lA==} + playwright-core@1.65.1: + resolution: {integrity: sha512-hqPpz7blSMPxWVdoeE1yiBSzXsKiVOd2k+kjCvmUywD2GPO2Dd9HfcWnq9NN0GHbNZDFgZ9JfBFr+X5/BLo0qw==} engines: {node: '>=20'} hasBin: true @@ -1951,8 +1951,8 @@ packages: postcss-value-parser@4.2.0: resolution: {integrity: sha512-1NNCs6uurfkVbeXG4S8JFT9t19m45ICnif8zWLd5oPSZ50QnwMfK+H3jv408d4jw/7Bttv5axS5IiHoLaVNHeQ==} - postcss@8.5.32: - resolution: {integrity: sha512-LJlKCCAUFKOuZxipUdYw1NzIITEsPcgyOG9LkvRJvuKj/bRzbuRY0ARXvL0pWGpsZvn8jku+LMep2eU0seHp8g==} + postcss@8.5.34: + resolution: {integrity: sha512-P1Qzj0XXZjMda74C7qiVnBG90UKNbyNUAOeQRBW8X63RsIMV57gevRqjnkELdwtZ/S2/uQFksJhmwuN8xShLPw==} engines: {node: ^10 || ^12 || >=14} prelude-ls@1.2.1: @@ -2015,8 +2015,8 @@ packages: rxjs@7.8.2: resolution: {integrity: sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==} - sass@1.107.1: - resolution: {integrity: sha512-aJ1/LvxOOb04YhmiBjzZn3jVwdHKol+OVhoMV6fFl02fF9T3i+5Mg9l/CnzqtM+NX5Jn5o3lAbs/ZJivTCLHfQ==} + sass@1.108.2: + resolution: {integrity: sha512-kugK8djotnG9HQRPTOf36asKYlxg8rWWsNLYHOgWDIVOiZQqlRfKBgF4XXM6kfw146kIDMvm57B4GIkvDSyTzA==} engines: {node: '>=20.19.0'} hasBin: true @@ -2076,6 +2076,10 @@ packages: resolution: {integrity: sha512-KGj/8Y43x35aZVDtt+J4mK1hoLGHULMYfSkODJNQjNDC3oW1PqPoxMwo0pLUsWM/UEGzON/NxeHywEfNXNP3Vw==} engines: {node: '>=0.10.0'} + source-map-js@1.3.0: + resolution: {integrity: sha512-pdUVfIWcK0kCgK831ibqkZDcL7I9zljjOu0TQFnA+fiQ6y1CYqYB7RkTOHHO45FGMg5P/Mvk/+4ToQ7gAYAL5Q==} + engines: {node: '>=6.0.0'} + string-width@4.2.3: resolution: {integrity: sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==} engines: {node: '>=8'} @@ -2143,6 +2147,10 @@ packages: resolution: {integrity: sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==} engines: {node: '>=18'} + supports-color@11.0.0: + resolution: {integrity: sha512-/zyImLdxhdygBIaVX0xTlQhKaCDLCrm665aqHk8xqK/Pa6k61fL6gwQGQq1k31yNyz6x55PppQgF2DMyPQa5xw==} + engines: {node: '>=22'} + supports-hyperlinks@4.4.0: resolution: {integrity: sha512-UKbpT93hN5Nr9go5UY7bopIB9YQlMz9nm/ct4IXt/irb5YRkn9WaqrOBJGZ5Pwvsd5FQzSVeYlGdXoCAPQZrPg==} engines: {node: '>=20'} @@ -2311,8 +2319,8 @@ packages: resolution: {integrity: sha512-rwu/ClNdSMpkSrUb+d6BRsSkLUq1fmfsY6TOpYzTwvwkg1/NRG85KBy3kq++A8LKQwX6lsu+aWad+2khvuXrqw==} engines: {node: ^20.19.0 || ^22.12.0 || >=23} - yargs@18.0.0: - resolution: {integrity: sha512-4UEqdc2RYGHZc7Doyqkrqiln3p9X2DZVxaGbwhn2pi7MrRagKaOcIKe8L3OxYcbhXLgLFUS3zAYuQjKBQgmuNg==} + yargs@18.2.0: + resolution: {integrity: sha512-9OpKOLeaoNFecEp7P6iYbzze/5CqWoH7N3SMs/6y1XF4nMvFMspEGZzJ6uFi9MmQwXhyzqYoSEKO3tvA3Z/o2w==} engines: {node: ^20.19.0 || ^22.12.0 || >=23} yocto-queue@0.1.0: @@ -2677,7 +2685,7 @@ snapshots: dependencies: postcss-selector-parser: 7.1.6 - '@discourse/lint-configs@3.9.1(eslint@10.6.0(jiti@2.7.0))(postcss@8.5.32)(prettier@3.8.1)(stylelint@17.5.0(typescript@5.9.3))': + '@discourse/lint-configs@3.12.0(eslint@10.6.0(jiti@2.7.0))(postcss@8.5.34)(prettier@3.8.1)(stylelint@17.5.0(typescript@5.9.3))': dependencies: '@babel/core': 8.0.10 '@babel/eslint-parser': 8.0.7(@babel/core@8.0.10)(eslint@10.6.0(jiti@2.7.0)) @@ -2696,7 +2704,7 @@ snapshots: prettier-plugin-ember-template-tag: 2.1.8(prettier@3.8.1) stylelint: 17.5.0(typescript@5.9.3) stylelint-config-standard: 40.0.0(stylelint@17.5.0(typescript@5.9.3)) - stylelint-config-standard-scss: 17.0.0(postcss@8.5.32)(stylelint@17.5.0(typescript@5.9.3)) + stylelint-config-standard-scss: 17.0.0(postcss@8.5.34)(stylelint@17.5.0(typescript@5.9.3)) stylelint-scss: 7.4.0(stylelint@17.5.0(typescript@5.9.3)) typescript: 5.9.3 typescript-eslint: 8.72.1(eslint@10.6.0(jiti@2.7.0))(typescript@5.9.3) @@ -2852,7 +2860,7 @@ snapshots: dependencies: simple-html-tokenizer: 1.0.0 - '@glint/ember-tsc@1.14.3(typescript@5.9.3)': + '@glint/ember-tsc@1.14.4(typescript@5.9.3)': dependencies: '@glimmer/syntax': 0.97.0 '@glint/template': 1.11.1 @@ -3203,7 +3211,7 @@ snapshots: '@types/json-schema@7.0.15': {} - '@types/node@26.6.6': + '@types/node@26.6.11': dependencies: undici-types: 8.9.0 @@ -3484,7 +3492,7 @@ snapshots: caniuse-lite@1.0.30001820: {} - chalk@5.6.2: {} + chalk@6.0.1: {} chokidar@5.0.0: dependencies: @@ -3506,14 +3514,14 @@ snapshots: commander@14.0.3: {} - concurrently@10.0.6: + concurrently@10.1.0: dependencies: - chalk: 5.6.2 + chalk: 6.0.1 rxjs: 7.8.2 shell-quote: 1.12.0 - supports-color: 10.2.2 + supports-color: 11.0.0 tree-kill: 1.2.2 - yargs: 18.0.0 + yargs: 18.2.0 content-tag@4.2.1: {} @@ -3558,7 +3566,7 @@ snapshots: dot-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.8.1 + tslib: 2.9.1 editorconfig@3.0.2: dependencies: @@ -4010,7 +4018,7 @@ snapshots: dependencies: yallist: 3.1.1 - lucide-static@1.69.0: {} + lucide-static@1.83.0: {} mathml-tag-names@4.0.0: {} @@ -4041,7 +4049,7 @@ snapshots: no-case@3.0.4: dependencies: lower-case: 2.0.2 - tslib: 2.8.1 + tslib: 2.9.1 node-addon-api@7.1.1: optional: true @@ -4119,19 +4127,19 @@ snapshots: picomatch@4.0.7: {} - playwright-core@1.65.0: {} + playwright-core@1.65.1: {} postcss-media-query-parser@0.2.3: {} postcss-resolve-nested-selector@0.1.7: {} - postcss-safe-parser@7.0.1(postcss@8.5.32): + postcss-safe-parser@7.0.1(postcss@8.5.34): dependencies: - postcss: 8.5.32 + postcss: 8.5.34 - postcss-scss@4.0.9(postcss@8.5.32): + postcss-scss@4.0.9(postcss@8.5.34): dependencies: - postcss: 8.5.32 + postcss: 8.5.34 postcss-selector-parser@7.1.6: dependencies: @@ -4145,11 +4153,11 @@ snapshots: postcss-value-parser@4.2.0: {} - postcss@8.5.32: + postcss@8.5.34: dependencies: nanoid: 3.3.20 picocolors: 1.1.1 - source-map-js: 1.2.2 + source-map-js: 1.3.0 prelude-ls@1.2.1: {} @@ -4196,9 +4204,9 @@ snapshots: rxjs@7.8.2: dependencies: - tslib: 2.8.1 + tslib: 2.9.1 - sass@1.107.1: + sass@1.108.2: dependencies: chokidar: 5.0.0 immutable: 5.1.9 @@ -4210,7 +4218,7 @@ snapshots: semver@7.8.5: {} - sharp@0.35.5(@types/node@26.6.6): + sharp@0.35.5(@types/node@26.6.11): dependencies: '@img/colour': 1.1.0 detect-libc: 2.1.2 @@ -4241,7 +4249,7 @@ snapshots: '@img/sharp-win32-arm64': 0.35.5 '@img/sharp-win32-ia32': 0.35.5 '@img/sharp-win32-x64': 0.35.5 - '@types/node': 26.6.6 + '@types/node': 26.6.11 shebang-command@2.0.0: dependencies: @@ -4272,10 +4280,12 @@ snapshots: snake-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.8.1 + tslib: 2.9.1 source-map-js@1.2.2: {} + source-map-js@1.3.0: {} + string-width@4.2.3: dependencies: emoji-regex: 8.0.0 @@ -4301,26 +4311,26 @@ snapshots: dependencies: ansi-regex: 6.3.0 - stylelint-config-recommended-scss@17.0.1(postcss@8.5.32)(stylelint@17.5.0(typescript@5.9.3)): + stylelint-config-recommended-scss@17.0.1(postcss@8.5.34)(stylelint@17.5.0(typescript@5.9.3)): dependencies: - postcss-scss: 4.0.9(postcss@8.5.32) + postcss-scss: 4.0.9(postcss@8.5.34) stylelint: 17.5.0(typescript@5.9.3) stylelint-config-recommended: 18.0.0(stylelint@17.5.0(typescript@5.9.3)) stylelint-scss: 7.4.0(stylelint@17.5.0(typescript@5.9.3)) optionalDependencies: - postcss: 8.5.32 + postcss: 8.5.34 stylelint-config-recommended@18.0.0(stylelint@17.5.0(typescript@5.9.3)): dependencies: stylelint: 17.5.0(typescript@5.9.3) - stylelint-config-standard-scss@17.0.0(postcss@8.5.32)(stylelint@17.5.0(typescript@5.9.3)): + stylelint-config-standard-scss@17.0.0(postcss@8.5.34)(stylelint@17.5.0(typescript@5.9.3)): dependencies: stylelint: 17.5.0(typescript@5.9.3) - stylelint-config-recommended-scss: 17.0.1(postcss@8.5.32)(stylelint@17.5.0(typescript@5.9.3)) + stylelint-config-recommended-scss: 17.0.1(postcss@8.5.34)(stylelint@17.5.0(typescript@5.9.3)) stylelint-config-standard: 40.0.0(stylelint@17.5.0(typescript@5.9.3)) optionalDependencies: - postcss: 8.5.32 + postcss: 8.5.34 stylelint-config-standard@40.0.0(stylelint@17.5.0(typescript@5.9.3)): dependencies: @@ -4372,8 +4382,8 @@ snapshots: micromatch: 4.0.8 normalize-path: 3.0.0 picocolors: 1.1.1 - postcss: 8.5.32 - postcss-safe-parser: 7.0.1(postcss@8.5.32) + postcss: 8.5.34 + postcss-safe-parser: 7.0.1(postcss@8.5.34) postcss-selector-parser: 7.1.6 postcss-value-parser: 4.2.0 string-width: 8.3.0 @@ -4387,6 +4397,8 @@ snapshots: supports-color@10.2.2: {} + supports-color@11.0.0: {} + supports-hyperlinks@4.4.0: dependencies: has-flag: 5.0.1 @@ -4419,7 +4431,8 @@ snapshots: dependencies: typescript: 5.9.3 - tslib@2.8.1: {} + tslib@2.8.1: + optional: true tslib@2.9.1: {} @@ -4545,12 +4558,12 @@ snapshots: yargs-parser@22.0.0: {} - yargs@18.0.0: + yargs@18.2.0: dependencies: cliui: 9.0.1 escalade: 3.2.0 get-caller-file: 2.0.5 - string-width: 7.2.0 + string-width: 8.3.0 y18n: 5.0.8 yargs-parser: 22.0.0 diff --git a/spec/system/feature_screenshots_spec.rb b/spec/system/feature_screenshots_spec.rb index 5477f550..f7f8280f 100644 --- a/spec/system/feature_screenshots_spec.rb +++ b/spec/system/feature_screenshots_spec.rb @@ -266,8 +266,16 @@ def fab_mod_note_notification(user:, topic:, kind: "note", reply_id: nil, excerp visit("/") expect(page).to have_css(".d-header", wait: 15) find(".header-dropdown-toggle.current-user button", match: :first).click + expect(page).to have_no_css(".user-menu .spinner") expect(page).to have_css(".notification.custom", wait: 10) - find(".notification.custom a", match: :first).click + attempts = 0 + begin + find(".notification.custom a", match: :first).click + rescue StandardError => e + raise unless e.message.include?("not attached") && (attempts += 1) <= 3 + sleep 0.1 + retry + end expect(page).to have_css("#mod-private-note-reply-#{reply_id}", wait: 15) # Give the deferred scrollIntoView (~250ms) plus rendering settle time. diff --git a/spec/system/jtech_theme_part2_spec.rb b/spec/system/jtech_theme_part2_spec.rb index f06da7f0..bc1dbd02 100644 --- a/spec/system/jtech_theme_part2_spec.rb +++ b/spec/system/jtech_theme_part2_spec.rb @@ -969,7 +969,7 @@ # edge and is cut off on the left, but its fade still ran left to right as # in English: the cut-off edge stayed hard and the start faded instead it "fades the cut-off edge of a strip of tabs in a right-to-left interface" do - SiteSetting.allow_user_locale = true + SiteSetting.allowed_user_locales = "all" SiteSetting.reqpm_enabled = true member.update!(locale: "he") sign_in(member) diff --git a/spec/system/jtech_theme_part3_spec.rb b/spec/system/jtech_theme_part3_spec.rb index 6013acf5..b6ced208 100644 --- a/spec/system/jtech_theme_part3_spec.rb +++ b/spec/system/jtech_theme_part3_spec.rb @@ -844,7 +844,7 @@ # search field's left: 50% into right: 50% but kept its -50% shift, which put # the field 330px off centre, over the header's buttons it "centres the header's search field in a right-to-left interface" do - SiteSetting.allow_user_locale = true + SiteSetting.allowed_user_locales = "all" member.update!(locale: "he") sign_in(member) visit("/latest") diff --git a/spec/system/jtech_theme_part4_spec.rb b/spec/system/jtech_theme_part4_spec.rb index 0ca0c308..85bd1fdd 100644 --- a/spec/system/jtech_theme_part4_spec.rb +++ b/spec/system/jtech_theme_part4_spec.rb @@ -967,7 +967,7 @@ def gate(categories: "", tags: "") end describe "the sidebar's palette menu" do - let(:background) { "getComputedStyle(document.body).backgroundColor" } + let(:body_background) { "getComputedStyle(document.body).backgroundColor" } def scheme_id(name) jtech_theme.color_schemes.find_by(name: name).id @@ -984,7 +984,9 @@ def pick(name) expect(page).to have_css(".jt-card") pick("Nord") - try_until_success { expect(page.evaluate_script(background)).to eq("rgb(236, 239, 244)") } + try_until_success do + expect(page.evaluate_script(body_background)).to eq("rgb(236, 239, 244)") + end try_until_success do expect(member.user_option.reload.color_scheme_id).to eq(scheme_id("Nord Light")) end @@ -993,14 +995,16 @@ def pick(name) visit("/latest") expect(page).to have_css(".jt-card") - expect(page.evaluate_script(background)).to eq("rgb(236, 239, 244)") + expect(page.evaluate_script(body_background)).to eq("rgb(236, 239, 244)") find(".jt-palette-menu").click expect(page).to have_css(".jt-palettes__option[aria-checked='true']", exact_text: "Nord") shot("palette-menu") # back to black and white: saved as the theme's default find(".jt-palettes__option", exact_text: "JTech").click - try_until_success { expect(page.evaluate_script(background)).to eq("rgb(255, 255, 255)") } + try_until_success do + expect(page.evaluate_script(body_background)).to eq("rgb(255, 255, 255)") + end try_until_success { expect(member.user_option.reload.color_scheme_id).to eq(-1) } expect(member.user_option.dark_scheme_id).to eq(-1) expect_no_theme_errors @@ -1011,10 +1015,12 @@ def pick(name) expect(page).to have_css(".jt-card") pick("Gruvbox") - try_until_success { expect(page.evaluate_script(background)).to eq("rgb(251, 241, 199)") } + try_until_success do + expect(page.evaluate_script(body_background)).to eq("rgb(251, 241, 199)") + end visit("/latest") expect(page).to have_css(".jt-card") - expect(page.evaluate_script(background)).to eq("rgb(251, 241, 199)") + expect(page.evaluate_script(body_background)).to eq("rgb(251, 241, 199)") expect(page).to have_no_css("html.jt-vanilla") @@ -1022,7 +1028,9 @@ def pick(name) # to swap the icons pick("Discourse") expect(page).to have_css("html.jt-vanilla") - try_until_success { expect(page.evaluate_script(background)).to eq("rgb(255, 255, 255)") } + try_until_success do + expect(page.evaluate_script(body_background)).to eq("rgb(255, 255, 255)") + end visit("/latest") expect(page).to have_css("html.jt-vanilla") expect(page).to have_no_css(".sidebar-section-link-prefix .d-icon use[href^='#jt-']") diff --git a/spec/system/reqpm_spec.rb b/spec/system/reqpm_spec.rb index 93ac840a..3e556bf7 100644 --- a/spec/system/reqpm_spec.rb +++ b/spec/system/reqpm_spec.rb @@ -174,10 +174,18 @@ def add_method(user, kind, value, **attrs) sign_in(alice) visit "/latest" find(".header-dropdown-toggle.current-user").click - item = find(".user-menu .notification", text: "wants your contact details") - expect(item).to have_content("bob_m") + expect(page).to have_no_css(".user-menu .spinner") + expect(page).to have_css(".user-menu .notification", text: "wants your contact details") + expect(page).to have_css(".user-menu .notification", text: "bob_m") shot("15_bell_notification") - item.click + attempts = 0 + begin + find(".user-menu .notification", text: "wants your contact details").click + rescue StandardError => e + raise unless e.message.include?("not attached") && (attempts += 1) <= 3 + sleep 0.1 + retry + end expect(page).to have_current_path(%r{/reqpm\?tab=requests}) expect(page).to have_css(".reqpm-row--incoming", text: "bob_m") end diff --git a/spec/system/review_queue_click_through_spec.rb b/spec/system/review_queue_click_through_spec.rb index b8e034f2..c0aba7ea 100644 --- a/spec/system/review_queue_click_through_spec.rb +++ b/spec/system/review_queue_click_through_spec.rb @@ -70,11 +70,19 @@ def seed_notification(kind:) # Capture the bell dropdown with the notification visible. find(".header-dropdown-toggle.current-user button", match: :first).click + expect(page).to have_no_css(".user-menu .spinner") expect(page).to have_css(".notification.custom", wait: 15) shot("review_clickthrough_#{kind}_01_bell_dropdown") - # Click the notification. - find(".notification.custom a", match: :first).click + # Click the notification (re-find if the menu re-renders mid-click). + attempts = 0 + begin + find(".notification.custom a", match: :first).click + rescue StandardError => e + raise unless e.message.include?("not attached") && (attempts += 1) <= 3 + sleep 0.1 + retry + end # Verify the URL — Discourse's review queue uses /review or # /review?reviewable_id=:id depending on version; assert the diff --git a/themes/jtech/assets/icons-sprite.svg b/themes/jtech/assets/icons-sprite.svg index 80cccf4f..8a567fe4 100644 --- a/themes/jtech/assets/icons-sprite.svg +++ b/themes/jtech/assets/icons-sprite.svg @@ -46,7 +46,7 @@ - + @@ -118,7 +118,7 @@ - + diff --git a/themes/jtech/stylesheets/jt-panels.scss b/themes/jtech/stylesheets/jt-panels.scss index 1816e4fa..1d8311ab 100644 --- a/themes/jtech/stylesheets/jt-panels.scss +++ b/themes/jtech/stylesheets/jt-panels.scss @@ -35,9 +35,13 @@ padding-top: 2.75rem; } -// jtech-tools' REQ-PM is a btn-small; on the card it sits under Message and -// Follow, which core sizes from 1rem, so it came out a size smaller and 8px -// shorter. It takes their text size and padding. +// jtech-tools' REQ-PM is a btn-small; on the card it sits beside core's +// icon-only controls, which are square at --usercard-button-width (2.3em + 2px). +// Match their font size and give every control button the same height. +.user-card .usercard-controls .btn { + min-height: var(--usercard-button-width, 2.3em); +} + .user-card .usercard-controls .reqpm-user-button.btn { padding: 0.5em 0.65em; font-size: var(--font-0); diff --git a/themes/jtech/stylesheets/jt-search.scss b/themes/jtech/stylesheets/jt-search.scss index 325211a3..b8454206 100644 --- a/themes/jtech/stylesheets/jt-search.scss +++ b/themes/jtech/stylesheets/jt-search.scss @@ -209,6 +209,10 @@ $jt-search-glyph: "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' display: flex; flex-direction: column; + > [aria-live]:has(> .result-count) { + order: -1; + } + .result-count { order: -1; display: flex;