npm-pkgbuild 22.2.5 → 22.2.7
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 +6 -6
- package/src/output/alpm.mjs +9 -10
- package/src/output/packager.mjs +4 -2
- package/src/types.mjs +12 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "npm-pkgbuild",
|
|
3
|
-
"version": "22.2.
|
|
3
|
+
"version": "22.2.7",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"access": "public",
|
|
6
6
|
"provenance": false
|
|
@@ -52,15 +52,15 @@
|
|
|
52
52
|
"aggregate-async-iterator": "^1.2.5",
|
|
53
53
|
"commander": "^15.0.0",
|
|
54
54
|
"compare-versions": "^6.1.1",
|
|
55
|
-
"content-entry": "^15.0.
|
|
56
|
-
"content-entry-filesystem": "^9.1.
|
|
57
|
-
"content-entry-transform": "^1.7.
|
|
55
|
+
"content-entry": "^15.0.3",
|
|
56
|
+
"content-entry-filesystem": "^9.1.3",
|
|
57
|
+
"content-entry-transform": "^1.7.9",
|
|
58
58
|
"execa": "^10.0.1",
|
|
59
59
|
"ini": "^7.0.0",
|
|
60
60
|
"key-value-transformer": "^3.3.2",
|
|
61
61
|
"npm-package-walker": "^8.0.11",
|
|
62
62
|
"npm-packlist": "^11.3.0",
|
|
63
|
-
"pacc": "^11.
|
|
63
|
+
"pacc": "^11.17.0",
|
|
64
64
|
"package-directory": "^8.2.0",
|
|
65
65
|
"pacote": "^22.0.0",
|
|
66
66
|
"picomatch": "^4.0.7",
|
|
@@ -68,7 +68,7 @@
|
|
|
68
68
|
"uti": "^8.11.3"
|
|
69
69
|
},
|
|
70
70
|
"devDependencies": {
|
|
71
|
-
"@types/node": "^26.6.
|
|
71
|
+
"@types/node": "^26.6.2",
|
|
72
72
|
"ava": "^8.0.1",
|
|
73
73
|
"c8": "^12.0.0",
|
|
74
74
|
"documentation": "^14.0.3",
|
package/src/output/alpm.mjs
CHANGED
|
@@ -287,9 +287,6 @@ export class ALPM extends Packager {
|
|
|
287
287
|
async create(sources, transformer, publishingDetails, options, expander) {
|
|
288
288
|
const { properties, staging, destination } = await this.prepare(options);
|
|
289
289
|
|
|
290
|
-
/*if (properties.source) {
|
|
291
|
-
properties.md5sums = ["SKIP"];
|
|
292
|
-
}*/
|
|
293
290
|
if (properties.hooks) {
|
|
294
291
|
properties.install = `${properties.name}.install`;
|
|
295
292
|
|
|
@@ -306,7 +303,15 @@ export class ALPM extends Packager {
|
|
|
306
303
|
out.end();
|
|
307
304
|
}
|
|
308
305
|
|
|
309
|
-
|
|
306
|
+
if (properties.backup?.[0] === "/") {
|
|
307
|
+
properties.backup = properties.backup.replace(/\//, "");
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
const dependencies = properties.dependencies;
|
|
311
|
+
delete properties.dependencies;
|
|
312
|
+
const fp = fieldProvider(properties, this.attributes);
|
|
313
|
+
|
|
314
|
+
const depends = this.makeDepends(dependencies).join(" ");
|
|
310
315
|
const dependsStatement = depends.length ? `depends=(${depends})` : "";
|
|
311
316
|
const verbose = options.verbose ? 'ls -laR "$pkgdir"' : "";
|
|
312
317
|
|
|
@@ -326,12 +331,6 @@ package() {
|
|
|
326
331
|
`;
|
|
327
332
|
}
|
|
328
333
|
|
|
329
|
-
if (properties.backup?.[0] === "/") {
|
|
330
|
-
properties.backup = properties.backup.replace(/\//, "");
|
|
331
|
-
}
|
|
332
|
-
|
|
333
|
-
const fp = fieldProvider(properties, this.attributes);
|
|
334
|
-
|
|
335
334
|
transformer.push({
|
|
336
335
|
name: PKGBUILD,
|
|
337
336
|
match: entry => entry.name === PKGBUILD,
|
package/src/output/packager.mjs
CHANGED
|
@@ -3,6 +3,7 @@ import { tmpdir } from "node:os";
|
|
|
3
3
|
import { mkdtemp, mkdir } from "node:fs/promises";
|
|
4
4
|
import { createReadStream } from "node:fs";
|
|
5
5
|
import {
|
|
6
|
+
asArray,
|
|
6
7
|
expand,
|
|
7
8
|
expandContextDoubbleCurly,
|
|
8
9
|
attributeIterator,
|
|
@@ -154,14 +155,15 @@ export class Packager {
|
|
|
154
155
|
return [];
|
|
155
156
|
}
|
|
156
157
|
|
|
157
|
-
if (Array.isArray(dependencies)) {
|
|
158
|
+
if (Array.isArray(dependencies) || dependencies instanceof Set) {
|
|
158
159
|
dependencies = Object.fromEntries(
|
|
159
|
-
dependencies.map(d => {
|
|
160
|
+
asArray(dependencies).map(d => {
|
|
160
161
|
const m = d.match(/^([^=<>]+)(.*)/);
|
|
161
162
|
return [m[1], m[2]];
|
|
162
163
|
})
|
|
163
164
|
);
|
|
164
165
|
}
|
|
166
|
+
|
|
165
167
|
return Object.entries(dependencies)
|
|
166
168
|
.filter(filterOutUnwantedDependencies())
|
|
167
169
|
.map(([name, expression]) => this.dependencyExpression(name, expression));
|
package/src/types.mjs
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import {
|
|
2
|
+
asArray,
|
|
2
3
|
types,
|
|
3
|
-
|
|
4
|
+
string_type,
|
|
4
5
|
string_collection_attribute_writable,
|
|
5
6
|
name_attribute,
|
|
6
7
|
description_attribute,
|
|
@@ -9,7 +10,7 @@ import {
|
|
|
9
10
|
} from "pacc";
|
|
10
11
|
|
|
11
12
|
export const dependency_type = {
|
|
12
|
-
...
|
|
13
|
+
...string_type,
|
|
13
14
|
name: "dependency",
|
|
14
15
|
toExternal: (value, attribute) => {
|
|
15
16
|
switch (typeof value) {
|
|
@@ -26,6 +27,14 @@ export const dependency_type = {
|
|
|
26
27
|
return value;
|
|
27
28
|
}
|
|
28
29
|
|
|
30
|
+
if (value instanceof Set) {
|
|
31
|
+
if (value.size === 0 && attribute.skipEmpty) {
|
|
32
|
+
return undefined;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return asArray(value);
|
|
36
|
+
}
|
|
37
|
+
|
|
29
38
|
return Object.entries(value).map(([name, expression]) =>
|
|
30
39
|
typeof expression === "string" ? `${name}${expression}` : name
|
|
31
40
|
);
|
|
@@ -33,7 +42,7 @@ export const dependency_type = {
|
|
|
33
42
|
};
|
|
34
43
|
|
|
35
44
|
export const architecture_type = {
|
|
36
|
-
...
|
|
45
|
+
...string_type,
|
|
37
46
|
name: "architecture",
|
|
38
47
|
|
|
39
48
|
toInternal: (value, attribute) => {
|