File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -24631,9 +24631,9 @@ function getDependenciesFromPackageJson(pkg, types) {
2463124631 return result;
2463224632}
2463324633function isSupportedArchitecture(pkg, os, cpu, libc) {
24634- const osMatches = pkg.os === void 0 || pkg.os.length > 0 && pkg.os.includes(os);
24635- const cpuMatches = pkg.cpu === void 0 || pkg.cpu.length > 0 && pkg.cpu.includes(cpu);
24636- const libcMatches = pkg.libc === void 0 || pkg.libc.length > 0 && pkg.libc.includes(libc);
24634+ const osMatches = pkg.os === void 0 || pkg.os.length === 0 || pkg.os.includes(os);
24635+ const cpuMatches = pkg.cpu === void 0 || pkg.cpu.length === 0 || pkg.cpu.includes(cpu);
24636+ const libcMatches = pkg.libc === void 0 || pkg.libc.length === 0 || pkg.libc.includes(libc);
2463724637 return osMatches && cpuMatches && libcMatches;
2463824638}
2463924639
Original file line number Diff line number Diff line change @@ -229,10 +229,10 @@ export function isSupportedArchitecture(
229229 libc : string
230230) : boolean {
231231 const osMatches =
232- pkg . os === undefined || ( pkg . os . length > 0 && pkg . os . includes ( os ) ) ;
232+ pkg . os === undefined || pkg . os . length === 0 || pkg . os . includes ( os ) ;
233233 const cpuMatches =
234- pkg . cpu === undefined || ( pkg . cpu . length > 0 && pkg . cpu . includes ( cpu ) ) ;
234+ pkg . cpu === undefined || pkg . cpu . length === 0 || pkg . cpu . includes ( cpu ) ;
235235 const libcMatches =
236- pkg . libc === undefined || ( pkg . libc . length > 0 && pkg . libc . includes ( libc ) ) ;
236+ pkg . libc === undefined || pkg . libc . length === 0 || pkg . libc . includes ( libc ) ;
237237 return osMatches && cpuMatches && libcMatches ;
238238}
You can’t perform that action at this time.
0 commit comments