palabra 1.21.4 → 1.22.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 CHANGED
@@ -1,3 +1,13 @@
1
+ 2026.04.12, v1.22.0
2
+
3
+ feature:
4
+ - 950ef6e palabra: when not found: exit 1
5
+
6
+ 2026.04.12, v1.21.5
7
+
8
+ fix:
9
+ - 8a8ddad palabra: hablar: no silabas
10
+
1
11
  2026.04.12, v1.21.4
2
12
 
3
13
  fix:
package/lib/hablar.js CHANGED
@@ -4,21 +4,22 @@ import {parse} from './parser/parser.js';
4
4
  export const hablar = (silabas, {directorio} = {}) => {
5
5
  const commands = [];
6
6
 
7
- if (directorio) {
8
- const binDir = join(directorio, '..', `bin`);
9
- commands.push(`mkdir -p ${binDir}`);
10
- }
11
-
12
7
  for (const {encontro, ...letra} of silabas) {
13
8
  const {name} = letra;
14
9
 
15
10
  if (!encontro) {
16
11
  commands.push(`echo "🧨letra '${name}' not found"`);
12
+ commands.push(`exit 1`);
17
13
  continue;
18
14
  }
19
15
 
20
16
  commands.push(...parse(letra));
21
17
  }
22
18
 
19
+ if (commands.length && directorio) {
20
+ const binDir = join(directorio, '..', `bin`);
21
+ commands.unshift(`mkdir -p ${binDir}`);
22
+ }
23
+
23
24
  return commands;
24
25
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palabra",
3
- "version": "1.21.4",
3
+ "version": "1.22.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Palabra software installer",