Conversation
📦 🤖 A new release has been made for this pull request.To play around with this PR, pull Images are available for x86_64 and ARM64.
|
There was a problem hiding this comment.
Pull Request Overview
This PR updates dependencies and modernizes the codebase to use newer versions of TypeScript, ESLint, Discord.js, and other packages. The changes include upgrading GitHub Actions workflows, updating package dependencies, and refactoring code to work with the updated libraries.
- Upgraded GitHub Actions versions for checkout, setup-node, and docker login actions
- Updated numerous dependencies including TypeScript 5.8.3, Discord.js 14.21.0, and ESLint 9.31.0
- Refactored code to use updated APIs like
makeDirectoryinstead ofmakeDirand asynchashfunction
Reviewed Changes
Copilot reviewed 16 out of 17 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated dev and runtime dependencies to latest versions |
| src/index.ts | Changed make-dir import to use makeDirectory function |
| src/services/player.ts | Updated hasha import and made getHashForCache async |
| src/utils/duration-string-to-seconds.ts | Added null check for parse result |
| eslint.config.js | Added new ESLint configuration file for updated ESLint version |
| Multiple workflow files | Upgraded GitHub Actions to v4 versions |
| Multiple source files | Removed eslint-disable comments |
| await interaction.respond([]); | ||
| return; | ||
| } catch {} | ||
| } catch { |
There was a problem hiding this comment.
[nitpick] Empty catch block should include a parameter name even if unused, as per TypeScript best practices. Consider } catch (_error) { or } catch (error) {.
| } catch { | |
| } catch (_error) { |
| await interaction.reply({content: errorMsg(error as Error), ephemeral: true}); | ||
| } | ||
| } catch {} | ||
| } catch { |
There was a problem hiding this comment.
[nitpick] Empty catch block should include a parameter name even if unused, as per TypeScript best practices. Consider } catch (_error) { or } catch (error) {.
| } catch { | |
| } catch (_error) { |
This pull request includes updates to modernize dependencies, improve workflows, and enhance code readability. Key changes include upgrading GitHub Actions versions, updating dependencies in
package.json, and refactoring code for better maintainability and clarity.Workflow Updates:
.github/workflows/lint.yml,.github/workflows/type-check.yml: Upgradedactions/checkoutandactions/setup-nodeto versionv4. [1] [2].github/workflows/publish.yml: Updateddocker/login-actiontov3and replacedactions/checkoutversions across jobs. [1] [2] [3].github/workflows/pr-release.yml,.github/workflows/pr-snapshot.yml: ChangedREGISTRY_IMAGEto use a new registry path (ghcr.io/fabaindaiz/muse). [1] [2]Dependency Updates:
package.json: Upgraded multiple dev and runtime dependencies, including@typescript-eslint,discord.js,typescript, and others to their latest versions for improved functionality and compatibility. [1] [2]Code Refactoring:
eslint.config.js: Added a new ESLint configuration with TypeScript-specific rules and basic JavaScript rules for improved linting.src/index.ts: Replacedmake-dirwithmakeDirectoryfor improved readability and alignment with updated dependencies. [1] [2]src/services/player.ts: RefactoredgetHashForCacheto be asynchronous and adjusted related calls for better caching logic. [1] [2] [3]Minor Enhancements:
src/bot.ts: Added comments to clarify error handling during interaction replies.These updates collectively improve the project's maintainability, compatibility, and adherence to modern development practices.