summaryrefslogtreecommitdiffstats
path: root/build/plugins/nots.py
diff options
context:
space:
mode:
authormiripiruni <[email protected]>2023-06-29 11:31:40 +0300
committermiripiruni <[email protected]>2023-06-29 11:31:40 +0300
commite439f7d9c2cd360529054bbb5f13a6cab80f3123 (patch)
treea743685bc20e96ff332b9fd064a4efe18db2eb17 /build/plugins/nots.py
parent6592029be25834b4bfbc3fac74c3bbc346ed22e6 (diff)
Всегда перечислять pnpm-lock.yaml во входах модуля
Issues: * https://st.yandex-team.ru/ * https://st.yandex-team.ru/
Diffstat (limited to 'build/plugins/nots.py')
-rw-r--r--build/plugins/nots.py18
1 files changed, 15 insertions, 3 deletions
diff --git a/build/plugins/nots.py b/build/plugins/nots.py
index 994512a1082..fff1ea36082 100644
--- a/build/plugins/nots.py
+++ b/build/plugins/nots.py
@@ -121,8 +121,15 @@ def on_from_npm_lockfiles(unit, *args):
elif unit.get("TS_STRICT_FROM_NPM_LOCKFILES") == "yes":
ymake.report_configure_error("lockfile not found: {}".format(lf_path))
- for pkg in pm.extract_packages_meta_from_lockfiles(lf_paths):
- unit.on_from_npm([pkg.name, pkg.version, pkg.sky_id, pkg.integrity, pkg.integrity_algorithm, pkg.tarball_path])
+ try:
+ for pkg in pm.extract_packages_meta_from_lockfiles(lf_paths):
+ unit.on_from_npm([pkg.name, pkg.version, pkg.sky_id, pkg.integrity, pkg.integrity_algorithm, pkg.tarball_path])
+ except Exception as e:
+ if unit.get("TS_RAISE") == "yes":
+ raise e
+ else:
+ unit.message(["WARN", "on_from_npm_lockfiles exception: {}".format(e)])
+ pass
@_with_report_configure_error
@@ -426,7 +433,12 @@ def on_node_modules_configure(unit):
if pj.has_dependencies():
unit.onpeerdir(pm.get_local_peers_from_package_json())
- ins, outs = pm.calc_node_modules_inouts()
+ message_level = "ERROR" if unit.get("TS_RAISE") == "yes" else "WARN"
+ errors, ins, outs = pm.calc_node_modules_inouts()
+
+ for err in errors:
+ unit.message([message_level, "calc_node_modules_inouts exception: {}".format(err)])
+
unit.on_set_node_modules_ins_outs(["IN"] + sorted(ins) + ["OUT"] + sorted(outs))
else:
# default "noop" command