Skip to content

Commit

Permalink
Merge pull request #1058 from aligent/chore/upgrade-following-node16-…
Browse files Browse the repository at this point in the history
…module

Upgrade template following node16 module
  • Loading branch information
kai-nguyen-aligent authored Aug 16, 2024
2 parents c310ce1 + 44512ec commit 247d0b6
Show file tree
Hide file tree
Showing 17 changed files with 6,707 additions and 7,917 deletions.
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,11 @@ The monorepo workspace is managed using [Nx.](https://nx.dev)

### Setup

2. Update application name in `package.json`. It's recommend to have the name in the format of: `@<brand-name>-int/<from>-<to>`. Eg: `@aligent-int/erp-ecomm`
1. Update application name in `package.json`. It's recommend to have the name in the format of: `@<brand-name>-int/<from>-<to>`. Eg: `@aligent-int/erp-ecomm`

3. Update brand name to `nx.json`. The naming convention for this is: `<brand-name>-int`. Just be mindful about the length of service name. Eg: `alg-int`
2. Update brand name in `nx.json`. The naming convention for this is: `<brand-name>-int`. Just be mindful about the length of service name. Eg: `alg-int`

4. Install dependencies: `npm ci`
3. Install dependencies: `npm ci`

### Working with services

Expand Down Expand Up @@ -85,6 +85,8 @@ Below are some example of general Nx. commands. For more information, check out

## Notes:

- The `tsconfig.base.json` file extends `@tsconfig/node20` and `@tsconfig/strictest` packages. Please note that there are settings which is not shown in that file but still applied. For more information on those settings, visit https://github.com/tsconfig/bases.

- This template is package manager agnostic. To use other package manager, install them by enabling [corepack](https://pnpm.io/installation#using-corepack).

## Under development
Expand Down
2 changes: 1 addition & 1 deletion nx.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
],
"cache": true
},
"@nx/vite:test": {
"test": {
"inputs": ["default", "^production"],
"cache": true
}
Expand Down
14,547 changes: 6,687 additions & 7,860 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
"test:all": "nx run-many -t test --coverage",
"lint": "nx affected -t lint",
"lint:all": "nx run-many -t lint",
"format": "nx format:check",
"format:write": "nx format:write",
"format": "prettier . --check",
"format:write": "prettier . --write",
"check-types": "nx affected -t check-types",
"check-types:all": "nx run-many -t check-types",
"prepare": "[ -d .git ] && git config core.hooksPath '.git-hooks' || true"
Expand Down Expand Up @@ -48,8 +48,8 @@
"serverless": "^3.38.0",
"serverless-esbuild": "^1.50.1",
"serverless-step-functions": "^3.21.0",
"ts-node": "10.9.2",
"tslib": "^2.6.2",
"tsx": "^4.17.0",
"typescript": "~5.3.3",
"vite": "~4.5.3",
"vite-tsconfig-paths": "~4.3.2",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
"ignorePatterns": ["!**/*"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"esModuleInterop": true
},
"include": [
"vite.config.ts",
"vite.config.mts",
"../../libs/**/src/index.ts",
"src/**/*.ts",
"**/*.test.ts"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, mergeConfig } from 'vitest/config';
import { viteBaseConfig } from '../../vite.config.base';
import { viteBaseConfig } from '../../vite.config.base.mjs';

export default mergeConfig(
viteBaseConfig,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
{
"extends": ["../../.eslintrc.json"],
"ignorePatterns": ["!**/*"],
"overrides": [
{
"files": ["*.ts", "*.tsx", "*.js", "*.jsx"],
"rules": {}
},
{
"files": ["*.ts", "*.tsx"],
"rules": {}
},
{
"files": ["*.js", "*.jsx"],
"rules": {}
}
]
"ignorePatterns": ["!**/*"]
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"esModuleInterop": true
},
"include": [
"vite.config.ts",
"vite.config.mts",
"../../libs/**/src/index.ts",
"src/**/*.ts",
"**/*.test.ts"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, mergeConfig } from 'vitest/config';
import { viteBaseConfig } from '../../vite.config.base';
import { viteBaseConfig } from '../../vite.config.base.mjs';

export default mergeConfig(
viteBaseConfig,
Expand Down
2 changes: 1 addition & 1 deletion tools/serverless-plugin/src/generators/service/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,5 @@
}
}
},
"required": [ "brand", "name" ]
"required": ["brand", "name"]
}
9 changes: 1 addition & 8 deletions tools/serverless-plugin/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
{
"extends": "../../tsconfig.base.json",
"compilerOptions": {
"module": "Node16",
"forceConsistentCasingInFileNames": true,
"strict": true,
"noImplicitOverride": true,
"noPropertyAccessFromIndexSignature": true,
"noImplicitReturns": true,
"noFallthroughCasesInSwitch": true,
"types": ["vitest"]
"esModuleInterop": true
},
"files": [],
"include": [],
Expand Down
1 change: 0 additions & 1 deletion tools/serverless-plugin/tsconfig.lib.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"declaration": true,
"types": ["node"]
},
"include": [
Expand Down
2 changes: 1 addition & 1 deletion tools/serverless-plugin/tsconfig.spec.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"types": ["vitest/globals", "vitest/importMeta", "vite/client", "node"]
},
"include": [
"vite.config.ts",
"vite.config.mts",
"src/**/*.test.ts",
"src/**/*.spec.ts",
"src/**/*.test.tsx",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { defineConfig, mergeConfig } from 'vitest/config';
import { viteBaseConfig } from '../../vite.config.base';
import { viteBaseConfig } from '../../vite.config.base.mjs';

export default mergeConfig(
viteBaseConfig,
Expand Down
5 changes: 1 addition & 4 deletions tsconfig.base.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
"emitDecoratorMetadata": true,
"experimentalDecorators": true,
"importHelpers": true,
"target": "es2015",
"module": "esnext",
"lib": ["es2020", "dom"],
"skipLibCheck": true,
"lib": ["es2022", "dom"],
"skipDefaultLibCheck": true,
"baseUrl": ".",
"paths": {
Expand Down
File renamed without changes.

0 comments on commit 247d0b6

Please sign in to comment.