Skip to content

Commit

Permalink
feat(core): add support for node.js v17 and upgrade to @loopback/cli v3
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
drop support for node.js v10

gh-0
  • Loading branch information
Samarpan Bhattacharya authored and Samarpan Bhattacharya committed Dec 26, 2021
1 parent 9b7032a commit 4115b6c
Show file tree
Hide file tree
Showing 42 changed files with 137,561 additions and 284,036 deletions.
21 changes: 21 additions & 0 deletions DEVELOPING.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,10 @@ This document describes how to develop microservices living in loopback4-microse
- [Building the project](#building-the-project)
- [File naming convention](#file-naming-convention)
- [Develop a new microservice](#develop-a-new-microservice)
- [How to upgrade to new LB4 dependencies](#how-to-upgrade-to-new-lb4-dependencies)
- [Sonar Setup in VS Code](#sonar-setup-in-vs-code)
- [Commit message guidelines](#commit-message-guidelines)
- [Husky setup for commit hooks](#husky-setup-for-commit-hooks)

## Setting up development environment

Expand Down Expand Up @@ -339,6 +341,25 @@ this.html = this.html.replace(/\$\{basePath\}/g, process.env.BASE_PATH ?? '');

Create home-page.controller.ts if not already there.

## How to upgrade to new LB4 dependencies

1. Upgrade LB4 CLI version first. Use `npm i -g @loopback/cli@latest`.
2. Run `npm i` at project root. This step is mandatory if node.js or npm version support is also needed to upgrade.
3. Upgrade any deps, if needed, at project root. Verify it in the package.json at root. If not needed, skip this step.
4. Navigate to core package. `cd packages/core`.
5. Run `lb4 update`. It will prompt you to confirm the deps upgrade. Verify it carefully and confirm. Let it overwrite package.json.
6. There may be some errors in previous step if there are any breaking changes coming in. If that's so, then, delete package-lock.json and run `npm i` again.
7. Upgrade any other package related, like, loopback4 extensions - loopback4-authentication, etc. In order to ensure upgrade works, all the extensions should support the upgraded LB4 version. For example, `npm i loopback4-authentication@latest loopback4-authorization@latest loopback4-soft-delete@latest tslib@latest loopback-connector-postgresql@latest`.
8. Run `npm audit fix`, if needed.
9. Run `npm run test` to validate upgrade.
10. Now, navigate to individual services. `cd ../../services/audit-service`.
11. Re-execute steps 5-8 again.
12. Before doing test, we need to update the `@sourceloop/core` with local symlinked package. Run `lerna bootstrap --force-local --scope=@sourceloop/audit-service`.
13. Now run `npm run test` to validate upgrade.
14. Repeat steps 10-13 for each service.

After all the steps above done for all services and core package, all your deps are upgraded and tested. You can commit and push them to be released. Make sure to mention any breaking changes if any of the deps upgrade had breaking change.

## Sonar Setup in VS Code

1. Go to [Sonar Cloud](https://sonarcloud.io/)
Expand Down
4 changes: 2 additions & 2 deletions lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"command": {
"bootstrap": {
"concurrency": 4,
"forceLocal": true,
"ignore": [
"@sourceloop/audit-ms-example",
"@sourceloop/auth-ms-basic-example",
Expand All @@ -36,7 +35,8 @@
"conventionalCommits": true,
"message": "chore: publish release",
"allowBranch": "master",
"noPrivate": true
"noPrivate": true,
"graphType": "all"
},
"run": {
"concurrency": 1,
Expand Down
Loading

0 comments on commit 4115b6c

Please sign in to comment.