Skip to content

Commit fe6a620

Browse files
feat!: migrate to NestJS 10, move project to NX
This commit upgrades all packages to be compatible with NestJS 10. Also it is changed to use NX insted ad Lerna. Fix devonfw#527
1 parent 538d35a commit fe6a620

File tree

238 files changed

+8051
-8213
lines changed

Some content is hidden

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

238 files changed

+8051
-8213
lines changed

.eslintrc.js

-26
This file was deleted.

.eslintrc.json

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
"root": true,
3+
"ignorePatterns": ["**/*"],
4+
"plugins": ["@nx"],
5+
"overrides": [
6+
{
7+
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
8+
"rules": {
9+
"@nx/enforce-module-boundaries": [
10+
"error",
11+
{
12+
"enforceBuildableLibDependency": true,
13+
"allow": [],
14+
"depConstraints": [
15+
{
16+
"sourceTag": "*",
17+
"onlyDependOnLibsWithTags": ["*"]
18+
}
19+
]
20+
}
21+
]
22+
}
23+
},
24+
{
25+
"files": ["*.ts", "*.tsx"],
26+
"extends": ["plugin:@nx/typescript"],
27+
"rules": {
28+
"no-console": "error",
29+
"@typescript-eslint/explicit-function-return-type": "error",
30+
"@typescript-eslint/no-explicit-any": "off",
31+
"@typescript-eslint/no-non-null-assertion": "off"
32+
}
33+
},
34+
{
35+
"files": ["*.js", "*.jsx"],
36+
"extends": ["plugin:@nx/javascript"],
37+
"rules": {}
38+
},
39+
{
40+
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
41+
"env": {
42+
"jest": true
43+
},
44+
"rules": {}
45+
}
46+
]
47+
}

.github/dependabot.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
version: 2
77
updates:
8-
- package-ecosystem: "npm" # See documentation for possible values
9-
directory: "/" # Location of package manifests
8+
- package-ecosystem: 'npm' # See documentation for possible values
9+
directory: '/' # Location of package manifests
1010
schedule:
11-
interval: "daily"
11+
interval: 'daily'

.github/stale.yml

-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ markComment: >
4242

4343
# Limit the number of actions per hour, from 1-30. Default is 30
4444
limitPerRun: 30
45-
4645
# Limit to only `issues` or `pulls`
4746
# only: issues
4847

.github/workflows/ci-root.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ name: CI
22

33
on:
44
push:
5-
branches: [ develop ]
5+
branches: [develop]
66
pull_request:
7-
branches: [ develop ]
7+
branches: [develop]
88

99
jobs:
1010
build:

.github/workflows/devonfw-spellcheck.yml

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
name: spellcheck
1+
name: spellcheck
22
on:
33
push:
44
paths:
5-
- '**.asciidoc'
6-
- '**.adoc'
7-
- '**.md'
5+
- '**.asciidoc'
6+
- '**.adoc'
7+
- '**.md'
88
workflow_dispatch:
99
jobs:
1010
spellchecker:
+3-3
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
name: Sync Docs
1+
name: Sync Docs
22
on:
33
push:
44
paths:
55
- '**.asciidoc'
6-
- '**.md'
6+
- '**.md'
77
branches:
88
- develop
99
workflow_dispatch:
@@ -14,4 +14,4 @@ jobs:
1414
RESUSABLE_GH_ACTION_TOKEN: ${{ secrets.GHA_TOKEN }}
1515
RESUSABLE_BUILD_USER: ${{ secrets.BUILD_USER }}
1616
RESUSABLE_BUILD_USER_PASSWD: ${{ secrets.BUILD_USER_PASSWD }}
17-
RESUSABLE_BUILD_USER_EMAIL: ${{ secrets.BUILD_USER_EMAIL }}
17+
RESUSABLE_BUILD_USER_EMAIL: ${{ secrets.BUILD_USER_EMAIL }}

.gitignore

