Skip to content

Commit cfb4dcd

Browse files
committed
Bump version to 3.3.0
1 parent c120ad8 commit cfb4dcd

File tree

7 files changed

+35
-8
lines changed

7 files changed

+35
-8
lines changed

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# compiled output
22
/dist
3-
.eslintcache
43

54
# dependencies
65
/node_modules

.npmignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22
src/
33
tests/
44
.editorconfig
5-
.eslintcache
65
.gitattributes
76
.gitignore
87
.nvmrc
98
.prettierignore
109
.prettierrc.json
11-
eslint.config.mjs
10+
.oxlintrc.json
1211
tsconfig.json
12+
vitest.config.ts

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
.vscode
22
dist
33
node_modules
4-
.eslintcache
54
.gitattributes
65
.gitignore
76
.npmignore

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@2toad/profanity",
3-
"version": "3.2.0",
3+
"version": "3.3.0",
44
"description": "A multi-language profanity filter with full TypeScript support",
55
"homepage": "https://github.com/2Toad/Profanity",
66
"author": "2Toad",

src/tools/benchmark/results.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,36 @@
88

99
### Benchmarks
1010

11+
12+
#### v3.3.0
13+
14+
- `censor()` on large text is ~5x faster.
15+
- `exists()` improved 5–10% across the board.
16+
- `censor()` regressed ~10% due to array-join overhead with few matches — negligible at >2M ops/sec.
17+
18+
```
19+
benchmark-1 | Using test data: v1
20+
benchmark-1 | exists() - small profane text x 4,915,990 ops/sec ±2.70% (95 runs sampled)
21+
benchmark-1 | exists() - small profane text (unicode on) x 1,779,776 ops/sec ±3.15% (95 runs sampled)
22+
benchmark-1 | exists() - large clean text x 76,738 ops/sec ±2.86% (94 runs sampled)
23+
benchmark-1 | exists() - large clean text (unicode on) x 14,985 ops/sec ±0.51% (94 runs sampled)
24+
benchmark-1 | censor() - Word, small profane text x 2,534,015 ops/sec ±2.01% (98 runs sampled)
25+
benchmark-1 | censor() - Word, small profane text (unicode on) x 1,151,956 ops/sec ±1.60% (98 runs sampled)
26+
benchmark-1 | censor() - Word, large profane text x 12,141 ops/sec ±0.61% (99 runs sampled)
27+
benchmark-1 | censor() - Word, large profane text (unicode on) x 8,749 ops/sec ±1.67% (99 runs sampled)
28+
benchmark-1 | exists() - small clean text x 5,254,667 ops/sec ±2.34% (97 runs sampled)
29+
benchmark-1 | exists() - large clean text x 81,157 ops/sec ±0.49% (98 runs sampled)
30+
benchmark-1 | exists() - large profane text x 1,298,867 ops/sec ±6.78% (99 runs sampled)
31+
benchmark-1 | exists() - partial match, small profane text x 4,405,440 ops/sec ±3.38% (92 runs sampled)
32+
benchmark-1 | censor() - Word, small profane text x 2,559,010 ops/sec ±0.92% (96 runs sampled)
33+
benchmark-1 | censor() - FirstChar, small profane text x 2,615,257 ops/sec ±0.17% (98 runs sampled)
34+
benchmark-1 | censor() - FirstVowel, small profane text x 2,314,978 ops/sec ±2.35% (99 runs sampled)
35+
benchmark-1 | censor() - AllVowels, small profane text x 2,197,737 ops/sec ±3.82% (90 runs sampled)
36+
benchmark-1 | censor() - Word, large profane text x 12,296 ops/sec ±0.27% (97 runs sampled)
37+
benchmark-1 | censor() - partial match, Word, small profane text x 2,292,568 ops/sec ±3.11% (99 runs sampled)
38+
benchmark-1 | Fastest: exists() - small clean text
39+
```
40+
1141
#### v3.2.0
1242
```
1343
benchmark-1 | Using test data: v1

tests/require.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { describe, it, expect } from "vitest";
22

3-
// eslint-disable-next-line @typescript-eslint/no-require-imports
43
const dist = require("../dist");
54

65
describe("CommonJS Require", () => {

0 commit comments

Comments
 (0)