Skip to content

Commit

Permalink
feat!: migrate to NestJS 10, move project to NX
Browse files Browse the repository at this point in the history
This commit upgrades all packages to be compatible with NestJS 10.
Also it is changed to use NX insted ad Lerna.

Fix devonfw#527
  • Loading branch information
dario-rodriguez committed Jul 2, 2023
1 parent 538d35a commit fe6a620
Show file tree
Hide file tree
Showing 238 changed files with 8,051 additions and 8,213 deletions.
26 changes: 0 additions & 26 deletions .eslintrc.js

This file was deleted.

47 changes: 47 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{
"root": true,
"ignorePatterns": ["**/*"],
"plugins": ["@nx"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {
"@nx/enforce-module-boundaries": [
"error",
{
"enforceBuildableLibDependency": true,
"allow": [],
"depConstraints": [
{
"sourceTag": "*",
"onlyDependOnLibsWithTags": ["*"]
}
]
}
]
}
},
{
"files": ["*.ts", "*.tsx"],
"extends": ["plugin:@nx/typescript"],
"rules": {
"no-console": "error",
"@typescript-eslint/explicit-function-return-type": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off"
}
},
{
"files": ["*.js", "*.jsx"],
"extends": ["plugin:@nx/javascript"],
"rules": {}
},
{
"files": ["*.spec.ts", "*.spec.tsx", "*.spec.js", "*.spec.jsx"],
"env": {
"jest": true
},
"rules": {}
}
]
}
6 changes: 3 additions & 3 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

version: 2
updates:
- package-ecosystem: "npm" # See documentation for possible values
directory: "/" # Location of package manifests
- package-ecosystem: 'npm' # See documentation for possible values
directory: '/' # Location of package manifests
schedule:
interval: "daily"
interval: 'daily'
1 change: 0 additions & 1 deletion .github/stale.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ markComment: >

# Limit the number of actions per hour, from 1-30. Default is 30
limitPerRun: 30

# Limit to only `issues` or `pulls`
# only: issues

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci-root.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: CI

on:
push:
branches: [ develop ]
branches: [develop]
pull_request:
branches: [ develop ]
branches: [develop]

jobs:
build:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/devonfw-spellcheck.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: spellcheck
name: spellcheck
on:
push:
paths:
- '**.asciidoc'
- '**.adoc'
- '**.md'
- '**.asciidoc'
- '**.adoc'
- '**.md'
workflow_dispatch:
jobs:
spellchecker:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/devonfw-sync-docs.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: Sync Docs
name: Sync Docs
on:
push:
paths:
- '**.asciidoc'
- '**.md'
- '**.md'
branches:
- develop
workflow_dispatch:
Expand All @@ -14,4 +14,4 @@ jobs:
RESUSABLE_GH_ACTION_TOKEN: ${{ secrets.GHA_TOKEN }}
RESUSABLE_BUILD_USER: ${{ secrets.BUILD_USER }}
RESUSABLE_BUILD_USER_PASSWD: ${{ secrets.BUILD_USER_PASSWD }}
RESUSABLE_BUILD_USER_EMAIL: ${{ secrets.BUILD_USER_EMAIL }}
RESUSABLE_BUILD_USER_EMAIL: ${{ secrets.BUILD_USER_EMAIL }}
119 changes: 47 additions & 72 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,72 +1,47 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*

# Runtime data
pids
*.pid
*.seed
*.pid.lock

# Directory for instrumented libs generated by jscoverage/JSCover
lib-cov

# Coverage directory used by tools like istanbul
coverage

# nyc test coverage
.nyc_output

# Grunt intermediate storage (http://gruntjs.com/creating-plugins#storing-task-files)
.grunt

# Bower dependency directory (https://bower.io/)
bower_components

# node-waf configuration
.lock-wscript

# Compiled binary addons (https://nodejs.org/api/addons.html)
build/Release

# Dependency directories
node_modules/
jspm_packages/

# TypeScript v1 declaration files
typings/

# Optional npm cache directory
.npm

# Optional eslint cache
.eslintcache

# Optional REPL history
.node_repl_history

# Output of 'npm pack'
*.tgz

# Yarn Integrity file
.yarn-integrity

# dotenv environment variables file
.env

# next.js build output
.next
template/dist/*
template/database.db
template/.vscode/launch.json
Samples/my-thai-star/.vscode/launch.json
template/database.db

testing/
**/testing/
**/testing*/
packages/cli
samples/todo
# See http://help.github.com/ignore-files/ for more about ignoring files.