+47-72
Original file line numberDiff line numberDiff line change
@@ -1,72 +1,47 @@
1-
# Logs
2-
logs
3-
*.log
4-
npm-debug.log*
5-
yarn-debug.log*
6-
yarn-error.log*
7-
8-
# Runtime data
9-
pids
10-
*.pid
11-
*.seed
12-
*.pid.lock
13-
14-
# Directory for instrumented libs generated by jscoverage/JSCover
15-
lib-cov
16-
17-
# Coverage directory used by tools like istanbul
18-
coverage
19-
20-
# nyc test coverage
21-
.nyc_output
22-
23-
# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
24-
.grunt
25-
26-
# Bower dependency directory (https://bower.io/)
27-
bower_components
28-
29-
# node-waf configuration
30-
.lock-wscript
31-
32-
# Compiled binary addons (https://nodejs.org/api/addons.html)
33-
build/Release
34-
35-
# Dependency directories
36-
node_modules/
37-
jspm_packages/
38-
39-
# TypeScript v1 declaration files
40-
typings/
41-
42-
# Optional npm cache directory
43-
.npm
44-
45-
# Optional eslint cache
46-
.eslintcache
47-
48-
# Optional REPL history
49-
.node_repl_history
50-
51-
# Output of 'npm pack'
52-
*.tgz
53-
54-
# Yarn Integrity file
55-
.yarn-integrity
56-
57-
# dotenv environment variables file
58-
.env
59-
60-
# next.js build output
61-
.next
62-
template/dist/*
63-
template/database.db
64-
template/.vscode/launch.json
65-
Samples/my-thai-star/.vscode/launch.json
66-
template/database.db
67-
68-
testing/
69-
**/testing/
70-
**/testing*/
71-
packages/cli
72-
samples/todo
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
dist
5+
tmp
6+
/out-tsc
7+
8+
# dependencies
9+
node_modules
10+
11+
# IDEs and editors
12+
/.idea
13+
.project
14+
.classpath
15+
.c9/
16+
*.launch
17+
.settings/
18+
*.sublime-workspace
19+
20+
# IDE - VSCode
21+
.vscode/*
22+
!.vscode/settings.json
23+
!.vscode/tasks.json
24+
!.vscode/launch.json
25+
!.vscode/extensions.json
26+
27+
# misc
28+
/.sass-cache
29+
/connect.lock
30+
/coverage
31+
/libpeerconnection.log
32+
npm-debug.log
33+
yarn-error.log
34+
testem.log
35+
/typings
36+
37+
# System Files
38+
.DS_Store
39+
Thumbs.db
40+
41+
# SonarQube
42+
.scannerwork
43+
sonar-project.properties
44+
45+
# Verdaccio
46+
project.json
47+
.verdaccio/

.husky/pre-commit

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
#!/bin/sh
22
. "$(dirname "$0")/_/husky.sh"
33

4+
npx lint-staged

.lintstagedrc.json

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"*.ts": ["nx format:write", "eslint"]
3+
}

.nvmrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
16.16.0
1+
18.16

.prettierignore

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Add files here to ignore them from prettier formatting
2+
/dist
3+
/coverage
4+
**/docker-compose.yml
5+
**/config/*.json
6+
**/*.handlebars

.vscode/extensions.json

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"recommendations": [
3+
"nrwl.angular-console",
4+
"esbenp.prettier-vscode",
5+
"dbaeumer.vscode-eslint",
6+
"firsttris.vscode-jest-runner"
7+
]
8+
}

.vscode/settings.json

-7
This file was deleted.

README.md

