cht-conf 4.10.0 → 5.1.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/CHANGELOG.md CHANGED
@@ -1,3 +1,20 @@
1
+ # [5.1.0](https://github.com/medic/cht-conf/compare/v5.0.0...v5.1.0) (2025-07-02)
2
+
3
+
4
+ ### Features
5
+
6
+ * compile max_task_notifications ([#717](https://github.com/medic/cht-conf/issues/717)) ([3c68ea2](https://github.com/medic/cht-conf/commit/3c68ea251c73ecfca5a910060c28e68f932c9963))
7
+
8
+ # [5.0.0](https://github.com/medic/cht-conf/compare/v4.10.0...v5.0.0) (2025-06-24)
9
+
10
+
11
+ * feat([#712](https://github.com/medic/cht-conf/issues/712))!: update targeted NodeJS versions ([#713](https://github.com/medic/cht-conf/issues/713)) ([40575ec](https://github.com/medic/cht-conf/commit/40575ece74da38a583238ed54a4b13cd892a14a4))
12
+
13
+
14
+ ### BREAKING CHANGES
15
+
16
+ * remove support for NodeJS 18
17
+
1
18
  # [4.10.0](https://github.com/medic/cht-conf/compare/v4.9.0...v4.10.0) (2025-06-16)
2
19
 
3
20
 
package/package.json CHANGED
@@ -1,10 +1,10 @@
1
1
  {
2
2
  "name": "cht-conf",
3
- "version": "4.10.0",
3
+ "version": "5.1.0",
4
4
  "description": "Configure CHT deployments",
5
5
  "main": "./src/lib/main.js",
6
6
  "engines": {
7
- "node": ">=18.0.0"
7
+ "node": ">=20.0.0"
8
8
  },
9
9
  "scripts": {
10
10
  "clean": "rm -rf ./build/",
@@ -49,7 +49,7 @@
49
49
  "json-diff": "^1.0.6",
50
50
  "json-stringify-safe": "^5.0.1",
51
51
  "json2csv": "^5.0.7",
52
- "mime-types": "^2.1.35",
52
+ "mime-types": "^3.0.1",
53
53
  "minimist": "^1.2.8",
54
54
  "mkdirp": "^3.0.1",
55
55
  "open": "^8.4.2",
@@ -92,7 +92,7 @@
92
92
  "mocha": "^11.1.0",
93
93
  "nyc": "^17.1.0",
94
94
  "pouchdb-adapter-memory": "^9.0.0",
95
- "rewire": "^7.0.0",
95
+ "rewire": "^8.0.0",
96
96
  "semantic-release": "^24.2.4",
97
97
  "sinon": "^19.0.2"
98
98
  }
@@ -65,6 +65,13 @@ const compileAppSettingsForProject = async (projectDir, options) => {
65
65
  const baseSettingsPath = path.join(projectDir, `${APP_SETTINGS_DIR_PATH}/base_settings.json`);
66
66
  const appSettingsPath = path.join(projectDir, APP_SETTINGS_JSON_PATH);
67
67
  const esLintFilePath = path.join(projectDir, '.eslintrc');
68
+ const parseMaxTaskNotifications = (maxTaskNotifications) => {
69
+ if (typeof maxTaskNotifications !== 'number' || !Number.isInteger(maxTaskNotifications) ||
70
+ maxTaskNotifications < 0) {
71
+ throw new Error('max_task_notifications should be a positive integer number');
72
+ }
73
+ return maxTaskNotifications;
74
+ };
68
75
 
69
76
  // Fail if no eslintrc file is found
70
77
  if (!fs.exists(esLintFilePath)) {
@@ -130,6 +137,11 @@ const compileAppSettingsForProject = async (projectDir, options) => {
130
137
  targets: parseTargets(projectDir),
131
138
  };
132
139
 
140
+ if (appSettings.max_task_notifications) {
141
+ appSettings.tasks.max_task_notifications = parseMaxTaskNotifications(appSettings.max_task_notifications);
142
+ delete appSettings.max_task_notifications;
143
+ }
144
+
133
145
  const purgeConfig = parsePurge(projectDir);
134
146
  if (purgeConfig) {
135
147
  appSettings.purge = purgeConfig;