Skip to content

Commit e4f8d25

Browse files
Version 1.0.0
Merge pull request #17 from KeyValueSoftwareSystems/staging
2 parents 184d98f + 4f23363 commit e4f8d25

File tree

93 files changed

+119208
-1
lines changed

Some content is hidden

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

93 files changed

+119208
-1
lines changed

.eslintrc.cjs

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
module.exports = {
2+
root: true,
3+
extends: ['plugin:vue/vue3-essential', 'eslint:recommended', '@vue/eslint-config-typescript', '@vue/eslint-config-prettier/skip-formatting', '@vue/airbnb', 'plugin:storybook/recommended'],
4+
parserOptions: {
5+
parser: '@typescript-eslint/parser',
6+
ecmaVersion: 'latest',
7+
project: ['./tsconfig.json', "./tsconfig-tests.json"]
8+
},
9+
overrides: [
10+
{
11+
files: ['*.vue', '*.ts'],
12+
rules: {
13+
'vue/multi-word-component-names': 'off'
14+
}
15+
}
16+
],
17+
rules: {
18+
'no-plusplus': 'off',
19+
'comma-dangle': ['error', 'never'],
20+
'import/no-extraneous-dependencies': 'off',
21+
'import/extensions': 'off',
22+
'import/no-unresolved': 'off',
23+
'@typescript-eslint/no-unused-vars': [
24+
'error',
25+
{
26+
ignoreRestSiblings: true,
27+
vars: 'local'
28+
}
29+
],
30+
'no-shadow': 'off',
31+
'implicit-arrow-linebreak': 'off',
32+
'space-before-blocks': 'error',
33+
'function-paren-newline': 'off',
34+
'padding-line-between-statements': [
35+
'error',
36+
{
37+
blankLine: 'always',
38+
prev: '*',
39+
next: 'return'
40+
},
41+
{
42+
blankLine: 'always',
43+
prev: ['const', 'let', 'var'],
44+
next: '*'
45+
},
46+
{
47+
blankLine: 'any',
48+
prev: ['const', 'let', 'var'],
49+
next: ['const', 'let', 'var']
50+
}
51+
],
52+
'object-curly-newline': 'off',
53+
'vue/multi-word-component-names': 'off',
54+
'vue/comma-dangle': 'off',
55+
'vue/no-setup-props-destructure': 'off',
56+
'func-call-spacing': 'off',
57+
'operator-linebreak': 'off',
58+
'import/prefer-default-export': 'off',
59+
'vue/html-indent': 'off',
60+
'vue/max-attributes-per-line': 'off',
61+
'no-spaced-func': 'off',
62+
'vuejs-accessibility/form-control-has-label': 'off',
63+
'@typescript-eslint/consistent-type-imports': 'error',
64+
'vue/first-attribute-linebreak': 'off',
65+
indent: ['off'],
66+
curly: ['error', 'multi', 'consistent'],
67+
'no-confusing-arrow': 'off',
68+
'nonblock-statement-body-position': 'off',
69+
'vue/operator-linebreak': 'off'
70+
}
71+
};

.github/PULL_REQUEST_TEMPLATE.md

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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.
45+

.github/workflows/test-and-build.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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: Build
33+
run: npm run build
Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
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+
54+
- name: Get Latest version from package.json
55+
run: |
56+
# Get the latest version from package.json
57+
LATEST_VERSION=$(node -p "require('./package.json').version")
58+
59+
# Output the latest version as a workflow env
60+
echo "latest_version=$LATEST_VERSION" >> $GITHUB_ENV
61+
62+
- name: Get new version
63+
id: get_next_version
64+
uses: christian-draeger/[email protected]
65+
with:
66+
current-version: ${{ env.latest_version }}
67+
version-fragment: ${{ steps.release_type.outputs.lowercase }}
68+
69+
- name: Update version in package.json and package-lock.json
70+
run: |
71+
OLD_VERSION=${{ env.latest_version }}
72+
NEW_VERSION=${{ steps.get_next_version.outputs.next-version }}
73+
74+
npm version $NEW_VERSION --no-git-tag-version
75+
git config user.name github-actions
76+
git config user.email [email protected]
77+
git add package.json package-lock.json
78+
git commit -m "Bump version from $OLD_VERSION to $NEW_VERSION"
79+
git push origin HEAD:main
80+
81+
- name: Build Package
82+
run: npm run build
83+
84+
- name: Publish package
85+
run: npm publish --access public --//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}
86+
if: success()
87+
88+
- name: Revert package.json and package-lock.json
89+
run: |
90+
# Revert package.json and package-lock.json to the previous version
91+
npm version ${{ env.latest_version }} --no-git-tag-version
92+
git commit -am "Revert to version ${{ env.latest_version }}"
93+
git push origin HEAD:main
94+
if: failure()
95+
96+
- name: Create GitHub release
97+
if: success()
98+
uses: actions/create-release@v1
99+
env:
100+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
101+
with:
102+
tag_name: v${{ steps.get_next_version.outputs.next-version }}
103+
release_name: Release v${{ steps.get_next_version.outputs.next-version }}
104+
# body: Release ${{ env.NEW_VERSION }}
105+
draft: false
106+
prerelease: false

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
node_modules
2+
.DS_Store
3+
dist

.husky/pre-commit

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

.storybook/main.ts

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
import type { StorybookConfig } from "@storybook/vue3-vite";
2+
3+
const config: StorybookConfig = {
4+
stories: ["../**/*.mdx", "../**/*.stories.@(js|jsx|mjs|ts|tsx)"],
5+
addons: [
6+
"@storybook/addon-links",
7+
"@storybook/addon-essentials",
8+
"@chromatic-com/storybook",
9+
"@storybook/addon-interactions",
10+
],
11+
framework: {
12+
name: "@storybook/vue3-vite",
13+
options: {},
14+
},
15+
docs: {
16+
autodocs: "tag",
17+
},
18+
};
19+
export default config;

.storybook/preview.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import type { Preview } from "@storybook/vue3";
2+
3+
const preview: Preview = {
4+
parameters: {
5+
controls: {
6+
matchers: {
7+
color: /(background|color)$/i,
8+
date: /Date$/i,
9+
},
10+
},
11+
},
12+
};
13+
14+
export default preview;

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+
## [1.0.0] - 2024-05-08
6+
7+
### Added
8+
9+
- Vue 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 [email protected]. 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)