npm-pkgbuild 8.3.13 → 8.3.16
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/package.json +4 -4
- package/src/npm-pkgbuild-cli.mjs +4 -11
- package/src/output/arch.mjs +11 -8
- package/src/util.mjs +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "8.3.
|
|
3
|
+
"version": "8.3.16",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public"
|
|
6
6
|
},
|
|
@@ -50,8 +50,8 @@
|
|
|
50
50
|
"expression-expander": "^7.0.16",
|
|
51
51
|
"globby": "^13.1.0",
|
|
52
52
|
"ini": "^3.0.0",
|
|
53
|
-
"iterable-string-interceptor": "^
|
|
54
|
-
"key-value-transformer": "^
|
|
53
|
+
"iterable-string-interceptor": "^2.0.0",
|
|
54
|
+
"key-value-transformer": "^3.0.0",
|
|
55
55
|
"node-fetch": "^3.2.3",
|
|
56
56
|
"npm-package-walker": "^5.0.6",
|
|
57
57
|
"npm-packlist": "^5.0.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"tar-stream": "^2.2.0"
|
|
61
61
|
},
|
|
62
62
|
"devDependencies": {
|
|
63
|
-
"ava": "^4.
|
|
63
|
+
"ava": "^4.2.0",
|
|
64
64
|
"c8": "^7.11.0",
|
|
65
65
|
"documentation": "^13.2.5",
|
|
66
66
|
"semantic-release": "^19.0.2",
|
package/src/npm-pkgbuild-cli.mjs
CHANGED
|
@@ -88,15 +88,6 @@ program
|
|
|
88
88
|
|
|
89
89
|
Object.assign(properties, { type: outputFactory.name }, options.define);
|
|
90
90
|
|
|
91
|
-
for (const [k, v] of Object.entries(properties)) {
|
|
92
|
-
if (typeof v === "string") {
|
|
93
|
-
properties[k] = v.replace(
|
|
94
|
-
/\$\{([^\}]+)\}/m,
|
|
95
|
-
(m, k) => properties[k]
|
|
96
|
-
);
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
|
|
100
91
|
sources.push(
|
|
101
92
|
...[...options.content, ...options.meta]
|
|
102
93
|
.filter(x => x)
|
|
@@ -119,9 +110,11 @@ program
|
|
|
119
110
|
".txt",
|
|
120
111
|
".webmanifest",
|
|
121
112
|
".service",
|
|
122
|
-
".socket"
|
|
113
|
+
".socket",
|
|
114
|
+
".rules"
|
|
123
115
|
]),
|
|
124
|
-
properties
|
|
116
|
+
context.expand(properties)
|
|
117
|
+
//properties
|
|
125
118
|
)
|
|
126
119
|
];
|
|
127
120
|
|
package/src/output/arch.mjs
CHANGED
|
@@ -22,6 +22,16 @@ import {
|
|
|
22
22
|
packageNameMapping
|
|
23
23
|
} from "../util.mjs";
|
|
24
24
|
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
function* keyValueLines(key, value, options) {
|
|
28
|
+
yield `${keyPrefix(key)}${options.keyValueSeparator}${
|
|
29
|
+
Array.isArray(value)
|
|
30
|
+
? "(" + value.map(v => quote(v)).join(" ") + ")"
|
|
31
|
+
: quote(value)
|
|
32
|
+
}${options.lineEnding}`;
|
|
33
|
+
}
|
|
34
|
+
|
|
25
35
|
/**
|
|
26
36
|
* @type KeyValueTransformOptions
|
|
27
37
|
* Options to describe key value pair separated by an equal sign '='
|
|
@@ -35,16 +45,9 @@ export const pkgKeyValuePairOptions = {
|
|
|
35
45
|
return [m[2], m[3] ? m[3].split(/\s*,\s*/) : m[4]];
|
|
36
46
|
}
|
|
37
47
|
},
|
|
38
|
-
keyValueLines
|
|
48
|
+
keyValueLines
|
|
39
49
|
};
|
|
40
50
|
|
|
41
|
-
function* keyValueLines3(key, value, lineEnding) {
|
|
42
|
-
yield `${keyPrefix(key)}=${
|
|
43
|
-
Array.isArray(value)
|
|
44
|
-
? "(" + value.map(v => quote(v)).join(" ") + ")"
|
|
45
|
-
: quote(value)
|
|
46
|
-
}${lineEnding}`;
|
|
47
|
-
}
|
|
48
51
|
|
|
49
52
|
function keyPrefix(key) {
|
|
50
53
|
const f = fields[key];
|
package/src/util.mjs
CHANGED
|
@@ -6,7 +6,7 @@ import { createWriteStream } from "fs";
|
|
|
6
6
|
export const utf8StreamOptions = { encoding: "utf8" };
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
|
-
*
|
|
9
|
+
* What is the node name in the package eco-system
|
|
10
10
|
*/
|
|
11
11
|
export const packageNameMapping = {
|
|
12
12
|
node: "nodejs"
|
|
@@ -32,7 +32,7 @@ export function decodePassword(password) {
|
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
/**
|
|
35
|
-
* Extract shell functions from a given text
|
|
35
|
+
* Extract shell functions from a given text.
|
|
36
36
|
* @param {AsyncIterator<string>} source
|
|
37
37
|
* @return {AsyncIterator<FunctionDecl>}
|
|
38
38
|
*/
|