build(docs-infra): use local version of Zone.js when testing against local packages#35780
build(docs-infra): use local version of Zone.js when testing against local packages#35780gkalpak wants to merge 4 commits intoangular:masterfrom
Conversation
|
You can preview 8367c72 at https://pr35780-8367c72.ngbuilds.io/. |
8367c72 to
cc93ccc
Compare
|
You can preview cc93ccc at https://pr35780-cc93ccc.ngbuilds.io/. |
cc93ccc to
6fdc27f
Compare
|
You can preview 6fdc27f at https://pr35780-6fdc27f.ngbuilds.io/. |
There was a problem hiding this comment.
Most of us have the original path to this file in our muscle memory. Can you please leave a placeholder script in the old location that will error instructing the developers to use the new path?
Also please leave a comment there that the placeholder can be removed two months from now (early May).
This commit moves the build-related scripts (`build-ivy-npm-packages.js`, `build-packages-dist.js` and `package-builder.js`) to a dedicated directory to keep the `scripts/` directory cleaner. It also moves the logic for building the `zone.js` package to a separate script, `zone-js-builder.js`, to make it re-usable. A subsequent commit will use it to build the `zone.js` package when building the Ivy Angular packages as well.
…al package detection Previously, `NgPackagesInstaller` would only look for Angular local packages and do so by listing all (deeply nested) files in `dist/packages-dist/` and looking for `package.json` files nested two levels deep (i.e. `dist/packages-dist/*/package.json`). Thus, it would unnecessarily check a large number of files. This commit changes the package detection logic to instead look for a `package.json` file directly inside each subdirectory of `dist/packages-dist/`, which speeds up the operation. It also refactors the code to make it easier to look for packages in other directories (besides `dist/packages-dist/`). This will be useful in a subsequent commit to look for and use the locally built `zone.js` package (from `dist/zone.js-dist/`).
…local packages In some cases, we want to test the AIO app or docs examples against the locally built Angular packages (for example to ensure that the changes in a commit do not introduce a breaking change). In order to achieve this, we have the `ng-packages-installer` script that handles updating a project's `package.json` file to use the locally built Angular packages (and appropriate versions for their (dev-/peer-)dependencies). Previously, `ng-packages-installer` would only consider the locally built Angular packages (from `dist/packages-dist/`). However, given that Zone.js is now part of the `angular/angular` repo, it makes sense to also use the locally built Zone.js package (from `dist/zone.js-dist/`). Otherwise, the tests might fail for commits that update both the Angular packages (and related docs examples) and the Zone.js package. An example of such a simultaneous change (that would have broken tests) is angular#33838. This commit updates the script to install the locally built Zone.js package (in addition to the Angular ones). The commit ensures that the Zone.js package will always be available alongside the Angular packages (i.e. that the Zone.js package will be built by the same script that builds the Angular packages and that the `dist/zone.js-dist/` directory will be cached on CI). Note: This problem was discovered while enabling docs examples unit tests in angular#34374.
6fdc27f to
e4b198a
Compare
e4b198a to
2d9c2f3
Compare
…al package detection (#35780) Previously, `NgPackagesInstaller` would only look for Angular local packages and do so by listing all (deeply nested) files in `dist/packages-dist/` and looking for `package.json` files nested two levels deep (i.e. `dist/packages-dist/*/package.json`). Thus, it would unnecessarily check a large number of files. This commit changes the package detection logic to instead look for a `package.json` file directly inside each subdirectory of `dist/packages-dist/`, which speeds up the operation. It also refactors the code to make it easier to look for packages in other directories (besides `dist/packages-dist/`). This will be useful in a subsequent commit to look for and use the locally built `zone.js` package (from `dist/zone.js-dist/`). PR Close #35780
…local packages (#35780) In some cases, we want to test the AIO app or docs examples against the locally built Angular packages (for example to ensure that the changes in a commit do not introduce a breaking change). In order to achieve this, we have the `ng-packages-installer` script that handles updating a project's `package.json` file to use the locally built Angular packages (and appropriate versions for their (dev-/peer-)dependencies). Previously, `ng-packages-installer` would only consider the locally built Angular packages (from `dist/packages-dist/`). However, given that Zone.js is now part of the `angular/angular` repo, it makes sense to also use the locally built Zone.js package (from `dist/zone.js-dist/`). Otherwise, the tests might fail for commits that update both the Angular packages (and related docs examples) and the Zone.js package. An example of such a simultaneous change (that would have broken tests) is #33838. This commit updates the script to install the locally built Zone.js package (in addition to the Angular ones). The commit ensures that the Zone.js package will always be available alongside the Angular packages (i.e. that the Zone.js package will be built by the same script that builds the Angular packages and that the `dist/zone.js-dist/` directory will be cached on CI). Note: This problem was discovered while enabling docs examples unit tests in #34374. PR Close #35780
This commit moves the build-related scripts (`build-ivy-npm-packages.js`, `build-packages-dist.js` and `package-builder.js`) to a dedicated directory to keep the `scripts/` directory cleaner. It also moves the logic for building the `zone.js` package to a separate script, `zone-js-builder.js`, to make it re-usable. A subsequent commit will use it to build the `zone.js` package when building the Ivy Angular packages as well. PR Close #35780
…al package detection (#35780) Previously, `NgPackagesInstaller` would only look for Angular local packages and do so by listing all (deeply nested) files in `dist/packages-dist/` and looking for `package.json` files nested two levels deep (i.e. `dist/packages-dist/*/package.json`). Thus, it would unnecessarily check a large number of files. This commit changes the package detection logic to instead look for a `package.json` file directly inside each subdirectory of `dist/packages-dist/`, which speeds up the operation. It also refactors the code to make it easier to look for packages in other directories (besides `dist/packages-dist/`). This will be useful in a subsequent commit to look for and use the locally built `zone.js` package (from `dist/zone.js-dist/`). PR Close #35780
…local packages (#35780) In some cases, we want to test the AIO app or docs examples against the locally built Angular packages (for example to ensure that the changes in a commit do not introduce a breaking change). In order to achieve this, we have the `ng-packages-installer` script that handles updating a project's `package.json` file to use the locally built Angular packages (and appropriate versions for their (dev-/peer-)dependencies). Previously, `ng-packages-installer` would only consider the locally built Angular packages (from `dist/packages-dist/`). However, given that Zone.js is now part of the `angular/angular` repo, it makes sense to also use the locally built Zone.js package (from `dist/zone.js-dist/`). Otherwise, the tests might fail for commits that update both the Angular packages (and related docs examples) and the Zone.js package. An example of such a simultaneous change (that would have broken tests) is #33838. This commit updates the script to install the locally built Zone.js package (in addition to the Angular ones). The commit ensures that the Zone.js package will always be available alongside the Angular packages (i.e. that the Zone.js package will be built by the same script that builds the Angular packages and that the `dist/zone.js-dist/` directory will be cached on CI). Note: This problem was discovered while enabling docs examples unit tests in #34374. PR Close #35780
…against local packages (angular#35780)" This reverts commit 7d832ae; breaks CI with error `Concurrent upstream jobs persisted the same file(s) into the workspace:`
|
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. |
In some cases, we want to test the AIO app or docs examples against the locally built Angular packages (for example to ensure that the changes in a commit do not introduce a breaking change). In order to achieve this, we have the
ng-packages-installerscript that handles updating a project'spackage.jsonfile to use the locally built Angular packages (and appropriate versions for their (dev-/peer-)dependencies).Previously,
ng-packages-installerwould only consider the locally built Angular packages (fromdist/packages-dist/). However, given that Zone.js is now part of theangular/angularrepo, it makes sense to also use the locally built Zone.js package (fromdist/zone.js-dist/). Otherwise, the tests might fail for commits that update both the Angular packages (and related docs examples) and the Zone.js package. An example of such a simultaneous change (that would have broken tests) is #33838.This commit updates the script to install the locally built Zone.js package (in addition to the Angular ones). The commit ensures that the Zone.js package will always be available alongside the Angular packages (i.e. that the Zone.js package will be built by the same script that builds the Angular packages and that the
dist/zone.js-dist/directory will be cached on CI).Note: This problem was discovered while enabling docs examples unit tests in #34374.