Skip to content

Commit

Permalink
chore: Update dependencies
Browse files Browse the repository at this point in the history
BREAKING CHANGE:
Update dependencies (Nest.js >=10)
  • Loading branch information
unlight committed May 9, 2024
1 parent f1b611f commit 43764cc
Show file tree
Hide file tree
Showing 5 changed files with 73 additions and 57 deletions.
3 changes: 0 additions & 3 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ module.exports = {
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:unicorn/recommended',
'plugin:promise/recommended',
'plugin:sonarjs/recommended',
'plugin:import/warnings',
'plugin:regexp/recommended',
'plugin:total-functions/recommended',
Expand Down Expand Up @@ -38,7 +37,6 @@ module.exports = {
'sort-class-members',
'total-functions',
'promise',
'sonarjs',
'etc',
'only-warn',
],
Expand Down Expand Up @@ -114,7 +112,6 @@ module.exports = {
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/camelcase': 0,
'import/max-dependencies': 0,
'sonarjs/no-duplicate-string': 0,
},
},
],
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- name: 'Setup node'
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 22
- name: 'Install depependencies'
run: npm install
- name: 'Test'
Expand All @@ -31,7 +31,7 @@ jobs:
- name: 'Setup Node'
uses: actions/setup-node@v3
with:
node-version: 18
node-version: 22
- name: 'Install depependencies'
run: |
npm install
Expand Down
43 changes: 30 additions & 13 deletions Taskfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,36 @@ PATH="$PWD/node_modules/.bin":$PATH
set -e

build_pkgroll() {
set -x
rm -rf dist
mkdir dist
# https://esbuild.github.io/api/#target
npx pkgroll --target=es2020
cp -f README.md dist
cat package.json | jq '.main = "./index.cjs"' |
jq '.module = "./index.mjs"' |
jq '.types = "./index.d.ts"' |
jq '.exports.".".import = "./index.mjs"' |
jq '.exports.".".require = "./index.cjs"' \
>dist/package.json
set +x
set -x
rm -rf dist
mkdir dist
# https://esbuild.github.io/api/#target
npx pkgroll --target=es2020
cp -f README.md dist
cat package.json | jq '.main = "./index.cjs"' |
jq '.module = "./index.mjs"' |
jq '.types = "./index.d.ts"' |
jq '.exports.".".import = "./index.mjs"' |
jq '.exports.".".require = "./index.cjs"' \
>dist/package.json
set +x
}

build_tsup() {
set -x
rm -rfv dist
tsup src/index.ts --format cjs,esm --target es2020 --no-sourcemap --cjsInterop --keep-names
mv dist/index.js dist/index.cjs
tsup src/index.ts --dts-only
cp -fv README.md dist

cat package.json | jq '.main = "./index.cjs"' |
jq '.module = "./index.mjs"' |
jq '.types = "./index.d.ts"' |
jq '.exports.".".import = "./index.mjs"' |
jq '.exports.".".require = "./index.cjs"' \
>dist/package.json
set +x
}

