Skip to content

Commit 0f2c9b5

Browse files
committed
feat(convention): add project templates and commit conventions
1 parent 1b2c190 commit 0f2c9b5

10 files changed

+16253
-16
lines changed

.github/COMMIT_CONVENTION.md

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
## Git Commit Message Convention
2+
3+
Using conventional commit messages, we can automate the process of generating the CHANGELOG file. All commits messages will automatically be validated against the following regex.
4+
5+
``` js
6+
/^(revert: )?(feat|fix|docs|style|refactor|perf|test|workflow|ci|chore|types|build|improvement)((.+))?: .{1,50}/
7+
```
8+
9+
## Commit Message Format
10+
A commit message consists of a **header**, **body** and **footer**. The header has a **type**, **scope** and **subject**:
11+
12+
> The **scope** is optional
13+
14+
```
15+
feat(router): add support for prefix
16+
17+
Prefix makes it easier to append a path to a group of routes
18+
```
19+
20+
1. `feat` is type.
21+
2. `router` is scope and is optional
22+
3. `add support for prefix` is the subject
23+
4. The **body** is followed by a blank line.
24+
5. The optional **footer** can be added after the body, followed by a blank line.
25+
26+
## Types
27+
Only one type can be used at a time and only following types are allowed.
28+
29+
- feat
30+
- fix
31+
- docs
32+
- style
33+
- refactor
34+
- perf
35+
- test
36+
- workflow
37+
- ci
38+
- chore
39+
- types
40+
- build
41+
42+
If a type is `feat` or `fix`, then the commit will appear in the CHANGELOG.md file. However if there is any BREAKING CHANGE, the commit will always appear in the changelog.
43+
44+
### Revert
45+
If the commit reverts a previous commit, it should begin with `revert:`, followed by the header of the reverted commit. In the body it should say: `This reverts commit <hash>`., where the hash is the SHA of the commit being reverted.
46+
47+
## Scope
48+
The scope could be anything specifying place of the commit change. For example: `router`, `view`, `querybuilder`, `database`, `model` and so on.
49+
50+
## Subject
51+
The subject contains succinct description of the change:
52+
53+
- use the imperative, present tense: "change" not "changed" nor "changes".
54+
- don't capitalize first letter
55+
- no dot (.) at the end
56+
57+
## Body
58+
59+
Just as in the **subject**, use the imperative, present tense: "change" not "changed" nor "changes".
60+
The body should include the motivation for the change and contrast this with previous behavior.
61+
62+
## Footer
63+
64+
The footer should contain any information about **Breaking Changes** and is also the place to
65+
reference GitHub issues that this commit **Closes**.
66+
67+
**Breaking Changes** should start with the word `BREAKING CHANGE:` with a space or two newlines. The rest of the commit message is then used for this.

.github/FUNDING.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
open_collective: secjs

