Releases: GLINCKER/glin-profanity
Glin-Profanity v2.1.0
🚀 Release Notes: Glin-Profanity v2.1.0
We’re excited to roll out v2.1.0, a focused follow-up to our major v2.0.0
launch. This release brings refinements, UI enhancements, and improved configurability across the board — all while maintaining blazing-fast profanity detection.
✨ What’s New in v2.1.0
🔁 Auto Replace Profanity (New!)
- Automatically replaces detected words with a user-defined string like
***
,🧼
, or#@%!
. - Controlled via the new
autoReplace
andreplaceWith
config options in bothFilter
anduseProfanityChecker
.
🎚 Minimum Severity Filtering
- Introduced
minSeverity
option to allow filtering based on severity level. - Example: Only act on
Fuzzy
and above by settingminSeverity: SeverityLevel.Fuzzy
.
🧠 Context Logging + Match Info
- Internally logs detected words and shows improved match context.
- Optional
customActions
callback allows hooking into logs from React UI or backend usage.
💡 Improved React Testing UI
- All new UI for live testing in React:
- Supports
autoReplace
,customWords
,replaceWith
selector - Real-time result viewer
- Match log panel and severity display
- Supports
🧼 Internal Enhancements
- Fixed a few inconsistent auto-replace edge cases.
- Better support for live configuration changes without remounting the hook.
- Ensured
processedText
always respectsreplaceWith
.
📌 Reminder
v2.0+ requires Node.js v14+
For v1.x users, please refer to the legacy docs or upgrade accordingly.
📥 Installation
npm install glin-profanity
or
yarn add glin-profanity
🛠 Minor Fixes & Cleanup
- 🧪 Added test coverage for
checkProfanityWithMinSeverity
- 🐛 Fixed severity-level filter not updating under certain configs
- 📄 Polished MDX documentation and added interactive badges
- 🔍 Improved match detection for highly obfuscated inputs
✅ Summary
Feature | Status |
---|---|
Auto Replace Support | ✅ |
Minimum Severity Filtering | ✅ |
Match Context Logging | ✅ |
React Demo Enhancements | ✅ |
Improved Config/Hook Structure | ✅ |
Thank you for using Glin-Profanity 🙌
Your feedback helps shape the future of safe and respectful content tools.
Explore the full project on GitHub →
What's Changed
Full Changelog: v2.0.0...v2.1.0
Glin-Profanity v2.0.0
🚀 Release Notes: Glin-Profanity v2.0.0
We are excited to announce the release of Glin-Profanity v2.0.0! This major version introduces powerful new features and enhanced accuracy for profanity detection, addressing many community-reported issues and adding advanced matching capabilities.
✨ What's New in v2.0.0
1. Obfuscated Profanity Detection
The filter now detects obfuscated profanities such as:
f*ck
fuuuuck
shiiiit
a$$hole
You can enable this behavior using the allowObfuscatedMatch
configuration.
2. Fuzzy Matching with Tolerance Level
A new fuzzy matching system has been added to catch misspelled or intentionally distorted profanities. You can configure the detection sensitivity using the fuzzyToleranceLevel
option (range: 0.5 - 1
):
fuzzyToleranceLevel: 0.7 // Lower = more aggressive detection
3. False Positive Handling (Word Boundaries Fix)
Improved word boundary behavior to avoid false positives on innocent words like:
- "classic" (earlier flagged because of "ass")
- "button" (earlier flagged because of "butt")
These words are now correctly marked as non-profane.
4. Dynamic Custom Words Input
In the React demo/testing app, users can now input custom profane words directly in a JSON textarea input instead of uploading a file. This greatly improves testing speed and flexibility.
5. Severity Levels Improved
Severity detection now clearly categorizes profanity matches as:
- Exact Match
- Fuzzy Match
- Obfuscated/Merged Match
6. Overall Performance Optimizations
- Reduced unnecessary checks in the filter loop.
- Cleaned and optimized regex & normalization logic.
- React Hook (useProfanityChecker) enhanced for faster reactivity.
🐛 Bug Fixes
- Fixed broken behavior in word boundary matching.
- Fixed crash when dictionary term contained whitespace.
- Fixed severity mapping errors in processed text.
- Prevented double counting of profanities.
🔥 Breaking Changes
- Minimum Node.js version is now 14+.
- Some configuration keys may have been renamed or modified.
Please refer to the updated documentation.
⚙️ Upcoming in v2.1.x
- Dynamic dictionary injection at runtime.
- Real-time profanity detection support for chat applications.
- Multilingual profanity detection improvements.
- WebSocket-based profanity stream filter.
- Better TypeScript typings & advanced use cases examples.
📥 Installation
npm install glin-profanity
OR
yarn add glin-profanity
📝 What's Changed
- ✅ Introduced Obfuscated Match Detection
- ✅ Introduced Fuzzy Match Tolerance
- ✅ Word Boundaries accuracy improved
- ✅ Dynamic textarea-based custom word input in demo app
- ✅ Dictionary cleanup & enhancements
- ✅ Refined severity levels (Exact, Fuzzy, Obfuscated)
- ✅ React hook performance optimized
Thank you for using Glin-Profanity.
For feedback or contributions, visit Glin-Profanity on GitHub.
What's Changed
- Bump webpack from 5.93.0 to 5.95.0 by @dependabot in #37
- feat: 🎸 Detect Obfuscated Profanity and Boundaries Fix by @thegdsks in #48
New Contributors
- @dependabot made their first contribution in #37
Full Changelog: v1.1.9...v2.0.0
v1.1.9 - Bug Improvements
Release Notes: Glin-Profanity v1.1.9
We are excited to release Glin-Profanity v1.1.9, packed with new features, optimizations, and bug fixes to make profanity detection more flexible and user-friendly. This release focuses on enhancing the customization of the profanity filter, improving usability, and preventing false positives.
🚀 What's New in v1.1.9
1. External Global Whitelist Support
With this release, the global whitelist has been moved to an external JSON file. This allows developers to maintain and update the list of words that should bypass profanity checks from a centralized location. The whitelist is easily reusable across various parts of the application, making it more manageable.
- JSON-based whitelist: You can now store and manage global whitelisted words in a separate JSON file for easier updates and reusability.
- Flexible configuration: Users can still pass custom whitelisted words through the configuration, which will be merged with the global whitelist.
2. Enhanced Profanity Detection
The profanity filter now includes improved logic to prevent common non-profane words from being flagged as offensive. 8000 We've added a set of words to the default whitelist that may have caused confusion in prior versions.
- Default Whitelisted Words: Words such as "Document", "Class", "Shoot", and others have been added to the default whitelist to prevent false positives in common use cases.
3. Improved TypeScript Definitions
TypeScript users can now benefit from a more accurate mapping of type definitions. The package.json
has been updated to properly point to the correct type declaration files, ensuring better compatibility with both CommonJS (CJS) and ESModule (ESM) imports.
- TypeScript support: Improved type resolution for both CommonJS and ESModules using the
exports
field inpackage.json
.
🐛 Bug Fixes
- Fixed false positives: Resolved an issue where certain non-profane words were incorrectly flagged as profanity.
- Enhanced severity logic: Improved the logic for determining severity levels of profanity matches to reduce inaccurate results.
📦 Package Structure Changes
- JSON-based whitelist: The global whitelist has been moved to an external JSON file for better manageability.
- Improved TypeScript mappings: Type definitions now correctly point to the appropriate build files based on the environment (CJS/ESM).
⚙️ Future Plans
- Further improvements in custom word list management and multilingual support.
- Enhancements in real-time profanity detection for chat applications.
- Continuous integration and deployment improvements for faster and more frequent releases.
Check out the Glin-Profanity project on GitHub or install the latest version via npm:
npm install glin-profanity
OR
yarn add glin-profanity
Thank you for using Glin-Profanity!
What's Changed
- Introduced external JSON whitelist for global words.
- Fixed false positives for common words like "Document" and "Shoot".
- Improved TypeScript definitions for better CJS/ESM compatibility.
Full Changelog: v1.1.8...v1.1.9
v1.1.8
Release Notes: Glin-Profanity v1.1.8
We are excited to announce the release of Glin-Profanity v1.1.8! This update focuses on improving compatibility and providing support for both CommonJS (CJS) and ESModules (ESM) environments, along with other enhancements.
🚀 What's New in v1.1.8
1. Dual Build Support (CommonJS & ESM)
With this release, Glin-Profanity is now built and packaged to support both CommonJS and ESModule environments. This ensures compatibility with modern bundlers like Webpack and Rollup, as well as traditional Node.js applications.
- CommonJS (CJS): Built files are available in
lib/cjs/
. - ESModules (ESM): Built files are available in
lib/esm/
. - UMD Build: Universal build available for broader compatibility across various environments.
2. Updated Package Structure
The package now includes a new structure for better module resolution:
exports
field inpackage.json
for streamlined imports.- Updated
main
,module
, andtypes
fields inpackage.json
to point to the correct build files.
3. Improved Error Handling
Enhancements have been made to resolve issues related to module import errors in different environments, ensuring smoother integration in various platforms and applications.
🐛 Bug Fixes
- Fixed issues with incorrect severity levels being reported.
- Improved the handling of profane words merged into other words.
- Addressed the bug where certain complex word patterns were not correctly detected as profanity.
📦 Package Structure Changes
- Split builds into
lib/cjs/
for CommonJS andlib/esm/
for ES Modules. - Removed extra root files for better package size management.
⚙️ Future Plans
- Further enhancements to custom word list management.
- Additional language support and improved multilingual handling.
- Continuous integration and delivery improvements for faster release cycles.
Check out the Glin-Profanity project on GitHub or install the latest version via npm:
npm install glin-profanity
OR
yarn add glin-profanity
Thank you for using Glin-Profanity!
What's Changed
Full Changelog: v1.1.7...v1.1.8
Glin Profanity v1.1.7
Glin Profanity v1.1.7 Release Notes
🚀 What's New in v1.1.7
1. Enhanced Profanity Detection
- Severity Levels: Profanity detection now includes severity levels to categorize the intensity of detected profanities:
- Level 1: Exact match with the dictionary.
- Level 2: Fuzzy match with minor character alterations.
- Level 3: Detection of merged profane words within other words.
2. Improved Regex Matching
- Updated the regular expressions to better capture profane words, even when they are embedded in other text or altered with extra characters. This enhancement increases the accuracy and reliability of the detection process.
3. Bug Fixes
- Severity Level Reporting: Resolved issues where severity levels were sometimes reported as
undefined
. - Performance Optimizations: General optimizations to improve the performance of the profanity checker.
4. Documentation and Testing
- Updated the documentation to reflect the new features and enhancements.
- Added new unit tests to ensure robustness and accuracy of the new detection mechanisms.
⚙️ Installation & Usage
To upgrade to this version, run:
npm install glin-profanity@1.1.7
For more details, visit the GitHub repository.
📣 We Want Your Feedback!
We are committed to improving Glin Profanity and welcome your feedback. Please report any issues or suggestions on our GitHub Issues page.
🔮 Future Plans
- Custom Word List Management: Enhancements to provide more control and flexibility in managing custom word lists.
- Additional Language Support: Expanding support for more languages and improving the handling of multilingual content.
- CI/CD Improvements: Continuous integration and delivery pipeline improvements for faster, more efficient release cycles.
Thank you for using Glin Profanity!
v1.1.6 (August 10, 2024)
Minor Bugs and Fixes
What's New
-
Modular Architecture:
- Refactored the project structure to a monorepo, isolating
glin-profanity
as a separate package within thepackages
directory. - Leveraged Lerna and npm workspaces for efficient dependency management and streamlined development.
- Refactored the project structure to a monorepo, isolating
-
Enhanced Build and Publish Workflow:
- Implemented a GitHub Actions workflow to automate the build and publish process.
- Ensured only the
glin-profanity
package is published to npm, keeping the package lightweight and free from unnecessary repository dependencies.
-
New Features:
- Added support for custom word lists with JSON file uploads.
- Introduced options for case sensitivity, word boundaries, and custom actions on profanity detection.
- Enabled logging of detected profane words for better monitoring and analytics.
-
Improved Configuration:
- Enhanced TypeScript configuration with
resolveJsonModule
andesModuleInterop
for better module handling. - Updated
tsconfig.json
to ensure compatibility and efficient compilation.
- Enhanced TypeScript configuration with
-
Documentation:
- Updated README with detailed usage examples, API documentation, and contribution guidelines.
- Added a comprehensive
CONTRIBUTING.md
to guide new contributors.
Bug Fixes
- Resolved issues with JSON imports in TypeScript.
- Fixed iteration issues by enabling
downlevelIteration
in TypeScript configuration.
Dependency Management
- Updated dependencies to the latest versions to ensure security and performance.
- Cleaned up unnecessary dependencies and ensured proper peer dependencies.
Future Plans
- Further enhancements to custom word list management.
- Additional language support and improved multilingual handling.
- Continuous integration and delivery improvements for faster release cycles.
What's Changed
- Package Fix by @gagandua078 in #20
Full Changelog: v1.1.5...v1.1.6
v1.1.5 (August 10, 2024)
Minor Bugs and Fixes
Full Changelog: v1.1.3...v1.1.5
v1.1.4 (August 03, 2024)
v1.1.4 - Release Summary
This release brings significant improvements and new features, enhancing the functionality and maintainability of the glin-profanity
package. Thank you for your contributions and support!
What's Changed
- Setup publishing workflow and update package configurations by @gagandua078 in #11
- Release v1.1.3 by @gagandua078 in #16
Full Changelog: v1.1.2...v1.1.3
v1.1.2 (August 02, 2024)
- Types Enabled
- Multiple Bug Fixes and Improvements
What's Changed
- Enable Log profane by @gagandua078 in #10
Full Changelog: v1.1.1...v1.1.2
v1.1.1 (August 02, 2024)
Some Minor Fixes and Docs Update