npm-pkgbuild 11.6.1 → 11.7.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/package.json +1 -1
- package/src/extract-from-package.mjs +13 -6
package/package.json
CHANGED
|
@@ -289,13 +289,20 @@ export async function* extractFromPackage(options = {}, env = {}) {
|
|
|
289
289
|
) {
|
|
290
290
|
let requirementsMet = true;
|
|
291
291
|
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
292
|
+
const requires = fragment.requires;
|
|
293
|
+
if (requires) {
|
|
294
|
+
if (requires.output && !output[requires.output]) {
|
|
295
|
+
requirementsMet = false;
|
|
296
|
+
console.log("skipping output", requires.output, output);
|
|
297
|
+
}
|
|
298
|
+
if (requires.dependencies) {
|
|
299
|
+
for (const [p, v] of Object.entries(requires.dependencies)) {
|
|
300
|
+
const pkgVersion = packages.get(p);
|
|
295
301
|
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
302
|
+
if (pkgVersion === undefined || !satisfies(pkgVersion, v)) {
|
|
303
|
+
requirementsMet = false;
|
|
304
|
+
break;
|
|
305
|
+
}
|
|
299
306
|
}
|
|
300
307
|
}
|
|
301
308
|
}
|