@digigov/cli 2.4.3-govgr-4752.27-07-26-12-24 → 2.5.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 +13 -1
- package/commands/packages/changelog.js +1 -1
- package/commands/packages/doctor.js +1 -1
- package/commands/packages/init.js +1 -1
- package/commands/packages/update.js +1 -1
- package/lib/command.js +1 -1
- package/lib/index.js +1 -1
- package/lib/{logger.js → logger.cjs} +8 -2
- package/lib/project-utils.cjs +9 -2
- package/lib/registry.js +1 -1
- package/package.json +2 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,9 +1,21 @@
|
|
|
1
1
|
# Change Log - @digigov/cli
|
|
2
2
|
|
|
3
|
-
<!-- This log was last generated on
|
|
3
|
+
<!-- This log was last generated on Mon, 27 Jul 2026 17:23:56 GMT and should not be manually modified. -->
|
|
4
4
|
|
|
5
5
|
<!-- Start content -->
|
|
6
6
|
|
|
7
|
+
## 2.5.0
|
|
8
|
+
|
|
9
|
+
Mon, 27 Jul 2026 17:23:56 GMT
|
|
10
|
+
|
|
11
|
+
### Minor changes
|
|
12
|
+
|
|
13
|
+
- expose the logger as CJS via the @digigov/cli/lib/logger subpath so CommonJS consumers (e.g. Next config files) can require it; the ESM lib export is unchanged (sangelopoulos@admin.grnet.gr)
|
|
14
|
+
|
|
15
|
+
### Patches
|
|
16
|
+
|
|
17
|
+
- fix typecheck error in registry.js prerelease sort key helper (sangelopoulos@admin.grnet.gr)
|
|
18
|
+
|
|
7
19
|
## 2.4.2
|
|
8
20
|
|
|
9
21
|
Fri, 12 Jun 2026 15:34:24 GMT
|
|
@@ -3,7 +3,7 @@ import path from 'path';
|
|
|
3
3
|
import chalk from 'chalk';
|
|
4
4
|
import { execa } from 'execa';
|
|
5
5
|
import { DigigovCommand } from '../../lib/command.js';
|
|
6
|
-
import { logger } from '../../lib/logger.
|
|
6
|
+
import { logger } from '../../lib/logger.cjs';
|
|
7
7
|
import { findPackageJson } from '../../lib/project-utils.cjs';
|
|
8
8
|
import {
|
|
9
9
|
getScopedDependencies,
|
|
@@ -2,7 +2,7 @@ import fs from "fs-extra";
|
|
|
2
2
|
import path from "path";
|
|
3
3
|
import chalk from "chalk";
|
|
4
4
|
import { DigigovCommand } from "../../lib/command.js";
|
|
5
|
-
import { logger } from "../../lib/logger.
|
|
5
|
+
import { logger } from "../../lib/logger.cjs";
|
|
6
6
|
import { findPackageJson } from "../../lib/project-utils.cjs";
|
|
7
7
|
import {
|
|
8
8
|
getScopedDependencies,
|
|
@@ -2,7 +2,7 @@ import { execa } from "execa";
|
|
|
2
2
|
import * as p from "@clack/prompts";
|
|
3
3
|
import ora from "ora";
|
|
4
4
|
import { DigigovCommand } from "../../lib/command.js";
|
|
5
|
-
import { logger } from "../../lib/logger.
|
|
5
|
+
import { logger } from "../../lib/logger.cjs";
|
|
6
6
|
import { detectPackageManager, buildAddArgs } from "../../lib/pm-detect.js";
|
|
7
7
|
import { fetchScopeManifest } from "../../lib/manifest.js";
|
|
8
8
|
import { RegistryError } from "../../lib/registry.js";
|
|
@@ -4,7 +4,7 @@ import * as p from "@clack/prompts";
|
|
|
4
4
|
import ora from "ora";
|
|
5
5
|
import chalk from "chalk";
|
|
6
6
|
import { DigigovCommand } from "../../lib/command.js";
|
|
7
|
-
import { logger } from "../../lib/logger.
|
|
7
|
+
import { logger } from "../../lib/logger.cjs";
|
|
8
8
|
import { findPackageJson } from "../../lib/project-utils.cjs";
|
|
9
9
|
import { detectPackageManager, buildInstallArgs } from "../../lib/pm-detect.js";
|
|
10
10
|
import {
|
package/lib/command.js
CHANGED
|
@@ -3,7 +3,7 @@ import path from "path";
|
|
|
3
3
|
import * as execa from "execa";
|
|
4
4
|
import * as commander from "commander";
|
|
5
5
|
import { fileURLToPath } from "url";
|
|
6
|
-
import { logger } from "./logger.
|
|
6
|
+
import { logger } from "./logger.cjs";
|
|
7
7
|
import { findPackageJson } from "./project-utils.cjs";
|
|
8
8
|
|
|
9
9
|
/**
|
package/lib/index.js
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
// CJS so both module systems can use it: the ESM lib re-exports it, and the
|
|
2
|
+
// Next config chain (next.common.cjs) requires it via `@digigov/cli/lib/logger`.
|
|
3
|
+
const chalk = require('chalk');
|
|
2
4
|
|
|
3
5
|
const args = process.argv.slice(2);
|
|
4
6
|
const IS_DEBUG = args.includes('--debug') || args.includes('-d');
|
|
@@ -60,7 +62,7 @@ function timeEnd(label) {
|
|
|
60
62
|
console.timeEnd(chalk.bgMagenta('⏱️ ' + label));
|
|
61
63
|
}
|
|
62
64
|
|
|
63
|
-
|
|
65
|
+
const logger = {
|
|
64
66
|
log,
|
|
65
67
|
info,
|
|
66
68
|
error,
|
|
@@ -70,3 +72,7 @@ export const logger = {
|
|
|
70
72
|
time,
|
|
71
73
|
timeEnd,
|
|
72
74
|
};
|
|
75
|
+
|
|
76
|
+
module.exports = {
|
|
77
|
+
logger,
|
|
78
|
+
};
|
package/lib/project-utils.cjs
CHANGED
|
@@ -3,6 +3,13 @@ const path = require('path');
|
|
|
3
3
|
const merge = require('deepmerge');
|
|
4
4
|
const { execSync } = require('child_process');
|
|
5
5
|
const assert = require('assert');
|
|
6
|
+
const { createRequire } = require('module');
|
|
7
|
+
|
|
8
|
+
// Bundler-opaque require: a literal `require()` with a computed path makes
|
|
9
|
+
// Turbopack warn "Module not found: Can't resolve <dynamic>".
|
|
10
|
+
function dynamicRequire(target) {
|
|
11
|
+
return createRequire(target)(target);
|
|
12
|
+
}
|
|
6
13
|
|
|
7
14
|
/**
|
|
8
15
|
* Resolve the project configuration from the nearest package.json
|
|
@@ -76,7 +83,7 @@ function resolveProject(dir) {
|
|
|
76
83
|
digigov = fs.readJSONSync(path.join(root, 'digigovrc.json'));
|
|
77
84
|
}
|
|
78
85
|
if (fs.existsSync(path.join(root, 'digigovrc.js'))) {
|
|
79
|
-
digigov =
|
|
86
|
+
digigov = dynamicRequire(path.join(root, 'digigovrc.js'));
|
|
80
87
|
}
|
|
81
88
|
|
|
82
89
|
const packageJS = fs.readJSONSync(pkg);
|
|
@@ -148,7 +155,7 @@ function localRequire(file) {
|
|
|
148
155
|
const filePath = path.join(project.root, file);
|
|
149
156
|
if (!fs.existsSync(filePath)) return {};
|
|
150
157
|
if (file.endsWith('.json')) return fs.readJSONSync(filePath);
|
|
151
|
-
else return
|
|
158
|
+
else return dynamicRequire(filePath);
|
|
152
159
|
}
|
|
153
160
|
|
|
154
161
|
function makeConfig(file, cfg = {}) {
|
package/lib/registry.js
CHANGED
|
@@ -275,7 +275,7 @@ function internalPrereleaseSortKey(pre) {
|
|
|
275
275
|
);
|
|
276
276
|
if (!m) return null;
|
|
277
277
|
const [, , issue, dd, mm, yy, hh, mi] = m;
|
|
278
|
-
return `${yy}${mm}${dd}${hh}${mi}-${issue.padStart(8, '0')}`;
|
|
278
|
+
return `${yy}${mm}${dd}${hh}${mi}-${(issue ?? '').padStart(8, '0')}`;
|
|
279
279
|
}
|
|
280
280
|
|
|
281
281
|
/**
|
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.
|
|
4
|
+
"version": "2.5.0",
|
|
5
5
|
"author": "GRNET Devs <devs@lists.grnet.gr>",
|
|
6
6
|
"type": "module",
|
|
7
7
|
"bin": {
|
|
@@ -42,6 +42,7 @@
|
|
|
42
42
|
"require": "./lib/project-utils.cjs",
|
|
43
43
|
"default": "./lib/index.js"
|
|
44
44
|
},
|
|
45
|
+
"./lib/logger": "./lib/logger.cjs",
|
|
45
46
|
"./tsconfig.cli": "./tsconfig.cli.json"
|
|
46
47
|
},
|
|
47
48
|
"scripts": {
|