-
Notifications
You must be signed in to change notification settings - Fork 3
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
Integrate lerna #3
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
@DaTebe, @anatoliynovo
This PR brings massive refactoring to our core services and introduces lerna as a management tool for the dependencies. I'll give a brief introduction here. The details will be captured in the docs.
You have to use lerna for dependency management and linking to local common packages.
Install lerna globally with
npm i -g lerna
or use it throughnpx lerna ...
lerna manages packages in a sub directory (⚠️ So the working directory for lerna commands is ⚠️
/packages
by default),core/services/
in our case. Therefore, lerna config file andpackage.json
are located incore/
.core
To install all dependencies run
lerna bootstrap --hoist
. This command installs deps for all services and hoists common packages incore/node_modules
.For specific service run
lerna bootstrap --hoist --scope=<service-name>
To add a dependency:
lerna add <package-name> [--scope=<service-name>]
To remove
node_modules
:lerna clean [--scope=<service-name>]
install
will fail as@diva/common
package is not in any registry nowTo run the service you can use lerna or just normally execute the npm scripts
So what has changed:
@diva/common
. These includes express server setup, JSON schema validation, Kafka messages validation and messaging in general, connections with Mongo and Elasticsearch, CRUD operations on entities and other frequently used utilities. These modules were rewritten to be flexible and generalized as possible.@diva/eslint-config
. All service use this configWe need a strong testing and debugging on this as many things have changed and i have not tested every single endpoint yet.