npm-pkgbuild 11.5.12 → 11.5.14

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-pkgbuild",
3
- "version": "11.5.12",
3
+ "version": "11.5.14",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -114,11 +114,7 @@ export async function* extractFromPackage(options = {}, env = {}) {
114
114
 
115
115
  await packageWalker(async (packageContent, dir, modulePath) => {
116
116
  let i = 0;
117
- for (const pkgbuild of Array.isArray(packageContent.pkgbuild)
118
- ? packageContent.pkgbuild
119
- : packageContent.pkgbuild
120
- ? [packageContent.pkgbuild]
121
- : []) {
117
+ for (const pkgbuild of asArray(packageContent.pkgbuild)) {
122
118
  if (modulePath.length > 0 && !pkgbuild.variant) {
123
119
  continue;
124
120
  }
@@ -320,8 +316,7 @@ export async function* extractFromPackage(options = {}, env = {}) {
320
316
  sources.map(s => s.toString()).join("\n"),
321
317
  output,
322
318
  arch
323
- );
324
- */
319
+ );*/
325
320
 
326
321
  if (arch.size === 0) {
327
322
  yield result;
@@ -102,8 +102,6 @@ export class ARCH extends Packager {
102
102
  _prepared = false;
103
103
  }
104
104
  }
105
- // console.log("ARCH", variant.arch, _architecture,
106
- // _prepared, (variant.arch === undefined || variant.arch === _architecture));
107
105
 
108
106
  return _prepared && (variant.arch === undefined || variant.arch === _architecture);
109
107
  }
@@ -191,7 +189,7 @@ package() {
191
189
  PACKAGER = person(properties.contributors);
192
190
  }
193
191
 
194
- const makepkg = await execa("makepkg", ["-f", "-e"], {
192
+ const makepkg = await execa("makepkg", ["-c", "-f", "-e"], {
195
193
  cwd: staging,
196
194
  env: { PKGDEST: destination, PACKAGER }
197
195
  });
package/src/util.mjs CHANGED
@@ -97,7 +97,7 @@ export function quote(v, qc = "'") {
97
97
  }
98
98
 
99
99
  export function asArray(o) {
100
- return Array.isArray(o) ? o : [o];
100
+ return Array.isArray(o) ? o : o ? [o] : [];
101
101
  }
102
102
 
103
103
  /**