Switch the JS script used for running the docs examples tests from
CommonJS to ESM format. This is necessary for upgrading the `globby`
dependency to [version 12.0.0][1] in a subsequent commit.
[1]: https://github.com/sindresorhus/globby/releases/v12.0.0
PR Close#42921
Switch the JS scripts used for generating StackBlitz projects and zips
from CommonJS to ESM format. This is necessary for upgrading the
`globby` dependency to [version 12.0.0][1] in a subsequent commit.
[1]: https://github.com/sindresorhus/globby/releases/v12.0.0
PR Close#42921
migrate aio to eslint as tslint has been deprecated, the migration is restricted to the aio app and
its e2e tests and does not include the other tools, for such reason both tslint and codelyzer have not
been removed (to be done in a next PR)
some minor tweaks needed to be applied to the code so that it would adhere to the new ESLinting behaviour
most TSLint rules have been substituted with their ESLint equivalent, with some exceptions:
* [whitespace] does not have an ESLint equivalent (suggested to be handled by prettier)
* [import-spacing] does not have an ESLint equivalent (suggested to be handled by prettier)
* [ban] replaced with [no-restricted-syntax] as there is no (official/included) ESLint equivalent
some rules have minor different behaviours compared to their TSLint counterparts:
* @typescript-eslint/naming-convention:
- typescript-eslint does not enforce uppercase for const only.
* @typescript-eslint/no-unused-expressions:
- The TSLint optional config "allow-new" is the default ESLint behavior and will no longer be ignored.
* arrow-body-style:
- ESLint will throw an error if the function body is multiline yet has a one-line return on it.
* eqeqeq:
- Option "smart" allows for comparing two literal values, evaluating the value of typeof and null comparisons.
* no-console:
- Custom console methods, if they exist, will no longer be allowed.
* no-invalid-this:
- Functions in methods will no longer be ignored.
* no-underscore-dangle:
- Leading and trailing underscores (_) on identifiers will now be ignored.
* prefer-arrow/prefer-arrow-functions:
- ESLint does not support allowing standalone function declarations.
- ESLint does not support allowing named functions defined with the function keyword.
* space-before-function-paren:
- Option "constructor" is not supported by ESLint.
- Option "method" is not supported by ESLint.
additional notes:
* the current typescript version used by the aio app is 4.3.5, which is not supported by typescript-eslint (the supported
versions are >=3.3.1 and <4.3.0). this causes a warning message to appear during linting, this issue should
likely/hopefully disappear in the future as typescript-eslint catches up
* The new "no-console" rule is not completely equivalent to what we had prior the migration, this is because TSLint's "no-console"
rule let you specify the methods you did not want to allow, whilst ESLint's "no-console" lets you specify the methods that you do
want to allow, so and in order not to have a very long list of methods in the ESLint rule it's been decided for the time being
to simply only allow the "log", "warn" and "error" methods
* 4 dependencies have been added as they have been considered necessary (see: https://github.com/angular/angular/pull/42820#discussion_r669978232)
extra:
* the migration has been performed by following: https://github.com/angular-eslint/angular-eslint#migrating-an-angular-cli-project-from-codelyzer-and-tslin
* more on typescript-eslint at: https://github.com/typescript-eslint/typescript-eslint
PR Close#42820
This commit upgrades `lighthouse` to the latest version (8.1.0) to take
advantage of latest fixes/improvements and ensure the min scores are
still met with the latest audit changes.
PR Close#42846
Update `@angular/*` packages to latest 12.1.x versions (mainly to take
advantage of recent ServiceWorker improvements, such as #42607
and #42622).
PR Close#42776
Updates to TypeScript 4.3.4 which contains a fix for a printer
regression that caused unexpected JavaScript output with our
compiler transforms.
See: https://github.com/microsoft/TypeScript/pull/44070.
Updates to TypeScript 4.3.4 which contains a fix for a printer
PR Close#42600
Previously, redirects had to be configured in both the Firebase config
(`firebase.json`) and the ServiceWorker config (`ngsw-config.json`).
This made it challenging to correctly configure redirects, since one had
to understand the different formats of the two configs, and was also
prone to getting out-of-sync configs.
This commit simplifies the process of adding redirects by removing the
need to update the ServiceWorker config (`ngsw-config.json`) and keep it
in sync with the Firebase config (`firebase.json`). Instead the
ServiceWorker `navigationUrls` are automatically generated from the list
of redirects in the Firebase config.
NOTE:
Currently, the automatic generation only supports the limited set of
patterns that are necessary to translate the existing redirects. It can
be made more sophisticated in the future, should the need arise.
PR Close#42452
This commit aligns the angular.io config files more closely to how a
newly generated CLI v12 app would look like. This helps validate the
setup and makes it easier to apply new chages in the future (by
preventing the angular.io layout from deviating too much from the
default new app layout).
PR Close#42259
Switches the repository to TypeScript 4.3 and the latest
version of tslib. This involves updating the peer dependency
ranges on `typescript` for the compiler CLI and for the Bazel
package. Tests for new TypeScript features have been added to
ensure compatibility with Angular's ngtsc compiler.
PR Close#42022
Changes the engines rule in aio to accept any node version greater than
or equal to v14. This allows node v15 to work with aio.
addresses #42076
PR Close#42367
When aio yarn docs-only command runs on v12.14.1 it fails details given on issue #41979. Upgrading node version to v12.17.0 solves this but creates a new warning (node:467072) ExperimentalWarning: The ESM module loader is experimental.
This warning gets removed in v12.20.0. Upgrading node version to 12.20.0
PR Close#42009
[`watchr` v4.0.0][1] changes the way watched directories are
scanned/watched, thus causing a great increase in the consumed CPU and
RAM. This affects the performance of the `docs-watch` and transitively
`serve-and-sync` npm scripts.
(For reference, on my local machine it goes from 0% CPU and 275MB RAM
with v3.0.1 to 50% CPU and 10GB RAM with v4+.)
This commit pins `watchr` to version 3.0.1 (which is the latest version
that does not cause performance issues) and disabled automatic updates
via Renovate.
[1]: https://github.com/bevry/watchr/releases/tag/v4.0.0
PR Close#41903
With this change we add the `assert` polyfill which is required because `timezone-mock` is a Node.JS library which is being used in Browser.
PR Close#41764