This change addresses an issue where the OpenSkill model definitions (bradleyTerryFull, bradleyTerryPart, plackettLuce, thurstoneMostellerFull, and thurstoneMostellerPart) were not properly exported, making them inaccessible through standard import paths. The new configuration in the package.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 the package.json was updated to include a dedicated path for the models 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:
import {
bradleyTerryFull,
bradleyTerryPart,
plackettLuce,
thurstoneMostellerFull,
thurstoneMostellerPart
} from "openskill/models";
import type {
bradleyTerryFull,
bradleyTerryPart,
plackettLuce,
thurstoneMostellerFull,
thurstoneMostellerPart
} from "openskill/models";
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.
coverage: 100.0%. remained the same
when pulling 4100e8b0125afb85ccdda5f2e87cc0c45b1c8f79 on eddyfidel:feature/missing-models-export
into 4f78c217425f0d48182ab6f0e7a135cbb495c821 on philihp:main.
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.