.github/ISSUE_TEMPLATE.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!-- CLICK "Preview" FOR INSTRUCTIONS IN A MORE READABLE FORMAT -->
2+
3+
## Prerequisites
4+
5+
- Ensure the issue isn't already reported.
6+
- Ensure you are reporting the bug in the correct repository.
7+
8+
*Delete the above section and the instructions in the sections below before submitting*
9+
10+
## Description
11+
12+
If this is a feature request, explain why it should be added. Specific use-cases and problems that it solve are best.
13+
14+
For bug reports, please provide as much *relevant* info as possible.
15+
16+
## Package version
17+
<!-- YOUR ANSWER -->
18+
19+
## Error Message & Stack Trace
20+
21+
## Relevant Information

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!-- CLICK "Preview" FOR INSTRUCTIONS IN A MORE READABLE FORMAT -->
2+
3+
## Proposed changes
4+
5+
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request. If it fixes a bug or resolves a feature request, be sure to link to that issue.
6+
7+
## Types of changes
8+
9+
What types of changes does your code introduce?
10+
11+
_Put an `x` in the boxes that apply_
12+
13+
- [ ] Bugfix (non-breaking change which fixes an issue)
14+
- [ ] New feature (non-breaking change which adds functionality)
15+
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
16+
17+
## Checklist
18+
19+
_Put an `x` in the boxes that apply. You can also fill these out after creating the PR. If you're unsure about any of them, don't hesitate to ask. We're here to help! This is simply a reminder of what we are going to look for before merging your code._
20+
21+
- [ ] I have read the [CONTRIBUTING](https://github.com/SecJS/Core/blob/master/CONTRIBUTING.md) documentation
22+
- [ ] Lint and unit tests pass locally with my changes
23+
- [ ] I have added tests that prove my fix is effective or that my feature works.
24+
- [ ] I have added necessary documentation (if appropriate)
25+
26+
## Further comments
27+
28+
If this is a relatively large or complex change, kick off the discussion by explaining why you chose the solution you did and what alternatives you considered, etc...

.github/workflows/cd.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
id: release
3333

3434
- name: Publish to NPM Registry
35-
run: yarn publish --access public
35+
run: npm publish --access public
3636
if: steps.release.outputs.released == 'true'
3737
env:
3838
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

.gitignore

Lines changed: 122 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,128 @@
1-
node_modules
1+
node_modules/
2+
3+
# Logs
4+
logs
5+
*.log
6+
npm-debug.log*
7+
yarn-debug.log*
8+
yarn-error.log*
9+
lerna-debug.log*
10+
.pnpm-debug.log*
11+
12+
# Diagnostic reports (https://nodejs.org/api/report.html)
13+
report.[0-9]*.[0-9]*.[0-9]*.[0-9]*.json
14+
15+
# Runtime data
16+
pids
17+
*.pid
18+
*.seed
19+
*.pid.lock
20+
21+
# Directory for instrumented libs generated by jscoverage/JSCover
22+
lib-cov
23+
24+
# Coverage directory used by tools like istanbul
225
coverage
3-
.DS_STORE
26+
*.lcov
27+
28+
# nyc test coverage
429
.nyc_output
30+
31+
# Grunt intermediate storage (https://gruntjs.com/creating-plugins#storing-task-files)
32+
.grunt
33+
34+
# Bower dependency directory (https://bower.io/)
35+
bower_components
36+
37+
# node-waf configuration
38+
.lock-wscript
39+
40+
# Compiled binary addons (https://nodejs.org/api/addons.html)
41+
build/Release
42+
43+
# Dependency directories
44+
jspm_packages/
45+
46+
# Snowpack dependency directory (https://snowpack.dev/)
47+
web_modules/
48+
49+
# TypeScript cache
50+
*.tsbuildinfo
51+
52+
# Optional npm cache directory
53+
.npm
54+
55+
# Optional eslint cache
56+
.eslintcache
57+
58+
# Microbundle cache
59+
.rpt2_cache/
60+
.rts2_cache_cjs/
61+
.rts2_cache_es/
62+
.rts2_cache_umd/
63+
64+
# Optional REPL history
65+
.node_repl_history
66+
67+
# Output of 'npm pack'
68+
*.tgz
69+
70+
# Yarn Integrity file
71+
.yarn-integrity
72+
73+
# parcel-bundler cache (https://parceljs.org/)
74+
.cache
75+
.parcel-cache
76+
77+
# Next.js build output
78+
.next
79+
out
80+
81+
# Nuxt.js build / generate output
82+
.nuxt
83+
84+
# Gatsby files
85+
.cache/
86+
# Comment in the public line in if your project uses Gatsby and not Next.js
87+
# https://nextjs.org/blog/next-9-1#public-directory-support
88+
# public
89+
90+
# vuepress build output
91+
.vuepress/dist
92+
93+
# Serverless directories
94+
.serverless/
95+
96+
# FuseBox cache
97+
.fusebox/
98+
99+
# DynamoDB Local files
100+
.dynamodb/
101+
102+
# TernJS port file
103+
.tern-port
104+
105+
# Stores VSCode versions used for testing VSCode extensions
106+
.vscode-test
107+
108+
# yarn v2
109+
.yarn/cache
110+
.yarn/unplugged
111+
.yarn/build-state.yml
112+
.yarn/install-state.gz
113+
.pnp.*
114+
115+
# IDE
5116
.idea
6-
.vscode/
7-
*.sublime-project
8-
*.sublime-workspace
9-
*.log
10-
build
11-
dist
12-
shrinkwrap.yaml
13-
package-lock.json
117+
.vscode
118+
119+
# dotenv environment variables file
120+
.env
121+
.env.testing
122+
.env.production
14123

124+
# Build files
15125
*.js
16126
*.d.ts
127+
dist
128+
build

CONTRIBUTING.md

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# Contributing
2+
3+
SecJS is a community driven project. You are free to contribute in any of the following ways.
4+
5+
- [Coding style](coding-style)
6+
- [Fix bugs by creating PR's](fix-bugs-by-creating-prs)
7+
- [Share an RFC for new features or big changes](share-an-rfc-for-new-features-or-big-changes)
8+
- [Report security issues](report-security-issues)
9+
- [Be a part of the community](be-a-part-of-community)
10+
11+
## Coding style
12+
13+
Majority of SecJS core packages are written in Typescript. Having a brief knowledge of Typescript is required to contribute to the core.
14+
15+
## Fix bugs by creating PR's
16+
17+
We appreciate every time you report a bug in the packages. However, taking time to submit a PR can help us in fixing bugs quickly and ensure a healthy and stable eco-system.
18+
19+
Go through the following points, before creating a new PR.
20+
21+
1. Create an issue discussing the bug or short-coming in the package.
22+
2. Once approved, go ahead and fork the repository.
23+
3. Make sure to start from the `develop`, since this is the upto date branch.
24+
4. Make sure to keep commits small and relevant.
25+
5. We follow [conventional-commits](https://github.com/conventional-changelog/conventional-changelog) to structure our commit messages. Instead of running `git commit -m "message"`, you must run only `git commit`, which will show you prompts to create a valid commit message.
26+
6. Once done with all the changes, create a PR against the `develop` branch.
27+
28+
## Share an RFC for new features or big changes
29+
30+
Sharing PR's for small changes works great. However, when contributing big features to the package, it is required to go through the RFC process.
31+
32+
### What is an RFC?
33+
34+
RFC stands for **Request for Commits**, a standard process followed by many other frameworks including [Ember](https://github.com/emberjs/rfcs), [yarn](https://github.com/yarnpkg/rfcs) and [rust](https://github.com/rust-lang/rfcs).
35+
36+
In brief, RFC process allows you to talk about the changes with everyone in the community and get a view of the core team before dedicating your time to work on the feature.
37+
38+
The RFC proposals are created as issues on [SecJS/Rfcs](https://github.com/SecJS/Rfcs) repository. Make sure to read the README to learn about the process in depth.
39+
40+
## Report security issues
41+
42+
All the security issues, must be reported via [email](mailto:lenon@secjs.com.br) and not using any of the public channels.
43+
44+
## Be a part of community
45+
46+
We welcome you to participate in the [forum](https://forum.secjs.com.br/) and the SecJS [discord server](https://discord.me/secjs). You are free to ask your questions and share your work or contributions made to SecJS eco-system.
47+
48+
We follow a strict [Code of Conduct](https://secjs.com.br/community-guidelines) to make sure everyone is respectful to each other.

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,18 @@
55
[![GitHub followers](https://img.shields.io/github/followers/jlenon7.svg?style=social&label=Follow&maxAge=2592000)](https://github.com/jlenon7?tab=followers)
66
[![GitHub stars](https://img.shields.io/github/stars/secjs/core.svg?style=social&label=Star&maxAge=2592000)](https://github.com/secjs/core/stargazers/)
77

8+
<p>
9+
<a href="https://www.buymeacoffee.com/secjs" target="_blank"><img src="https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png" alt="Buy Me A Coffee" style="height: 41px !important;width: 174px !important;box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;-webkit-box-shadow: 0px 3px 2px 0px rgba(190, 190, 190, 0.5) !important;" ></a>
10+
</p>
11+
812
<p>
913
<img alt="GitHub language count" src="https://img.shields.io/github/languages/count/secjs/core?style=for-the-badge&logo=appveyor">
1014

1115
<img alt="Repository size" src="https://img.shields.io/github/repo-size/secjs/core?style=for-the-badge&logo=appveyor">
1216

1317
<img alt="License" src="https://img.shields.io/badge/license-MIT-brightgreen?style=for-the-badge&logo=appveyor">
18+
19+
<img alt="Commitizen" src="https://img.shields.io/badge/commitizen-friendly-brightgreen?style=for-the-badge&logo=appveyor">
1420
</p>
1521

1622
The intention behind this repository is to concentrate all `SecJS` libraries to create an HTTP server to any NodeJS project.
@@ -85,4 +91,6 @@ class TestController {
8591

8692
---
8793

94+
## License
95+
8896
Made with 🖤 by [jlenon7](https://github.com/jlenon7) :wave:

0 commit comments

Comments
 (0)