npm-pkgbuild 11.5.13 → 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.13",
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;
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
  /**