@digigov/cli 2.5.0 → 2.6.1-govgr-5002.22-09-26-13-03

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,9 +1,17 @@
1
1
  # Change Log - @digigov/cli
2
2
 
3
- <!-- This log was last generated on Mon, 27 Jul 2026 17:23:56 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Wed, 26 Aug 2026 09:19:23 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
+ ## 2.6.0
8
+
9
+ Wed, 26 Aug 2026 09:19:23 GMT
10
+
11
+ ### Minor changes
12
+
13
+ - Adapt JS sources to TS 7 checkJs semantics (sangelopoulos@admin.grnet.gr)
14
+
7
15
  ## 2.5.0
8
16
 
9
17
  Mon, 27 Jul 2026 17:23:56 GMT
@@ -127,7 +127,7 @@ export function createChangelogCommand() {
127
127
  */
128
128
  function stripRangePrefix(range) {
129
129
  const match = range.match(/(\d+\.\d+[\.\d]*.*)/);
130
- return match ? match[1] : null;
130
+ return match?.[1] ?? null;
131
131
  }
132
132
 
133
133
  /**
@@ -148,9 +148,8 @@ function parseEntriesSince(content, sinceVersion) {
148
148
  let currentSection = null;
149
149
 
150
150
  for (const line of lines) {
151
- const versionMatch = line.match(/^## (\S+)/);
152
- if (versionMatch) {
153
- const version = versionMatch[1];
151
+ const version = line.match(/^## (\S+)/)?.[1];
152
+ if (version) {
154
153
  if (compareVersions(version, sinceVersion) <= 0) break;
155
154
  current = { version, date: '', sections: [] };
156
155
  currentSection = null;
@@ -165,17 +164,17 @@ function parseEntriesSince(content, sinceVersion) {
165
164
  continue;
166
165
  }
167
166
 
168
- const sectionMatch = line.match(/^### (.+)/);
169
- if (sectionMatch) {
170
- currentSection = { heading: sectionMatch[1], items: [] };
167
+ const heading = line.match(/^### (.+)/)?.[1];
168
+ if (heading) {
169
+ currentSection = { heading, items: [] };
171
170
  current.sections.push(currentSection);
172
171
  continue;
173
172
  }
174
173
 
175
- const itemMatch = line.match(/^- (.+)/);
176
- if (itemMatch && currentSection) {
174
+ const item = line.match(/^- (.+)/)?.[1];
175
+ if (item && currentSection) {
177
176
  currentSection.items.push(
178
- itemMatch[1].replace(/\s*\([^)]+@[^)]+\)\s*$/, '').trim(),
177
+ item.replace(/\s*\([^)]+@[^)]+\)\s*$/, '').trim(),
179
178
  );
180
179
  }
181
180
  }
@@ -200,10 +199,10 @@ function parseLatestEntry(content) {
200
199
  let currentSection = null;
201
200
 
202
201
  for (const line of lines) {
203
- const versionMatch = line.match(/^## (\S+)/);
204
- if (versionMatch) {
202
+ const nextVersion = line.match(/^## (\S+)/)?.[1];
203
+ if (nextVersion) {
205
204
  if (inEntry) break;
206
- version = versionMatch[1];
205
+ version = nextVersion;
207
206
  inEntry = true;
208
207
  continue;
209
208
  }
@@ -214,16 +213,16 @@ function parseLatestEntry(content) {
214
213
  continue;
215
214
  }
216
215
 
217
- const sectionMatch = line.match(/^### (.+)/);
218
- if (sectionMatch) {
219
- currentSection = { heading: sectionMatch[1], items: [] };
216
+ const heading = line.match(/^### (.+)/)?.[1];
217
+ if (heading) {
218
+ currentSection = { heading, items: [] };
220
219
  sections.push(currentSection);
221
220
  continue;
222
221
  }
223
222
 
224
- const itemMatch = line.match(/^- (.+)/);
225
- if (itemMatch && currentSection) {
226
- const item = itemMatch[1]
223
+ const rawItem = line.match(/^- (.+)/)?.[1];
224
+ if (rawItem && currentSection) {
225
+ const item = rawItem
227
226
  .replace(/\s*\([^)]+@[^)]+\)\s*$/, '')
228
227
  .trim();
229
228
  currentSection.items.push(item);
@@ -327,6 +326,7 @@ async function getPreviousVersionsFromGit(pkgJsonPath) {
327
326
  .relative(gitRoot, pkgJsonPath)
328
327
  .replace(/\\/g, '/');
329
328
 
329
+ /** @type {string | null} */
330
330
  let baseRef = null;
331
331
  for (const branch of ['main', 'master', 'origin/main', 'origin/master']) {
332
332
  try {
package/lib/index.js CHANGED
@@ -1,6 +1,15 @@
1
1
  export * from './command.js';
2
- export * from './project-utils.cjs';
3
- export * from './logger.cjs';
2
+ // TS 7 disallows `export *` from CJS `module.exports = {}` modules (TS2498),
3
+ // so these are named by hand — keep in sync with each .cjs file's module.exports.
4
+ export {
5
+ resolveProject,
6
+ findPackageJson,
7
+ resolveWorkspace,
8
+ resolveLocalPackages,
9
+ aliases,
10
+ makeConfig,
11
+ } from './project-utils.cjs';
12
+ export { logger } from './logger.cjs';
4
13
  export * from './pm-detect.js';
5
14
  export * from './registry.js';
6
15
  export * from './scope-scan.js';
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@digigov/cli",
3
3
  "description": "CLI for Digigov apps and libs with plugin support",
4
- "version": "2.5.0",
4
+ "version": "2.6.1-govgr-5002.22-09-26-13-03",
5
5
  "author": "GRNET Devs <devs@lists.grnet.gr>",
6
6
  "type": "module",
7
7
  "bin": {
@@ -18,7 +18,7 @@
18
18
  },
19
19
  "devDependencies": {
20
20
  "publint": "0.1.8",
21
- "typescript": "5.6.2",
21
+ "typescript": "7.0.2",
22
22
  "@types/fs-extra": "11.0.4",
23
23
  "@types/node": "20.17.24"
24
24
  },
package/tsconfig.cli.json CHANGED
@@ -2,6 +2,7 @@
2
2
  "compilerOptions": {
3
3
  "module": "NodeNext",
4
4
  "moduleResolution": "NodeNext",
5
+ "stableTypeOrdering": true,
5
6
  "noEmit": true,
6
7
  "allowJs": true,
7
8
  "checkJs": true,