bitbake-devel.lists.openembedded.org archive mirror
 help / color / mirror / Atom feed
* [master][PATCH] fetch2: npmsw: Don't fetch dev dependencies when they are not demanded
@ 2023-05-30 22:42 belouargamohamed
  2023-05-31 18:47 ` [bitbake-devel] " Alexandre Belloni
  0 siblings, 1 reply; 4+ messages in thread
From: belouargamohamed @ 2023-05-30 22:42 UTC (permalink / raw)
  To: bitbake-devel; +Cc: f.lahoudere, e.aubineau, j.guignard, BELOUARGA Mohamed

From: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>

Dev dependencies should not be fetched only if it is specified in the
recipe.

Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
---
 lib/bb/fetch2/npmsw.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/bb/fetch2/npmsw.py b/lib/bb/fetch2/npmsw.py
index 359192a2..d89be10c 100644
--- a/lib/bb/fetch2/npmsw.py
+++ b/lib/bb/fetch2/npmsw.py
@@ -49,6 +49,8 @@ def foreach_dependencies(shrinkwrap, callback=None, dev=False):
         if package != "":
             name = package.split('node_modules/')[-1]
             package_infos = packages.get(package, {})
+            if dev == False and package_infos.get("dev", False):
+                continue
             callback(name, package_infos, package)
 
 class NpmShrinkWrap(FetchMethod):
-- 
2.25.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-06-01 10:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-30 22:42 [master][PATCH] fetch2: npmsw: Don't fetch dev dependencies when they are not demanded belouargamohamed
2023-05-31 18:47 ` [bitbake-devel] " Alexandre Belloni
2023-05-31 18:59   ` belouargamohamed
2023-06-01 10:22     ` [bitbake-devel] " Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).