fix(compiler-cli): detect when the linker is working in unpublished angular and widen supported versions#54439
fix(compiler-cli): detect when the linker is working in unpublished angular and widen supported versions#54439josephperrott wants to merge 1 commit intoangular:mainfrom
Conversation
…ngular and widen supported versions When the linker is running using an unpublished version of angular, locally built, the version will be `0.0.0`. When encountering this situation, the range that for the linker map support is considered to be `*.*.*` allowing for the linker to work at build time with packages built with versioned angular. Most notably this allows for us to properly use the linker in building our documentation site with the locally built version of angular.
There was a problem hiding this comment.
Devtools has the same use-case, where it's being made to work by ignoring the warning:
angular/devtools/tools/esbuild/esbuild-base.config.mjs
Lines 45 to 55 in aee526a
There's also currently this logic, which I think wouldn't be needed with this change:
EDIT: the above concerns the PLACEHOLDER version, not the substituted 0.0.0 version, so is irrelevant w.r.t. this change.
| function getRange(comparator: '<='|'>=', versionStr: string): semver.Range { | ||
| // If the provided version is exactly `0.0.0` then we are known to be running with an unpublished | ||
| // version of angular and assume that all ranges are compatible. | ||
| if (versionStr === '0.0.0' && (PLACEHOLDER_VERSION as string) === '0.0.0') { |
There was a problem hiding this comment.
Where does the 0.0.0 come from exactly, as the version for HEAD is suffixed with -PLACEHOLDER
There was a problem hiding this comment.
0.0.0 is stamped from during the packaging, with 0.0.0 being the replacement when we are not "stamping" and the actual version stamping when we --stamp:
Lines 238 to 243 in ed0d5ec
There was a problem hiding this comment.
Ah, thanks for the reference! I wasn't aware of this behavior.
|
This PR was merged into the repository by commit da7fbb4. |
…ngular and widen supported versions (angular#54439) When the linker is running using an unpublished version of angular, locally built, the version will be `0.0.0`. When encountering this situation, the range that for the linker map support is considered to be `*.*.*` allowing for the linker to work at build time with packages built with versioned angular. Most notably this allows for us to properly use the linker in building our documentation site with the locally built version of angular. PR Close angular#54439
|
This issue has been automatically locked due to inactivity. Read more about our automatic conversation locking policy. This action has been performed automatically by a bot. |
When the linker is running using an unpublished version of angular, locally built, the version will be
0.0.0. When encountering this situation, the range that for the linker map support is considered to be*.*.*allowing for the linker to work at build time with packages built with versioned angular.Most notably this allows for us to properly use the linker in building our documentation site with the locally built version of angular.