aneka 0.11.0 → 0.11.1

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/CHANGES.md CHANGED
@@ -2,7 +2,8 @@
2
2
 
3
3
  ## 2026-01-18
4
4
 
5
- - [0.11.0] ```parseArgsArgv()``` now accepts a third parameter to set the current working directory
5
+ - [0.11.1] ```parseArgsArgv()``` now accepts an object as its parameter
6
+
6
7
 
7
8
  ## 2025-12-25
8
9
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aneka",
3
- "version": "0.11.0",
3
+ "version": "0.11.1",
4
4
  "description": "Some usefull function helper for daily use",
5
5
  "main": "index.js",
6
6
  "type": "module",
@@ -50,14 +50,16 @@ async function parseWithYargs (cwd) {
50
50
  * Parse program arguments (args) & options (argv)
51
51
  *
52
52
  * @async
53
- * @param {function(Object): Object} [sanitizer] - If provided, result will be sanitized with this function
54
- * @param {boolean} [useParser] - If ```true```, skip {@link https://github.com/yargs/yargs|yargs}
55
- * @param {string} [cwd] - If provided, current working directory is set to this
53
+ * @param {Object} [options={}] - Options object
54
+ * @param {function(Object): Object} [options.sanitizer] - If provided, result will be sanitized with this function
55
+ * @param {boolean} [options.useParser] - If ```true```, skip {@link https://github.com/yargs/yargs|yargs}
56
+ * @param {string} [options.cwd] - If provided, current working directory is set to this
56
57
  * @returns {{args: Array, argv: Object}} An object containing ```args``` and ```argv```
57
58
  * @see App#args
58
59
  * @see App#argv
59
60
  */
60
- async function parseArgsArgv (sanitizer, useParser, cwd) {
61
+ async function parseArgsArgv (options = {}) {
62
+ let { sanitizer, useParser, cwd } = options
61
63
  if (!useParser) useParser = find(process.argv, a => a.startsWith('--spawn'))
62
64
  let argv = useParser ? await parseWithParser() : await parseWithYargs(cwd)
63
65
  const args = argv._