Skip to content

Commit b7d9d23

Browse files
authored
Merge branch 'main' into fix-collection-api-email-reporting
2 parents f6af817 + 787442a commit b7d9d23

File tree

6 files changed

+31
-8
lines changed

6 files changed

+31
-8
lines changed

CHANGELOG.md

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,26 @@ All changes that impact users of this module are documented in this file, in the
1010

1111
- Fix email reporting on collection API errors
1212

13+
## 9.2.2 - 2025-11-19
14+
15+
_Full changeset and discussions: [#1203](https://github.com/OpenTermsArchive/engine/pull/1203)._
16+
17+
> Development of this release was supported by the [French Ministry for Foreign Affairs](https://www.diplomatie.gouv.fr/fr/politique-etrangere-de-la-france/diplomatie-numerique/) through its ministerial [State Startups incubator](https://beta.gouv.fr/startups/open-terms-archive.html) under the aegis of the Ambassador for Digital Affairs.
18+
19+
### Fixed
20+
21+
- Fix saving records whose content is not yet loaded when using MongoDB storage.
22+
23+
## 9.2.1 - 2025-11-19
24+
25+
_Full changeset and discussions: [#1206](https://github.com/OpenTermsArchive/engine/pull/1206)._
26+
27+
> Development of this release was supported by the [European Commission](https://commission.europa.eu/) for its [VLOPs/VLOSEs instance](https://code.europa.eu/dsa/terms-and-conditions-database/vlops-and-vloses/).
28+
29+
### Fixed
30+
31+
- Fix tracking when proxy configuration is provided
32+
1333
## 9.2.0 - 2025-11-05
1434

1535
_Full changeset and discussions: [#1173](https://github.com/OpenTermsArchive/engine/pull/1173)._

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@opentermsarchive/engine",
3-
"version": "9.2.0",
3+
"version": "9.2.2",
44
"description": "Tracks and makes visible changes to the terms of online services",
55
"homepage": "https://opentermsarchive.org",
66
"bugs": {

src/archivist/fetcher/htmlOnlyFetcher.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import AbortController from 'abort-controller';
22
import convertBody from 'fetch-charset-detection'; // eslint-disable-line import/no-unresolved
3-
import HttpProxyAgent from 'http-proxy-agent';
4-
import HttpsProxyAgent from 'https-proxy-agent';
3+
import { HttpProxyAgent } from 'http-proxy-agent';
4+
import { HttpsProxyAgent } from 'https-proxy-agent';
55
import nodeFetch, { AbortError } from 'node-fetch';
66

77
import { resolveProxyConfiguration } from './proxyUtils.js';

src/archivist/recorder/index.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ export default class Recorder {
1212
return Promise.all([ this.versionsRepository.initialize(), this.snapshotsRepository.initialize() ]);
1313
}
1414

15-
finalize() {
16-
return Promise.all([ this.versionsRepository.finalize(), this.snapshotsRepository.finalize() ]);
15+
async finalize() {
16+
// Close repositories sequentially to avoid race conditions when both repositories use the same MongoDB connection (same server/database).
17+
// Parallel closing can cause "Operation interrupted because client was closed" errors, especially on Windows.
18+
await this.versionsRepository.finalize();
19+
await this.snapshotsRepository.finalize();
1720
}
1821

1922
getLatestSnapshot(terms, sourceDocumentId) {

src/archivist/recorder/repositories/mongo/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ export default class MongoRepository extends RepositoryInterface {
135135

136136
async #toPersistence(record) {
137137
if (record.content === undefined || record.content === null) {
138-
await this.repository.loadRecordContent(record);
138+
await this.loadRecordContent(record);
139139
}
140140

141141
return DataMapper.toPersistence(record);

0 commit comments

Comments
 (0)