npm-pkgbuild 9.0.4 → 10.0.1

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
@@ -34,7 +34,7 @@ You can specify the package content in package.json.
34
34
 
35
35
  ```json
36
36
  {
37
- "pkg": {
37
+ "pkgbuild": {
38
38
  "content": {
39
39
  "/some/location" : { "base": "build" },
40
40
  "/etc/myconfig.json" : "sample-config.json",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npm-pkgbuild",
3
- "version": "9.0.4",
3
+ "version": "10.0.1",
4
4
  "publishConfig": {
5
5
  "access": "public"
6
6
  },
@@ -76,7 +76,7 @@ export async function extractFromPackage(json, dir) {
76
76
  let arch = new Set();
77
77
 
78
78
  const processPkg = (json, dir, modulePath) => {
79
- const pkg = json.pkg;
79
+ const pkg = json.pkgbuild;
80
80
 
81
81
  if (pkg) {
82
82
  if (json.cpu) {
@@ -93,10 +93,13 @@ export class DEBIAN extends Packager {
93
93
  )
94
94
  );
95
95
 
96
- properties.Depends = Object.entries(dependencies).map(
97
- ([name, e]) => `${packageNameMapping[name] ? packageNameMapping[name] : name} (${e})`
98
- );
99
-
96
+ if (Object.keys(dependencies).length > 0) {
97
+ properties.Depends = Object.entries(dependencies).map(
98
+ ([name, e]) =>
99
+ `${packageNameMapping[name] ? packageNameMapping[name] : name} (${e})`
100
+ );
101
+ }
102
+
100
103
  const fp = fieldProvider(properties, fields);
101
104
  const debianControlName = "DEBIAN/control";
102
105