engine icon indicating copy to clipboard operation
engine copied to clipboard

`--modified` fails on new filter file

Open MattiSG opened this issue 4 months ago • 1 comments

In https://github.com/OpenTermsArchive/GenAI-declarations/pull/298, I add a new filter file.

The ota validate declarations --modified fails with the error:

 1) Uncaught error outside test suite:
     Uncaught TypeError: Cannot read properties of undefined (reading 'terms')
      at file:///Users/opentermsarchive/Documents/GenAI-declarations/node_modules/@opentermsarchive/engine/scripts/declarations/utils/index.js:53:65

Which references the source line:

        servicesTermsTypes[serviceId] = Object.keys(declaration.terms); // Considering how rarely filters are used, simply return all term types that could potentially be impacted to spare implementing a function change check

This seems to fail because a new filter file is created, and there is thus no file to compare against in the base branch.

MattiSG avatar Aug 23 '25 21:08 MattiSG