From ee528bd143e526ee3c175804d62266c73fe39cc5 Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Tue, 6 Jan 2026 15:54:39 +0100 Subject: [PATCH 1/6] Remove obsolete default config values --- config/default.json | 2 -- 1 file changed, 2 deletions(-) diff --git a/config/default.json b/config/default.json index 3cac8ea15..95dab61cd 100644 --- a/config/default.json +++ b/config/default.json @@ -56,8 +56,6 @@ } }, "dataset": { - "title": "Sandbox collection dataset", - "versionsRepositoryURL": "https://github.com/OpenTermsArchive/sandbox-declarations", "publishingSchedule": "30 8 * * MON" } } From d00084796981174e33adb42d8d42dd5331e1581f Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Tue, 6 Jan 2026 15:54:48 +0100 Subject: [PATCH 2/6] Validate required datagouv configuration --- scripts/dataset/publish/datagouv/index.js | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/scripts/dataset/publish/datagouv/index.js b/scripts/dataset/publish/datagouv/index.js index c41cf7f41..164f84c03 100644 --- a/scripts/dataset/publish/datagouv/index.js +++ b/scripts/dataset/publish/datagouv/index.js @@ -41,11 +41,19 @@ function loadConfiguration() { const organizationIdOrSlug = config.has('@opentermsarchive/engine.dataset.datagouv.organizationIdOrSlug') && config.get('@opentermsarchive/engine.dataset.datagouv.organizationIdOrSlug'); if (!datasetId && !organizationIdOrSlug) { - throw new Error('Either datasetId or organizationIdOrSlug is required in config at @opentermsarchive/engine.dataset.datagouv'); + throw new Error('Either "datasetId" or "organizationIdOrSlug" is required in config at @opentermsarchive/engine.dataset.datagouv'); } const datasetTitle = config.get('@opentermsarchive/engine.dataset.title'); + if (!datasetTitle) { + throw new Error('"title" is required in config at @opentermsarchive/engine.dataset'); + } + const frequency = config.has('@opentermsarchive/engine.dataset.datagouv.frequency') && config.get('@opentermsarchive/engine.dataset.datagouv.frequency'); + if (!frequency){ + throw new Error('"frequency" is required in config at @opentermsarchive/engine.dataset.datagouv'); + } + const useDemo = config.has('@opentermsarchive/engine.dataset.datagouv.useDemo') && config.get('@opentermsarchive/engine.dataset.datagouv.useDemo'); const apiBaseUrl = useDemo ? DEMO_API_BASE_URL : PRODUCTION_API_BASE_URL; From 370b7df6e7bcd25e7d8f8f86ccaacce2d99d8f68 Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Tue, 6 Jan 2026 15:54:50 +0100 Subject: [PATCH 3/6] Add changelog entry --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index c16db4b4a..028ff1297 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,14 @@ All changes that impact users of this module are documented in this file, in the [Common Changelog](https://common-changelog.org) format with some additional specifications defined in the CONTRIBUTING file. This codebase adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## Unreleased [patch] + +> 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. + +### Fixed + +- Validate presence of required configuration for dataset publication to Data.gouv + ## 10.1.2 - 2025-12-09 _Full changeset and discussions: [#1212](https://github.com/OpenTermsArchive/engine/pull/1212)._ From 59e406de05fea12d179c11e25dfec5a27c5c89cb Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Tue, 6 Jan 2026 15:58:03 +0100 Subject: [PATCH 4/6] Remove early check blocking validation errors --- scripts/dataset/publish/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/dataset/publish/index.js b/scripts/dataset/publish/index.js index 79f752a12..e85f6ef20 100644 --- a/scripts/dataset/publish/index.js +++ b/scripts/dataset/publish/index.js @@ -16,7 +16,7 @@ export default async function publishRelease({ archivePath, releaseDate, stats } platforms.push({ name: 'GitLab', publish: () => publishGitLab({ archivePath, releaseDate, stats }) }); } - if (process.env.OTA_ENGINE_DATAGOUV_API_KEY && (config.has('@opentermsarchive/engine.dataset.datagouv.datasetId') || config.has('@opentermsarchive/engine.dataset.datagouv.organizationIdOrSlug'))) { + if (process.env.OTA_ENGINE_DATAGOUV_API_KEY) { platforms.push({ name: 'data.gouv.fr', publish: () => publishDataGouv({ archivePath, releaseDate, stats }) }); } From f47df14cc4106f055dfd9dfa8399c9956b586134 Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Tue, 6 Jan 2026 15:59:01 +0100 Subject: [PATCH 5/6] Lint --- scripts/dataset/publish/datagouv/index.js | 4 +++- scripts/dataset/publish/index.js | 2 -- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/dataset/publish/datagouv/index.js b/scripts/dataset/publish/datagouv/index.js index 164f84c03..98f49cff1 100644 --- a/scripts/dataset/publish/datagouv/index.js +++ b/scripts/dataset/publish/datagouv/index.js @@ -45,12 +45,14 @@ function loadConfiguration() { } const datasetTitle = config.get('@opentermsarchive/engine.dataset.title'); + if (!datasetTitle) { throw new Error('"title" is required in config at @opentermsarchive/engine.dataset'); } const frequency = config.has('@opentermsarchive/engine.dataset.datagouv.frequency') && config.get('@opentermsarchive/engine.dataset.datagouv.frequency'); - if (!frequency){ + + if (!frequency) { throw new Error('"frequency" is required in config at @opentermsarchive/engine.dataset.datagouv'); } diff --git a/scripts/dataset/publish/index.js b/scripts/dataset/publish/index.js index e85f6ef20..ec8906173 100644 --- a/scripts/dataset/publish/index.js +++ b/scripts/dataset/publish/index.js @@ -1,5 +1,3 @@ -import config from 'config'; - import logger from '../logger/index.js'; import publishDataGouv from './datagouv/index.js'; From d55612b1d4adcee8926969d913ce73dd9f2e8a65 Mon Sep 17 00:00:00 2001 From: Nicolas Dupont Date: Tue, 6 Jan 2026 16:05:59 +0100 Subject: [PATCH 6/6] Update changelog entry MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Clément Biron --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 028ff1297..0baf1fec0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,7 +8,7 @@ All changes that impact users of this module are documented in this file, in the ### Fixed -- Validate presence of required configuration for dataset publication to Data.gouv +- Validate presence of required configuration for dataset publication to data.gouv.fr ## 10.1.2 - 2025-12-09