+33-33
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
1-
# devon4node
2-
3-
[devonfw](https://www.devonfw.com/) is a platform which provides solutions to building business applications which combine best-in-class frameworks and libraries as well as industry proven practices and code conventions. devonfw is 100% Open Source (Apache License version 2.0) since the beginning of 2018.
4-
5-
devon4node is the NodeJS stack of devonfw. It allows you to build business applications (backends) using NodeJS technology in standardized way based on established best-practices.
6-
7-
![License](https://img.shields.io/npm/l/@devon4node/cli)
8-
![License](https://img.shields.io/npm/v/@devon4node/cli)
9-
![License](https://img.shields.io/librariesio/release/npm/@devon4node/cli)
10-
![License](https://img.shields.io/npm/dt/@devon4node/cli)
11-
12-
## Documentation
13-
14-
You can find all documentation in our [wiki](https://github.com/devonfw/devon4node/wiki).
15-
16-
## Code of conduct
17-
18-
Visit [code of conduct document](https://github.com/devonfw/.github/blob/master/CODE_OF_CONDUCT.md).
19-
20-
## Contributing guide
21-
22-
Visit [contributing guide document](https://github.com/devonfw/.github/blob/master/CONTRIBUTING.asciidoc).
23-
24-
## Key Principles
25-
26-
Visit [key principles document](https://github.com/devonfw/.github/blob/master/key-principles.asciidoc).
27-
28-
## Samples
29-
30-
- [Employee example](https://github.com/devonfw-sample/devon4node-samples/tree/develop/employee): simple backend example for a employee management application.
31-
- [Components example](https://github.com/devonfw-sample/devon4node/tree/develop/components-example): simple backend example which will show you the execution order of the devon4node components.
32-
- [GraphQL example](https://github.com/devonfw-sample/devon4node/tree/develop/graphql): simple GraphQL example with starter configuration.
33-
- [My Thai Star](https://github.com/devonfw/my-thai-star/tree/develop/node): realistic example about the management of a restaurant. This example has also a frontend and it is compatible with other devonfw stacks.
1+
# devon4node
2+
3+
[devonfw](https://www.devonfw.com/) is a platform which provides solutions to building business applications which combine best-in-class frameworks and libraries as well as industry proven practices and code conventions. devonfw is 100% Open Source (Apache License version 2.0) since the beginning of 2018.
4+
5+
devon4node is the NodeJS stack of devonfw. It allows you to build business applications (backends) using NodeJS technology in standardized way based on established best-practices.
6+
7+
![License](https://img.shields.io/npm/l/@devon4node/cli)
8+
![License](https://img.shields.io/npm/v/@devon4node/cli)
9+
![License](https://img.shields.io/librariesio/release/npm/@devon4node/cli)
10+
![License](https://img.shields.io/npm/dt/@devon4node/cli)
11+
12+
## Documentation
13+
14+
You can find all documentation in our [wiki](https://github.com/devonfw/devon4node/wiki).
15+
16+
## Code of conduct
17+
18+
Visit [code of conduct document](https://github.com/devonfw/.github/blob/master/CODE_OF_CONDUCT.md).
19+
20+
## Contributing guide
21+
22+
Visit [contributing guide document](https://github.com/devonfw/.github/blob/master/CONTRIBUTING.asciidoc).
23+
24+
## Key Principles
25+
26+
Visit [key principles document](https://github.com/devonfw/.github/blob/master/key-principles.asciidoc).
27+
28+
## Samples
29+
30+
- [Employee example](https://github.com/devonfw-sample/devon4node-samples/tree/develop/employee): simple backend example for a employee management application.
31+
- [Components example](https://github.com/devonfw-sample/devon4node/tree/develop/components-example): simple backend example which will show you the execution order of the devon4node components.
32+
- [GraphQL example](https://github.com/devonfw-sample/devon4node/tree/develop/graphql): simple GraphQL example with starter configuration.
33+
- [My Thai Star](https://github.com/devonfw/my-thai-star/tree/develop/node): realistic example about the management of a restaurant. This example has also a frontend and it is compatible with other devonfw stacks.

docker-compose.yml

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
version: "3"
2+
services:
3+
sonarqube:
4+
image: sonarqube:community
5+
volumes:
6+
- sonarqube_data:/opt/sonarqube/data
7+
- sonarqube_extensions:/opt/sonarqube/extensions
8+
- sonarqube_logs:/opt/sonarqube/logs
9+
ports:
10+
- "9000:9000"
11+
volumes:
12+
sonarqube_data:
13+
sonarqube_extensions:
14+
sonarqube_logs:

jest.config.ts

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
import { getJestProjects } from '@nx/jest';
2+
3+
export default {
4+
projects: getJestProjects(),
5+
};

jest.preset.js

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
const nxPreset = require('@nx/jest/preset').default;
2+
3+
module.exports = {
4+
...nxPreset,
5+
testMatch: [...nxPreset.testMatch, '!**/test.ts'],
6+
coverageReporters: ['clover', 'json', 'lcov', 'text'],
7+
};

0 commit comments

Comments
 (0)