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

Allow to provide custom store management engines. #583

Open
diegocr opened this issue Apr 5, 2023 · 2 comments
Open

Allow to provide custom store management engines. #583

diegocr opened this issue Apr 5, 2023 · 2 comments

Comments

@diegocr
Copy link

diegocr commented Apr 5, 2023

Currently, the only provided stores are memory and leveldb which are not extensible, and developing new ones requires those to be published under this repository maintenance.

const packageName = '@jscpd/' + storeName + '-store';

I would like to suggest the ability to provide a custom-made store engine, similar to the way eslint-plugin-local-rules does work.

i.e. my idea is that through the --store command line option (and/or config file) we can provide a path to a JS file to be loaded and used as store, overriding the default MemoryStore.

Thoughts?

Would you accept a PR implementing such feature?

@kucherenko
Copy link
Owner

Thank you for the request, will try to add new way to add stores

@diegocr
Copy link
Author

diegocr commented Apr 9, 2023

Thanks, don't hesitate to take my offer of providing this feature myself if you want :)

Btw, i think it will be good turning the close() method async as well, so that stores may does decide to flush to disk at that stage.

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

No branches or pull requests

2 participants