Skip to content

Commit 4a47ded

Browse files
authored
Merge pull request #51 from wayofdev/feat/refactor
2 parents 3e75c56 + 7d57e05 commit 4a47ded

22 files changed

+564
-11
lines changed

.github/.commitlint.config.mjs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
// More info: https://github.com/wayofdev/npm-shareable-configs/blob/master/packages/commitlint-config/src/index.js
2+
const automaticCommitPattern = /^chore\(release\):.*\[skip ci]/
3+
4+
export default {
5+
extends: ['@commitlint/config-conventional'],
6+
/*
7+
This resolves a linting conflict between commitlint's body-max-line-length
8+
due to @semantic-release/git putting release notes in the commit body
9+
https://github.com/semantic-release/git/issues/331
10+
*/
11+
ignores: [(commitMessage) => automaticCommitPattern.test(commitMessage)],
12+
rules: {
13+
'body-leading-blank': [1, 'always'],
14+
'body-max-line-length': [2, 'always', 120],
15+
'footer-leading-blank': [1, 'always'],
16+
'footer-max-line-length': [2, 'always', 120],
17+
'header-max-length': [2, 'always', 100],
18+
'scope-case': [2, 'always', 'lower-case'],
19+
'subject-case': [2, 'never', ['sentence-case', 'start-case', 'pascal-case', 'upper-case']],
20+
'subject-empty': [2, 'never'],
21+
'subject-full-stop': [2, 'never', '.'],
22+
'type-case': [2, 'always', 'lower-case'],
23+
'type-empty': [2, 'never'],
24+
'type-enum': [
25+
2,
26+
'always',
27+
[
28+
'feat', // New feature
29+
'fix', // Bug fix
30+
'perf', // Performance improvement
31+
'docs', // Documentation changes
32+
'style', // Code style update (formatting, missing semi colons, etc)
33+
'deps', // Dependency updates
34+
'refactor', // Code refactoring
35+
'ci', // Continuous integration changes
36+
'test', // Adding missing tests
37+
'revert', // Revert to a previous commit
38+
'build', // Changes that affect the build system
39+
'chore', // Other changes that don't modify src or test files
40+
'security', // Security improvements
41+
],
42+
],
43+
},
44+
}

.github/.cz.config.js

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
// @see https://cz-git.qbb.sh/config/#configure-template
2+
module.exports = {
3+
alias: { fd: 'docs: fix typos' },
4+
messages: {
5+
type: 'Select the type of change that you\'re committing:',
6+
scope: 'Denote the SCOPE of this change (optional):',
7+
customScope: 'Denote the SCOPE of this change:',
8+
subject: 'Write a SHORT, IMPERATIVE tense description of the change:\n',
9+
body: 'Provide a LONGER description of the change (optional). Use "|" to break new line:\n',
10+
breaking: 'List any BREAKING CHANGES (optional). Use "|" to break new line:\n',
11+
footerPrefixesSelect: 'Select the ISSUES type of changeList by this change (optional):',
12+
customFooterPrefix: 'Input ISSUES prefix:',
13+
footer: 'List any ISSUES by this change. E.g.: #31, #34:\n',
14+
generatingByAI: 'Generating your AI commit subject...',
15+
generatedSelectByAI: 'Select suitable subject by AI generated:',
16+
confirmCommit: 'Are you sure you want to proceed with the commit above?'
17+
},
18+
types: [
19+
{ value: 'feat', name: 'feat: A new feature', emoji: ':sparkles:' },
20+
{ value: 'fix', name: 'fix: A bug fix', emoji: ':bug:' },
21+
{ value: 'perf', name: 'perf: A code change that improves performance', emoji: ':zap:' },
22+
{ value: 'docs', name: 'docs: Documentation only changes', emoji: ':memo:' },
23+
{ value: 'style', name: 'style: Changes that do not affect the meaning of the code', emoji: ':lipstick:' },
24+
{ value: 'deps', name: 'deps: A dependency update', emoji: ':package:' },
25+
{ value: 'refactor', name: 'refactor: A code change that neither fixes a bug nor adds a feature', emoji: ':recycle:' },
26+
{ value: 'ci', name: 'ci: Changes to our CI configuration files and scripts', emoji: ':ferris_wheel:' },
27+
{ value: 'test', name: 'test: Adding missing tests or correcting existing tests', emoji: ':white_check_mark:' },
28+
{ value: 'revert', name: 'revert: Reverts a previous commit', emoji: ':rewind:' },
29+
{ value: 'build', name: 'build: Changes that affect the build system or external dependencies', emoji: ':package:' },
30+
{ value: 'chore', name: 'chore: Other changes that don\'t modify src or test files', emoji: ':hammer:' },
31+
{ value: 'security', name: 'security: A code change that fixes a security issue', emoji: ':lock:' }
32+
],
33+
useEmoji: false,
34+
emojiAlign: 'center',
35+
useAI: false,
36+
aiNumber: 1,
37+
themeColorCode: '',
38+
scopes: [],
39+
allowCustomScopes: true,
40+
allowEmptyScopes: true,
41+
customScopesAlign: 'bottom',
42+
customScopesAlias: 'custom',
43+
emptyScopesAlias: 'empty',
44+
upperCaseSubject: false,
45+
markBreakingChangeMode: false,
46+
allowBreakingChanges: ['feat', 'fix'],
47+
breaklineNumber: 100,
48+
breaklineChar: '|',
49+
skipQuestions: [],
50+
issuePrefixes: [{ value: 'closed', name: 'closed: ISSUES has been processed' }],
51+
customIssuePrefixAlign: 'top',
52+
emptyIssuePrefixAlias: 'skip',
53+
customIssuePrefixAlias: 'custom',
54+
allowCustomIssuePrefix: true,
55+
allowEmptyIssuePrefix: true,
56+
confirmColorize: true,
57+
maxHeaderLength: Infinity,
58+
maxSubjectLength: Infinity,
59+
minSubjectLength: 0,
60+
scopeOverrides: undefined,
61+
defaultBody: '',
62+
defaultIssues: '',
63+
defaultScope: '',
64+
defaultSubject: ''
65+
}

