npm-pkgbuild 18.2.6 → 18.2.7

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.2.6",
3
+ "version": "18.2.7",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "provenance": false
@@ -106,24 +106,25 @@ program
106
106
  const transformer = [
107
107
  {
108
108
  name: "skip-architecutes",
109
- match: (entry) => entry.name.endsWith(".node"),
109
+ match: (entry) => entry.name.endsWith(".node") && entry.filename,
110
110
  async transform(entry) {
111
- const proc = await execa("file", ["-b", entry.name], {
111
+ const proc = await execa("file", ["-b", entry.filename], {
112
112
  cwd: options.dir
113
113
  });
114
- const arch = proc.stdout.split(/\s*,\s*/)[1];
114
+ let arch = proc.stdout.split(/\s*,\s*/)[1];
115
115
 
116
- console.log('SKIP', entry.name, arch, properties.arch);
116
+ const archs = { "ARM aarch64" : "aarch64" };
117
+ arch = archs[arch] || arch;
117
118
 
118
- if(arch === 'ARM aarch64') {
119
+ if(properties.arch.indexOf(arch) >= 0) {
119
120
  return entry;
120
121
  }
121
122
 
122
- //return entry;
123
+ console.log('SKIP', entry.name, arch);
123
124
  }
124
125
  },
125
126
  createExpressionTransformer(
126
- entry => uc.fileNameConformsTo(entry.name, "public.text") && !uc.fileNameConformsTo(entry.name, "com.netscape.javascript-source"),
127
+ entry => entry.isBlob && uc.fileNameConformsTo(entry.name, "public.text") && !uc.fileNameConformsTo(entry.name, "com.netscape.javascript-source"),
127
128
  properties
128
129
  )
129
130
  ];