palabra 1.8.2 → 1.8.3
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 +6 -0
- package/README.md +0 -1
- package/bin/palabra.js +0 -1
- package/lib/buscar.js +12 -1
- package/lib/cli/parse-args.js +7 -1
- package/lib/palabra.js +0 -1
- package/package.json +1 -1
package/ChangeLog
CHANGED
package/README.md
CHANGED
package/bin/palabra.js
CHANGED
package/lib/buscar.js
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import {tryToCatch} from 'try-to-catch';
|
|
2
2
|
|
|
3
|
+
const parseVersion = ({values, data}) => {
|
|
4
|
+
if (values.version === '*')
|
|
5
|
+
return data.version;
|
|
6
|
+
|
|
7
|
+
return values.version || data.version;
|
|
8
|
+
};
|
|
9
|
+
|
|
3
10
|
export const buscar = async (name, values = {}) => {
|
|
4
11
|
const [, data] = await tryToCatch(importPalabra, name);
|
|
5
12
|
|
|
@@ -9,7 +16,11 @@ export const buscar = async (name, values = {}) => {
|
|
|
9
16
|
encontro: false,
|
|
10
17
|
};
|
|
11
18
|
|
|
12
|
-
const version =
|
|
19
|
+
const version = parseVersion({
|
|
20
|
+
values,
|
|
21
|
+
data,
|
|
22
|
+
});
|
|
23
|
+
|
|
13
24
|
const {directorio} = values;
|
|
14
25
|
|
|
15
26
|
return {
|
package/lib/cli/parse-args.js
CHANGED
package/lib/palabra.js
CHANGED