From c1cd6b9b94d482688e4097d32aa78a14c38cc437 Mon Sep 17 00:00:00 2001 From: Dustin Brett Date: Fri, 27 Jun 2025 21:27:47 -0700 Subject: [PATCH] Pkg upgrades --- components/apps/Webamp/functions.ts | 12 +++-- components/apps/Webamp/useWebamp.ts | 13 +++-- .../Files/FileManager/useFolderContextMenu.ts | 5 +- package.json | 10 ++-- yarn.lock | 53 ++++++++++--------- 5 files changed, 52 insertions(+), 41 deletions(-) diff --git a/components/apps/Webamp/functions.ts b/components/apps/Webamp/functions.ts index e4bd0897..3727e96e 100644 --- a/components/apps/Webamp/functions.ts +++ b/components/apps/Webamp/functions.ts @@ -107,29 +107,33 @@ export const cleanBufferOnSkinLoad = ( if (url) cleanUpBufferUrl(url); }); -export const closeEqualizer = (webamp: WebampCI): void => +export const closeEqualizer = (webamp: WebampCI): void => { webamp.store.dispatch({ type: "CLOSE_WINDOW", windowId: "equalizer", }); +}; -export const enabledMilkdrop = (webamp: WebampCI): void => +export const enabledMilkdrop = (webamp: WebampCI): void => { webamp.store.dispatch({ open: false, type: "ENABLE_MILKDROP", }); +}; -export const setSkinData = (webamp: WebampCI, data: SkinData): void => +export const setSkinData = (webamp: WebampCI, data: SkinData): void => { webamp.store.dispatch({ data, type: "SET_SKIN_DATA", }); +}; -const loadButterchurn = (webamp: WebampCI, butterchurn: unknown): void => +const loadButterchurn = (webamp: WebampCI, butterchurn: unknown): void => { webamp.store.dispatch({ butterchurn, type: "GOT_BUTTERCHURN", }); +}; const loadButterchurnPresets = ( webamp: WebampCI, diff --git a/components/apps/Webamp/useWebamp.ts b/components/apps/Webamp/useWebamp.ts index 9af5c33d..a657b8b6 100644 --- a/components/apps/Webamp/useWebamp.ts +++ b/components/apps/Webamp/useWebamp.ts @@ -212,13 +212,16 @@ const useWebamp = (id: string): Webamp => { const updateTrackInfo = async (): Promise => { const { display: { closed = false } = {}, - playlist: { currentTrack = -1 } = {}, + playlist: { currentTrack } = {}, tracks, } = webamp.store.getState() || {}; if (closed) { window.clearInterval(metadataProviderRef.current); - } else if (tracks[currentTrack]) { + } else if ( + typeof currentTrack === "number" && + tracks[currentTrack] + ) { const metaData = await getMetadata?.(); if (metaData) { @@ -238,10 +241,12 @@ const useWebamp = (id: string): Webamp => { 30 * MILLISECONDS_IN_SECOND ); } else { - const { playlist: { currentTrack = -1 } = {}, tracks } = + const { playlist: { currentTrack } = {}, tracks } = webamp.store.getState() || {}; const { artist = "", title: trackTitle = "" } = - tracks?.[currentTrack] || {}; + typeof currentTrack === "number" + ? tracks?.[currentTrack] || {} + : {}; if (trackTitle || artist) { title( diff --git a/components/system/Files/FileManager/useFolderContextMenu.ts b/components/system/Files/FileManager/useFolderContextMenu.ts index 2ffe6bc1..d731b90d 100644 --- a/components/system/Files/FileManager/useFolderContextMenu.ts +++ b/components/system/Files/FileManager/useFolderContextMenu.ts @@ -38,11 +38,12 @@ import { } from "utils/functions"; import { getMountUrl, isMountedFolder } from "contexts/fileSystem/core"; -const stopGlobalMusicVisualization = (): void => +const stopGlobalMusicVisualization = (): void => { window.WebampGlobal?.store.dispatch({ enabled: false, type: "SET_MILKDROP_DESKTOP", }); +}; const NEW_FOLDER = "New folder"; const NEW_TEXT_DOCUMENT = "New Text Document.txt"; @@ -463,7 +464,7 @@ const useFolderContextMenu = ( { action: () => { if (isMusicVisualizationRunning) { - stopGlobalMusicVisualization?.(); + stopGlobalMusicVisualization(); } setWallpaper(item.id); }, diff --git a/package.json b/package.json index 72b265ab..dff1bd02 100644 --- a/package.json +++ b/package.json @@ -60,18 +60,18 @@ "gif.js": "^0.2.0", "idb": "^8.0.3", "ini": "^5.0.0", - "isomorphic-git": "^1.31.1", + "isomorphic-git": "^1.32.0", "libheif-js": "^1.19.8", "mediainfo.js": "0.3.5", "minimist": "^1.2.8", - "motion": "^12.19.1", + "motion": "^12.19.2", "multiformats": "^13.3.7", "music-metadata-browser": "^2.5.11", "next": "^15.3.4", "nostr-tools": "^1.17.0", "opentype.js": "^1.3.4", "playlist-parser": "^0.0.12", - "prettier": "^3.6.1", + "prettier": "^3.6.2", "print-js": "^1.6.0", "quickjs-emscripten": "^0.31.0", "react": "^19.1.0", @@ -97,7 +97,7 @@ "@types/jest": "^30.0.0", "@types/lunr": "^2.3.7", "@types/minimist": "^1.2.5", - "@types/node": "^24.0.4", + "@types/node": "^24.0.6", "@types/offscreencanvas": "^2019.7.3", "@types/opentype.js": "^1.3.8", "@types/react": "^19.1.8", @@ -125,7 +125,7 @@ "eslint-plugin-react-hooks": "^5.2.0", "eslint-plugin-react-hooks-addons": "^0.5.0", "eslint-plugin-regexp": "^2.9.0", - "eslint-plugin-sonarjs": "^3.0.3", + "eslint-plugin-sonarjs": "^3.0.4", "eslint-plugin-sort-keys-fix": "^1.1.2", "eslint-plugin-typescript-sort-keys": "^3.3.0", "eslint-plugin-unicorn": "^56.0.1", diff --git a/yarn.lock b/yarn.lock index 1f653fd4..23e69478 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1681,10 +1681,10 @@ dependencies: undici-types "~6.19.2" -"@types/node@^24.0.4": - version "24.0.4" - resolved "https://registry.yarnpkg.com/@types/node/-/node-24.0.4.tgz#dbae889912bda33a7f57669fb8587c1a56bc0c1f" - integrity sha512-ulyqAkrhnuNq9pB76DRBTkcS6YsmDALy6Ua63V8OhrOBgbcYt6IOdzpw5P1+dyRIyMerzLkeYWBeOXPpA9GMAA== +"@types/node@^24.0.6": + version "24.0.6" + resolved "https://registry.yarnpkg.com/@types/node/-/node-24.0.6.tgz#d483f1407d022ef2a12118f7c02074ca218346c3" + integrity sha512-ZOyn+gOs749xU7ovp+Ibj0g1o3dFRqsfPnT22C2t5JzcRvgsEDpGawPbCISGKLudJk9Y0wiu9sYd6kUh0pc9TA== dependencies: undici-types "~7.8.0" @@ -4414,16 +4414,17 @@ eslint-plugin-regexp@^2.9.0: regexp-ast-analysis "^0.7.1" scslre "^0.3.0" -eslint-plugin-sonarjs@^3.0.3: - version "3.0.3" - resolved "https://registry.yarnpkg.com/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-3.0.3.tgz#4428fff61c1130e1923c96630af2d044c29eb16c" - integrity sha512-/UrTz8wyTW0MQVJKUF70vSjsMMf54+0cKHWAuYObuE82vNM8zrscm0wvZprolHNN0PIdnvVQ9Dm6MQkIzOKu4A== +eslint-plugin-sonarjs@^3.0.4: + version "3.0.4" + resolved "https://registry.yarnpkg.com/eslint-plugin-sonarjs/-/eslint-plugin-sonarjs-3.0.4.tgz#c33c09c128b5861b4a55a1517c27d4ff5d707b51" + integrity sha512-ftQcP811kRJNXapqpQXHErEoVOdTPfYPPYd7n3AExIPwv4qWKKHf4slFvXmodiOnfgy1Tl3waPZZLD7lcvJOtw== dependencies: "@eslint-community/regexpp" "4.12.1" builtin-modules "3.3.0" bytes "3.1.2" functional-red-black-tree "1.0.1" jsx-ast-utils "3.3.5" + lodash.merge "4.6.2" minimatch "9.0.5" scslre "0.3.0" semver "7.7.2" @@ -4869,10 +4870,10 @@ frac@~1.1.2: resolved "https://registry.yarnpkg.com/frac/-/frac-1.1.2.tgz#3d74f7f6478c88a1b5020306d747dc6313c74d0b" integrity sha512-w/XBfkibaTl3YDqASwfDUqkna4Z2p9cFSr1aHDt0WoMTECnRfBOv2WArlZILlqgWlmdIlALXGpM2AOhEk5W3IA== -framer-motion@^12.19.1: - version "12.19.1" - resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-12.19.1.tgz#1d078c04d2ef15bec180cd3573218fad1f4ee871" - integrity sha512-nq9hwWAEKf4gzprbOZzKugLV5OVKF7zrNDY6UOVu+4D3ZgIkg8L9Jy6AMrpBM06fhbKJ6LEG6UY5+t7Eq6wNlg== +framer-motion@^12.19.2: + version "12.19.2" + resolved "https://registry.yarnpkg.com/framer-motion/-/framer-motion-12.19.2.tgz#19e7f0ccff98c769ba2cafff24ba97d1bb6701a5" + integrity sha512-0cWMLkYr+i0emeXC4hkLF+5aYpzo32nRdQ0D/5DI460B3O7biQ3l2BpDzIGsAHYuZ0fpBP0DC8XBkVf6RPAlZw== dependencies: motion-dom "^12.19.0" motion-utils "^12.19.0" @@ -5827,10 +5828,10 @@ isexe@^2.0.0: resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== -isomorphic-git@^1.31.1: - version "1.31.1" - resolved "https://registry.yarnpkg.com/isomorphic-git/-/isomorphic-git-1.31.1.tgz#475e1f352eb0b4dfa7e8b0475991acee36e51c04" - integrity sha512-aQ2fg2Qf69Abhu4C3WkRDhr5WcY40mQpIALC2+HTJjeyKlKT/7pXm9KUEtcCbR6TnLxmzOO98IFQvkY6cBIzaw== +isomorphic-git@^1.32.0: + version "1.32.0" + resolved "https://registry.yarnpkg.com/isomorphic-git/-/isomorphic-git-1.32.0.tgz#f6f28bba40521784b1f8c6b025f1a95d2555135d" + integrity sha512-opbs9B00JcXZRmCFB8oxCIKsmshtfmWh89lHu+2qZZFF6599KNn3aRuhsDlA1YiAtvZXK85LW6MCLPxmNhGIAw== dependencies: async-lock "^1.4.1" clean-git-ref "^2.0.1" @@ -6599,7 +6600,7 @@ locate-path@^6.0.0: dependencies: p-locate "^5.0.0" -lodash.merge@^4.6.2: +lodash.merge@4.6.2, lodash.merge@^4.6.2: version "4.6.2" resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== @@ -6855,12 +6856,12 @@ motion-utils@^12.19.0: resolved "https://registry.yarnpkg.com/motion-utils/-/motion-utils-12.19.0.tgz#a7cc102f756e97093793cac7c218533d3b27f509" integrity sha512-BuFTHINYmV07pdWs6lj6aI63vr2N4dg0vR+td0rtrdpWOhBzIkEklZyLcvKBoEtwSqx8Jg06vUB5RS0xDiUybw== -motion@^12.19.1: - version "12.19.1" - resolved "https://registry.yarnpkg.com/motion/-/motion-12.19.1.tgz#f37b1d48f392cd4293d6a322d85518a25cc9879e" - integrity sha512-OhoHWrht+zwDPccr2wGltJdwgz2elFBBt/sLei2g0hwICvy2hOBFUkA4Ylup3VnDgz+vUtecf694EV7bJK4XjA== +motion@^12.19.2: + version "12.19.2" + resolved "https://registry.yarnpkg.com/motion/-/motion-12.19.2.tgz#d0cfcf2ec78a27a05ea03c8d06d729cb7f6d728f" + integrity sha512-Yb69HXE4ryhVd1xwpgWMMQAQgqEGMSGWG+NOumans2fvSCtT8gsj8JK7jhcGnc410CLT3BFPgquP67zmjbA5Jw== dependencies: - framer-motion "^12.19.1" + framer-motion "^12.19.2" tslib "^2.4.0" mrmime@^2.0.0: @@ -7547,10 +7548,10 @@ prelude-ls@^1.2.1: resolved "https://registry.yarnpkg.com/prelude-ls/-/prelude-ls-1.2.1.tgz#debc6489d7a6e6b0e7611888cec880337d316396" integrity sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g== -prettier@^3.6.1: - version "3.6.1" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.1.tgz#cc3bce21c09a477b1e987b76ce9663925d86ae44" - integrity sha512-5xGWRa90Sp2+x1dQtNpIpeOQpTDBs9cZDmA/qs2vDNN2i18PdapqY7CmBeyLlMuGqXJRIOPaCaVZTLNQRWUH/A== +prettier@^3.6.2: + version "3.6.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.6.2.tgz#ccda02a1003ebbb2bfda6f83a074978f608b9393" + integrity sha512-I7AIg5boAr5R0FFtJ6rCfD+LFsWHp81dolrFD8S79U9tb8Az2nGrJncnMSnys+bpQJfRUzqs9hnA81OAA3hCuQ== pretty-format@30.0.0, pretty-format@^30.0.0: version "30.0.0"