@massimo-cassandro/minimo 1.24.3 → 1.24.5
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/src/chooser-inquirer.mjs +2 -2
- 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
- package/src/utilities/dom-builder-helpers/form-tags.js +3 -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.
|
|
@@ -27,8 +27,8 @@ export async function chooser() {
|
|
|
27
27
|
|
|
28
28
|
params.addLog = params.toLog.indexOf(answer) !== -1 || answer === 'init';
|
|
29
29
|
|
|
30
|
-
// Se
|
|
31
|
-
if (params.addLog && params.
|
|
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
32
|
const newMajor = answer === 'major' ? params.semverArray[0] + 1 : params.semverArray[0];
|
|
33
33
|
if (newMajor === 0) params.addLog = false;
|
|
34
34
|
}
|
|
@@ -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: {
|
package/package.json
CHANGED
|
@@ -110,6 +110,7 @@ export function buildInput({
|
|
|
110
110
|
* @param {string | null} [args.wrapperClass=null] - optional class to be added to the `.form-group` wrapper.
|
|
111
111
|
* @param {string | null} [args.className=null] - optional class to be added to the `input`.
|
|
112
112
|
* @param {boolean} [args.condition=true] - When false, the function returns `null` without building anything.
|
|
113
|
+
* @param {boolean} [args.useBsClass=false] - When true, uses BS5 class (`form-select`) instead of `form-control`
|
|
113
114
|
* @param {string | HTMLElement | null} args.help - Optional help text.
|
|
114
115
|
* @param {(function(HTMLElement): void) | null} args.callback - Optional callback function.
|
|
115
116
|
* @param {Record<string, any> | null} [args.attrs={}] - Optional attributes object.
|
|
@@ -124,6 +125,7 @@ export function buildSelect({
|
|
|
124
125
|
addEmptyOption = true,
|
|
125
126
|
wrapperClass = null,
|
|
126
127
|
className = null,
|
|
128
|
+
useBsClass = false,
|
|
127
129
|
condition = true,
|
|
128
130
|
help = null,
|
|
129
131
|
attrs = {},
|
|
@@ -158,7 +160,7 @@ export function buildSelect({
|
|
|
158
160
|
`label.form-label[for:${id}] ${label}`,
|
|
159
161
|
{
|
|
160
162
|
tag: 'select',
|
|
161
|
-
className: classnames('form-control', className, attrs?.class),
|
|
163
|
+
className: classnames(useBsClass? 'form-select' : 'form-control', className, attrs?.class),
|
|
162
164
|
id: id,
|
|
163
165
|
attrs: {
|
|
164
166
|
...(attrs??{}),
|