Skip to content

Conversation

jaimellamasi
Copy link
Contributor

@jaimellamasi jaimellamasi commented Aug 2, 2025

Summary

Changes

This PR removes the legacy class-based EnvironmentVariablesService methods from the Logger package.

Issue number: closes #4116


By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@pull-request-size pull-request-size bot added the size/M PR between 30-99 LOC label Aug 2, 2025
@boring-cyborg boring-cyborg bot added the logger This item relates to the Logger Utility label Aug 2, 2025
Copy link

boring-cyborg bot commented Aug 2, 2025

Thanks a lot for your first contribution! Please check out our contributing guidelines and don't hesitate to ask whatever you need.
In the meantime, check out the #typescript channel on our Powertools for AWS Lambda Discord: Invite link

@pull-request-size pull-request-size bot added size/L PRs between 100-499 LOC and removed size/M PR between 30-99 LOC labels Aug 3, 2025
@boring-cyborg boring-cyborg bot added the tests PRs that add or change tests label Aug 3, 2025
@pull-request-size pull-request-size bot added size/XL PRs between 500-999 LOC, often PRs that grown with feedback and removed size/L PRs between 100-499 LOC labels Aug 5, 2025
@jaimellamasi
Copy link
Contributor Author

@dreamorosi I just pushed the changes to remove EnvironmentVariablesService from Logger. You will notice some assertion changed on the unit tests related to stack because of the behaviour of isDevMode() compared to this. envVarsService()?.isDevMode(). I am not 100% sure changes are good. I wait your feedback, thanks!

@dreamorosi
Copy link
Contributor

@dreamorosi I just pushed the changes to remove EnvironmentVariablesService from Logger. You will notice some assertion changed on the unit tests related to stack because of the behaviour of isDevMode() compared to this. envVarsService()?.isDevMode(). I am not 100% sure changes are good. I wait your feedback, thanks!

Sorry, GitHub was having issues and wasn't able to engage with the PR.

I have reviewed the PR and also ran the end to end tests which are passing. I am unsure why the previous tests were passing but the current assertions look correct to me.

Copy link

sonarqubecloud bot commented Aug 5, 2025

@dreamorosi dreamorosi self-requested a review August 5, 2025 16:53
Copy link
Contributor

@dreamorosi dreamorosi left a comment

Choose a reason for hiding this comment

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

Thank you so much for contributing this PR and helping making the project better for everyone!

We have a number of issues with similar complexity/scope (list), if you're interested in any of them please take a look!

@dreamorosi dreamorosi merged commit b2fcd90 into aws-powertools:main Aug 5, 2025
34 checks passed
Copy link

boring-cyborg bot commented Aug 5, 2025

Awesome work, congrats on your first merged pull request and thank you for helping improve everyone's experience!

@jaimellamasi jaimellamasi deleted the refactor/replace-env-service-by-helpers branch August 6, 2025 06:23
uttam282005 pushed a commit to uttam282005/powertools-lambda-typescript that referenced this pull request Aug 7, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
logger This item relates to the Logger Utility size/XL PRs between 500-999 LOC, often PRs that grown with feedback tests PRs that add or change tests
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintenance: replace EnvironmentVariablesService class with helper functions in Logger
3 participants