Skip to content

Comments

Dev#11

Merged
MXASoundNDEv merged 8 commits intomainfrom
Dev
Jan 8, 2026
Merged

Dev#11
MXASoundNDEv merged 8 commits intomainfrom
Dev

Conversation

@MXASoundNDEv
Copy link
Owner

This pull request introduces several new features and improvements, focusing on enhanced phonetic matching, a new deterministic shuffle utility, and expanded documentation and tests. The most significant updates are the addition of the fisherYatesShuffle algorithm, major enhancements to the soundex function (including multilingual and custom mapping support), and comprehensive documentation updates reflecting these changes.

New Algorithms and Utilities:

  • Added a standalone fisherYatesShuffle() function for deterministic array shuffling, supporting custom random number generators and included in the main exports. [1] [2]
  • Updated the README with usage examples and documentation for fisherYatesShuffle. [1] [2]

Phonetic Matching Improvements:

  • Enhanced soundex() to support custom character mappings and improved French language normalization (accents, special characters, and French-specific mappings). The function signature now accepts language and customMap parameters, with updated logic and documentation. [1] [2]
  • Fixed logic in soundex for handling custom maps and first-letter code inclusion.

Documentation and Testing:

  • Significantly expanded the README to include a detailed "Fonctionnalités" section, performance benchmarks, and updated usage examples for all algorithms, including new features. [1] [2] [3] [4] [5]
  • Updated test count and documentation to reflect the new shuffle utility and improved coverage (now 115 tests). [1] [2]

Changelog and Release Management:

  • Added a new entry for version 1.0.2 in CHANGELOG.md, summarizing all new features, enhancements, and bug fixes, including Soundex improvements and the new shuffle algorithm.

CI/CD and Workflow Enhancements:

  • Introduced a GitHub Actions workflow to validate PR title formats and suggest labels based on PR content, enforcing commit conventions and improving project hygiene. (.github/workflows/pr-validation.yml)

MXASoundNDEv and others added 8 commits August 5, 2025 17:01
… Soundex, avec des tests unitaires pour valider les fonctionnalités.
…le-algorithm-with-tests

Add Fisher-Yates shuffle algorithm
…me Soundex et mise à jour des tests pour vérifier les mappages spécifiques au français.
… compris des algorithmes de similarité textuelle, des fonctions de génération aléatoire, et des utilitaires pour l'autocomplétion intelligente.
Copilot AI review requested due to automatic review settings January 8, 2026 23:19
@github-actions github-actions bot added documentation Improvements or additions to documentation algorithm tests dependencies labels Jan 8, 2026
@MXASoundNDEv MXASoundNDEv merged commit 478b94c into main Jan 8, 2026
27 of 29 checks passed
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request introduces significant enhancements to the algorith package, including a new Fisher-Yates shuffle algorithm, multilingual support for the Soundex phonetic encoder, and comprehensive documentation improvements. The PR adds version 1.0.2 with new features, extensive tests, and a GitHub Actions workflow for PR title validation.

Key Changes:

  • Added standalone fisherYatesShuffle() function with deterministic shuffling support
  • Enhanced soundex() with French language support, custom character mappings, and accent normalization
  • Added PR validation workflow to enforce conventional commit standards

Reviewed changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
algorithms/fisherYatesShuffle.js New Fisher-Yates shuffle implementation with custom RNG support
algorithms/soundex.js Enhanced with multilingual support (EN/FR), custom mappings, and French character normalization
test/fisherYatesShuffle.test.js Comprehensive tests for shuffle algorithm including determinism validation
test/soundex.test.js Expanded tests for multilingual support, custom mappings, and French normalization
test/compareAll.test.js Updated to include fisherYatesShuffle in exports validation
index.js Added fisherYatesShuffle to module exports
index.d.ts Updated TypeScript definitions for soundex and fisherYatesShuffle, reformatted indentation
package.json Version bump to 1.0.2, added autocomplete-related keywords
package-lock.json Updated package versions and dependencies
README.md Added features section, performance benchmarks, updated test count, expanded soundex documentation
CHANGELOG.md Added comprehensive release notes for version 1.0.2
docs/PR_CONVENTIONS.md New documentation for PR title conventions and validation process
.github/workflows/pr-validation.yml New GitHub Actions workflow to validate PR titles and suggest labels

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

- Section "Fonctionnalités" complète avec toutes les capacités de la bibliothèque
- Benchmarks détaillés (ops/s) pour petites, moyennes et grandes chaînes
- Performance du RandomEngine avec toutes ses fonctions
- **Tests unitaires** - 152 tests passant (amélioration de la couverture)
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The CHANGELOG states "152 tests passant" but the README badge and text indicate "115 passing". These test counts should be consistent across all documentation.

Suggested change
- **Tests unitaires** - 152 tests passant (amélioration de la couverture)
- **Tests unitaires** - amélioration de la couverture de tests

Copilot uses AI. Check for mistakes.
Comment on lines +123 to +127
const customMap = {
a: '', e: '', i: '', o: '', u: '',
r: 9, // Different from standard mapping
o: '', b: 1, e: '', r: 9, t: 3
};
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The customMap object has duplicate keys: 'r' is defined twice (line 125 and 126), 'o' twice, and 'e' twice. In JavaScript objects, duplicate keys result in the last value overwriting previous ones. This makes the test's intent unclear and may not properly validate the custom mapping feature.

Copilot uses AI. Check for mistakes.

# Pattern pour les conventions de commit
# Format: type(scope): description
if [[ "$PR_TITLE" =~ ^(feat|fix|docs|style|refactor|test|chore)(\([a-z0-9-]+\))?: .{1,50}$ ]]; then
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The PR title "Dev" does not follow the conventional commit format that the newly added PR validation workflow enforces. According to the workflow validation regex on line 24, PR titles must follow the format "type(scope): description" (e.g., "feat(soundex): add multilingual support"). This PR will fail its own validation workflow.

Copilot uses AI. Check for mistakes.
Comment on lines +22 to +33
c: 2, k: 2, q: 2, g: 2, j: 2, s: 2, x: 2, z: 2, ç: 2,
d: 3, t: 3,
l: 4,
m: 5, n: 5,
r: 6,
f: 7, v: 7
}
};

// Prétraitement
s = s.toLowerCase();
let first = s[0].toUpperCase();
if (lang === 'fr') s = normalize(s);
Copy link

Copilot AI Jan 8, 2026

Choose a reason for hiding this comment

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

The normalization function is only applied when the language is 'fr', but the French map includes 'ç' as a key (line 22). This creates an inconsistency: if normalization converts ç to s before lookup, the ç key in the French map will never be matched. Either remove 'ç: 2' from the French map since it's already normalized to 's', or ensure the normalization logic doesn't conflict with the map definitions.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

algorithm dependencies documentation Improvements or additions to documentation tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant