Commit graph

366 commits

Author SHA1 Message Date
Alex Rickabaugh
612771ed54 build: update aio to 16.0.0 (#50131)
This commit updates the Angular version for AIO and its examples to 16.0.0.

PR Close #50131
2023-05-03 12:56:41 -07:00
Angular Robot
9b24bb9e50 build: update all non-major dependencies (#49990)
See associated pull request for more information.

PR Close #49990
2023-04-26 13:13:29 -07:00
Angular Robot
85f3a38bb3 build: update all non-major dependencies (#49909)
See associated pull request for more information.

PR Close #49909
2023-04-18 20:54:28 +00:00
Angular Robot
c190fbb15c build: update dependency rimraf to v5 (#49757)
See associated pull request for more information.

PR Close #49757
2023-04-12 09:28:25 -07:00
Andrew Kushnir
b98ecbc0ce build: update minimum supported Node version from 16.13.0 -> 16.14.0 (#49771)
This commit updates the minimum supported Node version across packages from 16.13.0 -> 16.14.0 to ensure compatibility with dependencies.

PR Close #49771
2023-04-11 07:56:31 -07:00
Angular Robot
85ca1f99b7 build: update dependency concurrently to v8 (#49662)
See associated pull request for more information.

PR Close #49662
2023-04-03 19:12:44 -07:00
Alan Agius
6e26af52fa feat(bazel): (APF) Angular Package Format updates (#49559)
Several updates to Angular Package Format.

BREAKING CHANGE:

Several changes to the Angular Package Format (APF)
- Removal of FESM2015
- Replacing ES2020 with ES2022
- Replacing FESM2020 with FESM2022

PR Close #49559
2023-03-23 08:18:45 -07:00
Andrew Scott
07cbaa3e28 Revert "feat(bazel): (APF) Angular Package Format updates (#49332)" (#49555)
This reverts commit 842d569a94.

PR Close #49555
2023-03-22 16:01:20 -07:00
Alan Agius
842d569a94 feat(bazel): (APF) Angular Package Format updates (#49332)
Several updates to Angular Package Format.

BREAKING CHANGE:

Several changes to the Angular Package Format (APF)
- Removal of FESM2015
- Replacing ES2020 with ES2022
- Replacing FESM2020 with FESM2022

PR Close #49332
2023-03-22 14:00:19 -07:00
Paul Gschwendtner
c7588683d1 build: always preserve symlinks when executing e2e test commands (#49293)
Currently, examples with test commands like `ng build` are *never*
using the local version of `//packages/compiler-cli`. This is because
the CLI is invoked accidentally from within `external/aio_example_deps`.

Since the CLI relies on importing the compiler-cli, it will always
resolve the dependency from that directory- causing it to be always
the version installed via `aio/examples/tools/shared/package.json`.

We should never resolve symlinks and escape the e2e sandbox. That way
the compiler-cli would be resolved properly and could also become the
locally built one, depending on the test mode (i.e. npm or "local").

PR Close #49293
2023-03-03 19:41:35 +00:00
Paul Gschwendtner
adb337c179 build: ensure chromium is not using sandbox within Bazel sandbox for AIO example e2e tests (#49293)
Chromium is launched via Karma from within the Bazel AIO example e2e
tests. This breaks depending on the platform and sandbox mechanism used.

We should never use Chromium's sandbox on top of Bazel's sandbox
invocation. The Angular CLI exposes a browser exactly for this use-case.

PR Close #49293
2023-03-03 19:41:35 +00:00
Paul Gschwendtner
da1504fec4 build: fix AIO local e2e examples picking up incorrect dependencies (#49293)
Whenever we run example tests using the local framework packages, the
e2e tests will have the local framework packages symlinked in the
`node_modules`.

This works well in general, but due to NodeJS by default resolving
symlinks to the target location, NodeJS will end up looking for
transitive dependencies in the `bazel-bin` instead of in the example
`node_modules` folder. This means that we end up incorrectly resolving
older versions of `@angular/core` that end up existing in the main
project dependencies. This causes errors like:

```
Error: ../../home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/execroot/angular/bazel-out/k8-fastbuild/bin/packages/common/npm_package/http/testing/index.d.ts:12:21 - error TS2307: Cannot find module '@angular/common/http' or its corresponding type declarations.

12 import * as i1 from '@angular/common/http';
                       ~~~~~~~~~~~~~~~~~~~~~~

Error: ../../home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/execroot/angular/bazel-out/k8-fastbuild/bin/packages/common/npm_package/index.d.ts:1630:18 - error TS2707: Generic type 'ɵɵDirectiveDeclaration' requires between 6 and 8 type arguments.

1630     static ɵdir: i0.ɵɵDirectiveDeclaration<NgClass, "[ngClass]", never, { "klass": "class"; "ngClass": "ngClass"; }, {}, never, never, true, never>;
                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

We can fix this by properly ensuring that NodeJS does not resolve
symlinks, but rather preserves them.

In the error above, the e2e tests end up accidentally resolving
`@angular/core` v14 that comes from `@angular/benchpress`. Angular
Benchpress is installed via `@angular/build-tooling` in the project
root.

PR Close #49293
2023-03-03 19:41:35 +00:00
Paul Gschwendtner
36b67152b9 build(docs-infra): fix example e2e tests not failing properly in some situations (#49293)
The `run-example-e2e` script does not properly fail if configured
tests of examples are failing. This happens when a CLI example
configures multiple tests in the `example-config`. Due to incorrect
usage of promises in combination with reduce, only the last test
command had an effect on the overall test conclusion.

A similar issue seems to occur with SystemJS Protractor tests.

This commit fixes the problem and also cleans up the code a little
by switching it to `async/await`.

PR Close #49293
2023-03-03 19:41:35 +00:00
Paul Gschwendtner
67679b3146 build: format run-example-e2e.mjs with prettier (#49293)
Formats the `run-example-e2e.mjs` file with prettier to ease
future diffs.

PR Close #49293
2023-03-03 19:41:35 +00:00
Alan Agius
eea29a7104 build: update Angular FW and CLI packages to version 16.0.0-next (#49173)
This commit updates the Angular FW and CLI packages to 16.0.0-next`

PR Close #49173
2023-02-23 10:36:29 -08:00
Kristiyan Kostadinov
913605085a build: update AIO to TypeScript 4.9 (#49135)
Updates AIO to the latest stable version of TypeScript as a prerequisite to drop support for 4.8.

PR Close #49135
2023-02-21 13:16:35 -08:00
Alan Agius
48aa96ea13 refactor: remove Angular Compatibility Compiler (ngcc) (#49101)
This commit removes the NGCC code and all the related infra setup required to support it.

BREAKING CHANGE: Angular Compatibility Compiler (ngcc) has been removed and as a result Angular View Engine libraries will no longer work

PR Close #49101
2023-02-16 16:01:17 -08:00
Paul Gschwendtner
42619bd670 build: remove puppeteer, remaining usages of webdriver-manager and migrate AIO production test to Bazel (#49025)
This commit does three things that all related and required to get
rid of `webdriver-manager`:

* Our puppeteer protractor setup in AIO relies on webdriver-manager
because we install a corresponding chromedriver based on the puppeteer
chromium version. We would like to get rid of this brittle setup.

* We don't use `puppeteer` in many places because we manage chromium and
the driver through Bazel. This commit removes the remaining puppeteer
usage and replaces it with the Bazel-managed canonical browser

* We need to migrate the AIO production URL tests to Bazel. These
weren't part of Aspect's migration. This is needed so that we can drop
puppeteer and use the Bazel browser setup.

* Migrates some at-runtime TS `ts-node` test setup to proper idiomatic
Bazel code. Needed because it depends on code that also had to be
migrated to Bazel given the production e2e test Bazel migration (above
points).

Note: The xregexp dependency had to be added to the root project because
`ts_library` does not support compilation deps from `@aio_npm`. This is
something we will fix anyway when we have a more modern toolchain!

PR Close #49025
2023-02-10 19:22:18 +00:00
Angular Robot
fe6a2bd9e2 build: update dependency rimraf to v4 (#48726)
See associated pull request for more information.

PR Close #48726
2023-01-18 10:43:21 -08:00
Angular Robot
5b1c7c10a0 build: update dependency @rollup/plugin-commonjs to v24 (#48530)
See associated pull request for more information.

PR Close #48530
2023-01-13 10:35:19 -08:00
Angular Robot
aa51e9b217 build: update all non-major dependencies (#48462)
See associated pull request for more information.

PR Close #48462
2023-01-04 11:38:40 -08:00
Paul Gschwendtner
13d3039c7d refactor: convert AIO tooling scripts used in Bazel to ESM (#48521)
Since the Bazel setup in this repo will now always use ESM,
the tooling scripts/binaries in AIO need to be switched to ESM
too. Most of the scripts are already ESM, but a few had to be converted.

Note that the Dgeni generation does not use ESM because it's unaffected
and the Dgeni CLI is used. In the future we could also update the Dgeni
setup to ESM but there is no need currently.

PR Close #48521
2022-12-19 19:50:44 +00:00
Angular Robot
126573d76b build: update all non-major dependencies (#48372)
See associated pull request for more information.

PR Close #48372
2022-12-06 11:06:39 -08:00
Paul Gschwendtner
ccff7dcb28 build: fix unnecessary large runfiles in AIO when composing boilerplate (#48329)
The `example-boilerplate` NodeJS binary always depends on all files from
the individual examples. This is not needed as for composition w/ the
boilerplate, only the target example content + boilerplate is needed
in the runfiles. This reduces the runfiles and therefore speeds up
boilerplate creation (which can happen for all examples concurrently).

PR Close #48329
2022-12-02 09:47:43 -08:00
Paul Gschwendtner
0125677cfe build: always ensure node_modules folders are not picked up in AIO (#48329)
AIO has two risk places where `node_modules` folders may exist and may
be accidentally picked up by Bazel- even though they are already added
as part of `.bazelignore` and made visible through `.gitignore`. It
doesn't hurt instructing Bazel to always ignore `node_modules` as part
of the `glob` instruction.

Co-authored-by: Joey Perrott <josephperrott@gmail.com>

PR Close #48329
2022-12-02 09:47:43 -08:00
Angular Robot
b935255ef9 build: update all non-major dependencies (#48271)
See associated pull request for more information.

PR Close #48271
2022-11-30 09:29:26 -08:00
Derek Cormier
903917b13d build(bazel): remaining AIO Bazel migration fixes 2022-11-22 13:51:16 -07:00
Derek Cormier
4c9f5b7c5e build(bazel): fix a regression when linking local packages for AIO example
tests

Caused by code moving around.
2022-11-22 13:51:16 -07:00
Derek Cormier
60058d2882 build(bazel): support ibazel for AIO example playgrounds
Also uses more fine-grained deps to make an ibazel rebuild fast.
2022-11-22 13:51:16 -07:00
Derek Cormier
837b8091f0 build(bazel): fix a bug where local ngc couldn't be linked into AIO example tests
The ngc entrypoint escapes the sandboxed example folder. Rather than
always symlinking local packages, copy the full package when there are
bin entries.
2022-11-22 13:51:16 -07:00
Derek Cormier
a61397f2f8 build(bazel): consolidate windows chromium path workaround
Add the hack to a central location so that it's easier to fix later.
2022-11-22 13:51:16 -07:00
Derek Cormier
f37dd0fc96 build(bazel): create AIO example playgrounds for manual testing
After the bazel migration, AIO examples are no longer fully formed in
the source tree.
2022-11-22 13:51:16 -07:00
Derek Cormier
e4b82cea26 build(bazel): clean up pathing in aio build tooling
Make use of process.env.RUNFILES.
2022-11-22 13:51:16 -07:00
Derek Cormier
ffea372105 build(bazel): update documentation for docs authors
Where possible, preseve the original yarn commands.
2022-11-22 13:51:16 -07:00
Derek Cormier
474671568e build(bazel): fix aio example systemjs tests for locally linked packages
These required a preserveSymlinks hack similar to the CLI tests
2022-11-22 13:51:16 -07:00
Derek Cormier
b4c40c5d55 build(bazel): merge aio/tools/defaults.bzl and tools/defaults.bzl
Detect the correct workspace for the source maps dep.
2022-11-22 13:51:16 -07:00
Derek Cormier
8420a293b3 build(bazel): restore filtering for example e2e tests
Added a wrapper script that performs bazel queries, filters, then runs
the tests.
2022-11-22 13:51:16 -07:00
Derek Cormier
7fd6f04df1 build(bazel): run aio systemjs example e2es concurrently
These had to be run with the 'exclusive' tag under bazel due to
hardcoded ports.
2022-11-22 13:51:16 -07:00
Derek Cormier
8775a745ad build(bazel): fix some aio linting errors
Surfaced by modifying ci to include aio targets
2022-11-22 13:51:16 -07:00
Derek Cormier
bc1e93d639 build(bazel): refactor aio example e2es to fix windows performance
Use the same config flag to enable local vs npm deps as aio.
2022-11-22 13:51:16 -07:00
Derek Cormier
7a134cf41a build(bazel): incrementally run aio example e2e tests
Replaces the workflow where all example e2es are run at once
2022-11-22 13:51:16 -07:00
Derek Cormier
07126ae40f build(bazel): fix race conditions in windows aio build
Disables the rules_nodejs linker and adds a custom esm module resolver
2022-11-22 13:51:16 -07:00
Derek Cormier
7c8ca113c1 build(bazel): replace ignore example feature with bazel equivalent
Comment out the entry in the EXAMPLES map to ignore an example.
2022-11-22 13:51:16 -07:00
Derek Cormier
9a27c4cb50 build(bazel): incrementally build aio example zips and live examples
The existing scripts were amended to work on one example at a time
2022-11-22 13:51:16 -07:00
Derek Cormier
20ff128103 build(bazel): create targets for aio example tooling tests
This replaces the boilerplate:test npm script
2022-11-22 13:51:16 -07:00
Derek Cormier
9cb9161876 build(bazel): generate aio stackblitz and example zips
Can be served by running bazel run //aio:serve
2022-11-22 13:51:16 -07:00
Angular Robot
80e3c28995 build: update dependency @nguniversal/builders to v15 (#48093)
See associated pull request for more information.

PR Close #48093
2022-11-17 09:30:51 -08:00
Alan Agius
32135b27a1 docs: update examples to reflect changes in Angular CLI version 15. (#47904)
These changes include
- Remove the usage of `enableProdMode`
- Remove `test.ts`, `polyfills.ts`, `karma.conf.js` and environment files which are no longer generated by default

PR Close #47904
2022-11-03 17:46:46 -07:00
Angular Robot
e3fbeab3bd build: update dependency @rollup/plugin-commonjs to v23 (#47711)
See associated pull request for more information.

PR Close #47711
2022-10-11 23:09:06 +00:00
Angular Robot
8cef5dd7c1 build: update all non-major dependencies (#47487)
See associated pull request for more information.

PR Close #47487
2022-09-21 16:00:46 +02:00