Skip to content
This repository has been archived by the owner on Dec 24, 2024. It is now read-only.

fix: make all class properties private/protected with public getters #68

Merged
merged 7 commits into from
Jul 18, 2020

Conversation

homer0
Copy link
Owner

@homer0 homer0 commented Jul 18, 2020

What does this PR do?

As the title says; all classes' properties are now private/protected, with public getter in most cases; those properties that were for dependency injection, are not longer accessible from outside the class.

To be honest, I had EVERYTHING public, and that's hard to maintain because EVERYTHING you touch can potentially be a breaking change.

How should it be tested manually?

npm test
# or
yarn test

homer0 added 7 commits July 18, 2020 02:37
…tected

All the class properties are now private/protected, prefixed with an underscore; and while most of
them have public getters, properties for injected services don't.

BREAKING CHANGE: The properties for `.environmentUtils` and `rootRequire` are not longer accessible.
…d with public getters

Both `env` and `production` are now protected properties with public getters.
All the class properties are now private/protected, prefixed with an underscore; and while most of
them have public getters, properties for injected services don't.

BREAKING CHANGE: The properties for `.appLogger` and `.eventNames` are not longer accesible.
…lic getters

Both `messagesPrefix` and `showTime` are now protected properties with public getters.
…public getters

Both `locations` and `path` are now protected properties with public getters.
All the class properties are now private/protected, prefixed with an underscore, but with public
getters.

BREAKING CHANGE: The method `flattenEndpoints` was removed; it was just a wrapper for a call to
`ObjectUtils`.
@coveralls
Copy link

Pull Request Test Coverage Report for Build 173546713

  • 70 of 70 (100.0%) changed or added relevant lines in 7 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 100.0%

Totals Coverage Status
Change from base Build 173503796: 0.0%
Covered Lines: 809
Relevant Lines: 809

💛 - Coveralls

@homer0 homer0 merged commit f78a7e6 into next Jul 18, 2020
@homer0 homer0 deleted the homer0_private branch July 18, 2020 06:37
@homer0 homer0 added the on:next label Jul 18, 2020
@homer0 homer0 mentioned this pull request Jul 19, 2020
github-actions bot pushed a commit that referenced this pull request Jul 19, 2020
# [4.0.0](3.0.4...4.0.0) (2020-07-19)

### Bug Fixes

* add a package.json with the type 'module' on the ESM directory ([9e1521b](9e1521b))
* **node/logger:** use provider creators ([c2197a3](c2197a3))
* make all class properties private/protected with public getters ([f78a7e6](f78a7e6)), closes [#68](#68)
* **node/errorhandler:** use a provider creator ([b53b71e](b53b71e))
* migrate from ESDoc to JSDoc ([65ab6cd](65ab6cd))
* remove 'main' from package.json ([515165a](515165a))
* use 'named' exports on the folders' indexes ([1ce2f2c](1ce2f2c))
* **node:** remove the providers that no longer exist ([544c9e8](544c9e8))
* **node:** use provider creators ([7f54d4e](7f54d4e)), closes [#67](#67)
* **node/appconfiguration:** make all the class properties private/protected ([eab4cab](eab4cab))
* **node/appconfiguration:** use a provider creator ([ece3f9d](ece3f9d))
* **node/errorhandler:** make the properties private/protected ([82c7aa2](82c7aa2))
* **node/pathutils:** use a provider creator ([100fb44](100fb44))
* **shared/apiclient:** make the properties private/protected ([da216d3](da216d3))
* **shared/deepAssign:** use spread instead of .freeze ([bb8503c](bb8503c))

### Features

* add ESM version ([aebdab6](aebdab6)), closes [#61](#61)
* add the deepAssign module ([d766a49](d766a49)), closes [#63](#63)
* add the deepAssign module ([1e9247b](1e9247b))
* add the new Jimple wrappers ([67a8e6e](67a8e6e)), closes [#66](#66)
* add the new Jimple wrappers ([0afc6a3](0afc6a3))
* add warn alias for warning on the Logger ([38cf90c](38cf90c))
* fix the the types for the APIClient and validate with ts-check ([346449b](346449b))
* **node/environmentutils:** use a provider creator ([c6821f9](c6821f9))
* **node/packageInfo:** use a provider creator ([fe66556](fe66556))
* **node/rootRequire:** use a provider creator ([9da0d2f](9da0d2f))

### BREAKING CHANGES

* **shared/apiclient:** The method `flattenEndpoints` was removed; it was just a wrapper for a call to
`ObjectUtils`.
* **node/errorhandler:** The properties for `.appLogger` and `.eventNames` are not longer accesible.
* **node/appconfiguration:** The properties for `.environmentUtils` and `rootRequire` are not longer accessible.
* **node/logger:** The providers `loggerWithOptions` and `appLoggerWithOptions` were removed.
* **node/pathutils:** The provider `pathUtilsWithHome` doesn't exist anymore.
* **node/errorhandler:** The provider `errorHandlerWithOptions` doesn't exist anymore.
* **node/appconfiguration:** The `appConfiguration` function is now a provider creator and its signature changed
* The error method now adds the status to the returned error message
@github-actions
Copy link

🎉 This PR is included in version 4.0.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants