Repository navigation
Upgrade to Node 24 and modernize Pub/Sub dependencies and tooling - #51
vikram-ecobee wants to merge 5 commits into
Conversation
Update NestJS and Google Cloud Pub/Sub dependencies, migrate publishing to the supported API, replace snapshots with focused assertions, and refresh Jest and Husky tooling. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Code Review
This pull request updates the package dependencies, upgrading NestJS to version 11, @google-cloud/pubsub to version 6, and targeting ES2022. It also refactors the server tests to use fake timers instead of snapshots and migrates the publishing logic to use publishMessage. Feedback on these changes highlights that the newly added private eventEmitter and custom on method in GCloudPubSubServer are redundant and break the base Server class's event contract. Additionally, the unwrap method should return the underlying PubSub client (this.client) instead of this.subscriptions to conform to NestJS microservice conventions.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #51 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 4 4
Lines 82 120 +38
Branches 9 17 +8
=========================================
+ Hits 82 120 +38 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Forward listeners to subscriptions instead of an unused emitter and expose the initialized Pub/Sub client through unwrap. Add regression coverage for both registration orders and client access. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Exercise sync and async registration, custom and default options, injected dependencies, useClass/useExisting, and factory failures. Include untested production files in coverage and forward async module imports to fix the uncovered dependency resolution bug. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Enable source maps and inline sources in the ts-jest transform so coverage maps to original TypeScript instead of generated decorator helpers. Production compiler output is unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Summary
Topic.publish()withTopic.publishMessage({ data, attributes }), preserving the public API.Validation
npm ciand package build pass on Node 24.20.0.reports/jest/results.xml.git diff --checkpass.Remaining considerations
npm auditreports 20 moderate findings tracing to thesprintf-jschain in Jest's coverage tooling. The suggested forced ts-jest downgrade was intentionally not applied.