npm-pkgbuild 22.2.7 → 22.2.9

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": "22.2.7",
3
+ "version": "22.2.9",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": false
@@ -47,20 +47,20 @@
47
47
  "lint:docs": "documentation lint ./src**/*.mjs"
48
48
  },
49
49
  "dependencies": {
50
- "@npmcli/arborist": "^10.0.2",
50
+ "@npmcli/arborist": "^10.0.3",
51
51
  "@vercel/nft": "^1.11.0",
52
52
  "aggregate-async-iterator": "^1.2.5",
53
53
  "commander": "^15.0.0",
54
54
  "compare-versions": "^6.1.1",
55
55
  "content-entry": "^15.0.3",
56
- "content-entry-filesystem": "^9.1.3",
56
+ "content-entry-filesystem": "^9.1.4",
57
57
  "content-entry-transform": "^1.7.9",
58
58
  "execa": "^10.0.1",
59
59
  "ini": "^7.0.0",
60
60
  "key-value-transformer": "^3.3.2",
61
61
  "npm-package-walker": "^8.0.11",
62
62
  "npm-packlist": "^11.3.0",
63
- "pacc": "^11.17.0",
63
+ "pacc": "^11.17.6",
64
64
  "package-directory": "^8.2.0",
65
65
  "pacote": "^22.0.0",
66
66
  "picomatch": "^4.0.7",
@@ -68,7 +68,7 @@
68
68
  "uti": "^8.11.3"
69
69
  },
70
70
  "devDependencies": {
71
- "@types/node": "^26.6.2",
71
+ "@types/node": "^26.6.3",
72
72
  "ava": "^8.0.1",
73
73
  "c8": "^12.0.0",
74
74
  "documentation": "^14.0.3",
@@ -288,19 +288,25 @@ export class ALPM extends Packager {
288
288
  const { properties, staging, destination } = await this.prepare(options);
289
289
 
290
290
  if (properties.hooks) {
291
- properties.install = `${properties.name}.install`;
291
+ let installFileName = `${properties.name}.install`;
292
+ let parts = 0;
292
293
 
293
294
  const out = createWriteStream(
294
- join(staging, properties.install),
295
+ join(staging, installFileName),
295
296
  utf8StreamOptions
296
297
  );
297
298
 
298
299
  for await (const hook of this.hookContent()) {
300
+ parts++;
299
301
  out.write(`${hook.name}() {\n`);
300
302
  out.write(hook.string);
301
303
  out.write(`\n}\n`);
302
304
  }
303
305
  out.end();
306
+
307
+ if(parts > 0) {
308
+ properties.install = installFileName;
309
+ }
304
310
  }
305
311
 
306
312
  if (properties.backup?.[0] === "/") {