-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
drop support of nestjs<8 and node<16, update ci, deps, readme
- Loading branch information
Showing
31 changed files
with
4,733 additions
and
5,474 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.json', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: [ | ||
'plugin:@typescript-eslint/recommended', | ||
'plugin:import/recommended', | ||
'plugin:import/typescript', | ||
'plugin:prettier/recommended', | ||
], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
'@typescript-eslint/no-explicit-any': [ | ||
'error', | ||
{ fixToUnknown: true, ignoreRestArgs: false }, | ||
], | ||
'@typescript-eslint/no-floating-promises': ['error', { ignoreIIFE: true }], | ||
'@typescript-eslint/no-unused-vars': [ | ||
'error', | ||
{ varsIgnorePattern: '^_', argsIgnorePattern: '^_', ignoreRestSiblings: true }, | ||
], | ||
'@typescript-eslint/explicit-member-accessibility': [ | ||
'error', | ||
{ accessibility: 'no-public' }, | ||
], | ||
'@typescript-eslint/member-ordering': ['error', { | ||
default: [ | ||
"public-static-field", | ||
"public-static-get", | ||
"public-static-set", | ||
"public-static-method", | ||
"protected-static-field", | ||
"protected-static-get", | ||
"protected-static-set", | ||
"protected-static-method", | ||
"private-static-field", | ||
"private-static-get", | ||
"private-static-set", | ||
"private-static-method", | ||
|
||
"signature", | ||
"public-abstract-field", | ||
"protected-abstract-field", | ||
"public-decorated-field", | ||
"public-instance-field", | ||
"protected-decorated-field", | ||
"protected-instance-field", | ||
"private-decorated-field", | ||
"private-instance-field", | ||
|
||
"public-constructor", | ||
"protected-constructor", | ||
"private-constructor", | ||
|
||
"public-abstract-get", | ||
"public-abstract-set", | ||
"public-abstract-method", | ||
"public-decorated-get", | ||
"public-instance-get", | ||
"public-decorated-set", | ||
"public-instance-set", | ||
"public-decorated-method", | ||
"public-instance-method", | ||
|
||
"protected-abstract-get", | ||
"protected-abstract-set", | ||
"protected-abstract-method", | ||
"protected-decorated-get", | ||
"protected-instance-get", | ||
"protected-decorated-set", | ||
"protected-instance-set", | ||
"protected-decorated-method", | ||
"protected-instance-method", | ||
|
||
"private-decorated-get", | ||
"private-instance-get", | ||
"private-decorated-set", | ||
"private-instance-set", | ||
"private-decorated-method", | ||
"private-instance-method", | ||
] | ||
}], | ||
'import/order': [ | ||
'error', | ||
{ | ||
alphabetize: { order: 'asc', caseInsensitive: true }, | ||
'newlines-between': 'always', | ||
}, | ||
] | ||
}, | ||
}; |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: build-lint-test | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
build-lint-test: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
nestjs-version: | ||
- "8" | ||
- "9" | ||
- "10" | ||
nodejs-version: | ||
- 16 | ||
- 18 | ||
- 20 | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: ${{ matrix.nodejs-version }} | ||
- run: npm ci | ||
- run: | | ||
npm i @nestjs/core@${{ matrix.nestjs-version }} \ | ||
@nestjs/common@${{ matrix.nestjs-version }} \ | ||
@nestjs/platform-express@${{ matrix.nestjs-version }} \ | ||
@types/node@${{ matrix.nodejs-version }} \ | ||
-D | ||
- run: npm run lint | ||
- uses: actions/cache@v3 | ||
with: | ||
path: coverage | ||
key: ${{ github.sha }}-${{ matrix.nestjs-version }}-${{ matrix.nodejs-version }} | ||
- run: npm t | ||
- run: npm run build |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
name: on-pr-master | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-lint-test: | ||
uses: ./.github/workflows/build-lint-test.yml | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
name: on-push | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build-lint-test: | ||
uses: ./.github/workflows/build-lint-test.yml | ||
secrets: inherit | ||
|
||
publish-alpha: | ||
if: github.actor != 'dependabot[bot]' && github.actor != 'mergify[bot]' | ||
needs: | ||
- build-lint-test | ||
uses: ./.github/workflows/publish-alpha.yml | ||
secrets: inherit | ||
|
||
coverage: | ||
needs: | ||
- build-lint-test | ||
uses: ./.github/workflows/publish-coverage.yml | ||
secrets: inherit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
name: on-release | ||
|
||
on: | ||
release: | ||
types: [created] | ||
|
||
jobs: | ||
publish-with-git-tag-version: | ||
uses: ./.github/workflows/publish-with-git-tag-version.yml | ||
secrets: inherit |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
name: publish-alpha | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
publish-alpha: | ||
if: github.ref == 'refs/heads/master' && github.actor != 'dependabot[bot]' && github.actor != 'mergify[bot]' | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- run: npm ci | ||
|
||
- run: npm version --no-git-tag-version $(git describe --abbrev=0 --tags)-alpha.$(git rev-parse --short=6 ${{ github.sha }}) || true | ||
|
||
- run: npm publish --tag alpha || true | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
name: publish-coverage | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
publish-coverage: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: coverage | ||
# restore cache from build-lint-test wf with key=sha-(oneof nestjs version)-(oneof nodejs version) | ||
key: ${{ github.sha }}-10-20 | ||
|
||
- uses: paambaati/codeclimate-action@v2.7.5 | ||
with: | ||
coverageLocations: ${{github.workspace}}/coverage/lcov.info:lcov | ||
env: | ||
CC_TEST_REPORTER_ID: ${{ secrets.CODE_CLIMATE_REPORTER_ID }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: publish-with-git-tag-version | ||
|
||
on: | ||
workflow_call: | ||
|
||
jobs: | ||
publish-with-git-tag-version: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
registry-url: 'https://registry.npmjs.org' | ||
|
||
- run: npm ci | ||
|
||
- run: npm version --no-git-tag-version $(git describe --abbrev=0 --tags) | ||
|
||
- run: | | ||
git config --local user.email "github-actions[bot]@users.noreply.github.com" | ||
git config --local user.name "github-actions[bot]" | ||
git commit -m "update version" -a | ||
- uses: ad-m/github-push-action@master | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- run: npm publish | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
Oops, something went wrong.