Skip to content
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

Redesign meta #7

Merged
merged 36 commits into from
Mar 7, 2024
Merged

Redesign meta #7

merged 36 commits into from
Mar 7, 2024

Conversation

aedart
Copy link
Owner

@aedart aedart commented Mar 7, 2024

PR contains a refactored / redesigned version the util functions offered by @aedart/support/meta. A new MetaRepository and TargetMetaRepository are now used underneath. The API has not changed¹.

¹: targetMeta() and inheritTargetMeta() now throw MetaError instead of previous TypeError. This should have a low impact, because both utils are intended to be used as class and class method decorators.

Details

Details are available in the CHANGELOG.md.

aedart added 30 commits March 6, 2024 08:52
Now it should correspond to the value that a decorator will return.
Well... it seems that both target and context must be specified this way, to ensure that previous solution is respected. Not sure if this should be abstracted away from the Repository.
This should make it easier to describe the return value(s) for decorator related utils.
This will allow reducing the "context" parameter for some of the internal helper methods.
A new Meta Repository class is now responsible for reading and writing metadata. This should make it a lot easier for other developers to create their own "meta" version, if needed.
aedart added 6 commits March 7, 2024 10:51
To be used by the "inheritTargetMeta()" util.
Added new TargetMetaRepository that handles the "targetMeta" logic. Furthermore, also added hasTargetMeta() util, and moved all target meta related components into the "target" sub-directory.
@aedart aedart added the enhancement New feature or request label Mar 7, 2024
@aedart aedart self-assigned this Mar 7, 2024
@aedart aedart merged commit 73b11c7 into main Mar 7, 2024
2 checks passed
@aedart aedart deleted the redesign-meta branch March 7, 2024 11:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant