forked from nestjsx/crud
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nestjsx#781 from nestjsx/chore/mrepo
Chore/mrepo
- Loading branch information
Showing
53 changed files
with
6,851 additions
and
5,901 deletions.
There are no files selected for viewing
Empty file.
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,59 @@ | ||
module.exports = { | ||
parser: '@typescript-eslint/parser', | ||
parserOptions: { | ||
project: 'tsconfig.eslint.json', | ||
sourceType: 'module', | ||
}, | ||
plugins: ['@typescript-eslint/eslint-plugin'], | ||
extends: ['plugin:@typescript-eslint/eslint-recommended', 'plugin:@typescript-eslint/recommended', 'prettier'], | ||
root: true, | ||
env: { | ||
node: true, | ||
jest: true, | ||
}, | ||
ignorePatterns: ['.eslintrc.js'], | ||
rules: { | ||
'@typescript-eslint/interface-name-prefix': 'off', | ||
'@typescript-eslint/explicit-function-return-type': 'off', | ||
'@typescript-eslint/no-explicit-any': 'off', | ||
'@typescript-eslint/no-empty-function': 'off', | ||
'@typescript-eslint/no-non-null-assertion': 'off', | ||
'@typescript-eslint/no-var-requires': 'off', | ||
'lines-between-class-members': ['error', 'always'], | ||
'padded-blocks': ['error', 'never'], | ||
semi: ['error', 'always'], | ||
quotes: ['error', 'single', { avoidEscape: true }], | ||
'max-len': ['error', { code: 150, comments: 200 }], | ||
'comma-dangle': ['error', 'always-multiline'], | ||
'@typescript-eslint/no-namespace': 'off', | ||
'@typescript-eslint/member-ordering': [ | ||
'error', | ||
{ | ||
default: [ | ||
'signature', | ||
'public-static-field', | ||
'protected-static-field', | ||
'private-static-field', | ||
'public-instance-field', | ||
'protected-instance-field', | ||
'private-instance-field', | ||
'public-abstract-field', | ||
'protected-abstract-field', | ||
'private-abstract-field', | ||
'public-constructor', | ||
'protected-constructor', | ||
'private-constructor', | ||
'public-static-method', | ||
'protected-static-method', | ||
'private-static-method', | ||
'public-instance-method', | ||
'protected-instance-method', | ||
'private-instance-method', | ||
'public-abstract-method', | ||
'protected-abstract-method', | ||
'private-abstract-method', | ||
], | ||
}, | ||
], | ||
}, | ||
}; |
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,46 @@ | ||
--- | ||
name: "\U0001F41B Bug Report" | ||
about: "If something isn't working as expected \U0001F914." | ||
title: '' | ||
labels: 'type: potential issue' | ||
assignees: '' | ||
--- | ||
|
||
## Bug Report | ||
|
||
## Current behavior | ||
|
||
<!-- Describe how the issue manifests. --> | ||
|
||
## Input Code | ||
|
||
<!-- REPL or Repo link if applicable: --> | ||
|
||
```ts | ||
const your = (code) => here; | ||
``` | ||
|
||
## Expected behavior | ||
|
||
<!-- A clear and concise description of what you expected to happen (or code). --> | ||
|
||
## Possible Solution | ||
|
||
<!--- Only if you have suggestions on a fix for the bug --> | ||
|
||
## Environment | ||
|
||
<pre><code> | ||
Package version: X.Y.Z | ||
<!-- Check whether this is still an issue in the most recent package(s) version --> | ||
|
||
For Tooling issues: | ||
- Node version: XX <!-- run `node --version` --> | ||
- Platform: <!-- Mac, Linux, Windows --> | ||
- Database <!-- MySQL, Postgres, etc. (with version) --> | ||
|
||
Others: | ||
<!-- Anything else relevant? Operating system version, IDE, ... --> | ||
</code></pre> | ||
|
||
## Repository with minimal reproduction |
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: "\U0001F680 Feature Request" | ||
about: "I have a suggestion \U0001F63B!" | ||
title: '' | ||
labels: 'type: enhancement' | ||
assignees: '' | ||
--- | ||
|
||
## Feature Request | ||
|
||
## Is your feature request related to a problem? Please describe. | ||
|
||
<!-- A clear and concise description of what the problem is. Ex. I have an issue when [...] --> | ||
|
||
## Describe the solution you'd like | ||
|
||
<!-- A clear and concise description of what you want to happen. Add any considered drawbacks. --> | ||
|
||
## Teachability, Documentation, Adoption, Migration Strategy | ||
|
||
<!-- If you can, explain how users will be able to use this and possibly write out a version the docs. Maybe a screenshot or design? --> | ||
|
||
## What is the motivation / use case for changing the behavior? | ||
|
||
<!-- Describe the motivation or the concrete use case. --> |
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 @@ | ||
## PR Checklist | ||
|
||
Please check if your PR fulfills the following requirements: | ||
|
||
- [ ] The commit message was generated by `yarn commit` | ||
- [ ] Tests for the changes have been added (for bug fixes / features) | ||
|
||
## PR Type | ||
|
||
What kind of change does this PR introduce? | ||
|
||
<!-- Please check the one that applies to this PR using "x". --> | ||
|
||
``` | ||
[ ] Bugfix | ||
[ ] Feature | ||
[ ] Code style update (formatting, local variables) | ||
[ ] Refactoring (no functional changes, no api changes) | ||
[ ] Build related changes | ||
[ ] Tests | ||
[ ] Release | ||
[ ] CI related changes | ||
[ ] Other... Please describe: | ||
``` | ||
|
||
## What is the current behavior? | ||
|
||
<!-- Please describe the current behavior that you are modifying, or link to a relevant issue. --> | ||
|
||
Issue Number: N/A | ||
|
||
## What is the new behavior? | ||
|
||
## Does this PR introduce a breaking change? | ||
|
||
``` | ||
[ ] Yes | ||
[ ] No | ||
``` | ||
|
||
<!-- If this PR contains a breaking change, please describe the impact and migration path for existing applications below. --> | ||
|
||
## Other information |
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,121 @@ | ||
name: Release | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
release: | ||
if: github.event.pull_request.merged && startsWith(github.head_ref, 'release') | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: '0' | ||
|
||
- name: Set NPM Token | ||
uses: actions/setup-node@v2 | ||
with: | ||
registry-url: https://registry.npmjs.org | ||
env: | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Install | ||
run: yarn boot | ||
|
||
- name: Build | ||
run: yarn build | ||
|
||
- name: Run Tests | ||
run: yarn test | ||
|
||
- name: Get Latest Tag | ||
id: get_latest_tag | ||
uses: actions-ecosystem/action-get-latest-tag@v1 | ||
|
||
- name: Parse Latest Git Tag | ||
id: parse_latest_tag | ||
run: | | ||
TAG=$(echo ${{ steps.get_latest_tag.outputs.tag }} | cut -d 'v' -f 2) | ||
echo "::set-output name=tag::${TAG}" | ||
- name: Get Next Tag Semver | ||
id: get_next_tag_semver | ||
uses: WyriHaximus/github-action-next-semvers@v1 | ||
with: | ||
version: ${{ steps.parse_latest_tag.outputs.tag }} | ||
|
||
- name: Define Publishing Strategy | ||
id: lerna_strategy | ||
run: | | ||
MREPO_LERNA_STRATEGY=$(cat lerna.json | npx jase version) | ||
echo "MREPO_LERNA_STRATEGY=${MREPO_LERNA_STRATEGY}" >> $GITHUB_ENV | ||
- name: Define Current Version | ||
run: | | ||
echo ${{ env.MREPO_LERNA_STRATEGY }} | ||
if [ "${{ env.MREPO_LERNA_STRATEGY }}" = "independent" ]; then | ||
CURRENT_VERSION=${{ steps.get_next_tag_semver.outputs.v_minor }} | ||
DIST_TAG=$(cat lerna.json | npx jase distTag) | ||
else | ||
CURRENT_VERSION=$(cat lerna.json | npx jase version) | ||
[[ $CURRENT_VERSION =~ "-" ]] && DIST_TAG=$(echo $CURRENT_VERSION | cut -d '-' -f 2 | cut -d '.' -f 1) || DIST_TAG="latest" | ||
CURRENT_VERSION=v$CURRENT_VERSION | ||
fi | ||
echo $CURRENT_VERSION | ||
echo $DIST_TAG | ||
echo "CURRENT_VERSION=${CURRENT_VERSION}" >> $GITHUB_ENV | ||
echo "DIST_TAG=${DIST_TAG}" >> $GITHUB_ENV | ||
- name: Ensure Latest Git Tag | ||
uses: mukunku/[email protected] | ||
id: checkTag | ||
with: | ||
tag: ${{ env.CURRENT_VERSION }} | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Git Tag | ||
if: steps.checkTag.outputs.exists == 'false' | ||
uses: negz/create-tag@v1 | ||
with: | ||
version: ${{ env.CURRENT_VERSION }} | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Release | ||
if: steps.checkTag.outputs.exists == 'false' | ||
uses: actions/create-release@v1 | ||
with: | ||
tag_name: ${{ env.CURRENT_VERSION }} | ||
release_name: ${{ env.CURRENT_VERSION }} | ||
body: | | ||
${{ github.event.pull_request.body }} | ||
draft: false | ||
prerelease: false | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Publish Packages to NPM Registry | ||
if: steps.checkTag.outputs.exists == 'false' | ||
run: | | ||
lerna publish from-package --no-git-reset --no-verify-access --yes --registry https://registry.npmjs.org --dist-tag ${{ env.DIST_TAG }} | ||
git update-index --assume-unchanged ./packages/**/package.json | ||
env: | ||
GH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | ||
|
||
- name: Create a Comment | ||
uses: actions/[email protected] | ||
with: | ||
github-token: ${{secrets.GITHUB_TOKEN}} | ||
script: | | ||
github.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: 'Packages with version [${{ env.CURRENT_VERSION }}](https://github.com/${{ github.repository }}/releases/tag/${{ env.CURRENT_VERSION }}) have been released 🎉' | ||
}) |
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
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,4 @@ | ||
#!/bin/sh | ||
. "$(dirname "$0")/_/husky.sh" | ||
|
||
yarn lint && yarn format |
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 |
---|---|---|
@@ -1,5 +1,5 @@ | ||
{ | ||
"printWidth": 90, | ||
"printWidth": 120, | ||
"singleQuote": true, | ||
"trailingComma": "all", | ||
"arrowParens": "always" | ||
|
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 @@ | ||
save-prefix "" |
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 |
---|---|---|
|
@@ -17,6 +17,7 @@ services: | |
- nestjsx_crud | ||
|
||
mysql: | ||
platform: linux/x86_64 | ||
image: mysql:5.7 | ||
ports: | ||
- 3316:3306 | ||
|
Oops, something went wrong.