Skip to content

Conversation

@Koenkk
Copy link
Owner

@Koenkk Koenkk commented Oct 1, 2025

Remove dependency on Moment.js as it's considered legacy and we can easily replace the functionality that is used with a simple function.

This is potentially breaking as we don't support all tokens supported by Moment.js (but I don't expect it's used). Let's add more once we find users using it.

@Koenkk Koenkk requested review from Nerivec and Copilot October 1, 2025 20:30
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 removes the Moment.js dependency from the codebase and replaces it with a custom formatTimestamp function to reduce bundle size and eliminate reliance on a legacy library.

Key changes:

  • Implemented a lightweight formatTimestamp function that supports common date formatting tokens
  • Replaced all Moment.js usage in the logger with the new function
  • Added comprehensive test coverage for the new formatting function

Reviewed Changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
package.json Removes the moment dependency from the project
lib/util/utils.ts Adds the new formatTimestamp function implementation
lib/util/logger.ts Replaces moment calls with the new formatTimestamp function
test/utils.test.ts Adds comprehensive test cases for the new formatting function
test/utils.bench.ts Adds performance benchmark tests for the new function
Files not reviewed (1)
  • pnpm-lock.yaml: Language not supported

@Nerivec Nerivec force-pushed the fix/remove-moment branch from cbc4a92 to 09cda8e Compare October 6, 2025 15:33
@Koenkk Koenkk merged commit 74335fb into dev Oct 6, 2025
14 checks passed
@Koenkk Koenkk deleted the fix/remove-moment branch October 6, 2025 18:06
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.

4 participants