npm-pkgbuild 22.0.5 → 22.1.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/package.json +1 -1
- package/src/output/alpm.mjs +2 -2
- package/src/output/packager.mjs +0 -1
- package/src/util.mjs +7 -1
package/package.json
CHANGED
package/src/output/alpm.mjs
CHANGED
|
@@ -137,7 +137,7 @@ export class ALPM extends Packager {
|
|
|
137
137
|
default: ["any"],
|
|
138
138
|
mandatory: true
|
|
139
139
|
},
|
|
140
|
-
backup: { ...string_collection_attribute_writable, name: "backup" },
|
|
140
|
+
backup: { ...string_collection_attribute_writable, name: "backup", skipEmpty: true },
|
|
141
141
|
depends: {
|
|
142
142
|
...dependency_attribute_collection_writable /*, alias: "dependencies" */,
|
|
143
143
|
name: "depends"
|
|
@@ -279,7 +279,7 @@ package() {
|
|
|
279
279
|
expander
|
|
280
280
|
)) {
|
|
281
281
|
const flags = {
|
|
282
|
-
user: ["-
|
|
282
|
+
user: ["-o", value => value],
|
|
283
283
|
group: ["-g", value => value],
|
|
284
284
|
mode: ["-m", value => Number(value & 0o7777).toString(8)]
|
|
285
285
|
};
|
package/src/output/packager.mjs
CHANGED
package/src/util.mjs
CHANGED
|
@@ -154,11 +154,17 @@ export function fieldProvider(properties, attributes) {
|
|
|
154
154
|
for (const [name, attribute] of Object.entries(attributes)) {
|
|
155
155
|
if (!presentKeys.has(name)) {
|
|
156
156
|
let value = properties[attribute.alias || name];
|
|
157
|
-
if (
|
|
157
|
+
if (
|
|
158
|
+
value === undefined ||
|
|
159
|
+
(attribute.collection && value.size === 0)
|
|
160
|
+
) {
|
|
158
161
|
if (attribute.default === undefined) {
|
|
159
162
|
if (attribute.mandatory) {
|
|
160
163
|
console.error(`Missing value for mandatory attribute ${name}`);
|
|
161
164
|
}
|
|
165
|
+
if (attribute.skipEmplty) {
|
|
166
|
+
continue;
|
|
167
|
+
}
|
|
162
168
|
} else {
|
|
163
169
|
yield [name, toExternal(attribute.default, attribute)];
|
|
164
170
|
}
|