.github/.release-please-config.json

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
{
2+
"release-type": "node",
3+
"packages": {
4+
".": {
5+
"package-name": "gh-actions",
6+
"changelog-path": "/CHANGELOG.md"
7+
}
8+
},
9+
"include-component-in-tag": false,
10+
"changelog-sections": [
11+
{
12+
"type": "feat",
13+
"section": "Features",
14+
"hidden": false
15+
},
16+
{
17+
"type": "fix",
18+
"section": "Bug Fixes",
19+
"hidden": false
20+
},
21+
{
22+
"type": "perf",
23+
"section": "Performance Improvements",
24+
"hidden": false
25+
},
26+
{
27+
"type": "docs",
28+
"section": "Documentation",
29+
"hidden": false
30+
},
31+
{
32+
"type": "deps",
33+
"section": "Dependencies",
34+
"hidden": false
35+
},
36+
{
37+
"type": "refactor",
38+
"section": "Code Refactoring",
39+
"hidden": false
40+
},
41+
{
42+
"type": "test",
43+
"section": "Tests",
44+
"hidden": true
45+
},
46+
{
47+
"type": "build",
48+
"section": "Build System",
49+
"hidden": true
50+
},
51+
{
52+
"type": "ci",
53+
"section": "Continuous Integration",
54+
"hidden": true
55+
},
56+
{
57+
"type": "chore",
58+
"section": "Miscellaneous",
59+
"hidden": true
60+
},
61+
{
62+
"type": "style",
63+
"section": "Styles",
64+
"hidden": true
65+
},
66+
{
67+
"type": "revert",
68+
"section": "Reverts",
69+
"hidden": true
70+
}
71+
]
72+
}

.github/.release-please-manifest.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
".": "1.0.0"
3+
}

.github/CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners
2+
3+
* @lotyp @jevgenijsblaus

.github/CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
[the@wayof.dev](mailto:the@wayof.dev).
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
[https://www.contributor-covenant.org/version/2/0/code_of_conduct.html](https://www.contributor-covenant.org/version/2/0/code_of_conduct.html).
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
[https://www.contributor-covenant.org/faq](https://www.contributor-covenant.org/faq). Translations are available at
128+
[https://www.contributor-covenant.org/translations](https://www.contributor-covenant.org/translations).

.github/FUNDING.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
3+
github: wayofdev
4+
5+
...

.github/SECURITY.md

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Security Policy
2+
3+
Thank you for helping keep project and its users safe. We greatly appreciate your efforts to disclose security vulnerabilities responsibly.
4+
5+
<br>
6+
7+
## 🚨 Reporting a Vulnerability
8+
9+
We take all security bugs in project seriously. Thank you for improving the security of this project. We appreciate your efforts and responsible disclosure and will make every effort to acknowledge your contributions.
10+
11+
### → How to Report a Vulnerability
12+
13+
1. **Direct Contact**: For highly sensitive information, please email us directly at `the@wayof.dev` with the subject line "SECURITY - Vulnerability Report". This will be treated with the highest priority.
14+
15+
2. **GitHub Issues**: For vulnerabilities that do not immediately affect the security of the application or its users, such as those found in non-critical systems, please report them through our GitHub issues. Make sure to use the `⚠️ Security Report` issue template. Please do not include sensitive information in GitHub issues. Detailed instructions about how to fill this report are included within the issue template itself.
16+
17+
<br>

.github/labeler.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
3+
# this file is for the labeler workflow job
4+
# Documentation https://github.com/marketplace/actions/labeler
5+
6+
"type: bug":
7+
- head-branch: ['^bug', '^fix', 'bug', 'fix']
8+
9+
"type: enhancement":
10+
- head-branch: ['^feature', '^feat', 'feature']
11+
12+
"type: documentation":
13+
- changed-files:
14+
- any-glob-to-any-file: ['assets/**/*', '.github/*', './*.md']
15+
16+
"type: maintenance":
17+
- changed-files:
18+
- any-glob-to-any-file: ['tests/**/*', '.github/workflows/*']
19+
20+
...

.github/workflows/create-changesets-release.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1+
---
2+
13
name: Create release or publish to pnpm reusable workflow
2-
on:
4+
on: # yamllint disable-line rule:truthy
35
workflow_call:
46
inputs:
57
os:
@@ -59,3 +61,5 @@ jobs:
5961
HOME: ${{ github.workspace }}
6062
GITHUB_TOKEN: ${{ secrets.token }}
6163
NPM_TOKEN: ${{ secrets.npm_token }}
64+
65+
...

0 commit comments

Comments
 (0)