Commit graph

271 commits

Author SHA1 Message Date
Angular Robot
4de35735d3 build: update io_bazel_rules_sass digest to f6ceac7 (#47376)
See associated pull request for more information.

PR Close #47376
2022-10-11 23:16:21 +00:00
Alan Agius
1b9fd46d14 feat(core): add support for Node.js version 18 (#47730)
This change aligns with the supported Node.js versions of the Angular CLI.
See: https://github.com/angular/angular-cli/pull/24026

BREAKING CHANGE: Angular no longer supports Node.js versions `14.[15-19].x` and `16.[10-12].x`. Current supported versions of Node.js are `14.20.x`, `16.13.x` and `18.10.x`.

PR Close #47730
2022-10-11 17:21:19 +00:00
Angular Robot
b9f80d277d build: update io_bazel_rules_sass digest to f3874ae (#47292)
See associated pull request for more information.

PR Close #47292
2022-09-06 09:59:21 -07:00
Angular Robot
8340da92bb build: update io_bazel_rules_sass digest to 6802532 (#47104)
See associated pull request for more information.

PR Close #47104
2022-08-23 09:24:56 -07:00
Angular Robot
f6c57e856b build: update io_bazel_rules_sass digest to 697e5a0 (#47046)
See associated pull request for more information.

PR Close #47046
2022-08-05 09:57:45 -07:00
Angular Robot
de1e28006b build: update io_bazel_rules_sass digest to 70ffe01 (#47023)
See associated pull request for more information.

PR Close #47023
2022-08-04 13:08:42 -07:00
Paul Gschwendtner
b757b1387c build: update dev-infra packages and account for build-tooling split from ng-dev (#46976)
The dev-infra build tooling is now decoupled from `ng-dev`. This will
make it easier to update `ng-dev` without necessarily needing to upgrade
the whole build system, Bazel etc. This is useful when e.g. new release
tool features have been added and should also be ported to active LTS
branches.

PR Close #46976
2022-08-02 09:37:37 -07:00
Angular Robot
d6899d516d build: update io_bazel_rules_sass digest to 030f696 (#46947)
See associated pull request for more information.

PR Close #46947
2022-08-01 09:40:03 -07:00
Paul Gschwendtner
7b9269c5e4 build: account for integration test rule change (#46778)
The integration test rule now always executes tests in a directory
outside of the execroot. This ensures a more hermetic test environment
on platforms without a sandbox, or when tests are run with `tags:
local`.

As part of this change, an issue with Yarn 1.x. and `nodejs_binary`
unveiled. Yarn 1.x. is resolved properly using the tool mapping but
when Yarn inside Yarn is invoked (e.g. using `package.json` scripts),
then the second nested Yarn invocation fails due to an unknown path.

This happens because Yarn in the original invocation creates another
directory in the `/tmp` directory and modifies the `PATH` so that
the same `yarn` can be invoked again. This makes sense conceptually
but breaks in our case because the Yarn Bash script put into the `/tmp`
directory tries to resolve our vendored Yarn script relatively (which
is the wrong spot here). It worked previously in the execroot because
`nodejs_binary` invoked Yarn through `<external>/../node.sh
<absolute-path-to-yarn-cjs-script>`, but outside the execroot it invoked
Yarn using a relative path (which then ended up being preserved in the
Yarn temporary directory).

We can fix this by updating the Bazel NodeJS repository which seems to
have coincidentally have a fix for the path resolution. See:

https://github.com/bazelbuild/rules_nodejs/pull/3493#event-6870301735.

PR Close #46778
2022-07-11 20:55:30 +00:00
Derek Cormier
2c8fd2b57b build(bazel): enable runfiles (#46313)
Patches are required for tsec and rules_webtesting. The fix for
rules_webtesting was merged to that repo
(581b1557e3)
but it's unclear when a release will be cut.

PR Close #46313
2022-06-14 16:58:19 +00:00
Renovate Bot
0410c0901e build: update all non-major dependencies (#46150)
PR Close #46150
2022-06-10 14:26:34 +00:00
Renovate Bot
d869ede818 build: update all non-major dependencies (#45967)
PR Close #45967
2022-05-20 14:18:09 -07:00
Paul Gschwendtner
be7955d84e build: use vendored yarn script for installing Sass repositories (#45892)
Fixes the Bazel analysis warning and the fact that Yarn is unnecessarily
downloaded by `rules_nodejs`.

```
DEBUG: /home/circleci/.cache/bazel/_bazel_circleci/9ce5c2144ecf75d11717c0aa41e45a8d/external/build_bazel_rules_nodejs/index.bzl:73:14: yarn_install#yarn attribute not set and no repository named 'yarn' exists; installing default yarn
```

PR Close #45892
2022-05-05 13:56:38 -07:00
George Kalpakas
e1454aeb7b build(common): update CLDR to version 41 (#45714)
Update CLDR, which is used to generate the locales files, to version 41.
Also, make necessary code changes to account for changes in the CLDR
data.

Fixes #43301

PR Close #45714
2022-04-29 12:20:08 -04:00
George Kalpakas
57a9c17e7c build(common): specify CLDR version to use by cldr (#45714)
While generating locales, two sets of data (both derived from the
[CLDR project][1]) are used:
- JSON data with the [`cldrjs` package][2], which is used for most
  operations.
- XML data with the [`cldr` package][3], which is used for generating
  plural-related data.

The JSON data is brought in from the [unicode-org/cldr-json][4]
repository. Since we control the version of the repository that we use,
we can control the CLDR version that these correspond to.

Previously, however, we used the XML data that were bundled with the
[`cldr` package[3]. As a result, the two sets of data could correspond
to different CLDR versions, resulting in incorrect/inconsistent locales
files.

This commit addresses the problem by utilizing the `load()` method of
the [`cldr` package][3], which allows passing in a custom path to the
CLDR XML data (instead of using the bundled data. This way, we can
ensure that the data used for all operations correspond to the same CLDR
version.

Related discussion: #43301

[1]: https://github.com/unicode-org/cldr
[2]: https://www.npmjs.com/package/cldrjs
[3]: https://www.npmjs.com/package/cldr
[4]: https://github.com/unicode-org/cldr-json

PR Close #45714
2022-04-29 12:20:08 -04:00
Renovate Bot
48b8a1fcf0 build: update all non-major dependencies (#45470)
Updates all non-major dependencies, including Bazel

PR Close #45470
2022-04-11 21:01:09 +00:00
Paul Gschwendtner
a24293ae80 build: migrate more usages from @bazel/typescript to @bazel/concatjs (#45431)
As mentioned in previous commits (check them for more details), `@bazel/typescript`
no longer contains `ts_library`-specific code, so we no longer need that dependency.

PR Close #45431
2022-03-25 12:18:34 -07:00
Renovate Bot
010a39f856 build: update bazel (#45431)
Update `@bazel` packages to the latest 5.x version.

Some of the changes here are modeled after
angular/dev-infra@40c0ac8559.

Co-Authored-By: George Kalpakas <kalpakas.g@gmail.com>

PR Close #45431
2022-03-25 12:18:33 -07:00
Derek Cormier
22d1dc0acb build(bazel): add bazel build and test targets for aio build (#45022)
First step towards a migration of aio to bazel. Not yet built by ci.

PR Close #45022
2022-03-14 09:25:34 -07:00
Renovate Bot
561bd750b5 build: update dependency io_bazel_rules_sass to v1.49.8 (#45128)
PR Close #45128
2022-02-18 13:34:14 -08:00
Renovate Bot
6769f94b14 build: update all non-major dependencies (#45037)
PR Close #45037
2022-02-16 13:50:43 -08:00
Renovate Bot
4c83395508 build: update all non-major dependencies (#44855)
PR Close #44855
2022-01-31 21:30:10 +00:00
Renovate Bot
a03f80a409 build: update dependency rules_pkg to v0.6.0 (#44818)
PR Close #44818
2022-01-26 17:37:41 -08:00
AleksanderBodurri
445fbf81fd refactor(devtools): bring the angular devtools directory into the root bazel workspace
Previously devtools used a nested workspace for its bazel configurations. This meant framework dependencies were consumed via npm.

Now devtools is part of the root bazel directory that all other files in this codebase fall under. This allows us to build devtools using local angular packages, removing the need to consume these dependencies with npn. This is useful because we no longer have to update these dependencies with an automated tool like renovate, and our CI tests will always run against the most up to date framework packages.
2022-01-26 16:35:31 -05:00
AleksanderBodurri
0a948fb2ef build: configure circleci for angular devtools ci
Sets up commands in circleci config to test angular devtools.
2022-01-26 16:35:30 -05:00
AleksanderBodurri
82d46b20b1 refactor(devtools): run ng-dev format on bazel files in devtools directory 2022-01-26 16:35:30 -05:00
Renovate Bot
dff497f78d build: update all non-major dependencies (#44502)
PR Close #44502
2022-01-10 19:55:23 +00:00
Paul Gschwendtner
d73c7162df build: add postinstall script as runfile for yarn_install repository rule (#44490)
Adds the postinstall script as runfile for the `yarn_install`
repository rule, so that the dependencies are re-fetched when
the script changes.

PR Close #44490
2022-01-04 12:14:14 -08:00
Renovate Bot
6c05c3fd2d build: update all non-major dependencies (#44152)
PR Close #44152
2021-12-14 16:04:34 -05:00
Paul Gschwendtner
6c0905d7ab build: wire up integration test rule from shared dev-infra package (#44238)
Wires up the integration test rule from the shared dev-infra package,
while also deleting the old integration test rule.

The readme is updated to reflect the changes that are being made
to run with the new integration rule. Overall one major difference is
that we will declare the integration test targets within each test
directory, making those actual bazel packages. This is more idiomatic
within Bazel and also reduces the computation within Skyframe as less
globs need to be evaluated for example.

PR Close #44238
2021-12-08 13:42:41 -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
Renovate Bot
891318e805 build: update all non-major dependencies (#43974)
PR Close #43974
2021-11-09 21:00:17 +00:00
Renovate Bot
ba4e18b096 build: update all non-major dependencies (#43838)
PR Close #43838
2021-10-15 10:45:02 -07:00
Joey Perrott
b5da715d9f build: update to cldr@39 (#43820)
Update repository to use cldr version 39 as it is the latest available.

PR Close #43820
2021-10-13 16:49:24 +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
a274de088a build: make bazel integrations compatible with windows (#43431)
The bazel integration tests are currently not compatible with Windows.
Tests never get to run because the created tar packages for NPM packages
are built using an outdated `pkg_tar` rule that creates invalid
tarballs. We fix this by using the non-deprecated windows-compatible
`rules_pkg` implementation.

Additionally, we copy all `package.json` files of integration tests to
the bazel bin directory as otherwise the file would be accidentally
modified as a source on Windows.

PR Close #43431
2021-10-01 18:28:43 +00:00
Paul Gschwendtner
f87b7c1e65 build: install @bazel/esbuild used for ESM bundling of tools (#43431)
Installs `@bazel/esbuild` so that we can use it for bundling
of the `@angular/compiler-cli`.

PR Close #43431
2021-10-01 18:28:41 +00:00
Paul Gschwendtner
831ede8bf4 build: update bazel setup to latest dev-infra package and rules_nodejs v4.2.0 (#43431)
Updates the Bazel setup to the latest shared dev-infra package. Also the
rules_nodejs version is updated to v4.2.0. We have landed various
changes that prepare us for the APF v13 implementation. e.g.

* Ability to control the linker mappings for the `ng_package` rule. This
will become important for using a transition that could accidentally
cause linker mappings that would otheriwse conflict.
* Use of latest version of rollup & terser in the Bazel rules the
  dev-infra package exposes. This is necessary for ES2020 support.

PR Close #43431
2021-10-01 18:28:41 +00:00
Paul Gschwendtner
9b2732c0ed build: update bazel setup to latest versions (#43322)
Updates the overall Bazel setup to their latest versions:

* rules_nodejs is updated to stable 4.0.0
* rules_sass is updated to the latest version containing a fix
  for the `@bazel/worker` bug we had a workaround for.
* dev-infra-private is updated to avoid duplicated dependencies.
  We should use a version that also relies on stable rules_nodejs v4.

Note: We are not set on how dependencies for the `bazel/` folder
of the dev-infra package are managed, but we removed `@types/`
packages from the transitive dependencies, so we now need to
manually include `@types/uuid` for building the benchmark driver
utilties. We need to revisit this in the future.

PR Close #43322
2021-09-02 21:18:36 +00:00
Renovate Bot
d7de6d6725 build: update bazel to v4.0.0-rc.0 (#43138)
PR Close #43138
2021-08-17 20:00:37 -07:00
Joey Perrott
81e4257761 build: remove dev-infra directory and migrate to relying on @angular/dev-infra-private-builds (#43061)
Remove the dev-infra directory and complete the migration to using the code generated by the
angular/dev-infra repository.

PR Close #43061
2021-08-16 10:44:27 -07:00
Renovate Bot
a2c893309d build: update bazel to v4.0.0-beta.1 (#42967)
PR Close #42967
2021-07-28 10:54:05 -07:00
Paul Gschwendtner
7a3a453072 build: convert CLDR locale extraction from Gulp to Bazel tool (#42230)
Converts the CLDR locale extraction script to a Bazel tool.
This allows us to generate locale files within Bazel, so that
locales don't need to live as sources within the repo. Also
it allows us to get rid of the legacy Gulp tooling.

The migration of the Gulp script to a Bazel tool involved the
following things:

  1. Basic conversion of the `extract.js` script to TypeScript.
     This mostly was about adding explicit types. e.g. adding `locale:
     string` or `localeData: CldrStatic`.

  2. Split-up into separate files. Instead of keeping the large
     `extract.js` file, the tool has been split into separate files.
     The logic remains the same, just that code is more readable and
     maintainable.

  3. Introduction of a new `index.ts` file that is the entry-point
     for the Bazel tool. Previously the Gulp tool just generated
     all locale files, the default locale and base currency files
     at once. The new entry-point accepts a mode to be passed as
     first process argument. based on that argument, either locales
     are generated into a specified directory, or the default locale,
     base currencies or closure file is generated.

     This allows us to generate files with a Bazel genrule where
     we simply run the tool and specify the outputs. Note: It's
     necessary to have multiple modes because files live in separate
     locations. e.g. the default locale in `@angular/core`, but the
     rest in `@angular/common`.

  4. Removal of the `cldr-data-downloader` and custom CLDR resolution
     logic. Within Bazel we cannot run a downloader using network.

     We switch this to something more Bazel idiomatic with better
     caching. For this a new repository rule is introduced that
     downloads the CLDR JSON repository and extracts it. Within
     that rule we determine the supported locales so that they
     can be used to pre-declare outputs (for the locales) within
     Bazel analysis phase. This allows us to add the generated locale
     files to a `ts_library` (which we want to have for better testing,
     and consistent JS transpilation).

     Note that the removal of `cldr-data-downloader` also requires us to
     add logic for detecting locales without data. The CLDR data
     downloader overwrote the `availableLocales.json` file with a file
     that only lists locales that CLDR provides data for. We use the
     official `availableLocales` file CLDR provides, but filter out
     locales for which no data is available. This is needed until we
     update to CLDR 39 where data is available for all such locales
     listed in `availableLocales.json`.

PR Close #42230
2021-07-16 12:44:59 -07:00
Paul Gschwendtner
762e057e85 build: update to rules_nodejs v4.0.0-beta.0 (#42760)
Updates the Bazel NodeJS rules to v4.0.0-beta.0. This is necessary
so that the Angular components repo can update, and it's generally
good to stay as up-to-date as possible with the Bazel rules as it's
easy to fall behind, and updating early allows us to discover issues
affecting our tooling earlier (where they are easier to address due to
e.g. potential breaking change policy).

PR Close #42760
2021-07-09 14:50:15 -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
Renovate Bot
9ec241926e build: update all non-major dependencies (#42739)
PR Close #42739
2021-07-09 10:13:37 -07:00
Renovate Bot
166e98a594 build: update all non-major dependencies (#42544)
PR Close #42544
2021-06-17 18:09:31 +00:00
Alex Rickabaugh
ec6dc78f1d Revert "build: convert CLDR locale extraction from Gulp to Bazel tool (#42230)" (#42583)
This reverts commit 1eaeb23c75.

PR Close #42583
2021-06-16 09:49:37 -07:00
Paul Gschwendtner
1eaeb23c75 build: convert CLDR locale extraction from Gulp to Bazel tool (#42230)
Converts the CLDR locale extraction script to a Bazel tool.
This allows us to generate locale files within Bazel, so that
locales don't need to live as sources within the repo. Also
it allows us to get rid of the legacy Gulp tooling.

The migration of the Gulp script to a Bazel tool involved the
following things:

  1. Basic conversion of the `extract.js` script to TypeScript.
     This mostly was about adding explicit types. e.g. adding `locale:
     string` or `localeData: CldrStatic`.

  2. Split-up into separate files. Instead of keeping the large
     `extract.js` file, the tool has been split into separate files.
     The logic remains the same, just that code is more readable and
     maintainable.

  3. Introduction of a new `index.ts` file that is the entry-point
     for the Bazel tool. Previously the Gulp tool just generated
     all locale files, the default locale and base currency files
     at once. The new entry-point accepts a mode to be passed as
     first process argument. based on that argument, either locales
     are generated into a specified directory, or the default locale,
     base currencies or closure file is generated.

     This allows us to generate files with a Bazel genrule where
     we simply run the tool and specify the outputs. Note: It's
     necessary to have multiple modes because files live in separate
     locations. e.g. the default locale in `@angular/core`, but the
     rest in `@angular/common`.

  4. Removal of the `cldr-data-downloader` and custom CLDR resolution
     logic. Within Bazel we cannot run a downloader using network.

     We switch this to something more Bazel idiomatic with better
     caching. For this a new repository rule is introduced that
     downloads the CLDR JSON repository and extracts it. Within
     that rule we determine the supported locales so that they
     can be used to pre-declare outputs (for the locales) within
     Bazel analysis phase. This allows us to add the generated locale
     files to a `ts_library` (which we want to have for better testing,
     and consistent JS transpilation).

     Note that the removal of `cldr-data-downloader` also requires us to
     add logic for detecting locales without data. The CLDR data
     downloader overwrote the `availableLocales.json` file with a file
     that only lists locales that CLDR provides data for. We use the
     official `availableLocales` file CLDR provides, but filter out
     locales for which no data is available. This is needed until we
     update to CLDR 39 where data is available for all such locales
     listed in `availableLocales.json`.

PR Close #42230
2021-06-14 09:59:46 -07:00
Jessica Janiuk
e3b709314f Revert "build: convert CLDR locale extraction from Gulp to Bazel tool" (#42521)
This reverts commit b9759522260cd57392e44fe63c5b17a9f102c101.

PR Close #42521
2021-06-08 10:06:24 -07:00