chore(deps): add missing export for models #687
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change addresses an issue where the OpenSkill model definitions (
bradleyTerryFull
,bradleyTerryPart
,plackettLuce
,thurstoneMostellerFull
, andthurstoneMostellerPart
) were not properly exported, making them inaccessible through standard import paths. The new configuration in thepackage.json
allows users to directly import these models in their projects using different module formats (ES Modules, CommonJS, and TypeScript types).Change Details:
The
exports
section in thepackage.json
was updated to include a dedicated path for themodels
directory:This addition ensures that the various models can now be imported using a simplified syntax and are compatible with different module systems. The following import variants can now be used:
ES Modules:
CommonJS (Require Syntax):
TypeScript Imports:
Impact:
This enhancement provides a more convenient and modular import path, allowing users to access the rating models independently from the main library, improving usability and maintaining compatibility with various module systems.