Skip to content

Commit f7b0864

Browse files
Version 1.0.0
2 parents c0883ff + 4c5fc91 commit f7b0864

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

79 files changed

+19004
-1
lines changed

.eslintrc.cjs

Lines changed: 100 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,100 @@
1+
module.exports = {
2+
env: {
3+
browser: true,
4+
es2021: true
5+
},
6+
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended'],
7+
overrides: [
8+
{
9+
env: {
10+
node: true
11+
},
12+
files: ['.eslintrc.{js,cjs}'],
13+
parserOptions: {
14+
sourceType: 'script'
15+
}
16+
}
17+
],
18+
parser: '@typescript-eslint/parser',
19+
parserOptions: {
20+
ecmaVersion: 'latest',
21+
sourceType: 'module'
22+
},
23+
plugins: ['@typescript-eslint', 'import'],
24+
rules: {
25+
'no-plusplus': 'off',
26+
'comma-dangle': ['off'],
27+
'import/no-extraneous-dependencies': 'off',
28+
'import/extensions': 'off',
29+
'import/no-unresolved': 'off',
30+
'@typescript-eslint/no-unused-vars': [
31+
'error',
32+
{
33+
ignoreRestSiblings: true,
34+
vars: 'local'
35+
}
36+
],
37+
'no-shadow': 'off',
38+
'implicit-arrow-linebreak': 'off',
39+
'space-before-blocks': 'error',
40+
'function-paren-newline': 'off',
41+
'padding-line-between-statements': [
42+
'error',
43+
{
44+
blankLine: 'always',
45+
prev: '*',
46+
next: 'return'
47+
},
48+
{
49+
blankLine: 'always',
50+
prev: ['const', 'let', 'var'],
51+
next: '*'
52+
},
53+
{
54+
blankLine: 'any',
55+
prev: ['const', 'let', 'var'],
56+
next: ['const', 'let', 'var']
57+
}
58+
],
59+
'object-curly-newline': 'off',
60+
'func-call-spacing': 'off',
61+
'operator-linebreak': 'off',
62+
'import/prefer-default-export': 'off',
63+
'no-spaced-func': 'off',
64+
'@typescript-eslint/consistent-type-imports': 'error',
65+
indent: ["error", 2, { "SwitchCase": 1}],
66+
curly: ['error', 'multi', 'consistent'],
67+
'no-confusing-arrow': 'off',
68+
'nonblock-statement-body-position': 'off',
69+
'@typescript-eslint/no-explicit-any': 'warn',
70+
'sort-imports': ['error', {ignoreCase: true, ignoreDeclarationSort: true}],
71+
'import/order': [
72+
'error',
73+
{
74+
groups: [
75+
['external', 'builtin'],
76+
'internal',
77+
['sibling', 'parent'],
78+
'index',
79+
],
80+
pathGroups: [
81+
{
82+
pattern: '@(react|react-native)',
83+
group: 'external',
84+
position: 'before',
85+
},
86+
{
87+
pattern: '@src/**',
88+
group: 'internal',
89+
},
90+
],
91+
pathGroupsExcludedImportTypes: ['internal', 'react'],
92+
'newlines-between': 'always',
93+
alphabetize: {
94+
order: 'asc',
95+
caseInsensitive: true,
96+
},
97+
},
98+
],
99+
}
100+
};

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
This template outlines the recommended format for creating pull requests within this project. Please fill out all sections before submitting your PR
2+
3+
## Branch Naming:
4+
5+
- Use a descriptive branch name that reflects the change and follows the format: [type]/[brief-description]
6+
- Replace [type] with feature, fix, refactor, hotfix, or other relevant categories
7+
- Keep the description concise and clear
8+
9+
## Commit Guidelines:
10+
11+
- Adhere to the "scope:subject" commit message structure
12+
- Scope can be feat, fix, docs, test, refactor, build, format, etc.
13+
- Use imperative tense (e.g., "fix: User unable to login")
14+
## Pull Request Checklist:
15+
16+
[ ] **Read the contributing guidelines** <br />
17+
[ ] **Branch is up-to-date with the base branch: main (or other designated branch)**<br />
18+
[ ] **Changes pass all tests: npm test or yarn test (or equivalent command)**<br />
19+
[ ] **Documentation has been updated (if applicable)**<br />
20+
## Description:
21+
- Start your pull request summary with a clear and informative heading. Use the Markdown syntax `##` for the heading, like `## Your Heading Here`.
22+
- For the section detailing the changes introduced by this pull request, use the Markdown heading `## Changes`.
23+
- Briefly describe the changes introduced in this pull request.Ensure that the changelog has been updated accordingly
24+
- Explain the motivation and the problem it solves
25+
- Mention any breaking changes
26+
- Link to related issues or internal tickets
27+
## Additional Notes:
28+
29+
- Include any other relevant information, such as limitations, known issues, or future improvements.
30+
## Screenshots (if applicable):
31+
32+
- Add screenshots or GIFs to help visualize your changes.
33+
## Testing Instructions:
34+
35+
- Provide step-by-step instructions on how to test your changes
36+
## Checklist for Reviewers:
37+
38+
[ ] **Code follows project conventions and style guidelines**<br />
39+
[ ] **Changes do not introduce new warnings or errors**<br />
40+
[ ] **Unit tests cover the changes adequately**<br />
41+
[ ] **Documentation is updated correctly and reflects the changes**<br />
42+
Additional Information:
43+
44+
By submitting this pull request, I confirm that my contribution is made under the terms of the MIT License.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Test Suite
2+
3+
on:
4+
pull_request:
5+
# The branches below must be a subset of the branches above
6+
branches: [main, dev]
7+
8+
jobs:
9+
test-and-build:
10+
runs-on: ubuntu-latest
11+
strategy:
12+
matrix:
13+
node-version: [18.x]
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v2
17+
with:
18+
ref: ${{ github.event.pull_request.head.sha }}
19+
fetch-depth: 0
20+
21+
- name: Use Node.js ${{ matrix.node-version }}
22+
uses: actions/setup-node@v2
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
26+
- name: Install dependencies
27+
run: npm install
28+
29+
- name: Linting
30+
run: npm run lint
31+
32+
- name: Test cases
33+
run: npm run test
34+
35+
- name: Build
36+
run: npm run build
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
name: Deploy
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
ReleaseType:
7+
description: 'Release Type'
8+
required: true
9+
default: 'warning'
10+
type: choice
11+
options:
12+
- Major
13+
- Feature
14+
- Bug
15+
16+
jobs:
17+
update-and-publish:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v2
22+
23+
- name: Setup Node.js
24+
uses: actions/setup-node@v2
25+
with:
26+
node-version: 18.x
27+
scope: '@keyvaluesystems'
28+
29+
- name: Install dependencies
30+
run: npm install
31+
32+
- name: Run tests
33+
run: npm run test
34+
35+
- name: 'Set release type : ${{ inputs.ReleaseType }}'
36+
id: release_type
37+
uses: ASzc/change-string-case-action@v5
38+
with:
39+
string: ${{ inputs.ReleaseType }}
40+
41+
- name: Extract Current Branch and Validate
42+
id: get_current_branch
43+
shell: bash
44+
run: |
45+
BRANCH="${GITHUB_REF#refs/heads/}"
46+
if [ "$BRANCH" == 'main' ]
47+
then
48+
echo "Branch validation Successful"
49+
else
50+
echo "Releases only taken from main branch"
51+
exit 1
52+
fi
53+
- name: Get Latest version from package.json
54+
run: |
55+
# Get the latest version from package.json
56+
LATEST_VERSION=$(node -p "require('./package.json').version")
57+
# Output the latest version as a workflow env
58+
echo "latest_version=$LATEST_VERSION" >> $GITHUB_ENV
59+
- name: Get new version
60+
id: get_next_version
61+
uses: christian-draeger/increment-semantic-version@1.0.3
62+
with:
63+
current-version: ${{ env.latest_version }}
64+
version-fragment: ${{ steps.release_type.outputs.lowercase }}
65+
66+
- name: Update version in package.json and package-lock.json
67+
run: |
68+
OLD_VERSION=${{ env.latest_version }}
69+
NEW_VERSION=${{ steps.get_next_version.outputs.next-version }}
70+
npm version $NEW_VERSION --no-git-tag-version
71+
git config user.name github-actions
72+
git config user.email github-actions@github.com
73+
git add package.json package-lock.json
74+
git commit -m "Bump version from $OLD_VERSION to $NEW_VERSION"
75+
git push origin HEAD:main
76+
- name: Build Package
77+
run: npm run build
78+
79+
- name: Publish package
80+
run: npm publish --access public --//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}
81+
if: success()
82+
83+
- name: Revert package.json and package-lock.json
84+
run: |
85+
# Revert package.json and package-lock.json to the previous version
86+
npm version ${{ env.latest_version }} --no-git-tag-version
87+
git commit -am "Revert to version ${{ env.latest_version }}"
88+
git push origin HEAD:main
89+
if: failure()
90+
91+
- name: Create GitHub release
92+
if: success()
93+
uses: actions/create-release@v1
94+
env:
95+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
96+
with:
97+
tag_name: v${{ steps.get_next_version.outputs.next-version }}
98+
release_name: Release v${{ steps.get_next_version.outputs.next-version }}
99+
# body: Release ${{ env.NEW_VERSION }}
100+
draft: false
101+
prerelease: false

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
node_modules/
2+
dist/
3+
.DS_Store
4+
coverage/
5+
example/package-lock.json
6+

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npm run lint

CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
## [0.0.1] - 2024-03-26
6+
7+
### Added
8+
9+
- React UI kit for managing and displaying in-app notification

CODE_OF_CONDUCT.md

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, sex characteristics, gender identity and expression,
9+
level of experience, education, socio-economic status, nationality, personal
10+
appearance, race, religion, or sexual identity and orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
- Using welcoming and inclusive language
18+
- Being respectful of differing viewpoints and experiences
19+
- Gracefully accepting constructive criticism
20+
- Focusing on what is best for the community
21+
- Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
- The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
- Trolling, insulting/derogatory comments, and personal or political attacks
28+
- Public or private harassment
29+
- Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
- Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at it.team@keyvalue.systems. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
72+
73+
[homepage]: https://www.contributor-covenant.org
74+
75+
For answers to common questions about this code of conduct, see
76+
https://www.contributor-covenant.org/faq

0 commit comments

Comments
 (0)