Compare commits
12 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4411bede02 | |||
| 58f4dde9c9 | |||
| 9586a567de | |||
| 6c663cf7fc | |||
| 535a62857c | |||
| 03f68e2912 | |||
| 71925553c1 | |||
| 53bb1437a0 | |||
| 92f8126abf | |||
| 5080d71fb8 | |||
| 56ad837b82 | |||
| 003c943a74 |
20
.gitea/issue_template/bug-template.md
Normal file
20
.gitea/issue_template/bug-template.md
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
---
|
||||||
|
name: "Bug Report"
|
||||||
|
about: Report a reproducible bug or regression
|
||||||
|
title: "Bug: "
|
||||||
|
---
|
||||||
|
|
||||||
|
## Steps To Reproduce
|
||||||
|
|
||||||
|
<!-- Simple, clear, laconical, reproducible steps how to cause this bug in a development environment -->
|
||||||
|
|
||||||
|
1.
|
||||||
|
2.
|
||||||
|
|
||||||
|
## The current behavior
|
||||||
|
|
||||||
|
<!-- It is recommended to provide an image or a video, if that is not possible a very concise text would suffice -->
|
||||||
|
|
||||||
|
## The expected behavior
|
||||||
|
|
||||||
|
<!-- Describe the expected behavior -->
|
||||||
29
.gitea/issue_template/feature-request.md
Normal file
29
.gitea/issue_template/feature-request.md
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
name: "Feature Request"
|
||||||
|
about: Standard feature request template.
|
||||||
|
title: "Feature: "
|
||||||
|
---
|
||||||
|
|
||||||
|
## Feature summary
|
||||||
|
|
||||||
|
<!-- e.g. -->
|
||||||
|
|
||||||
|
Add legal page to the website
|
||||||
|
|
||||||
|
## The expected behavior
|
||||||
|
|
||||||
|
<!-- e.g. -->
|
||||||
|
|
||||||
|
- Ability to select a language for legal page
|
||||||
|
- Presence of a legal page in sitemap
|
||||||
|
- Ability to add different legal documents in a .md format
|
||||||
|
|
||||||
|
## Helpful resources
|
||||||
|
|
||||||
|
<!-- e.g. -->
|
||||||
|
|
||||||
|
- [Svelte Markdown on NPM](https://www.npmjs.com/package/svelte-markdown)
|
||||||
|
|
||||||
|
## Notes
|
||||||
|
|
||||||
|
First two documents are going to be Privacy Policy and Terms of Service
|
||||||
9
.gitea/issue_template/task.md
Normal file
9
.gitea/issue_template/task.md
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
---
|
||||||
|
name: "Task"
|
||||||
|
about: "Staff task template "
|
||||||
|
title: "Task: "
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- Describe the task here, e.g. -->
|
||||||
|
|
||||||
|
Change pricing to medium standard
|
||||||
@@ -3,6 +3,7 @@
|
|||||||
"commands",
|
"commands",
|
||||||
"changelog",
|
"changelog",
|
||||||
"readme",
|
"readme",
|
||||||
"release"
|
"release",
|
||||||
|
"config"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
23
CHANGELOG.md
23
CHANGELOG.md
@@ -2,6 +2,29 @@
|
|||||||
|
|
||||||
Generation of this changelog is based on commits
|
Generation of this changelog is based on commits
|
||||||
|
|
||||||
|
## v1.5.1
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- [6c663cf7f] - **commands**: allow chore type in validation regex
|
||||||
|
|
||||||
|
## v1.5.0
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- [92f8126ab] - **commands**: add --amend option to commit sub-command
|
||||||
|
- [5080d71fb] - **config**: allow more config file names
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- [53bb1437a] - **commands**: allow chore type (#7)
|
||||||
|
|
||||||
|
## v1.4.0
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
- [8ab631549] - **commands**: add the ability to return code only for validation command
|
||||||
|
|
||||||
## v1.3.0
|
## v1.3.0
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ Resultium commit standardization library
|
|||||||
|
|
||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
You can create an `.rczrc` file in your root directory and specify available scopes and commit types
|
You can create an `.rczrc`, `.rczrc.json` or `rcz.config.json` file in your root directory and specify available scopes and commit types
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@resultium/rcz",
|
"name": "@resultium/rcz",
|
||||||
"version": "1.4.0",
|
"version": "1.5.1",
|
||||||
"description": "Resultium commit standardization library, based on conventional commits",
|
"description": "Resultium commit standardization library, based on conventional commits",
|
||||||
"main": "./dist/index.js",
|
"main": "./dist/index.js",
|
||||||
"bin": {
|
"bin": {
|
||||||
|
|||||||
43
src/index.ts
43
src/index.ts
@@ -24,6 +24,18 @@ const GetConfig = async () => {
|
|||||||
await fs.promises.readFile(path.join(process.cwd(), ".rczrc"))
|
await fs.promises.readFile(path.join(process.cwd(), ".rczrc"))
|
||||||
).toString()
|
).toString()
|
||||||
) as Config;
|
) as Config;
|
||||||
|
} else if (fs.existsSync(path.join(process.cwd(), ".rczrc.json"))) {
|
||||||
|
return JSON.parse(
|
||||||
|
(
|
||||||
|
await fs.promises.readFile(path.join(process.cwd(), ".rczrc.json"))
|
||||||
|
).toString()
|
||||||
|
) as Config;
|
||||||
|
} else if (fs.existsSync(path.join(process.cwd(), "rcz.config.json"))) {
|
||||||
|
return JSON.parse(
|
||||||
|
(
|
||||||
|
await fs.promises.readFile(path.join(process.cwd(), "rcz.config.json"))
|
||||||
|
).toString()
|
||||||
|
) as Config;
|
||||||
} else {
|
} else {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -39,8 +51,10 @@ program
|
|||||||
.command("commit")
|
.command("commit")
|
||||||
.description("Create a conventional commit")
|
.description("Create a conventional commit")
|
||||||
.option("-S, --sign", "sign the commit")
|
.option("-S, --sign", "sign the commit")
|
||||||
|
.option("--amend", "amend commit message to the last commit")
|
||||||
.action(async (options) => {
|
.action(async (options) => {
|
||||||
const sign = options.sign ? true : false;
|
const sign = options.sign ? true : false;
|
||||||
|
const amend = options.amend ? true : false;
|
||||||
|
|
||||||
const config = await GetConfig();
|
const config = await GetConfig();
|
||||||
|
|
||||||
@@ -51,7 +65,9 @@ program
|
|||||||
process.exit(0);
|
process.exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
const stageAll = await confirm({
|
const stageAll = amend
|
||||||
|
? null
|
||||||
|
: await confirm({
|
||||||
message: "Stage all changes?",
|
message: "Stage all changes?",
|
||||||
initialValue: true,
|
initialValue: true,
|
||||||
});
|
});
|
||||||
@@ -99,6 +115,11 @@ program
|
|||||||
value: "refactor",
|
value: "refactor",
|
||||||
hint: "code change that neither fixes a bug nor adds a feature",
|
hint: "code change that neither fixes a bug nor adds a feature",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
label: "chore",
|
||||||
|
value: "chore",
|
||||||
|
hint: "changes that are routinely, e.g. dependency update or a release commit",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -192,14 +213,24 @@ program
|
|||||||
if (stageAll) {
|
if (stageAll) {
|
||||||
await simpleGit()
|
await simpleGit()
|
||||||
.add(".")
|
.add(".")
|
||||||
.commit(commitMessage, sign ? ["-S"] : []);
|
.commit(
|
||||||
|
commitMessage,
|
||||||
|
sign ? (amend ? ["-S", "--amend"] : ["-S"]) : amend ? ["--amend"] : []
|
||||||
|
);
|
||||||
} else {
|
} else {
|
||||||
await simpleGit().commit(commitMessage, sign ? ["-S"] : []);
|
await simpleGit().commit(
|
||||||
|
commitMessage,
|
||||||
|
sign ? (amend ? ["-S", "--amend"] : ["-S"]) : amend ? ["--amend"] : []
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
note(commitMessage);
|
note(commitMessage);
|
||||||
|
|
||||||
outro("Finished creating a conventional commit, feel free to push");
|
outro(
|
||||||
|
`Finished ${
|
||||||
|
amend ? "amending" : "creating"
|
||||||
|
} a conventional commit, feel free to push`
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
program
|
program
|
||||||
@@ -434,9 +465,9 @@ program
|
|||||||
const testRegex = new RegExp(
|
const testRegex = new RegExp(
|
||||||
`(${
|
`(${
|
||||||
config?.types?.map((type) => type.value).join("|") ||
|
config?.types?.map((type) => type.value).join("|") ||
|
||||||
"feat|fix|build|ci|docs|perf|refactor"
|
"feat|fix|build|ci|docs|perf|refactor|chore"
|
||||||
})(\\((${
|
})(\\((${
|
||||||
config?.scopes?.join("|") || "..*"
|
config?.scopes ? [...config?.scopes, "release"] : "..*"
|
||||||
})\\))?!?: .* ?(\\(..*\\))?((\n\n..*)?(\n\n..*)?)?`,
|
})\\))?!?: .* ?(\\(..*\\))?((\n\n..*)?(\n\n..*)?)?`,
|
||||||
"gm"
|
"gm"
|
||||||
);
|
);
|
||||||
|
|||||||
Reference in New Issue
Block a user