Problem
loadOntologyPackage() derives the package directory with manifestPath.slice(0, manifestPath.lastIndexOf("/")). Windows paths use backslashes, so lastIndexOf("/") returns -1 and the code removes only the last character from openontology.yaml.
The loader then looks for declared files below a non-existent path such as openontology.yam\schema\namespaces.yaml, making every directory-backed OpenOntology package fail to load on Windows.
Reproduction
On Windows, scaffold a package with initOntologyPackage(dir, ...), then call loadOntologyPackage(dir) or pass the explicit openontology.yaml path. Both throw that the declared schema file is missing even though it exists.
Expected
Manifest-relative schema and data files should resolve from the manifest's parent directory on every supported platform.
Proposed fix
Use Node's platform-aware path.dirname() and cover explicit manifest-path loading in the validation suite.
Problem
loadOntologyPackage()derives the package directory withmanifestPath.slice(0, manifestPath.lastIndexOf("/")). Windows paths use backslashes, solastIndexOf("/")returns-1and the code removes only the last character fromopenontology.yaml.The loader then looks for declared files below a non-existent path such as
openontology.yam\schema\namespaces.yaml, making every directory-backed OpenOntology package fail to load on Windows.Reproduction
On Windows, scaffold a package with
initOntologyPackage(dir, ...), then callloadOntologyPackage(dir)or pass the explicitopenontology.yamlpath. Both throw that the declared schema file is missing even though it exists.Expected
Manifest-relative schema and data files should resolve from the manifest's parent directory on every supported platform.
Proposed fix
Use Node's platform-aware
path.dirname()and cover explicit manifest-path loading in the validation suite.