npm-pkgbuild 22.1.10 → 22.1.11

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/README.md CHANGED
@@ -350,7 +350,7 @@ Source of package content.
350
350
  * `dir` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
351
351
  * `destination` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)** 
352
352
  * `defaultProperties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)** 
353
- * `permissions` **[Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)>**&#x20;
353
+ * `permissions` **([Map](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Map)<[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object), [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)> | [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object))**&#x20;
354
354
 
355
355
  ### propertiesFor
356
356
 
@@ -676,7 +676,7 @@ Type: [Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Globa
676
676
 
677
677
  ### Parameters
678
678
 
679
- * `locations` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>** (optional, default `[]`)
679
+ * `locations` **[Array](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Array)<[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)>**&#x20;
680
680
  * `properties` **[Object](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object)?**&#x20;
681
681
 
682
682
  * `properties.PKGBUILD_PUBLISH` **[string](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String)?**&#x20;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-pkgbuild",
3
- "version": "22.1.10",
3
+ "version": "22.1.11",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": false
package/src/util.mjs CHANGED
@@ -222,17 +222,20 @@ export async function* copyEntries(
222
222
  entry.destination = name;
223
223
  const destination = join(destinationDirectory, name);
224
224
 
225
+ let options;
226
+ const mode = await entry.mode;
227
+ if (mode) {
228
+ options = { mode };
229
+ }
230
+
225
231
  if (entry.isCollection) {
226
- await mkdir(destination, { recursive: true, mode: await entry.mode });
232
+ await mkdir(destination, { recursive: true, ...options });
227
233
  } else {
228
234
  await mkdir(dirname(destination), { recursive: true });
229
235
 
230
236
  await pipeline(
231
237
  Readable.fromWeb(await entry.stream),
232
- createWriteStream(
233
- destination,
234
- entry.mode ? { mode: await entry.mode } : undefined
235
- )
238
+ createWriteStream(destination, options)
236
239
  );
237
240
  }
238
241