Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ng-dev/release): run yarn integrity check before performing a rel…
…ease If the ng-dev command is run with an outdate version of the package, a dev may perform a release without the latest changes to the tooling. This can lead to not creating up to date artifacts and general issues. By checking if the installed dependencies match the expected dependencies before performing the action we can instruct the user to update their installed node_modules. An example where this change would have prevented issue: Framework releases from the patch branch which is currently a different version of the package as defined in package.json. Calling them version 1 and version 2, with version 2 being the latest version. A patch release is performed by checking out the latest commit from the upstream next branch, running yarn install and then running ng-dev release publish. This release process will occur using version 2 of the dev-infra package. During the release process, the patch branch is checked out and yarn install is performed, causing version 1 to be installed. Upon completion of the patch release, the next release is attempted unknowingly triggered using version 1 of the package. While generated artifacts are already ensured to built with the correct dependency by the process, the tool itself is already running before this check can occur. Instead version 1 of the package is used to process the release, potentially resulting in an errant or unexpected process. This situation will now be prevented by validating the expected version is being used for the action process, in the situation above the user would be informed that yarn install was needed before performing the second release.
- Loading branch information