-
Notifications
You must be signed in to change notification settings - Fork 619
feat: apply rule @typescript-eslint/explicit-member-accessibility #3250
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
a2780dd to
d54b6f5
Compare
d54b6f5 to
bc3dd6c
Compare
bc3dd6c to
663d92b
Compare
|
This package does not have an assigned component owner and is considered unmaintained. As such this package is in feature-freeze and this PR will be closed with 14 days unless a new owner or a sponsor (a member of @open-telemetry/javascript-approvers) for the feature is found. It is the responsibility of the author to find a sponsor for this feature. |
| private readonly DEFAULT_CGROUP_V2_PATH = '/proc/self/mountinfo'; | ||
| private readonly UTF8_UNICODE = 'utf8'; | ||
| private readonly HOSTNAME = 'hostname'; | ||
| private readonly MARKING_PREFIX = ['containers', 'overlay-containers']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup, looks like those constants aren't used here and are already being exported in utils.
JamieDanielson
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be marked as breaking since there are some private modifiers being added in where they weren't previously?
pichlermarc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good overall, but I think we may have to undo the changes from public to private in packages/resource-detector-aws, as the package is already stable.
|
There are opentelemetry-js-contrib/packages/resource-detector-aws/src/detectors/AwsBeanstalkDetector.ts Line 92 in efc2c8d
|
pichlermarc
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are
_prefixed methods inpackages/resource-detector-awswith implicitpublicaccessibility. Should we mark these methods asprivate?opentelemetry-js-contrib/packages/resource-detector-aws/src/detectors/AwsBeanstalkDetector.ts
Line 92 in efc2c8d
async _gatherData(): Promise<DetectedResourceAttributes> {
Looking into this again, it looks like the classes themselves are actually not exported. Only instances of it are, which makes adding private have less impact overall. So I think it'd be okay to describe this as a type-level bugfix use private here (current diff). 🙂
Note: I did this (making them as private) in #3242 because I knew it was an experimental package and it would end up in the breaking change section. I think the safest would be to use explicit public instead of private in this PR. Then in a second PR we can change methods that were intended as private methods to be actually private as a fix!:. This way the changelog will explicitly points it out as a breaking change. The version is then also auto-incremented as if we had merged a feat:. We could in that PR also leave the AWS detectors as-is (with the "incorrect" public modifiers) and wait for 3.0 to make them private.
Though I'm not convinced I would be worth the effort. So I'm actually okay with going as it is now 👍
|
Actually, I think it makes sense to revert the |
Which problem is this PR solving?
Short description of the changes
Given that applying the
privateaccess modifier could be a potential breaking change, this does not apply the rule to every package to reduce the burden of reviewers.@typescript-eslint/explicit-member-accessibilityto (non-instrumentation) packages (less changes).