From af4e4561ec5a3b9c6fa820f9d46da375c851d950 Mon Sep 17 00:00:00 2001 From: zarzet Date: Fri, 26 Jun 2026 20:26:43 +0700 Subject: [PATCH] chore(deps): update Flutter and Go dependencies to latest stable Flutter: bump connectivity_plus, device_info_plus, share_plus, receive_sharing_intent, path_provider, flutter_local_notifications to latest stable. Revert file_picker from 12.0.0-beta to 11.0.2 stable and migrate pickFile (singular) to pickFiles. Add win32 ^6.0.1 dependency_overrides to resolve the win32 5 vs 6 conflict between file_picker stable and device_info_plus (Windows-desktop-only transitive dep, not used on mobile targets). Go: update goja, golang.org/x/mobile, golang.org/x/tools, regexp2/v2 to latest. --- go_backend/go.mod | 8 ++--- go_backend/go.sum | 16 ++++----- lib/screens/library_playlists_screen.dart | 5 +-- lib/screens/library_tracks_folder_screen.dart | 5 +-- lib/screens/track_metadata_edit_sheet.dart | 10 ++++-- pubspec.lock | 34 +++++++++---------- pubspec.yaml | 21 ++++++++---- 7 files changed, 56 insertions(+), 43 deletions(-) diff --git a/go_backend/go.mod b/go_backend/go.mod index 9d031aee..8f4f00a9 100644 --- a/go_backend/go.mod +++ b/go_backend/go.mod @@ -5,25 +5,25 @@ go 1.25.0 toolchain go1.25.9 require ( - github.com/dop251/goja v0.0.0-20260607120635-348e6bea910d + github.com/dop251/goja v0.0.0-20260618133527-c9b2ea77db59 github.com/go-flac/flacpicture/v2 v2.0.2 github.com/go-flac/flacvorbis/v2 v2.0.2 github.com/go-flac/go-flac/v2 v2.0.4 github.com/refraction-networking/utls v1.8.2 golang.org/x/crypto v0.53.0 - golang.org/x/mobile v0.0.0-20260602190626-68735029466e + golang.org/x/mobile v0.0.0-20260611195102-4dd8f1dbf5d2 golang.org/x/net v0.56.0 golang.org/x/text v0.38.0 ) require ( github.com/andybalholm/brotli v1.2.1 // indirect - github.com/dlclark/regexp2/v2 v2.2.1 // indirect + github.com/dlclark/regexp2/v2 v2.2.2 // indirect github.com/go-sourcemap/sourcemap v2.1.4+incompatible // indirect github.com/google/pprof v0.0.0-20260604005048-7023385849c0 // indirect github.com/klauspost/compress v1.18.6 // indirect golang.org/x/mod v0.37.0 // indirect golang.org/x/sync v0.21.0 // indirect golang.org/x/sys v0.46.0 // indirect - golang.org/x/tools v0.45.0 // indirect + golang.org/x/tools v0.47.0 // indirect ) diff --git a/go_backend/go.sum b/go_backend/go.sum index c72d93da..3581976a 100644 --- a/go_backend/go.sum +++ b/go_backend/go.sum @@ -4,10 +4,10 @@ github.com/andybalholm/brotli v1.2.1 h1:R+f5xP285VArJDRgowrfb9DqL18yVK0gKAW/F+eT github.com/andybalholm/brotli v1.2.1/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY= github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c= github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= -github.com/dlclark/regexp2/v2 v2.2.1 h1:mf4KkFUj0gJuarK8P+LgiS+Lit7m9N1yAwEfPbee7R0= -github.com/dlclark/regexp2/v2 v2.2.1/go.mod h1:avUrQvPaLz2DrFNHJF0taWAFFX2C1GMSSoeiqFjcBmU= -github.com/dop251/goja v0.0.0-20260607120635-348e6bea910d h1:xbM5U2EvWKkHxzEQJ2DEn20FwolWZahuTnVHr6WL3Q4= -github.com/dop251/goja v0.0.0-20260607120635-348e6bea910d/go.mod h1:Sc+QOu1WruvaaeT/cxFez/pXHpI9ZDjg/E8QNfSVveI= +github.com/dlclark/regexp2/v2 v2.2.2 h1:MYWvNYw8okuqNhwTYO587EZMiDruVa2vhV6fsGpfya0= +github.com/dlclark/regexp2/v2 v2.2.2/go.mod h1:avUrQvPaLz2DrFNHJF0taWAFFX2C1GMSSoeiqFjcBmU= +github.com/dop251/goja v0.0.0-20260618133527-c9b2ea77db59 h1:DjKLmvKK9u15djHZ88N8M0DhgnHVgJJ8bnEe0h7Lga8= +github.com/dop251/goja v0.0.0-20260618133527-c9b2ea77db59/go.mod h1:Sc+QOu1WruvaaeT/cxFez/pXHpI9ZDjg/E8QNfSVveI= github.com/go-flac/flacpicture/v2 v2.0.2 h1:HCaJIVZpxnpdWs6G3ECEVRelzqS5xOi1Ba1AGmtXbzE= github.com/go-flac/flacpicture/v2 v2.0.2/go.mod h1:DMZBPWPAmdLqNhqFSy5ZBs9wyBzOekXutGfP7/TFCuo= github.com/go-flac/flacvorbis/v2 v2.0.2 h1:xCL3OhxrxWkHrbWUBvGNe+6FQ03yLmBbz0v5z4V2PoQ= @@ -34,8 +34,8 @@ github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZ github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E= golang.org/x/crypto v0.53.0 h1:QZ4Muo8THX6CizN2vPPd5fBGHyogrdK9fG4wLPFUsto= golang.org/x/crypto v0.53.0/go.mod h1:DNLU434OwVakk9PzuwV8w62mAJpRJL3vsgcfp4Qnsio= -golang.org/x/mobile v0.0.0-20260602190626-68735029466e h1:YxPXu/HWDTcSSrzSX+sCltsfcNCa/ZYVG43oslMouNU= -golang.org/x/mobile v0.0.0-20260602190626-68735029466e/go.mod h1:ltIbhcRzKgwHa4ZxKJeiv0nyzcXUUYCqMyO0Y+vPmXw= +golang.org/x/mobile v0.0.0-20260611195102-4dd8f1dbf5d2 h1:zoM1gIKhVkcQNm43kad8OHLgPNoJ12xIqmxHtKr8Mug= +golang.org/x/mobile v0.0.0-20260611195102-4dd8f1dbf5d2/go.mod h1:QGMqsqLn6orFQ/ksqYMf+Fa33Soa1vPoHEd0Pj7N+lQ= golang.org/x/mod v0.37.0 h1:vF1DjpVEshcIqoEaauuHebaLk1O1forxjxBaVn884JQ= golang.org/x/mod v0.37.0/go.mod h1:m8S8VeM9r4dzDwjrKO0a1sZP3YjeMamRRlD+fmR2Q/0= golang.org/x/net v0.56.0 h1:Rw8j/hFzGvJUZwNBXnAtf5sVDVt+65SK2C7IxCxZt5o= @@ -46,7 +46,7 @@ golang.org/x/sys v0.46.0 h1:noSf2Fq6F8DBgS+LysIkx7rIExoNHJsxOAtPp4rthXw= golang.org/x/sys v0.46.0/go.mod h1:4GL1E5IUh+htKOUEOaiffhrAeqysfVGipDYzABqnCmw= golang.org/x/text v0.38.0 h1:sXmwo9DwP3OK9EZ7PqAdaooSGozfl/3a6/xJcbzPRhE= golang.org/x/text v0.38.0/go.mod h1:YXZt3QhHUKYT53r2lLKFIVi6Ao1jdzrTR/KQ09qyxF4= -golang.org/x/tools v0.45.0 h1:18qN3FAooORvApf5XjCXgsuayZOEtXf6JK18I3+ONa8= -golang.org/x/tools v0.45.0/go.mod h1:LuUGqqaXcXMEFEruIVJVm5mgDD8vww/z/SR1gQ4uE/0= +golang.org/x/tools v0.47.0 h1:7Kn5x/d1svx/PzryTsqeoZN4TZwqeH5pGWjefhLi/1Q= +golang.org/x/tools v0.47.0/go.mod h1:dFHnyTvFWY212G+h7ZY4Vsp/K3U4/7W9TyVaAul8uCA= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= diff --git a/lib/screens/library_playlists_screen.dart b/lib/screens/library_playlists_screen.dart index cf0a0046..f78d9f26 100644 --- a/lib/screens/library_playlists_screen.dart +++ b/lib/screens/library_playlists_screen.dart @@ -361,8 +361,9 @@ class LibraryPlaylistsScreen extends ConsumerWidget { WidgetRef ref, String playlistId, ) async { - final picked = await FilePicker.pickFile(type: FileType.image); - if (picked == null) return; + final result = await FilePicker.pickFiles(type: FileType.image); + if (result == null || result.files.isEmpty) return; + final picked = result.files.first; final path = picked.path; if (path == null || path.isEmpty) return; diff --git a/lib/screens/library_tracks_folder_screen.dart b/lib/screens/library_tracks_folder_screen.dart index 7a4d3f54..2e258615 100644 --- a/lib/screens/library_tracks_folder_screen.dart +++ b/lib/screens/library_tracks_folder_screen.dart @@ -571,8 +571,9 @@ class _LibraryTracksFolderScreenState final playlistId = widget.playlistId; if (playlistId == null) return; - final picked = await FilePicker.pickFile(type: FileType.image); - if (picked == null) return; + final result = await FilePicker.pickFiles(type: FileType.image); + if (result == null || result.files.isEmpty) return; + final picked = result.files.first; final path = picked.path; if (path == null || path.isEmpty) return; diff --git a/lib/screens/track_metadata_edit_sheet.dart b/lib/screens/track_metadata_edit_sheet.dart index 26ffb351..6c9785e2 100644 --- a/lib/screens/track_metadata_edit_sheet.dart +++ b/lib/screens/track_metadata_edit_sheet.dart @@ -201,15 +201,19 @@ class _EditMetadataSheetState extends State<_EditMetadataSheet> { Future _pickCoverImage() async { try { - final picked = await FilePicker.pickFile(type: FileType.image); - if (picked == null) return; + final result = await FilePicker.pickFiles( + type: FileType.image, + withData: true, + ); + if (result == null || result.files.isEmpty) return; + final picked = result.files.first; final sourcePath = picked.path; Uint8List? bytes; final needsByteFallback = !_hasValue(sourcePath) && !_hasValue(picked.extension); if (needsByteFallback) { - bytes = await picked.readAsBytes(); + bytes = picked.bytes; } final extension = _resolveImageExtension(picked.extension, bytes); diff --git a/pubspec.lock b/pubspec.lock index f64e2ba2..34b314de 100644 --- a/pubspec.lock +++ b/pubspec.lock @@ -213,10 +213,10 @@ packages: dependency: "direct main" description: name: connectivity_plus - sha256: "62ffa266d9a23b79fb3fcbc206afc00bb979417ba57b1324c546b5aab95ba057" + sha256: cad0e811a289ea2a941119dc483c204ec1684cbb9a8fc7351fe4a230b8313160 url: "https://pub.dev" source: hosted - version: "7.1.1" + version: "7.2.0" connectivity_plus_platform_interface: dependency: transitive description: @@ -277,10 +277,10 @@ packages: dependency: "direct main" description: name: device_info_plus - sha256: "6a642e1daa10190af89ba6cb6386c0df7d071a3592080bfe1e44faa63ae1df65" + sha256: "0891702f96b2e465fe567b7ec448380e6b1c14f60af552a8536d9f583b6b8442" url: "https://pub.dev" source: hosted - version: "13.1.0" + version: "13.2.0" device_info_plus_platform_interface: dependency: transitive description: @@ -349,10 +349,10 @@ packages: dependency: "direct main" description: name: file_picker - sha256: fc83774ce5bd7ce08168333b5e53dbe9090ec04eb21e7aa7cd7bac921032c934 + sha256: f13a03000d942e476bc1ff0a736d2e9de711d2f89a95cd4c1d88f861c3348387 url: "https://pub.dev" source: hosted - version: "12.0.0-beta.5" + version: "11.0.2" fixnum: dependency: transitive description: @@ -394,10 +394,10 @@ packages: dependency: "direct main" description: name: flutter_local_notifications - sha256: be38e3854d2baabcda8e16966a5fe8748cebb655bb94701494da0f052c2fc352 + sha256: a0d7141f14cabcee42967470a858dfc99dd6cfb70d3cab404bacfcafa9e84e70 url: "https://pub.dev" source: hosted - version: "22.0.0" + version: "22.0.1" flutter_local_notifications_linux: dependency: transitive description: @@ -426,10 +426,10 @@ packages: dependency: transitive description: name: flutter_local_notifications_windows - sha256: "5aeed973a0c1480706784fad05c5c3a911335ebb561b2274b47fe80b375201e1" + sha256: "6f43bdd03b171b7a90f22647506fea33e2bb12294b7c7c7a3d690e960a382945" url: "https://pub.dev" source: hosted - version: "3.1.0" + version: "3.1.1" flutter_localizations: dependency: "direct main" description: flutter @@ -785,10 +785,10 @@ packages: dependency: "direct main" description: name: path_provider - sha256: "50c5dd5b6e1aaf6fb3a78b33f6aa3afca52bf903a8a5298f53101fdaee55bbcd" + sha256: a7f4874f987173da295a61c181b8ee71dab59b332a486b391babf26a1b884825 url: "https://pub.dev" source: hosted - version: "2.1.5" + version: "2.1.6" path_provider_android: dependency: transitive description: @@ -937,10 +937,10 @@ packages: dependency: "direct main" description: name: receive_sharing_intent - sha256: ec76056e4d258ad708e76d85591d933678625318e411564dcb9059048ca3a593 + sha256: "72f229a38f2910029c11d840770c173b27072e348ef3376130b37514bc4556f6" url: "https://pub.dev" source: hosted - version: "1.8.1" + version: "1.9.0" record_use: dependency: transitive description: @@ -1001,10 +1001,10 @@ packages: dependency: "direct main" description: name: share_plus - sha256: a857d8b1479250aff6b57a51b2c02d31ca05848d441817c43f1640c885c286c0 + sha256: "9eee8283462d91a7a1c8bdb67d08874abd75a2f8fae3bc0ca033035e375fb3d8" url: "https://pub.dev" source: hosted - version: "13.1.0" + version: "13.2.0" share_plus_platform_interface: dependency: transitive description: @@ -1411,7 +1411,7 @@ packages: source: hosted version: "1.2.1" win32: - dependency: transitive + dependency: "direct overridden" description: name: win32 sha256: ba6f4bba816c8d7e3c1580e170f3786d216951cc6b94babc3b814c08d2cb2738 diff --git a/pubspec.yaml b/pubspec.yaml index 82ab4ae9..fd1330d1 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -24,13 +24,13 @@ dependencies: # Storage & Persistence shared_preferences: ^2.5.3 flutter_secure_storage: ^10.3.1 - path_provider: ^2.1.5 + path_provider: ^2.1.6 path: ^1.9.0 sqflite: ^2.4.3 # HTTP & Network http: ^1.6.0 - connectivity_plus: ^7.1.1 + connectivity_plus: ^7.2.0 # UI Components cached_network_image: ^3.4.1 @@ -43,16 +43,16 @@ dependencies: permission_handler: ^12.0.3 # File Picker - file_picker: ^12.0.0-beta.5 + file_picker: ^11.0.2 # JSON Serialization json_annotation: ^4.12.0 # Utils url_launcher: ^6.3.1 - device_info_plus: ^13.1.0 - share_plus: ^13.1.0 - receive_sharing_intent: ^1.8.1 + device_info_plus: ^13.2.0 + share_plus: ^13.2.0 + receive_sharing_intent: ^1.9.0 logger: ^2.5.0 # FFmpeg for audio conversion @@ -60,7 +60,7 @@ dependencies: open_filex: ^4.7.0 # Notifications - flutter_local_notifications: ^22.0.0 + flutter_local_notifications: ^22.0.1 dev_dependencies: flutter_test: @@ -72,6 +72,13 @@ dev_dependencies: json_serializable: ^6.14.0 flutter_launcher_icons: ^0.14.3 +# file_picker (stable 11.x) pins win32 ^5.9.0, while device_info_plus and +# other *_plus plugins require win32 ^6.x. win32 is a Windows-desktop-only +# transitive dependency and is never compiled for the Android/iOS targets, so +# we override it to satisfy resolution without affecting mobile builds. +dependency_overrides: + win32: ^6.0.1 + flutter_launcher_icons: android: true ios: true