422 Commits

Author SHA1 Message Date
Paul Gschwendtner af19c440e2 ci: re-enable components repo unit tests job (#44832)
Re-enables the components-repo unit tests job that we previously
disabled due to the devmode target change that caused conflicts
with `angular/components` patching `ng_module.bzl` of `@angular/bazel`.

PR Close #44832
2022-01-27 09:22:24 -08:00
Paul Gschwendtner 12e042405b ci: temporarily disable components-repo-unit-tests job (#44505)
Temporarily disables the components repo unit tests job that
breaks due to us changing the devmode output to ES2015 in Angular Bazel.

This is a trivial thing to solve in the COMP repo but the job needs
to be disabled first, so that the changes can be released.

PR Close #44505
2022-01-05 23:20:21 +00:00
Paul Gschwendtner b23ce150d0 build: bundle spec files for saucelabs legacy job (#44281)
Bundle spec files similar to how it is done within the Angular
Components repo. This should simplify the setup and also speed
up the Saucelab job as only a single spec bundle would need to be
downloaded, compared to having to load hundreds of files through the
Saucelabs tunnel.

Also makes a couple of tests more robust with the emulators/and accounts
for ES2015 test runner changes. The tests should be less reluctant to
such build process changes.

Note for reviewers: Some imports have been simplified here. This work
came from Joey's original WIP for this. It's unclear to me whether this
is still needed, but it sounded like this was necessary for the ESBuild
bundling to work. I have robusted the module resolution plugin though,
so I doubt it's still needed. At the same time though: Not worth
reverting/trying as these changes are nice to have anyway!

Co-Authored-By: Joey Perrott <josephperrott@gmail.com>
Co-Authored-By: Paul Gschwendtner <paulgschwendtner@gmail.com>

PR Close #44281
2021-11-30 11:56:04 -05:00
Joey Perrott 0ad0054083 build: update repository to node@16 locally (#44211)
As node 16 is now active LTS, updating to node 16 is a better choice for our own development. Notably its
support for M1 chips is an important value add for us.

PR Close #44211
2021-11-24 18:55:33 +00:00
Alex Rickabaugh bb9ff6003c test: remove view-engine-only tests (#43884)
This commit removes most tests that were designated as only covering View
Engine code. It also removes tag filters from CI and local commands to run
tests.

In a few cases (such as with the packages/compiler tests), this tag was
improperly applied, and certain test cases have been added back running in
Ivy mode.

This commit also empties `@angular/compiler/testing` as it is no longer
necessary (this is safe since compiler packages are not public API). It can
be deleted in the future.

PR Close #43884
2021-11-23 21:10:06 +00:00
Paul Gschwendtner bac03a95d7 ci: do not capture nested bazel integration test workspace within Bazel (#44061)
The `integration/bazel` folder cannot be excluded within the
`.bazelignore` file. This is necessary so that the integration test
rule can glob for all files within the integration test.

The downside is that the `integration/bazel/<..>` folder is being
discovered by the `//...` target query, causing Starlark files to
be interpreted/validated. e.g.

https://app.circleci.com/pipelines/github/angular/angular/39255/workflows/c6c448ed-9a44-49b3-a0c2-2c7328ce2855/jobs/1079169

Previously such errors did not appear because no Starlark `.bzl` files
within the test imported other files using the `//` absolute resolution.

Explicitly excluding the nested packages using the `--deleted_packages`
option is the most idiomatic way of achieving this currently (similarly
done by `rules_nodejs`). More information on why this is so verbose
currently:

https://github.com/bazelbuild/bazel/issues/12034

PR Close #44061
2021-11-05 16:22:17 +00:00
George Kalpakas 8286190930 build(docs-infra): update docs examples to Angular v13.0.0-rc.0 (#43880)
This commit updates the docs examples to Angular v13.0.0-rc.0. In
addition to updating the dependency versions, it also updates the
projects' structure and configs to more closely match what a new v13 CLI
app would look like. See, also, the [diff][1] between a basic v12.1.3
CLI app and a v13.0.0-rc.0 one.
(NOTE: v12.1.3 was the last version for which we aligned the projects
with how a new CLI app would look like.)

Additionlly:
- Since we now use RxJS v7 in docs examples, this commit removes the
  extra CI steps to explicitly test the docs examples against RxJS v7.
- Since Angular v13 no longer supports IE, this commit removes an
  IE-specific section from `upgrade-setup.md`.

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/12.1.3..13.0.0-rc.0

PR Close #43880
2021-10-29 13:10:25 -07:00
George Kalpakas 0fc4e66f6e test(docs-infra): fix practical-observable-usage docs example tests with RxJS v7 (#43880)
Due to how `debounceTime()` works in RxJS v7, Jasmine's mock clock was
not enough to trigger it. This commit fixes it by providing a similar
mock clock that is able to mock all of `Date.now()`, `setInterval()` and
`setTimeout()`.

PR Close #43880
2021-10-29 13:10:25 -07:00
Paul Gschwendtner e2f9dcff68 ci: update commit for components-repo-unit-tests job (#43932)
Updates the SHA for the components-repo-unit-tests job. Due to
us enabling code splittign in the Angular compiler CLI package,
the postinstall patches in Angular Components started failing. The
latest commit of Angular Components no longer patches any JS files of
the compiler-cli, so updating the job unblocks us from enabling code
splitting within ESBuild.

PR Close #43932
2021-10-26 23:58:27 +00:00
Joey Perrott 9236e7d2da ci: correct comment related to building view engine npm packages (#43862)
Removing the comment related about building the npm packages using view engine as it was actually done via
ivy, now that ivy is used for all builds there is no need for expressing the aspect of the build.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott cbe7b60d6c ci: remove view engine test job (#43862)
Remove the view engine test job as view engine is no longer being tested on CI.  Additionally, update size
tracking to rely on test job instead of test_ivy_aot.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott 5c1d4ab7f1 ci: remove windows view engine test job (#43862)
Remove the windows view engine test job as view engine is no longer being tested on CI.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott af1f8f8429 ci: remove saucelabs view engine tests (#43862)
Remove the view engine specific saucelabs test job and associated tags/tooling as view engine is no longer being tested
on CI.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott f9b203bf22 build: remove fixme-ivy-aot tag filter (#43862)
Remove the fixme-ivy-aot tag filter from usage as no targets are tagged with fixme-ivy-aot as ivy is now the
compiler used by default.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott aef63e7ae5 build: remove "ivy-only" bazel tag (#43862)
Because all actions are assumed to be running on Ivy, things which only work on Ivy should not be marked as
Ivy only.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott a365a1f0ff build: rename "no-ivy-aot" tag to "view-engine-only" (#43862)
Using the tag "view-engine-only" better describes the expected usage of bazel targets with the test. They can
only be run with view engine.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott 00d801122c build: Use Ivy compiler for bazel builds by default (#43862)
Setting the angular_ivy_enabled environment variable to True will default Bazel builds to use the Ivy
compiler rather than defaulting to ViewEngine.

PR Close #43862
2021-10-19 10:06:54 -07:00
Alan Agius 17f5299967 ci: use Node.js browsers image (#43810)
Spinning up a Node.js browsers image has little to no overhead when the image is not cached on the host. `install_chrome_libs` however takes takes ~13s everytime.

PR Close #43810
2021-10-12 17:43:15 +00:00
Alan Agius 6411128284 ci: update default circle ci image to cimg/node:14.17.6 (#43810)
With this change we update Node.js version to 14.17 which is needed because of Eslint 8. Also, we replace the legacy images `circleci/node` with the new images `cimg/node`.

See: https://circleci.com/developer/images/image/cimg/node

PR Close #43810
2021-10-12 17:43:15 +00:00
Paul Gschwendtner 167fb2b37f ci: re-enable components-repo-unit-tests job after APF v13 adjustments (#43798)
The APF v13 changes have landed in the `angular/components` repository
so that the CI check can be re-enabled.

PR Close #43798
2021-10-12 17:42:46 +00:00
George Kalpakas 5c7e87a0f3 ci: avoid testing angular.io against RxJS v7 twice (#43767)
Previously, we used to run the angular.io unit tests against both RxJS
v6 (which was the version specified in `package.json`) and RxJS v7 on
CI, as a way to guard against future regressions with RxJS v7.

Now that `package.json` has been updated to RxJS v7, there is no reason
to explicitly re-run the unit test against RxJS v7 on CI, so this commit
removes the corresponding steps.

PR Close #43767
2021-10-08 20:17:58 +00:00
Alex Rickabaugh 48aa0039ea refactor(compiler-cli): update peerDependencies to require rxjs ^7.4.0 (#43748)
RxJS 7 versions prior to 7.4.0 export ES5 code, whereas Angular
applications using RxJS 6 today use ES2015. This was fixed in RxJS 7.4.0
which exposes ES2015 entrypoints as well. This commit updates Angular's
peer dependencies to require the newer RxJS.

PR Close #43748
2021-10-06 15:57:59 -07:00
George Kalpakas 23ac3f7cef ci: test AIO/docs examples against the latest RxJS 7.x version (v7.3.1) (#43683)
Use the latest RxJS 7.x version (v7.3.1) with AIO and docs examples
tests to guard against regressions with RxJS v7.

PR Close #43683
2021-10-06 10:04:47 -07:00
George Kalpakas 99e18a07f6 ci: use the local Angular packages when testing AIO/docs examples with RxJS v7 (#43683)
The `test_aio_local` and `test_docs_examples` CI jobs, test the AIO app
and the docs examples using the locally built Angular packages. They
also include steps that install RxJS v7 and test the examples against
that as well, to avoid regressions with RxJS v7.

However, it turns out that the `yarn add` command used to install
RxJS v7 caused yarn to overwrite the local Agular packages in
`node_modules/` with the ones from NPM.

This commit ensures that the local Angular packages are restored in
`node_modules/` after adding RxJS v7. It also adds a check to ensure
that the restoration of local Angular packages did not affect the
version of RxJS.

PR Close #43683
2021-10-06 10:04:47 -07:00
Kristiyan Kostadinov c14085e434 feat(core): drop support for TypeScript 4.2 and 4.3 (#43642)
Bumps the minimum required TypeScript version to 4.4.2 and removes the integration tests for 4.1, 4.2 and 4.3.

BREAKING CHANGE:
TypeScript versions older than 4.4.2 are no longer supported.

PR Close #43642
2021-10-05 17:26:37 -07:00
Paul Gschwendtner efcc723846 ci: invalidate cache for node modules to ensure latest CLI is used (#43431)
Invalidate the cache for node modules so that the CLI builds from
the snapshot repositories are used. Due to a bug in Yarn, and the need
of using the `github:<..>` syntax, the old artifacts from previous runs
are incorrectly cached. This could have been prevented by using an actual
full Git ref URL, but unfortunately that does not work because the CLI
devkit snapshot dependencies set snapshot builds as deps as well. The URLs
here need to match as otherwise Yarn will conflict. e.g.

```
 Pattern ["@angular-devkit/core@github:angular/angular-devkit-core-builds#64b7e2b1d"] is trying to unpack in the same destination "/Users/paul/Library/Caches/Yarn/v6/npm-@angular-devkit-core-13.0.0-next.6/node_modules/@angular-devkit/core" as pattern ["@angular-devkit/core@github:angular/angular-devkit-core-builds#0e7277c63"]. This could result in non-deterministic behavior, skipping.
```

PR Close #43431
2021-10-01 18:28:46 +00:00
Paul Gschwendtner b2ff0ac188 ci: disable components-repo-unit-tests job due to APF v13 (#43431)
Temporarily disables the `components-repo-unit-tests` job due to APF
v13 which is currently not handled properly in the components repo. The
components repo would need to be updated first to properly handle v13
APF output (with linker processing and an alternative to UMD bundles
which the majority of tests currently rely on).

PR Close #43431
2021-10-01 18:28:44 +00:00
Paul Gschwendtner fcd958dd9f build: update build scripts to no longer build View Engine output (#43431)
Removes View Engine compilation from the package builder script. For
v13, we can no longer ship View Engine packages.

PR Close #43431
2021-10-01 18:28:42 +00:00
Paul Gschwendtner 652a6d36d4 ci: avoid failures when yarn unlinks bazelisk in windows jobs (#43373)
Windows disallows removal of files which are currently being used.
i.e. have active handles. This currently can result in permission denied
failures on the Windows CI jobs where `yarn bazel` resolves to the local
bazelisk installation that can be unlinked by `yarn_install` repository
fetching as part of the Bazel invocation, resulting in errors like:

```
ERROR: An error occurred during the fetch of repository 'npm':
   yarn_install failed: $ node tools/yarn/check-yarn.js
...
[4/5] Linking dependencies...
info If you think this is a bug, please open a bug report with the information provided in "C:\\users\\circleci\\ng\\yarn-error.log".
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
 (warning " > tsickle@0.34.3" has incorrect peer dependency "typescript@~3.3.1".
error An unexpected error occurred: "EPERM: operation not permitted, unlink 'C:\\users\\circleci\\ng\\node_modules\\@bazel\\bazel-win32_x64\\bazel-0.27.0-windows-x86_64.exe'".
Process stalled
Active handles:
  - Socket
  - Socket
  - Socket
)
```

We workarund this in order to improve CI stability in case the node modules are
being invalidated by Bazel, or through Yarns integrity checking.

PR Close #43373
2021-09-07 18:44:00 +00:00
Paul Gschwendtner 5472c28fa1 build: check .ng-dev tool configuration in CI (#43322)
Checks the `.ng-dev` tool configuration in CI, compared
to doing it locally when the caretaker intends to perform
a merge and then realizes the config is broken.

PR Close #43322
2021-09-02 21:18:36 +00:00
Joey Perrott c91cecddaa ci: update circle cache key (#43177)
Update the prefix used for the circle cache key to use new cache base.

PR Close #43177
2021-08-16 11:06:01 -07:00
Paul Gschwendtner 72c03a0d4f build: remove ts-api-guardian from repository (#42735)
This commit removes `ts-api-guardian` from the repository. We introduced
a new tool for testing API signature that is part of the shared
dev-infra package. The TS API guardian package will be deprecated for
the public in favor of Microsoft's API extractor that has support for
more parts of the syntax, such as alias exports.

PR Close #42735
2021-07-26 12:02:14 -07:00
Paul Gschwendtner 7271ad15ba ci: remove RBE workaround from components-repo-unit-tests job (#42875)
In the past when we had issues with our RBE instance, we wanted
to get CI green as soon as possible, and couldn't wait on the
components repo to land their RBE instance fix. We manually
fixed the RBE instance name using a CI step using `sed`.

This is no longer needed if we update to the most recent
state of the components repository.

PR Close #42875
2021-07-19 17:32:44 -07:00
Paul Gschwendtner 1c5b130156 build: build locale files for legacy saucelabs job (#42230)
Given that the locale files are now generated through
Bazel, the files are no longer checked-in and the
legacy TSC compilation fails due to imports resolving
to non-existent files. We fix this for the legacy
saucelabs job by copying the generated TS files into
the sources (which is acceptable for the isolated CI job)

PR Close #42230
2021-07-16 12:44:59 -07:00
Paul Gschwendtner c7d20639c6 build: enable noImplicitOverride in project (#42512)
Enables the `noImplicitOverride` option to improve
overall codehealth in the repository.

PR Close #42512
2021-07-12 13:11:14 -07:00
Paul Gschwendtner 12443ea739 build: remove skydoc and rules_sass from repository (#42760)
Skydoc is no longer used as `@angular/bazel` is no longer a
public API. The Sass rules were only used in a single place
in the repo where Sass is not really needed and has just been
added by accident most likely. We want to remove the Sass dependency
in preparation for Rules NodeJS v4.x where the Sass rules currently
still use an older version of `@bazel/worker` that is incompatible.

PR Close #42760
2021-07-09 14:50:15 -07:00
George Kalpakas 02742552f3 refactor(docs-infra): make angular.io and docs examples compatible with RxJS v7 (#42660)
This commit applies the necessary changes to make angular.io and (most)
docs examples compatible with both RxJS v6 and v7. It also adds new
steps to relevant CI jobs to test angular.io and docs examples against
RxJS v7 as well (to catch potential regressions).

NOTE:
Some of the docs examples are not compatible with RxJS v7 and are
therefore excluded from the tests. The SystemJS-based ngUpgrade
examples in particular are excluded, since they require a different
SystemJS configs to run against RxJS v6 and v7 and the extra complexity
of managing that is not worth it for the 4 affected examples.

PR Close #42660
2021-06-29 10:29:58 -07:00
Paul Gschwendtner 8da6f66f7b ci: replace RBE instance name for components-repo-unit-tests job (#42636)
Temporarily replaces the RBE instance name for the
`components-repo-unit-tests` job until
https://github.com/angular/components/pull/23056 is available.

PR Close #42636
2021-06-24 08:28:57 -07:00
Alex Rickabaugh bf0e82cde6 Revert "build: build locale files for legacy saucelabs job (#42230)" (#42583)
This reverts commit c42041b419.

PR Close #42583
2021-06-16 09:49:37 -07:00
Paul Gschwendtner c42041b419 build: build locale files for legacy saucelabs job (#42230)
Given that the locale files are now generated through
Bazel, the files are no longer checked-in and the
legacy TSC compilation fails due to imports resolving
to non-existent files. We fix this for the legacy
saucelabs job by copying the generated TS files into
the sources (which is acceptable for the isolated CI job)

PR Close #42230
2021-06-14 09:59:46 -07:00
Jessica Janiuk dc25efbb5b Revert "build: build locale files for legacy saucelabs job" (#42521)
This reverts commit 018654fe672a8ab7a954ae6541706957926ac0f4.

PR Close #42521
2021-06-08 10:06:24 -07:00
Paul Gschwendtner 532caa7bd9 build: build locale files for legacy saucelabs job (#42230)
Given that the locale files are now generated through
Bazel, the files are no longer checked-in and the
legacy TSC compilation fails due to imports resolving
to non-existent files. We fix this for the legacy
saucelabs job by copying the generated TS files into
the sources (which is acceptable for the isolated CI job)

PR Close #42230
2021-06-07 15:34:38 -07:00
Paul Gschwendtner 57865b352a ci: do not update shared dev-infra package in components-repo-unit-tests job (#42268)
The shared dev-infra package from `HEAD` should not be installed
when running the `components-repo-unit-tests` job. This is done
because otherwise changes to the dev-infra package can result in
build setup issues for the CI job (while the goal of the CI job
is to test the framework)

PR Close #42268
2021-06-03 10:37:41 -07:00
Joey Perrott 4e9b61aaf9 docs: remove/update broken links in resources appearing on aio (#42232)
Remove or update broken links to resources from the resources and
contributors pages on aio.

Closes #39719

PR Close #42232
2021-05-26 14:21:12 -07:00
Joey Perrott ef676bf946 build: reformat yml files (#42136)
Reformat all yml files in the repository.

PR Close #42136
2021-05-19 11:20:20 -07:00
Alan Agius ca0fcd6c08 ci: only run publish_snapshot when not PR (#41877)
Currently, the non forked PRs such as Renovate will run `publish_snapshot` because `CIRCLE_PR_NUMBER` is not defined for PRs which are opened from non forked repos. Instead we add a filter to only run `publish_snapshot` on releasable branches.

Example of run were the mentioned variable is not defined https://app.circleci.com/pipelines/github/angular/angular/32093/workflows/7c8c4cfc-e6f6-44fc-a6dc-a82a6ac862db/jobs/976611

PR Close #41877
2021-04-29 10:16:03 -07:00
George Kalpakas 641fa6944f ci: re-enable the @angular/components unit tests (#41816)
Previously, the `components-repo-unit-tests` CI job was temporarily
disabled due to a version mismatch between the `rules_nodejs`
dependency version on the two repos (angular/angular and
angular/components).

Now that both repos have been updated to a `rules_nodejs` version
>=2.0.0, we can re-enable the job and have `@angular/components` unit
tests run on every build.

PR Close #41816
2021-04-28 09:57:48 -07:00
George Kalpakas 295889ed2e ci: prevent CI cache from growing indefinitely (#41814)
Previously, the fallback key used for the CircleCI cache could match a
cache indefinitely (as long as `.bazelversion` didn't change). This
would allow the cache to grow quite large, which in turn would lead to
slow-down in CI jobs. See, also, angular/angular-cli#17533 for more
details of the impact of a growing CircleCI cache.

Unfortunately, using something like the lockfile checksum in the
fallback cache key would cause too many cache misses (esp. with
automatic updates via Renovate), again slowing CI down.

(The problem was originally discussed [here][2].)

This commit uses the technique described in [this blogpost][1] to
invalidate the cache monthly. This keeps the extra cache misses low
(essentially once per month per fork), while also preventing the cache
from growing indefinitely.

[1]: https://support.circleci.com/hc/en-us/articles/360012618473-Creating-a-daily-cache
[2]: https://github.com/angular/angular/pull/41467#discussion_r607818494

PR Close #41814
2021-04-26 11:03:10 -07:00
Alan Agius 89529bca0e ci: remove AIO ViewEngine tests (#41638)
With Angular CLI 12, it is not possible to build ViewEngine applications.

PR Close #41638
2021-04-16 08:59:37 -07:00
Joey Perrott ee615e0744 build: upgrade to node 14 (#41544)
Upgrade local development environment for the angular repo to use node 14
dropping node 10 from supported for development within the angular repo.

PR Close #41544
2021-04-14 09:40:17 -07:00