Repository navigation
Conversation
junland
marked this pull request as ready for review
November 26, 2026 15:53
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request replaces the
momentandmoment-timezonelibraries which are in maintenance mode withdayjs(and relevant plugins) throughout the control plane and EC2 runner code. This change modernizes date/time handling, reduces bundle size, and improves maintainability. All usages ofmomentfor date manipulation, timezone, and UTC handling have been refactored to usedayjs, and the necessary plugins (utc,timezone) are now initialized where needed.Note: This PR and its associated code was assisted with GitHub Copilot using the GPT-6 Luna model.
Dependency updates and replacements:
momentandmoment-timezonefrom dependencies inpackage.jsonfiles and addeddayjs(plus plugins) as a replacement. [1] [2] [3]Refactoring date/time logic:
momentto usedayjs(withutcandtimezoneplugins) in the following files:scale-down-config.ts,scale-down-config.test.ts,scale-down.ts,scale-down.test.ts, andrunners.ts. This includes logic for current time, time zone conversions, and date arithmetic. [1] [2] [3] [4] [5]moment(...).add(...),moment(...).subtract(...), andmoment(...).diff(...)with equivalentdayjsoperations. [1] [2] [3] [4] [5] [6] [7] [8] [9]Initialization of plugins:
dayjs.extend(utc)anddayjs.extend(timezone)are called at the top of relevant files to enable UTC and timezone support. [1] [2] [3] [4] [5]## DescriptionTest Plan
scale-downandscale-down-config.Related Issues
Closes #3435