Skip to content

fix: expose English language pack#154

Merged
alyldas merged 1 commit into
mainfrom
fix/expose-english-language-pack
Jul 13, 2026
Merged

fix: expose English language pack#154
alyldas merged 1 commit into
mainfrom
fix/expose-english-language-pack

Conversation

@alyldas

@alyldas alyldas commented Jul 13, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Move the reviewed English dictionary and filter implementation into src/languages/en.
  • Export the English dictionary, lazy read-only shared filter, and mutable filter factory from the package entrypoint.
  • Keep the Russian shared default unchanged while making the English implementation available in the published distribution.
  • Add source, type-level, and runtime distribution coverage for the public English API.
  • Update package metadata, policy documentation, and the private example to use the package-owned implementation.

Validation

  • npm test -- --run tests/english-language-pack.spec.ts tests/api.spec.ts tests/language-dictionaries.spec.ts tests/scanner.spec.ts
  • npm run check
  • npm pack --dry-run --json

Benchmark Evidence

Baseline origin/main:

  • create filter: 7.6264 avg ms
  • short clean: 0.0285 avg ms
  • long clean: 4.2932 avg ms
  • short match: 0.0038 avg ms

This branch:

  • create filter: 7.6255 avg ms
  • short clean: 0.0262 avg ms
  • long clean: 4.3215 avg ms
  • short match: 0.0037 avg ms

The English shared filter is initialized lazily, and the existing default matching path remains within normal benchmark variance.

Compatibility Notes

  • Existing public APIs and the Russian shared default remain unchanged.
  • English rules are opt-in through englishProfanityFilter or createEnglishProfanityFilter() and are not added to filter.
  • The shared English export is read-only; the factory returns isolated mutable filters with the existing runtime mutation contract.

Closes #148

No publish, no merge, no tag/release.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1358cb4a8a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/languages/en/index.ts
@alyldas alyldas force-pushed the fix/expose-english-language-pack branch from 1358cb4 to 47dccb6 Compare July 13, 2026 18:53
@alyldas

alyldas commented Jul 13, 2026

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🚀

Reviewed commit: 47dccb6be5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@alyldas alyldas merged commit 455ce27 into main Jul 13, 2026
4 checks passed
@alyldas alyldas deleted the fix/expose-english-language-pack branch July 13, 2026 20:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

feat: add reviewed English profanity coverage from the audit corpus

1 participant