npm-pkgbuild 14.2.4 → 14.2.6
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/extract-from-package.mjs +8 -3
- package/src/util.mjs +2 -0
package/package.json
CHANGED
|
@@ -56,7 +56,7 @@ function mergeArchs(a, b) {
|
|
|
56
56
|
}
|
|
57
57
|
return a;
|
|
58
58
|
}
|
|
59
|
-
return b
|
|
59
|
+
return b;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/**
|
|
@@ -367,6 +367,12 @@ export async function* extractFromPackage(options = {}, env = {}) {
|
|
|
367
367
|
}
|
|
368
368
|
|
|
369
369
|
for (const [name, output] of Object.entries(result.output)) {
|
|
370
|
+
|
|
371
|
+
const arch = mergeArchs(result.properties?.arch, output.properties?.arch);
|
|
372
|
+
if(arch !== undefined) {
|
|
373
|
+
result.properties.arch = arch;
|
|
374
|
+
}
|
|
375
|
+
|
|
370
376
|
yield {
|
|
371
377
|
...result,
|
|
372
378
|
variant: { ...result.variant, output: name },
|
|
@@ -379,8 +385,7 @@ export async function* extractFromPackage(options = {}, env = {}) {
|
|
|
379
385
|
properties: {
|
|
380
386
|
type: name,
|
|
381
387
|
...result.properties,
|
|
382
|
-
...output.properties
|
|
383
|
-
arch: mergeArchs(result.properties?.arch, output.properties?.arch)
|
|
388
|
+
...output.properties
|
|
384
389
|
}
|
|
385
390
|
};
|
|
386
391
|
}
|
package/src/util.mjs
CHANGED
|
@@ -190,12 +190,14 @@ export async function* copyEntries(
|
|
|
190
190
|
expander = v => v
|
|
191
191
|
) {
|
|
192
192
|
for await (const entry of source) {
|
|
193
|
+
// @ts-ignore
|
|
193
194
|
const d = entry.destination;
|
|
194
195
|
|
|
195
196
|
const name = expander(
|
|
196
197
|
d === undefined ? entry.name : d.endsWith("/") ? join(d, entry.name) : d
|
|
197
198
|
).replace(/^\//, "");
|
|
198
199
|
|
|
200
|
+
// @ts-ignore
|
|
199
201
|
entry.destination = name;
|
|
200
202
|
const destination = join(destinationDirectory, name);
|
|
201
203
|
await mkdir(dirname(destination), { recursive: true });
|