diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..ec39c1a --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,66 @@ +# Pull Request Checklist + +## What does this PR do? + + + + + +## **Checklist** + +### Code Changes +- [ ] I have added new features to the package (e.g., custom time thresholds, new languages, etc.) +- [ ] I have fixed existing issues (e.g., incorrect formatting, performance bottlenecks) +- [ ] I have improved the overall structure or optimized the codebase + +### Documentation +- [ ] I have updated the README file or relevant documentation with the changes +- [ ] I have added code usage examples or updated existing examples to reflect changes +- [ ] I have updated the package version in the `pubspec.yaml` file + +### Testing + +**General Tests** +- [ ] The package correctly formats time differences into human-readable strings +- [ ] The package supports dynamic updates (e.g., changing locales, thresholds) + +**Localization** +- [ ] The package supports all documented languages +- [ ] Custom locales can be added and work as expected +- [ ] Language fallback works correctly if a specific locale is missing + +**Custom Thresholds** +- [ ] Custom time thresholds are applied correctly +- [ ] The package handles edge cases like just now, future dates, or extreme past dates + +**Error Handling** +- [ ] The package handles null or invalid inputs gracefully +- [ ] Fallback behavior works for unexpected or incorrect configurations + +**Responsiveness** +- [ ] The package adapts to time-zone differences accurately +- [ ] The formatting responds correctly to locale changes in the app + +**Performance** +- [ ] The package performs efficiently, even when processing frequent or large updates +- [ ] Performance tests show no regressions + +### How did you verify your code works? + + + + diff --git a/CHANGELOG.md b/CHANGELOG.md index 7ee5d16..2efbb1a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## 2.1.1 - **Fix**: Demo web app issue fixed. +- **Security**: Added `SECURITY.md` for vulnerability reporting and security best practices. +- **Enhancement**: Added `Pull Request template` to ensure thorough checks for new contributions. ## 2.1.0 diff --git a/README.md b/README.md index 8f90bde..00c4c03 100644 --- a/README.md +++ b/README.md @@ -84,7 +84,7 @@ This section explains the breaking change, the impact it has on custom implement ## Demo -### [Click here to experience the demo in a Web App](https://nixrajput.github.io/get-time-ago) +### [Click here to experience the demo in a Web App](https://nixrajput.github.io/get_time_ago) ## Installation diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..9f7a3dc --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,54 @@ +# Security Policy + +## Supported Versions + +The following versions of the `get_time_ago` package are currently being supported with security updates: + +| Version | Supported | +|---------|--------------------| +| 2.x.x | :white_check_mark: | +| 1.3.x | :white_check_mark: | +| 1.2.x | :x: | +| 0.x.x | :x: | + +If you are using an older, unsupported version, we recommend upgrading to the latest version to benefit from security fixes. + +## Reporting a Vulnerability + +We take security issues seriously. If you discover any security vulnerabilities or potential issues in the package, please report them to us privately to allow us to investigate and address the issue before it is publicly disclosed. + +### To report a vulnerability: + +- **Email:** [`nkr.nikhil.nkr@gmail.com`, `nixlab.in@gmail.com`] +- **Subject:** Security Issue in `get_time_ago` Package +- **Information to include:** + - A description of the vulnerability + - Steps to reproduce (if applicable) + - The impact of the vulnerability + - Any potential fixes or patches + +Please **do not** publicly disclose security vulnerabilities until we have confirmed and addressed them. We will work quickly to investigate and fix the issue. + +### Response Time: + +We aim to respond to vulnerability reports within **48 hours** and will work closely with you to understand and resolve the issue as quickly as possible. + +## Security Best Practices + +When using the package in your project, consider the following security best practices: + +1. **Keep the package up to date:** + Always use the latest version of the package to ensure you have the most recent security fixes and updates. + +2. **Review dependencies:** + Ensure that all other dependencies in your project are up-to-date and free from vulnerabilities. Use tools like `pub outdated` to identify and update outdated packages. + +## Patching and Updates + +We commit to regularly reviewing and updating the package with necessary security patches. Critical security vulnerabilities will be patched and released as soon as possible. If a critical fix is required, we will: + +- Prioritize the vulnerability fix +- Release a patch version immediately +- Notify users through the release notes and the changelog + +By adhering to these guidelines, you help ensure a more secure experience when using the `get_time_ago` package. \ No newline at end of file