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

feat(Store): Implement Store #72

Merged
merged 43 commits into from
Mar 15, 2020
Merged

feat(Store): Implement Store #72

merged 43 commits into from
Mar 15, 2020

Conversation

Khaaz
Copy link
Owner

@Khaaz Khaaz commented Mar 14, 2020

PULL REQUEST

Overview

This PR implements Store DataStructure.
This structure brings all utility function to manipulate Key => Value structures in one place.
This also correctly separate data manipulation function from the actual cache holder. It now appears under the cache property in Store.
A Store is iterable, and you can apply get, set, delete, has (along with all others utility) functions directly on it.

Store is used in all registries directly. By extension, registries are iterable and you can use all Store methods directly on it.
Collection is just a Store that use a Map and enforce a particular type of object to be used.

Why Store, Why not directly extending Map?

  • Store can be used with any Key-Value store that implements has, get, set, delete, and keys, values, entries.
  • Store allow to entirely separate the utility function from the actual storage
  • Store prevent from overriding Map methods.
  • Extending Store (eg: for registries) is fine since we can easily override specific methods. We also keep separation between the Structure that handles the data and the structure that holds the data.

Status

  • Typings have been updated or don't need to be.
  • This PR have been tested and is ready to be merged.

Semantic versioning classification

  • This PR introduces BREAKING changes.
  • This PR adds new features, improve the code and implies minimal changes.
  • This PR fixes a bug and references the relevant issue or documentation.
  • This PR improve performance or code refactor without API changes.
  • This PR only includes non-code changes (documentation, CI, tools...).

@Khaaz Khaaz added enhancement and removed roadmap labels Mar 14, 2020
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
Khaaz and others added 4 commits March 14, 2020 20:36
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
src/Utility/Store.js Outdated Show resolved Hide resolved
Khaaz and others added 2 commits March 14, 2020 20:37
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
Khaaz and others added 2 commits March 15, 2020 00:24
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
src/Utility/Store.js Outdated Show resolved Hide resolved
src/Utility/Collection.js Outdated Show resolved Hide resolved
src/Utility/Store.js Outdated Show resolved Hide resolved
Khaaz and others added 7 commits March 15, 2020 17:01
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
Co-Authored-By: bsian03 <bsian@staff.libraryofcode.us>
bsian03 added a commit to bsian03/AxonCore that referenced this pull request Mar 15, 2020
@Khaaz Khaaz merged commit 2df8eff into dev Mar 15, 2020
@Khaaz Khaaz deleted the stores branch March 15, 2020 16:21
@Khaaz Khaaz mentioned this pull request Mar 19, 2020
7 tasks
Khaaz pushed a commit that referenced this pull request Mar 20, 2020
* Enum documentation fixes

* Lint types folder (soon)

* Split typings

* Codefactor

* Removed unnecessary overload. Try and link #58 to PR?

* Should fix CI

* Reflect correction in 27d7d9c

* Added library typings

* Add rest of typings

* Typo

* Finished rest of library typings, bug fixes etc

* Export file, bug fixes, typos etc

* Typings change

* Naming typos

* Attempt 2

* b85c399, 22610d8 and df13457 reflections

* b854f61 reflections

* b8f415f reflections

* 9139554 reflections

* 7631742 reflections

* b0563ac reflections

* 95c586c reflections and bug fixes from previous commit

* 6296f7c reflections

* 21b3014 reflections

* 21b3014 reflections

* 38d7b34 reflections

* Added WinstonLogger

* Lint

* Don't emit file outputs on tsc check

* Add updateDBVal type

* Changed name

* Add path references

* fix

* Fix the damn CI

* Correct path

* 37a4838 and previous reflections

* f0978c2 reflections

* #64 reflections

* Clear warnings from e69bf1c

* 3ff2100 reflections

* e5bcc33 reflections

* Confirmed typo

* #65 reflections

* Rename

* #67 reflections

* Remove unused imports

* Added Library selector postinstall script, needs testing

* Remove language check/selection

* Remove variable in global

* Constant

* Move to scripts folder

* Exit process if CI detected

* Add CI env vars

* #69 reflections

* Added name to dep install and test

* Consistency

* #72 reflections

* Add first and sweep methods

* Test something

* Fix pathing

* Trying something...

* module declaration?

* Fix typings

* Return `this` where appropriate

* Save json only if invalid config

* Bump events to 13.9.2

* #70 reflections

* #66 reflections

* 0af8a88 reflections

* #73 reflections

* 061de33 reflections
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants