presetter 8.1.0 → 8.2.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/lib/task.js +8 -8
- package/package.json +5 -5
package/lib/task.js
CHANGED
|
@@ -16,23 +16,23 @@ export function parseGlobalArgs(argv) {
|
|
|
16
16
|
}
|
|
17
17
|
const ARG_PLACEHOLDER_REGEX = /^{@:?(.*)$/;
|
|
18
18
|
/**
|
|
19
|
-
* expand a placeholder pattern like {
|
|
19
|
+
* expand a placeholder pattern like {\@:default args} into actual arguments
|
|
20
20
|
*
|
|
21
|
-
* this function handles the {
|
|
22
|
-
* - {
|
|
23
|
-
* - {
|
|
24
|
-
* - {
|
|
21
|
+
* this function handles the {\@:...} syntax where:
|
|
22
|
+
* - {\@} gets replaced with globalArgs
|
|
23
|
+
* - {\@:default} uses "default" if no globalArgs, otherwise uses globalArgs
|
|
24
|
+
* - {\@:arg1 arg2} splits into ["arg1", "arg2"] if no globalArgs
|
|
25
25
|
* @example
|
|
26
26
|
* // with globalArgs available
|
|
27
|
-
* expandPlaceholderArgs(['{
|
|
27
|
+
* expandPlaceholderArgs(['{\@:--verbose}'], 0, ['--quiet', '--force'])
|
|
28
28
|
* // returns: { args: ['--quiet', '--force'], nextIndex: 1 }
|
|
29
29
|
* @example
|
|
30
30
|
* // No globalArgs, use defaults
|
|
31
|
-
* expandPlaceholderArgs(['{
|
|
31
|
+
* expandPlaceholderArgs(['{\@:--verbose', '--output}'], 0, [])
|
|
32
32
|
* // returns: { args: ['--verbose', '--output'], nextIndex: 2 }
|
|
33
33
|
* @example
|
|
34
34
|
* // empty placeholder
|
|
35
|
-
* expandPlaceholderArgs(['{
|
|
35
|
+
* expandPlaceholderArgs(['{\@:}'], 0, [])
|
|
36
36
|
* // returns: { args: [], nextIndex: 1 }
|
|
37
37
|
* @param rawArgs array of raw arguments
|
|
38
38
|
* @param startIndex starting index of the placeholder
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "presetter",
|
|
3
|
-
"version": "8.
|
|
3
|
+
"version": "8.2.0",
|
|
4
4
|
"description": "Make project configurations clean with presets",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"config",
|
|
@@ -78,7 +78,7 @@
|
|
|
78
78
|
"source-map-support": "^0.5.0",
|
|
79
79
|
"yargs": "^18.0.0",
|
|
80
80
|
"yargs-parser": "^22.0.0",
|
|
81
|
-
"presetter-types": "8.
|
|
81
|
+
"presetter-types": "8.2.0"
|
|
82
82
|
},
|
|
83
83
|
"devDependencies": {
|
|
84
84
|
"@types/debug": "^4.0.0",
|
|
@@ -86,9 +86,9 @@
|
|
|
86
86
|
"@types/node": "^24.0.0",
|
|
87
87
|
"@types/yargs": "^17.0.0",
|
|
88
88
|
"type-fest": "^5.0.0",
|
|
89
|
-
"presetter-preset-esm": "8.
|
|
90
|
-
"presetter-preset-essentials": "8.
|
|
91
|
-
"presetter-preset-strict": "8.
|
|
89
|
+
"presetter-preset-esm": "8.2.0",
|
|
90
|
+
"presetter-preset-essentials": "8.2.0",
|
|
91
|
+
"presetter-preset-strict": "8.2.0"
|
|
92
92
|
},
|
|
93
93
|
"engines": {
|
|
94
94
|
"node": ">=20.0.0"
|