diff options
| -rw-r--r-- | build/conf/ts/node_modules.conf | 7 | ||||
| -rw-r--r-- | build/plugins/nots.py | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/build/conf/ts/node_modules.conf b/build/conf/ts/node_modules.conf index b50f6d8f159..115579711d3 100644 --- a/build/conf/ts/node_modules.conf +++ b/build/conf/ts/node_modules.conf @@ -5,6 +5,9 @@ NPM_CONTRIBS_PATH=contrib/typescript _NODE_MODULES_INOUTS= _YATOOL_PREBUILDER_ARG= +macro CUSTOM_CONTRIB_TYPESCRIPT(P) { + SET(NPM_CONTRIBS_PATH $P) +} ### @usage: NPM_CONTRIBS() # internal ### @@ -88,9 +91,5 @@ module _PREPARE_DEPS_BASE: _BARE_UNIT { # we read pnpm-lock.yaml and package.json during configuration SET_APPEND(_MAKEFILE_INCLUDE_LIKE_DEPS ${CURDIR}/pnpm-lock.yaml ${CURDIR}/package.json) - PEERDIR($NPM_CONTRIBS_PATH) - _PREPARE_DEPS_CONFIGURE() } - - diff --git a/build/plugins/nots.py b/build/plugins/nots.py index cc4561bb0b1..6a8d825bd21 100644 --- a/build/plugins/nots.py +++ b/build/plugins/nots.py @@ -477,6 +477,11 @@ def _select_matching_version(erm_json, resource_name, range_str, dep_is_required @_with_report_configure_error def on_prepare_deps_configure(unit): + # Originally this peerdir was in .conf file + # but it kept taking default value of NPM_CONTRIBS_PATH + # before it was updated by CUSTOM_CONTRIB_TYPESCRIPT() + # so I moved it here. + unit.onpeerdir(unit.get("NPM_CONTRIBS_PATH")) pm = _create_pm(unit) pj = pm.load_package_json_from_dir(pm.sources_path) has_deps = pj.has_dependencies() |
