@opentermsarchive/engine 0.30.0 → 0.31.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/config/ci.json CHANGED
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "services": {
3
- "declarationsPath": "./contrib-declarations/declarations"
3
+ "declarationsPath": "./demo-declarations/declarations"
4
4
  }
5
5
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentermsarchive/engine",
3
- "version": "0.30.0",
3
+ "version": "0.31.0",
4
4
  "description": "Tracks and makes visible changes to the terms of online services",
5
5
  "homepage": "https://github.com/OpenTermsArchive/engine#readme",
6
6
  "bugs": {
@@ -107,7 +107,7 @@
107
107
  "supertest": "^6.3.3"
108
108
  },
109
109
  "peerDependencies": {
110
- "@opentermsarchive/terms-types": "~0.1.1"
110
+ "@opentermsarchive/terms-types": "^1.0.0"
111
111
  },
112
112
  "engines": {
113
113
  "node": ">=16.0.0"
@@ -78,6 +78,10 @@ export default async options => {
78
78
  if (!schemaOnly && service) {
79
79
  service.getTermsTypes()
80
80
  .filter(termsType => {
81
+ if (!service.terms[termsType]?.latest) { // If this terms type has been deleted and there is only a historical record for it, but no current valid declaration
82
+ return false;
83
+ }
84
+
81
85
  if (servicesTermsTypes[serviceId] && servicesTermsTypes[serviceId].length > 0) {
82
86
  return servicesTermsTypes[serviceId].includes(termsType);
83
87
  }