Repository navigation
Conversation
|
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 includes several dependency updates, codebase improvements for asynchronous operations, and enhancements to test coverage and reliability. The main changes focus on upgrading dependencies for security and compatibility, optimizing asynchronous logic for better performance and clarity, and making test assertions more robust.
Dependency Upgrades:
package.json, includingexpressto5.3.0,express-rate-limit,graphql-http,moment,mongodb,mongoose,pino,pino-pretty,switcher-client,eslint,jest,node-notifier, andsupertestto their latest minor or patch versions.sonarsource/sonarqube-scan-actionGitHub Action tov8.3.0in both.github/workflows/master.ymland.github/workflows/sonar.yml. [1] [2]Asynchronous Code Improvements:
Promise.allfor parallel processing insrc/helpers/cache/index.jsandsrc/helpers/cache/worker.js, improving performance and code clarity. [1] [2]resolveComponentsFirst(insrc/aggregator/resolvers.js) to usePromise.allfor counting configs, reducing sequential awaits and simplifying group filtering.voidto fire-and-forget async calls (e.g.,metric.save(),get, andpostinsrc/models/metric.jsandsrc/services/relay.js) to clarify intent and avoid unhandled promise rejections. [1] [2]voidfor the mongoose connection insrc/db/mongoose.jsto avoid unhandled promise warnings.Test Enhancements:
tests/client-api.test.js,tests/client-api-cached.test.js,tests/client-api-cached-payload.test.js,tests/client-api-payload.test.js) by capturing responses and asserting thatresponse.bodyis defined after error cases, ensuring better test reliability and coverage. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15]Configuration Cleanup:
.vscode/settings.json, likely as part of configuration cleanup.Cache Logic Refactoring:
src/helpers/cache/worker.jsto return update objects directly fromupdateDomainCacheSnapshotand filter out nulls, simplifying the flow and error handling.These changes collectively improve the project's maintainability, test reliability, and performance.