npm-pkgbuild 18.3.1 → 18.3.2

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": "18.3.1",
3
+ "version": "18.3.2",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": false
@@ -115,15 +115,19 @@ program
115
115
  const proc = await execa("file", ["-b", entry.filename], {
116
116
  cwd: options.dir
117
117
  });
118
- let arch = proc.stdout.split(/\s*,\s*/)[1];
118
+ const parts = proc.stdout.split(/\s*,\s*/);
119
119
 
120
- const archs = { "ARM aarch64" : "aarch64" };
121
- arch = archs[arch] || arch;
120
+ if(!parts[4].match(/Android/i)) {
121
+ let arch = parts[1];
122
+
123
+ const archs = { "ARM aarch64" : "aarch64" };
124
+ arch = archs[arch] || arch;
122
125
 
123
- if(properties.arch.indexOf(arch) >= 0) {
124
- return entry;
126
+ if(properties.arch.indexOf(arch) >= 0) {
127
+ return entry;
128
+ }
125
129
  }
126
-
130
+
127
131
  console.log("skip", entry.filename);
128
132
  }
129
133
  },
@@ -102,14 +102,16 @@ export function shrinkNPM(
102
102
  "xo"
103
103
  ];
104
104
 
105
- toBeRemoved.map(key => delete pkg[key]);
106
-
107
105
  if (options?.removeKeys) {
108
106
  options.removeKeys.map(key => {
109
- delete pkg[key];
107
+ if (pkg.addon && key !== "name") {
108
+ delete pkg[key];
109
+ }
110
110
  });
111
111
  }
112
112
 
113
+ toBeRemoved.map(key => delete pkg[key]);
114
+
113
115
  if (options.removeDefaults) {
114
116
  switch (pkg.main) {
115
117
  case "index":