palabra 1.23.11 → 2.0.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.13, v2.0.0
2
+
3
+ feature:
4
+ - 533d458 palabra: respect XDG_DATA_HOME: default ~/.local/src -> ~/.local/share
5
+
6
+ 2026.04.13, v1.23.12
7
+
8
+ fix:
9
+ - 5adf4c9 ghci: rm
10
+
1
11
  2026.04.13, v1.23.11
2
12
 
3
13
  fix:
package/README.md CHANGED
@@ -72,7 +72,7 @@ palabra l
72
72
 
73
73
  ## Env variables
74
74
 
75
- Use `PALABRA_DIR` to override default installation path `~/.local/src`.
75
+ Use `PALABRA_DIR` or `XDG_DATA_HOME` to override default installation path `~/.local/share`.
76
76
 
77
77
  That's it!
78
78
 
@@ -12,8 +12,7 @@
12
12
  "cabal": "bin/cabal",
13
13
  "ghcup": "bin/ghcup",
14
14
  "stack": "bin/stack",
15
- "ghc": "bin/ghc",
16
- "ghci": "bin/ghci"
15
+ "ghc": "bin/ghc"
17
16
  },
18
17
  "test": [
19
18
  "ghcup --version",
@@ -21,8 +20,5 @@
21
20
  "ghc --version",
22
21
  "stack --version"
23
22
  ],
24
- "commands": [
25
- "mv ~/.ghcup {{ directorio }}/ghcup",
26
- "ln -fs {{ directorio }}/ghcup/ghc/{{ version }}/lib/ghc-{{ version }}/bin/ghc {{ directorio }}/../bin/ghc"
27
- ]
23
+ "commands": ["mv ~/.ghcup {{ directorio }}/ghcup", "ln -fs {{ directorio }}/ghcup/ghc/{{ version }}/lib/ghc-{{ version }}/bin/ghc {{ directorio }}/../bin/ghc"]
28
24
  }
@@ -11,7 +11,7 @@ export const parseArgs = (args) => {
11
11
  },
12
12
  string: ['directorio'],
13
13
  default: {
14
- directorio: process.env.PALABRA_DIR || '~/.local/src',
14
+ directorio: getDirectorio(process.env),
15
15
  },
16
16
  boolean: [
17
17
  'quiet',
@@ -21,3 +21,15 @@ export const parseArgs = (args) => {
21
21
  ],
22
22
  });
23
23
  };
24
+
25
+ function getDirectorio(env) {
26
+ const {PALABRA_DIR, XDG_DATA_HOME} = env;
27
+
28
+ if (PALABRA_DIR)
29
+ return PALABRA_DIR;
30
+
31
+ if (XDG_DATA_HOME)
32
+ return XDG_DATA_HOME;
33
+
34
+ return '~/.local/share';
35
+ }
@@ -17,7 +17,7 @@ const isString = (a) => typeof a === 'string';
17
17
 
18
18
  const addDefaults = (letra) => ({
19
19
  confirmar: true,
20
- directorio: '~/.local/src',
20
+ directorio: '~/.local/share',
21
21
  ...letra,
22
22
  });
23
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "palabra",
3
- "version": "1.23.11",
3
+ "version": "2.0.0",
4
4
  "type": "module",
5
5
  "author": "coderaiser <mnemonic.enemy@gmail.com> (https://github.com/coderaiser)",
6
6
  "description": "Palabra software installer",