angular-cn/aio/tools/ng-packages-installer
George Kalpakas 671deadde1 fix(docs-infra): avoid version mismatch error when using local Angular packages (#34213)
The local Angular packages used to build `aio/` when running
`yarn setup-local`/`yarn build-local` (and related commands), are built
by bazel. Bazel, determines the version to use for these locally built
packages based on the latest tag for a commit on the current branch.
(This works as expected during the release, because the packages are
built on the correct branch with up-to-date tags.)

During local development, however, this often leads to generating older
versions than what the current `@angular/cli` version is compatible
with, if the user has not fetched the latest tags from `angular/angular`
or the branch has not been rebased recently.

Previously, the above (common) situation would result in a build error
by the CLI. (Note that this would be a false error, because in this case
the version set by bazel would not reflect the actual version of the
local packages.) The solution would be for the user to fetch the latest
tags from `angular/angular`, rebase their branch and run a bazel build
again (ensuring that it would actually build anew and not emit cached
artifacts). This was cumbersome and most people didn't even know about
it.

This commit avoids this error and the associated pain-points by
overwriting the versions of the installed local packages with fake
versions based on the ones in the lockfile, which are guaranteed to be
compatible with the currently used CLI version.

Fixes #34208

PR Close #34213
2019-12-03 10:40:14 -08:00
..
index.js fix(docs-infra): avoid version mismatch error when using local Angular packages (#34213) 2019-12-03 10:40:14 -08:00
index.spec.js fix(docs-infra): avoid version mismatch error when using local Angular packages (#34213) 2019-12-03 10:40:14 -08:00