Skip to content

Conversation

@fabaindaiz
Copy link

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: Upgraded actions/checkout and actions/setup-node to version v4. [1] [2]
  • .github/workflows/publish.yml: Updated docker/login-action to v3 and replaced actions/checkout versions across jobs. [1] [2] [3]
  • .github/workflows/pr-release.yml, .github/workflows/pr-snapshot.yml: Changed REGISTRY_IMAGE to 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: Replaced make-dir with makeDirectory for improved readability and alignment with updated dependencies. [1] [2]
  • src/services/player.ts: Refactored getHashForCache to 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.
  • Removed unnecessary ESLint disable comments across several files for cleaner code. [1] [2] [3]

These updates collectively improve the project's maintainability, compatibility, and adherence to modern development practices.

@codetheweb
Copy link
Collaborator

codetheweb commented Jul 25, 2025

📦 🤖 A new release has been made for this pull request.

To play around with this PR, pull ghcr.io/museofficial/muse:pr-1279.

Images are available for x86_64 and ARM64.

Latest commit: 2ebfd71

@Xeravax Xeravax requested a review from Copilot August 12, 2025 14:31
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 makeDirectory instead of makeDir and async hash function

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 {
Copy link

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Empty catch block should include a parameter name even if unused, as per TypeScript best practices. Consider } catch (_error) { or } catch (error) {.

Suggested change
} catch {
} catch (_error) {

Copilot uses AI. Check for mistakes.
await interaction.reply({content: errorMsg(error as Error), ephemeral: true});
}
} catch {}
} catch {
Copy link

Copilot AI Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nitpick] Empty catch block should include a parameter name even if unused, as per TypeScript best practices. Consider } catch (_error) { or } catch (error) {.

Suggested change
} catch {
} catch (_error) {

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants