Skip to content

Commit 4115b6c

Browse files
Samarpan  BhattacharyaSamarpan  Bhattacharya
authored andcommitted
feat(core): add support for node.js v17 and upgrade to @loopback/cli v3
BREAKING CHANGE: drop support for node.js v10 gh-0
1 parent 9b7032a commit 4115b6c

42 files changed

Lines changed: 137561 additions & 284036 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

DEVELOPING.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,10 @@ This document describes how to develop microservices living in loopback4-microse
77
- [Building the project](#building-the-project)
88
- [File naming convention](#file-naming-convention)
99
- [Develop a new microservice](#develop-a-new-microservice)
10+
- [How to upgrade to new LB4 dependencies](#how-to-upgrade-to-new-lb4-dependencies)
1011
- [Sonar Setup in VS Code](#sonar-setup-in-vs-code)
1112
- [Commit message guidelines](#commit-message-guidelines)
13+
- [Husky setup for commit hooks](#husky-setup-for-commit-hooks)
1214

1315
## Setting up development environment
1416

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

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

344+
## How to upgrade to new LB4 dependencies
345+
346+
1. Upgrade LB4 CLI version first. Use `npm i -g @loopback/cli@latest`.
347+
2. Run `npm i` at project root. This step is mandatory if node.js or npm version support is also needed to upgrade.
348+
3. Upgrade any deps, if needed, at project root. Verify it in the package.json at root. If not needed, skip this step.
349+
4. Navigate to core package. `cd packages/core`.
350+
5. Run `lb4 update`. It will prompt you to confirm the deps upgrade. Verify it carefully and confirm. Let it overwrite package.json.
351+
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.
352+
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`.
353+
8. Run `npm audit fix`, if needed.
354+
9. Run `npm run test` to validate upgrade.
355+
10. Now, navigate to individual services. `cd ../../services/audit-service`.
356+
11. Re-execute steps 5-8 again.
357+
12. Before doing test, we need to update the `@sourceloop/core` with local symlinked package. Run `lerna bootstrap --force-local --scope=@sourceloop/audit-service`.
358+
13. Now run `npm run test` to validate upgrade.
359+
14. Repeat steps 10-13 for each service.
360+
361+
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.
362+
342363
## Sonar Setup in VS Code
343364

344365
1. Go to [Sonar Cloud](https://sonarcloud.io/)

lerna.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
"command": {
1212
"bootstrap": {
1313
"concurrency": 4,
14-
"forceLocal": true,
1514
"ignore": [
1615
"@sourceloop/audit-ms-example",
1716
"@sourceloop/auth-ms-basic-example",
@@ -36,7 +35,8 @@
3635
"conventionalCommits": true,
3736
"message": "chore: publish release",
3837
"allowBranch": "master",
39-
"noPrivate": true
38+
"noPrivate": true,
39+
"graphType": "all"
4040
},
4141
"run": {
4242
"concurrency": 1,

0 commit comments

Comments
 (0)