# compiled output
dist
tmp
/out-tsc

# dependencies
node_modules

# IDEs and editors
/.idea
.project
.classpath
.c9/
*.launch
.settings/
*.sublime-workspace

# IDE - VSCode
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
!.vscode/extensions.json

# misc
/.sass-cache
/connect.lock
/coverage
/libpeerconnection.log
npm-debug.log
yarn-error.log
testem.log
/typings

# System Files
.DS_Store
Thumbs.db

# SonarQube
.scannerwork
sonar-project.properties

# Verdaccio
project.json
.verdaccio/
1 change: 1 addition & 0 deletions .husky/pre-commit
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/bin/sh
. "$(dirname "$0")/_/husky.sh"

npx lint-staged
3 changes: 3 additions & 0 deletions .lintstagedrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"*.ts": ["nx format:write", "eslint"]
}
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
16.16.0
18.16
6 changes: 6 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Add files here to ignore them from prettier formatting
/dist
/coverage
**/docker-compose.yml
**/config/*.json
**/*.handlebars
8 changes: 8 additions & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"recommendations": [
"nrwl.angular-console",
"esbenp.prettier-vscode",
"dbaeumer.vscode-eslint",
"firsttris.vscode-jest-runner"
]
}
7 changes: 0 additions & 7 deletions .vscode/settings.json

This file was deleted.

66 changes: 33 additions & 33 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
# devon4node

[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.

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.

![License](https://img.shields.io/npm/l/@devon4node/cli)
![License](https://img.shields.io/npm/v/@devon4node/cli)
![License](https://img.shields.io/librariesio/release/npm/@devon4node/cli)
![License](https://img.shields.io/npm/dt/@devon4node/cli)

## Documentation

You can find all documentation in our [wiki](https://github.com/devonfw/devon4node/wiki).

## Code of conduct

Visit [code of conduct document](https://github.com/devonfw/.github/blob/master/CODE_OF_CONDUCT.md).

## Contributing guide

Visit [contributing guide document](https://github.com/devonfw/.github/blob/master/CONTRIBUTING.asciidoc).

## Key Principles

Visit [key principles document](https://github.com/devonfw/.github/blob/master/key-principles.asciidoc).

## Samples

- [Employee example](https://github.com/devonfw-sample/devon4node-samples/tree/develop/employee): simple backend example for a employee management application.
- [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.
- [GraphQL example](https://github.com/devonfw-sample/devon4node/tree/develop/graphql): simple GraphQL example with starter configuration.
- [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.
# devon4node

[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.

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.

![License](https://img.shields.io/npm/l/@devon4node/cli)
![License](https://img.shields.io/npm/v/@devon4node/cli)
![License](https://img.shields.io/librariesio/release/npm/@devon4node/cli)
![License](https://img.shields.io/npm/dt/@devon4node/cli)

## Documentation

You can find all documentation in our [wiki](https://github.com/devonfw/devon4node/wiki).

## Code of conduct

Visit [code of conduct document](https://github.com/devonfw/.github/blob/master/CODE_OF_CONDUCT.md).

## Contributing guide

Visit [contributing guide document](https://github.com/devonfw/.github/blob/master/CONTRIBUTING.asciidoc).

## Key Principles

Visit [key principles document](https://github.com/devonfw/.github/blob/master/key-principles.asciidoc).

## Samples

- [Employee example](https://github.com/devonfw-sample/devon4node-samples/tree/develop/employee): simple backend example for a employee management application.
- [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.
- [GraphQL example](https://github.com/devonfw-sample/devon4node/tree/develop/graphql): simple GraphQL example with starter configuration.
- [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.
14 changes: 14 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
version: "3"
services:
sonarqube:
image: sonarqube:community
volumes:
- sonarqube_data:/opt/sonarqube/data
- sonarqube_extensions:/opt/sonarqube/extensions
- sonarqube_logs:/opt/sonarqube/logs
ports:
- "9000:9000"
volumes:
sonarqube_data:
sonarqube_extensions:
sonarqube_logs:
5 changes: 5 additions & 0 deletions jest.config.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { getJestProjects } from '@nx/jest';

export default {
projects: getJestProjects(),
};
7 changes: 7 additions & 0 deletions jest.preset.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const nxPreset = require('@nx/jest/preset').default;

module.exports = {
...nxPreset,
testMatch: [...nxPreset.testMatch, '!**/test.ts'],
coverageReporters: ['clover', 'json', 'lcov', 'text'],
};
Loading

0 comments on commit fe6a620

Please sign in to comment.