mirror of
https://github.com/angular/angular
synced 2026-05-24 09:28:37 +00:00
build: update compiler-cli to not be stamped when used for the compiler in ng_project (#61535)
The compiler-cli package needs to be unstamped and will the resulting generated code will be stamped as expected. PR Close #61535
This commit is contained in:
parent
e11f48f65e
commit
7f6bb91c5d
3 changed files with 22 additions and 17 deletions
|
|
@ -148,14 +148,14 @@ pkg_npm(
|
|||
# Long-term, `pkg_npm` will be migrated to `npm_package` in general.
|
||||
npm_package(
|
||||
name = "pkg",
|
||||
srcs = [":npm_package_nosub"],
|
||||
srcs = [":npm_package"],
|
||||
data = [
|
||||
# Needed because compiler is a dev dependency (to satisfy the peer dependency)
|
||||
# and `rules_js` only makes transitive production dependencies available.
|
||||
":node_modules/@angular/compiler",
|
||||
],
|
||||
replace_prefixes = {
|
||||
"npm_package_nosub/": "",
|
||||
"npm_package/": "",
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -48,9 +48,9 @@ ng_package(
|
|||
# Long-term, `pkg_npm` will be migrated to `npm_package` in general.
|
||||
npm_package(
|
||||
name = "pkg",
|
||||
srcs = [":npm_package"],
|
||||
srcs = [":npm_package_nosub"],
|
||||
replace_prefixes = {
|
||||
"npm_package/": "",
|
||||
"npm_package_nosub/": "",
|
||||
},
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ def ng_package(name, readme_md = None, license_banner = None, license = None, de
|
|||
if not license:
|
||||
license = "//:LICENSE"
|
||||
visibility = kwargs.pop("visibility", None)
|
||||
tags = kwargs.pop("tags", [])
|
||||
|
||||
common_substitutions = dict(kwargs.pop("substitutions", {}), **PKG_GROUP_REPLACEMENTS)
|
||||
substitutions = dict(common_substitutions, **{
|
||||
|
|
@ -198,6 +199,23 @@ def ng_package(name, readme_md = None, license_banner = None, license = None, de
|
|||
rollup_config_tmpl = _INTERNAL_NG_PACKAGE_DEFAULT_ROLLUP_CONFIG_TMPL,
|
||||
rollup = _INTERNAL_NG_PACKAGE_DEFAULT_ROLLUP,
|
||||
visibility = visibility,
|
||||
tags = tags,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
_ng_package(
|
||||
name = "%s_nosub" % name,
|
||||
deps = deps,
|
||||
validate = True,
|
||||
readme_md = readme_md,
|
||||
license = license,
|
||||
license_banner = license_banner,
|
||||
substitutions = common_substitutions,
|
||||
ng_packager = _INTERNAL_NG_PACKAGE_PACKAGER,
|
||||
rollup_config_tmpl = _INTERNAL_NG_PACKAGE_DEFAULT_ROLLUP_CONFIG_TMPL,
|
||||
rollup = _INTERNAL_NG_PACKAGE_DEFAULT_ROLLUP,
|
||||
visibility = visibility,
|
||||
tags = ["manual"],
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
|
@ -214,7 +232,6 @@ def ng_package(name, readme_md = None, license_banner = None, license = None, de
|
|||
def pkg_npm(name, deps = [], validate = True, **kwargs):
|
||||
"""Default values for pkg_npm"""
|
||||
visibility = kwargs.pop("visibility", None)
|
||||
tags = kwargs.pop("tags", [])
|
||||
|
||||
common_substitutions = dict(kwargs.pop("substitutions", {}), **PKG_GROUP_REPLACEMENTS)
|
||||
substitutions = dict(common_substitutions, **{
|
||||
|
|
@ -248,18 +265,6 @@ def pkg_npm(name, deps = [], validate = True, **kwargs):
|
|||
}),
|
||||
deps = [":%s_js_module_output" % name],
|
||||
visibility = visibility,
|
||||
tags = tags,
|
||||
**kwargs
|
||||
)
|
||||
|
||||
_pkg_npm(
|
||||
name = "%s_nosub" % name,
|
||||
validate = validate,
|
||||
substitutions = common_substitutions,
|
||||
deps = [":%s_js_module_output" % name],
|
||||
visibility = visibility,
|
||||
# should not be built unless it is a dependency of another rule
|
||||
tags = ["manual"],
|
||||
**kwargs
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue