@massimo-cassandro/minimo 1.24.2 → 1.24.4
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/dev-tools/starter-kit/templates/package-tpl.json +1 -1
- package/dev-tools/starter-kit/webpack.config.mjs +2 -2
- package/dev-tools/update-version/README.md +1 -1
- package/dev-tools/update-version/index.mjs +0 -5
- package/dev-tools/update-version/src/chooser-inquirer.mjs +6 -0
- package/dev-tools/update-version/src/get-cli-params.mjs +4 -4
- package/dev-tools/update-version/src/params.mjs +1 -1
- package/package.json +1 -1
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
"eslint-check": "npx eslint app/ # or src/, frontend/src/ ...",
|
|
24
24
|
"create-favicons INIT": "npx create-favicons init",
|
|
25
25
|
"create-favicons": "npx create-favicons --dir=./favicons # o ./frontend/favicons",
|
|
26
|
-
"UPD-version": "npx update-version --
|
|
26
|
+
"UPD-version": "npx update-version --no-log-v0 # --log-file=./frontend/changelog.md --log-patch --pkg=alt/path/to/package.json",
|
|
27
27
|
"upd@m": "npx upd@m",
|
|
28
28
|
"launchChrome": "open -n -a 'Google Chrome' --args --profile-directory='Profile 3'",
|
|
29
29
|
"python server": "python3 -m http.server 8000 # --directory __dirname__ # 8000 = default port",
|
|
@@ -375,8 +375,8 @@ const config = {
|
|
|
375
375
|
start_year,
|
|
376
376
|
...(current_year > start_year? [current_year] : [])
|
|
377
377
|
].join('-')
|
|
378
|
-
,vers = packageJson.version.split('.').slice(0,-1).join('.')
|
|
379
|
-
|
|
378
|
+
// ,vers = packageJson.version.split('.').slice(0,-1).join('.')
|
|
379
|
+
,vers = packageJson.version
|
|
380
380
|
;
|
|
381
381
|
|
|
382
382
|
const author = packageJson.author?.name ?? (packageJson.author ?? '');
|
|
@@ -17,4 +17,4 @@ Options:
|
|
|
17
17
|
* `--pkg`: Path to the `package.json` file relative to the current directory (default: `./package.json`)
|
|
18
18
|
* `--log-file`: Path to the log file relative to the current directory (default: `./changelog.md`). If the file name ends with `.txt`, the log type is assumed to be the previous version of `update-version`, where each line is in the form `timestamp | version | description`
|
|
19
19
|
* `--log-patch`: If present, patch changes are also recorded in the log.
|
|
20
|
-
* `--
|
|
20
|
+
* `--no-log-v0`: If `true` (default), the log is not written when the major version is `0`, except for the initial log entry created when the changelog file is first initialized. Pass `--no-log-v0` to enable it explicitly, or `--no-log-v0=false` to disable it from the command line.
|
|
@@ -52,11 +52,6 @@ async function run() {
|
|
|
52
52
|
params.updateMode = choice; // modalità scelta (init, major, minor o patch)
|
|
53
53
|
updateSemver();
|
|
54
54
|
|
|
55
|
-
// Se noLogv0 è true e la major version è 0, il log non viene registrato (eccetto per l'inizializzazione)
|
|
56
|
-
if (params.noLogv0 && params.updateMode !== 'init' && params.semverArray[0] === 0) {
|
|
57
|
-
params.addLog = false;
|
|
58
|
-
}
|
|
59
|
-
|
|
60
55
|
params.logRow.vers = params.newSemver;
|
|
61
56
|
|
|
62
57
|
// Scrive il log, se richiesto
|
|
@@ -27,6 +27,12 @@ export async function chooser() {
|
|
|
27
27
|
|
|
28
28
|
params.addLog = params.toLog.indexOf(answer) !== -1 || answer === 'init';
|
|
29
29
|
|
|
30
|
+
// Se noLogV0 è true e la major version (prospettica) è 0, il log non viene registrato (eccetto per l'inizializzazione)
|
|
31
|
+
if (params.addLog && params.noLogV0 && answer !== 'init') {
|
|
32
|
+
const newMajor = answer === 'major' ? params.semverArray[0] + 1 : params.semverArray[0];
|
|
33
|
+
if (newMajor === 0) params.addLog = false;
|
|
34
|
+
}
|
|
35
|
+
|
|
30
36
|
if (answer && params.addLog) {
|
|
31
37
|
const descr = await input({
|
|
32
38
|
message: 'Description (optional): ',
|
|
@@ -25,10 +25,10 @@ export function getCliParams() {
|
|
|
25
25
|
}
|
|
26
26
|
|
|
27
27
|
// Disabilita il log per major version 0
|
|
28
|
-
if (arg === '--
|
|
29
|
-
params.
|
|
30
|
-
} else if (arg.startsWith('--
|
|
31
|
-
params.
|
|
28
|
+
if (arg === '--no-log-v0') {
|
|
29
|
+
params.noLogV0 = true;
|
|
30
|
+
} else if (arg.startsWith('--no-log-v0=')) {
|
|
31
|
+
params.noLogV0 = arg.split('=')[1].trim() !== 'false';
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
});
|
|
@@ -10,7 +10,7 @@ export const params = {
|
|
|
10
10
|
debug: false, // solo sviluppo, non aggiorna nulla ma mostra l'output finale
|
|
11
11
|
|
|
12
12
|
addLog: true, // modificato in base alla scelta del tipo di aggironamento e del valore di toLog
|
|
13
|
-
|
|
13
|
+
noLogV0: true, // se true e la major version è 0 il log non viene registrato (ad esclusione dell'inizializzazione del file)
|
|
14
14
|
|
|
15
15
|
// preRealeaseTags: ['alpha', 'beta', 'rc'],
|
|
16
16
|
logRow: {
|