"$@"
76 changes: 38 additions & 38 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"format:src": "prettier src --write",
"lint:commit": "sh Taskfile commit_lint",
"commit": "cz",
"build": "sh Taskfile build_pkgroll",
"build": "sh Taskfile build_tsup",
"test:d": "ndb node node_modules/vitest/vitest.mjs watch src"
},
"config": {
Expand All @@ -49,10 +49,10 @@
}
},
"peerDependencies": {
"@nestjs/common": ">=7 <=9"
"@nestjs/common": ">=10"
},
"dependencies": {
"ansicolor": "^1.1.100",
"ansicolor": "^2.0.3",
"ololog": "^1.1.175",
"stacktracey": "^2.1.8",
"string.bullet": "^1.0.12",
Expand All @@ -62,53 +62,53 @@
"wrap-ansi": "7.X"
},
"devDependencies": {
"@commitlint/cli": "^17.4.2",
"@commitlint/config-conventional": "^17.4.2",
"@nestjs/common": "^9.2.1",
"@nestjs/core": "^9.2.1",
"@nestjs/platform-express": "^9.2.1",
"@semantic-release/changelog": "^6.0.2",
"@commitlint/cli": "^19.3.0",
"@commitlint/config-conventional": "^19.2.2",
"@nestjs/common": "^10.3.8",
"@nestjs/core": "^10.3.8",
"@nestjs/platform-express": "^10.3.8",
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@swc/core": "^1.3.29",
"@swc/helpers": "^0.4.14",
"@types/express": "^4.17.16",
"@types/node": "^18.11.18",
"@swc/core": "^1.5.5",
"@swc/helpers": "^0.5.11",
"@types/express": "^4.17.21",
"@types/node": "^20.12.11",
"@types/wrap-ansi": "3.X",
"@typescript-eslint/eslint-plugin": "^5.49.0",
"@typescript-eslint/parser": "^5.49.0",
"c8": "^7.12.0",
"cache-manager": "^5.1.4",
"@typescript-eslint/eslint-plugin": "^7.8.0",
"@typescript-eslint/parser": "^7.8.0",
"c8": "^9.1.0",
"cache-manager": "^5.5.2",
"class-transformer": "^0.5.1",
"class-validator": "^0.14.0",
"class-validator": "^0.14.1",
"commitizen": "^4.3.0",
"conventional-changelog-conventionalcommits": "^5.0.0",
"cz-conventional-changelog": "^3.3.0",
"cz-customizable": "^7.0.0",
"eslint": "^8.32.0",
"eslint-config-prettier": "^8.6.0",
"eslint-import-resolver-node": "^0.3.7",
"eslint-plugin-etc": "^2.0.2",
"eslint-plugin-import": "^2.27.5",
"eslint-config-prettier": "^9.1.0",
"eslint-import-resolver-node": "^0.3.9",
"eslint-plugin-etc": "^2.0.3",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-only-warn": "^1.1.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-prettier": "^5.1.3",
"eslint-plugin-promise": "^6.1.1",
"eslint-plugin-regexp": "^1.12.0",
"eslint-plugin-simple-import-sort": "^9.0.0",
"eslint-plugin-sonarjs": "^0.18.0",
"eslint-plugin-sort-class-members": "^1.16.0",
"eslint-plugin-total-functions": "^6.0.0",
"eslint-plugin-unicorn": "^45.0.2",
"eslint-plugin-regexp": "^2.5.0",
"eslint-plugin-simple-import-sort": "^12.1.0",
"eslint-plugin-sort-class-members": "^1.20.0",
"eslint-plugin-total-functions": "^7.1.0",
"eslint-plugin-unicorn": "^52.0.0",
"eslint-plugin-wix-editor": "^3.3.0",
"express": "4.18.2",
"prettier": "^2.8.3",
"reflect-metadata": "^0.1.13",
"express": "4.19.2",
"prettier": "^3.2.5",
"reflect-metadata": "^0.2.2",
"request": "^2.88.2",
"rxjs": "^7.8.0",
"semantic-release": "^20.1.0",
"ts-node": "^10.9.1",
"tslib": "^2.4.1",
"typescript": "^4.9.4",
"vitest": "^0.28.2",
"rxjs": "^7.8.1",
"semantic-release": "^23.0.8",
"ts-node": "^10.9.2",
"tslib": "^2.6.2",
"tsup": "^8.0.2",
"typescript": "^5.4.5",
"vitest": "^1.6.0",
"watchexec-bin": "^1.0.0"
}
}
4 changes: 3 additions & 1 deletion src/nestolog.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@ import {
} from './nestolog-options';
import { NestoLogger } from './nestologger.service';

@Module({})
@Module({
exports: [NestoLogger],
})
export class NestologModule {
static forRoot(options: Partial<NestologOptions> = {}): DynamicModule {
options = { ...nestologOptionsDefaults, ...options };
Expand Down

0 comments on commit 43764cc

Please sign in to comment.