diff options
author | BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com> | 2023-06-04 03:39:18 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2023-06-29 11:10:21 +0100 |
commit | 224c2bb1fd3f16ac4063dc0eb8ba43eee34ba782 (patch) | |
tree | bed619db085989b08fa4a0d5110690d7381d7252 | |
parent | 19b9f7f0f451a636f3fdcdc1bb283ab431ede612 (diff) | |
download | bitbake-contrib-224c2bb1fd3f16ac4063dc0eb8ba43eee34ba782.tar.gz |
fetch2/npmsw: Don't fetch dev dependencies when they are not demanded
Dev dependencies should not be fetched only if it is specified in the
recipe.
Signed-off-by: BELOUARGA Mohamed <m.belouarga@technologyandstrategy.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r-- | lib/bb/fetch2/npmsw.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/bb/fetch2/npmsw.py b/lib/bb/fetch2/npmsw.py index 359192a29..d89be10ca 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): |