Compare commits

..

511 Commits

Author SHA1 Message Date
Paul Gschwendtner ae34e6cabd fix(language-service): expose package.json for vscode extension resolution (#48678)
The VSCode extension looks for `@angular/language-service/package.json`
using `require`. This currently breaks as of the ESM changes because
we introduced the `exports` field but did not expose the `package.json`.

This commit fixes it.

Co-authored-By: Andrew Scott <atscott@google.com>
Co-authored-By: Dylan Hunn <dylhunn@gmail.com>

PR Close #48678
2023-01-10 09:13:55 -08:00
Kristiyan Kostadinov aa31d611c9 fix(compiler): resolve deprecation warning (#48652)
Fixes a deprecation warning that was being logged by compiler when generating aliases, because we weren't going through `ts.factory` to create an AST node.

PR Close #48652
2023-01-10 08:13:28 -08:00
Paul Gschwendtner 5a03d82986 test(docs-infra): increase jasmine default timeout for e2e specs (#48671)
Similar to the Saucelabs job, the jasmine default timeout can be
increased to avoid the common jasmine timeouts. We cannot control
how fast Selenium e.g. loads a page or not.

PR Close #48671
2023-01-10 08:10:23 -08:00
Alan Agius 6d183741ed fix(docs-infra): correctly read example type (#48665)
Prior to this change the universal example was broken as the example type was not retrieved correctly in bazel which caused the `_renameFile` method to be called with incorrect context.

Closes #48664

PR Close #48665
2023-01-10 08:09:55 -08:00
Alan Agius 128c4a604b docs: update universal example (#48665)
This change updates the universal example to align with latest CLI changes.

PR Close #48665
2023-01-10 08:09:54 -08:00
Angular Robot 62becec7d9 build: update dependency jsdom to v21 (#48660)
See associated pull request for more information.

PR Close #48660
2023-01-10 08:09:05 -08:00
Virginia Dooley 65c823b150 docs: Custom data Pipes doc, fixed live-example link. (#48656)
PR Close #48656
2023-01-10 08:08:07 -08:00
Andrew Kushnir 84d436e504 refactor(platform-browser): prepare the code to use MockPlatformLocation by default (#48651)
This commit prepares the code of the `BrowserTestingModule` to include the `MockPlatformLocation` by deafult in the future. With this change, the set of providers to add the `MockPlatformLocation` would be disabled by a flag, which will be switched in v16.

PR Close #48651
2023-01-10 08:06:37 -08:00
piyush132000 e4c70cbb4f docs: updated docs removed unnecessary imports and empty methods (#48628)
Removed empty methods and unnecessary imports in files

PR Close #48628
2023-01-10 08:06:05 -08:00
Tim Gates df0a94dc3a docs: fix simple typo, esnure -> ensure (#48588)
There is a small typo in integration/check-dependencies.js.

Should read `ensure` rather than `esnure`.

Signed-off-by: Tim Gates <tim.gates@iress.com>

PR Close #48588
2023-01-10 08:05:33 -08:00
Matthieu Riegler c139d2de1a docs(compiler-cli): fix commands to run compliance unit test (#48559)
PR Close #48559
2023-01-10 07:59:53 -08:00
Doug Parker d0f732a85c refactor(bazel): disables the Tsickle decorator transform (#47934)
This is no longer needed in google3 and actively impedes prodmode tests. See http://b/254054103#comment7 for deeper analysis.

This just turns off the transform for now, if it lands successfully I'll follow up with deleting the flag and dead code altogether.

PR Close #47934
2023-01-10 07:58:39 -08:00
Paul Gschwendtner 993217e192 fix(language-service): ship /api entry-point (#48670)
The `/api` entry-point was accidentally dropped when we switched the
compilation in the repo to full ESM- thinking the entry-point is not
needed externally.

We re-add it because the VSCode repo extension relies on it for checking
whether `ts.LanguageService` is an Angular one.

PR Close #48670
2023-01-09 10:13:34 -08:00
Greg Magolan 0e0d686d1e fix(language-service): update packages/language-service/build.sh script to work with vscode-ng-language-service's new Bazel build (#48663)
2nd half of https://github.com/angular/vscode-ng-language-service/pull/1846. `npm_traslate_lock` in vscode-ng-language-service now has a data attribute so sed should only add another item to the list instead of adding a duplicate data attribute.

PR Close #48663
2023-01-09 10:13:07 -08:00
Matthieu Riegler 433dd5c66f fix(forms): Form provider FormsModule.withConfig return a FormsModule (#48526)
Because of a transitive dependency, FormsModule.withConfig wasn't providing FormModule.

fixes: #48519

PR Close #48526
2023-01-05 16:26:22 -08:00
Matthieu Riegler 10de92c68a refactor(forms): cleanup type any in forms tests (#48624)
Removing every type any in forms with a reference to #9100

PR Close #48624
2023-01-05 14:52:03 -08:00
Matthieu Riegler c5fd6a85ec docs: remove empty constructors & ngOnInit() (#48576)
PR Close #48576
2023-01-05 14:49:38 -08:00
Matthieu Riegler 4bca3fed19 docs: remove onInit from Tour Of Heroes. (#48576)
Following #24008, the schematics don't produce ngOnInit and the constructor. Let's reflect that in the Tour of Heroes tutorial.

Fixes #48575

PR Close #48576
2023-01-05 14:49:38 -08:00
Matthieu Riegler f3babe0458 refactor(common): remove non-null assertions (#48476)
As part of angular#24571, removing all non-null assertions from common/test/directives

PR Close #48476
2023-01-05 14:46:21 -08:00
Matthieu Riegler 406ae85e10 refactor(common): code cleaning (#48476)
* removing guard as console.warn is now widely supported
* Couldn't remove non-null assertion, waiting for TS support of getters with different types (microsoft/typescript#43662)

PR Close #48476
2023-01-05 14:46:20 -08:00
Matthieu Riegler be321f017a refactor(common): remove non-null assertions (#48476)
As part of angular#24571, removing all non-null assertions from common/directives

PR Close #48476
2023-01-05 14:46:20 -08:00
Matthieu Riegler 7d30528fbd refactor(common): remove non-null assertions (#48476)
As part of angular#24571, removing all non-null assertions from common/directives

PR Close #48476
2023-01-05 14:46:20 -08:00
Andrew Scott a9a7e9fb00 refactor(router): Remove files no longer in use (#48500)
These files exist to support internal patches that are no longer needed

PR Close #48500
2023-01-05 14:42:27 -08:00
Paul Gschwendtner c0015282ea ci: fix snapshot publish github credential preparation (#48648)
It looks like the wrapping in `&> /dev/null` breaks for some reason.
We don't need it as CircleCI will remove secrets from logs if they
would leak for some reason.

A simple echo is very unlikely ever printing its content to
stdout/stderr though.

PR Close #48648
2023-01-05 16:44:02 +00:00
Paul Gschwendtner 984d0fac92 ci: use snapshot deploy secret directly (#48644)
Instead of encoding the GitHub snapshot robot access token
in a file that needs to be decoded by an ambiguously named
secret called `KEY`, the token can be directly stored in the
secrets of CircleCI given easier maintenance and the same risk.

The leakage of the secret still means the GitHub token file could
be decoded.

We are switching to a similar model as in the components repo, which
also simplifies key rotations etc.

PR Close #48644
2023-01-05 15:15:59 +00:00
Matthieu Riegler cea2d192d9 refactor(compiler): Remove unnecessary assignment (#48478)
This is well known problem and has a opened issue at microsoft/typescript.  @ts-expect-error will highlight an error when this is fixed.

PR Close #48478
2023-01-04 12:23:51 -08:00
Renan Ferro b542f0f398 docs(docs-infra): update precedence of binding dynamic example and commentary (#48636)
PR Close #48636
2023-01-04 12:16:40 -08:00
Matthieu Riegler 10c10ee559 refactor(core): cleanup type any (#48623)
Removing every type any in core with a reference to #9100

PR Close #48623
2023-01-04 12:15:17 -08:00
Pawel Kozlowski 4621be3081 refactor(core): move attachDebugGetter to i18n specifc code (#48549)
The attachDebugGetter function is only used in the i18n specific code
so could be moved closer to the sole usage site instead of being
exported to the entire framework code. It also lets us remove the
entire packages/core/src/render3/util/debug_utils.ts file.

PR Close #48549
2023-01-04 12:14:30 -08:00
Pawel Kozlowski 9a1083c0ee refactor(core): remove unused attachDebugObject function (#48549)
This commit removes the unused attachDebugObject function.

PR Close #48549
2023-01-04 12:14:30 -08:00
piyush132000 98615c74b5 docs: updated docs removed unnecessary imports and empty methods (#48546)
Removed empty methods and unnecessary imports in files

PR Close #48546
2023-01-04 12:13:24 -08:00
Angular Robot 67ec04683c build: update eslint dependencies to v5.47.0 (#48548)
See associated pull request for more information.

PR Close #48548
2023-01-04 12:09:15 -08:00
Matthieu Riegler dfa69553a0 refactor(common): remove unnecessary parseFloat from ng_optimized_image directive. (#48527)
There is no need to parse clientWidth/clientHeight/naturalWidth/naturalHeight on HTMLImageElement as there is no sign of other types being returned on everygreen browers.

PR Close #48527
2023-01-04 12:07:03 -08:00
Matthieu Riegler 864a425de1 docs: fix typo on SkipSelf (#48511)
fixes #48506

PR Close #48511
2023-01-04 11:53:31 -08:00
Alan Agius 881ecb0936 fix(localize): add triple slash type reference on @angular/localize on `ng add (#48502)
This commits add a triple slash type reference to the `main.ts` of the project when running `ng add @angular/localize`. This is purely needed for IDE purposes so that `$localize` is available globally. For the compilations `@angular/localize` types are adding the the respective TS configs files.

This commits also add better support for using `@angular/localize` in `/// <reference types="@angular/localize" />`. To support this we need to move the global definition outside of a barrel file and into the index.ts file. Without this change the `$localize` method will not available globally when using triple slash type references.

Closes #48434

PR Close #48502
2023-01-04 11:50:45 -08:00
Alex Castle acff032f4b fix(common): Add data attribtue to NgOptimizedImage (#48497)
Add a tracking attribute in oder to be able to distinguish usages of NgOptimizedImage from standard images

PR Close #48497
2023-01-04 11:46:27 -08:00
robertIsaac 7bbe492383 docs: add NG0403.md for Bootstrapped NgModule doesn't specify which component to initialize error (#48483)
- update `errors.ts` to annotate the error NG0403, so that the runtime can add a link to that guide when an error is thrown
- update `application_ref_spec.ts` to include the new link of the error
- update `errors.md` as a result of running `yarn bazel test packages/core/test`

Fixes #47985

PR Close #48483
2023-01-04 09:59:25 -08:00
Paul Gschwendtner 788e7ca8b8 build: remove unused dependencies (#48641)
Removes unused dependencies introduced back when the devtools
were moved into the framework repo.

Most of these deps were added when the Bazel http-server from
the components repo was copied here

PR Close #48641
2023-01-04 09:55:52 -08:00
Paul Gschwendtner 2b8d8f0077 fix(compiler-cli): update @babel/core dependency and lock version (#48634)
Similar to how the `@babel/core` dependency is managed for the localize
NPM package, the version should be locked. Also the version should
correspond to the version we install for building & testing.

Currently the Babel version allowed by the compiler-cli may not
work given the ESM -> CJS interop. causing errors like:

```
import { types as t } from "@babel/core";
         ^^^^^
SyntaxError: Named export 'types' not found. The requested module '@babel/core' is a CommonJS module, which may not support all module.exports as named exports.
CommonJS modules can always be imported via the default export, for example using:

import pkg from '@babel/core';
const { types: t } = pkg;
```

We can only be confident about the interop if we know the version
installed- is the one we test.

PR Close #48634
2023-01-03 16:36:50 +00:00
Paul Gschwendtner 87d2385994 build: switch from ng-comp-dev to canonical dev-infra preview Firebase project (#48630)
We are going with a single canonical dev-infra Firebase/GCP project
for previews. This commit switches to it.

PR Close #48630
2023-01-03 13:22:38 +00:00
mgechev d7ff276bce docs: hide state of js survey (#48578)
PR Close #48578
2023-01-02 12:19:50 +00:00
Vadim e88d3ae171 docs: fix typo in preconnect_link_checker.ts (#48595)
PR Close #48595
2023-01-02 12:17:52 +00:00
Alan Agius ac106cc432 build: remove duplicate license banners from FESM bundles (#48560)
Prior to this change the FESM bundles have the license banner duplicated multiple of times in each published file.

With this change we remove all the banners from the individual input files. A new banner will be appended at the top of the FESM using rollup's banner option.

While there is a rollup plugin on NPM to strip these banners (https://github.com/mjeanroy/rollup-plugin-strip-banner) we could not use this as it does not support `.mjs`.

PR Close #48560
2023-01-02 12:16:55 +00:00
Alan Agius e7c2249dd7 fix(bazel): remove duplicate license banners from FESM bundles (#48560)
Prior to this change the FESM bundles for the FW packages have the license banner duplicated hundreds of times in each published file.

With this change we remove all the banners from the individual input files. A new banner will be appended at the top of the FESM using rollup's banner option.

While there is a rollup plugin on NPM to strip these banners (https://github.com/mjeanroy/rollup-plugin-strip-banner) we could not use this as it does not support `.mjs`.

PR Close #48560
2023-01-02 12:16:55 +00:00
Derek Cormier 4ae66558bf build(bazel): improve remote caching for AIO local deps build (#48579)
Fix non-hermetic zipping of example zips by fixing the zip entry timestamps.

I also hardcoded stamp values in stable-status.txt and volatile-status.txt using the workspace status command for the aio_local_deps config to improve cache performance. The Bazel remote cache appears to not ignore volatile-status.txt when there are no other changes, unlike the local Bazel cache:

https://github.com/bazelbuild/bazel/issues/10075#issuecomment-546872111

PR Close #48579
2023-01-02 12:16:12 +00:00
Alan Agius 125b3df884 ci: remove redundant aio dependencies installation step (#48574)
Remove redundant aio dependencies installation step from update-events action as this action only uses built-in node.js APIs

PR Close #48574
2022-12-24 11:26:35 +00:00
Derek Cormier f64dae0806 build(bazel): prevent remote cache misses on dgeni build (#48585)
Using 'always' as the stamp attribute caused stable-status.txt
to always be included as an input, which has different values on
different ci executors causing a cache miss.

We run the regular aio build without stamping on ci so only include
status files when stamping is explicitly enabled.

PR Close #48585
2022-12-24 11:25:40 +00:00
Paul Gschwendtner ab13c9663a build: do not rely on CommonJS module global for Bazel karma saucelabs (#48573)
The Karma Saucelabs script for Bazel & Saucelabs relies on some CommonJS
specific features. This commit replaces it with an ESM-compatible
alternative so that it can execute because `nodejs_binary` requires ESM
files now.

PR Close #48573
2022-12-23 14:16:34 +00:00
piyush132000 d768fb7fe5 docs: updated docs removed unnecessary imports and empty methods (#48513)
Removed empty methods and unnecessary imports in files

PR Close #48513
2022-12-21 13:08:18 +00:00
Paul Gschwendtner 1513561ea4 build: only generate bazel saucelabs targets for //packages/ (#48554)
With the recent ESM changes we also started generating Saucelabs
targets for `//devtools` (as part of an effort to avoid code
duplication). We should skip Saucelabs targets for this package
because we don't intend to run them on Saucelabs and this whole
setup needs some more work (and we shouldn't change unexpectedly).

PR Close #48554
2022-12-21 12:58:28 +00:00
Paul Gschwendtner a3958a2a76 build: update google sync config to match internal changes (#48538)
Updates the sync config to match changes as of:
https://critique.corp.google.com/cl/496085096

PR Close #48538
2022-12-19 20:12:38 +00:00
Paul Gschwendtner 30c002bc88 refactor: make benchmarking syncing easier and add comments for future insight (#48538)
The way the benchmarking code is used and wired up in g3 is rather
magical. This change makes it easier to sync into g3 by using
conditional blocks, and also consistnetly using a single bundle name
(like it was before— we regressed here as part of the ESM initial
changes- but now with clear comments, it's more future-proof..)

PR Close #48538
2022-12-19 20:12:38 +00:00
Paul Gschwendtner bca8403c83 build: remove unused systemjs bootstrap benchmark scripts (#48538)
These files are not used and also should not be synced into g3.

PR Close #48538
2022-12-19 20:12:38 +00:00
Paul Gschwendtner cbb9183ed4 refactor: update packages/bazel npm artifact to not rely on defaults.bzl (#48538)
Fixes that we temporarily broke the Bazel npm package artifact as
part of the ESM work. This commit adjusts it and also makes the
artifact subsitutions more maintainable.

PR Close #48538
2022-12-19 20:12:38 +00:00
Paul Gschwendtner e523d2785e ci: reset cache when patches change (#48538)
This will help making it easier to update patches when `node_modules`
are cached. Note that most of the time this shouldn't be necessary
as we only cache the Yarn `.cache` for the non-windows jobs. Windows
job caches `node_modules` directly- so could be affected and needs
a cache reset/wipe occasionally when patches change (even though it's
rarely). Long-term we can remove this when the esm patches are no longer
needed.

PR Close #48538
2022-12-19 20:12:38 +00:00
Paul Gschwendtner e7e5a0adc6 build: make devmode a noop and ensure it never runs (#48538)
This is basically a pre-step for combining devmode and prodmode into a
single compilation. We are already achieving this now, and can claim
with confidence that we reduced possible actions by half. This is
especially important now that prodmode is used more often, but rules
potentially still using the devmode ESM sources. We can avoid double
compilations (which existed before the whole ESM migration too!).

We will measure this more when we have more concrete documentation
of the changes & a better planning document.

Changes:

  * ts_library will no longer generate devmode `d.ts`. Definitions are
    generated as part of prodmode. That way only prodmode can be exposed
    via providers.
  * applied the same to `ng_module`.
  * updates migrations to bundle because *everything* using `ts_library`
    is now ESM. This is actually also useful in the future if
    schematics rely on e.g. the compiler.
  * updates schematics for localize to also bundle. similar reason as
    above.

PR Close #48538
2022-12-19 20:12:38 +00:00
Paul Gschwendtner eda0a7af2b build: remove remaining usages of deprecated ts_devserver (#48538)
* Switches all remaining targets (even if not tested and failing as per
  build) away from `ts_devserver` to the canonical `http_server` from
  dev-infra.

PR Close #48538
2022-12-19 20:12:38 +00:00
Paul Gschwendtner e296d1d01d build: fix legacy saucelabs test bundle generation after ESM changes (#48538)
ZoneJS is no longer loaded as an UMD, but instead is included as part
of the browser init entry-point. This means that ZoneJS is bundled and
the ESBuild logic needs to be adjusted for that.

PR Close #48538
2022-12-19 20:12:38 +00:00
Paul Gschwendtner 96675cfe88 build: remove components repo unit tests job (#48538)
After discussion initiated in the framework team (by kkostadinov),
the team has decided to not keeping the `components-repo-unit-tests`
job. This commit removes it.

PR Close #48538
2022-12-19 20:12:38 +00:00
Paul Gschwendtner c454728870 build: update build-tooling and adjust benchmark macros for ESM (#48538)
* The benchmark macro should also use devmode ESM 2020. No CommonJS
* The benchmark macro should always add `benchpress` as runtime
  dependency because it is loaded asynchronously.
* The protractor `nodejs_binary` should use our ESM-interop binary
so that ESM resolution works (e.g. when `await import(benchpress)` from
the driver utilities is invoked).

PR Close #48538
2022-12-19 20:12:38 +00:00
Paul Gschwendtner a857f2975e refactor: update modules/ benchmarks and playgrounds to work with ESM (#48538)
* Switches away from the ESM-incompatible & unmaintained `ts_devserver`
  to `http_server`. This is the canonical server maintained by dev-infra
* Switches tests away from CommonJS specific logic. e.g. require.resolve
* Adjusts tests to work with Protractor spec bundling (Protractor does
  not support ESM execution, but we want to take ESM-written specs)
* Reworks playground and benchmarks to use `app_bundle` and `esbuild`
  instead of loading hundreds of files individually. This also makes
  tests more stable and more aligned with real applications.

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner 548f196bea refactor: update service-worker tests to work with ESM (#48538)
* Updates circular dependency tests to use the `.mjs` outputs
* Switches away from CommonJS specific `require` calls.
* Simplifies the test helper logic since all browsers/NodeJS versions
  support `URL` as a global.

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner 627d0070e3 refactor: update language-service package and tests to work with ESM (#48538)
The Angular Language Service package is now tested & compiled using ESM.
Previously it was a mismatch of CommonJS and ESM.

Still the language-service ESM output is transformed into a single UMD
bundle to allow for module resolution to be overriden. See
`bundles/BUILD`.

This is kept as is. To fully ship ESM (language-service is an exception
here), we need to:

 * Update all code to no longer reference typescript via import. Instead
   typescript needs to be passed around so that the extension can
   control the version
 * The VSCode extension/ the TS server needs to be able to load ESM. It
   looks like the server supports ESM global plugins, but the extension
   might not yet.

This is out of scope for the dev-infra effort as it requires more
insight into VSCode & the extension system & the TS language server.

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner b75c87bba3 refactor: update tools tests and scripts to work with Bazel ESM (#48538)
* The Karma Bazel Saucelabs binary needs to use `.mjs` as everything in
  the repo w/Bazel is supposed to be ESM.
* The symbol extractor test is updated to no longer use CommonJS
  features like `require.resolve`.

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner 15d61f6798 refactor: switch packages/examples to ESM-compatible http server (#48538)
* Switches all examples to use dev-infra's canonical ESM-compatible
  `http_server`.
* Uses ESBuild for bundling ESM into a single file, compared to having
  to load hundreds of individual ESM files in the browser (potential
  source of flakiness & slowness).

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner 9db4392e2f refactor: simplify devtools setup given recent ESM changes (#48538)
Since the `defaults.bzl` repo-wide macros are now supporting ESM,
the special spec-bundle logic from `devtools` can be removed.

Also the esbuild configurations need to be updated to account
for the recent dev-infra build-tooling changes. Also properly
now ensures that `aysnc/await` is downleveled for ZoneJS compatibility.

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner 0882296d67 build: update dev-infra build tooling and properly handle builtin node: imports (#48538)
* Updates build-tooling to benefit from the latest `spec_bundle`
  improvements.
* Updates the ESM extension loader to not attempt adding extensions to
  builtin `node:` specifiers. This seems to be disallowed and cannot be
  handled gracefully (the attempts are part of a try/catch).

```

Use --sandbox_debug to see verbose messages from the sandbox
Error [ERR_UNKNOWN_BUILTIN_MODULE]: No such built-in module: node:fs.mjs
    at new NodeError (node:internal/errors:371:5)
    at ESMLoader.builtinStrategy (node:internal/modules/esm/translators:276:11)
    at ESMLoader.moduleProvider (node:internal/modules/esm/loader:236:14)
```

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner e0e3c85c83 refactor: convert AIO tooling scripts used in Bazel to ESM (#48538)
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 #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner 55b28e4500 build: always attempt next/builtin resolution first when resolving modules (#48538)
Even with patched resolution, we should always attempt the next/builtin
NodeJS resolution first. It may find a module if there `node_modules`
relative to the context file. This would be more correct than looking
for a module always at the Bazel `npm` repository `node_modules` folder.

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner 9e4421eb47 build: ensure esbuild nodejs_binary correctly wires up ESM loader (#48538)
ESBuild relies on the linker and we currently set up the ESM loader,
along with accidentally enabling the patched resolution loader. This
didn't cause any problems in sandbox, but outside of sandbox incorrect
ESBuild versions may be discovered because the loader looks at the
top-level `npm/` node modules before looking relative to e.g.
`@bazel/esbuild`

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner d3bd820ea3 refactor: update zone.js and tests to work with ESM (#48538)
* Adjusts tests to no longer rely on CommonJS features. Switches them to
  ESM
* Updates test initialization files to not double-initialize Jasmine now
  that bootstrap files are loaded after Jasmine. The `jasmine.boot`
  setup was hacky from `rules_nodejs` and will break in the future
  regardless if we e.g. use `rules_js` with actual unmodified `jasmine`.

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner d2689012bf refactor: update elements test to work with ESM outputs (#48538)
* Uses the `.mjs` ESM output for testing/checking circular dependencies.

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner 6b8c3e2d63 refactor: update forms package tests to work with ES2020 ESM (#48538)
Tests now always run with ESM 2020, while previously they ran with
ES2015 CommonJS UMD bundles.

Since ZoneJS does not support intercepting native `async/await` syntax,
the forms test needs to use the zone-compatible variant of
`jasmine_node_tests`. This variant downlevels the native `async/await`
syntax to generators that ZoneJS can intercept. All of this is done
using the dev-infra ESBuild `spec_bundle` rule.

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner 61d2eacf79 refactor: update upgrade package tests to work with ESM output (#48538)
* Uses the `.mjs` output of the upgrade package when checking for
  circular deps.

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner 4fce3e3a02 refactor: update platform-browser-dynamic to work with ESM output (#48538)
* Switches circular dependency tests to use the `.mjs` output.

PR Close #48538
2022-12-19 20:12:37 +00:00
Paul Gschwendtner b6424ac3c5 refactor: update platform-server tests to work with ESM (#48538)
* Uses `.mjs` for circular deps tests
* Replaces `require` with ESM-equivalent. uses an import statement here
  for proper typing, and specify dependency properly.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner ab4b5c8b0e refactor: update packages/localize to be strict ESM (#48538)
The `packages/localize` package still required some trickery
to support CommonJS because tests in the repo were running as CommonJS.

This commit removes the CommonJS logic in localize and its tests, so
that only ESM is used in production & tests.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner def64a3d57 build: bundle tests for protractor tests to support ESM output (#48538)
Protractor does not support ESM, so we need to take all the ESM
output and bundle it into a CommonJS file. This comes at the cost
of not using actual ESM for execution, but the ESBuild bundle follows
strict ESM semantics so we can be sure it's compatible when we have
an ESM-compatible e2e test runner in the future.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner 2597e3b7ff build: add missing dependencies to platform-server and tools/testing (#48538)
There are two build targets which never had all its runtime dependencies
properly specified. This wasn't noticed because there were macros in
`defaults.bzl` that automatically included these deps.

In a follow-up we will clean-up this legacy auto-deps feature in
`defaults.bzl`.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner cca335dc40 refactor: update packages/router tests to be compatible with ESM (#48538)
The ESM js files need to be referenced, and the router tests rely
on `async/await` with change detection- so a special rule is required
that downlevels `async/await` to generators (similar to the Angular CLI)

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner 9b0a7e2d7d build: introduce zone_compatible_jasmine_node_test rule (#48538)
Introduces a variant of `jasmine_node_test` that works with async/await
in combination with ZoneJS. This is needed for tests relying on
async/await in combinatin with change detection.

Browser tests are already benefting from ESbuild async-await
downleveling. Node tests would ideally not need this, but until
ZoneJS supports native async/await we need to also process
source files to avoid native async/await syntax.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner 4f156fb6da refactor: update image-directive e2e test to work with ESM (#48538)
* Switches to the canonical dev-infra http server
* Uses the bundle for serving.
* Switches app_bundle to simple `esbuild` since the test relies
  on `ngDevMode` which `app_bundle` elides as optimization.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner 0787f0131a refactor: update platform-browser tests to run as ESM (#48538)
`platform-browser` tests now run in ESM and with `.mjs` output, so
the build targets and tests need to be updated.

Here we change the `zone_event_unpatched` script to include the
`.init` suffix that will be picked up by `spec_bundle`.

Also some circular dependency tests are updated to refer to the
`.mjs` files.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner 260faaf912 refactor: update compiler-cli to work with ESM (#48538)
Updates compiler-cli & tests to be full ESM compatible. Tests
no longer with CommonJS.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner ef2de133a3 refactor: change ngcc to only rely on ESM features (#48538)
Refactors ngcc to only rely on ESM features because CJS
is no longer needed & tested.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner f25d71498d refactor: update compiler-cli babel linker to be ESM only (#48538)
Since the linker is no longer being tested with CommonJS, we can remove
most of the CJS/ESM interop trickery.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner e8783286af build: refactor packages/compiler/test to work with ESM (#48538)
Switches the circular deps test to use the ESM output. The
normal `.js` devmode output is no longer available.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner ea6d21ec71 build: update packages/bazel/test to work with ESM (#48538)
The bazel tests cannot use CommonJS features like `require` and should
be updated to work with ESM. Additionally some specs are updated to
no longer assert CJS/UMD output from `ng_module`. The rule only emits
ESM now.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner d53b456d8c refactor: update packages/common tests to work with ESM pipeline (#48538)
We no longer have generated `.js` files as everything generated
is the ESM `.mjs` output. The tests need to be updated to reflect that.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner 091a7b5715 refactor: update animations tests to work with ESM output (#48538)
The circular deps tests should use the `.mjs` output.

PR Close #48538
2022-12-19 20:12:36 +00:00
Paul Gschwendtner 8499bfcfa5 build: update angular-in-memory-web-api to work with ESM (#48538)
Properly imports `jasmine-ajax` instead of attempting to load
some CommonJS bundle as a bootstrap dependency in Karma.

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner 3a6a568113 build: override schematics to be built and tested using CommonJS (#48538)
The Angular CLI does not yet support schematics running as ESM. For
this reason we switch the schematics BUILD targets to explicitly
use ESM (as an exception in the repo).

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner 3922443827 build: bundle tests for karma web test suites (#48538)
Since Karma with Bazel does not support ESM natively, we bundle the
tests using ESBuild into a single AMD file. This not only solves the
ESM issue until we can run browser ESM tests natively (also pending
in the components repo - the esbuild generation follows ESM semantics
but since collapsed we don't rely on the real module system).

A benefit of bundling is also faster and more reliable Karma browser
tests since only a single file needs to be loaded- compared to hundreds
of individual files.

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner 008fe464e4 test: refactor render3 definition feature test to be less sensitive to JS output (#48538)
If tests are bundled using e.g. esbuild, the `ee` symbols may
be rewritten to `\u0275\u0275`. This breaks assertions that
rely on `Function.toString`. We can avoid this string comparison
and make it more future proof by just comparing the symbols directly.

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner b055818419 build: update dev-infra build tooling to leverage recent ESM changes (#48538)
Update dev-infra's build-tooling since multiple ESM changes have
landed there. e.g. not relying on `require.main === module` for API
bundling. This will allow us to also execute all dev-infra rules
in ESM because we plan on applying our ESM patching to `ts_library`
(which would also affect build-tooling then).

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner fc96316039 test: refactor core bundling tests to work with ESM (#48538)
Switches all `core/test/bundling` tests to not rely on
CommonJS-specific features like `require.resolve

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner 7e07f333c3 refactor: update symbol extractor test tool to work with ESM (#48538)
The symbol extractor test tool now runs with ESM too. This commit
makes it ESM compatible.

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner abad407474 build: support esbuild configurations using ESM dependencies (#48538)
We use `bazel/esbuild` in various places (e.g. for app bundling tests).
These tests rely on the Angular Compiler-CLI itself for e.g. linking
or the Terser configuration. Since everything in this repo is now
strict ESM, the ESBuild configs (which are already ESM-supported)
need to import from `//packages/compiler-cli`. We also need to be
able to leverage our existing ESM Bazel loader for this though as
otherwise resolution would fail.

Long-term we can remove this if everything in the compiler-cli
would use `.mjs` extensions and the import paths would also specify
an explicit extension. See: https://nodejs.org/api/esm.html#mandatory-file-extensions

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner 3ef7d89e2f build: update esm nodejs loader to properly handle subpaths (#48538)
The ESM loader when used with patched Bazel module resolution
handled subpaths incorrectly. e.g.
`@bazel/concatjs/tsc_wrapped/internal/index.js` could be incorrectly
resolved to `@bazel/concatjs/index.js`.

This commit fixes the flawed logic. Also we prioritize the ESM attempts
before the original specifier. This is necessary because otherwise
the default Node resolution (using `require.resolve`) may incorrectly
prefer the `index.js` file over a `index.mjs` when a directory is
imported.

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner fd8344a333 refactor: adjust packages/core/test to work with ESM (#48538)
The `packages/core/test` test code was relying on non-ESM
compatible features like untyped `require` calls.

We switch these to ESM `import` statements/expressions and
make it strongly typed. It's a trade-off between type-safety
and the dependency graph- but it feels more reasonable typing
this properly to actually benefit from the type system provided
by using TypeScript.

Additionally, we align the IDE tsconfigs to use `esnext` as module
because that is what we use in Bazel and it allows us to use
top-level await.

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner 92da3aae2c refactor(platform-server): use proper ESM-compatible import to domino (#48538)
Now that everything runs from within ESM, we need to use the proper
default-import variant to be able to load `domino` from ESM.

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner ef32a8967d build: remove unnecessary import to @bazel/jasmine (#48538)
Since we no properly initialize as part of the spec-entrypoint
the hacky logic starting Jasmine can be removed. The init
file now runs before tests run, but after Jasmine is initialized.

Calling `boot` while Jasmine is already initialized results in
tests executing in a different context and before other
initialization work completes.

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner 5915c7dcfb build: ensure bootstrap transitive runfiles are made available (#48538)
Since we generate a `.mjs` file as entry-point for jasmine tests,
a couple of issues prevented the transitive dependencies from
bootstrap targets to be brought in (causing resolution errors):

1. The `_files` (previously `_esm2015`) targets are no longer needed,
   and they also miss all the information on runfiles.
2. The aspect for computing linker mappings does not respect the
   `bootstrap` attribute from the `spec_entrypoint` so we manually
   add the extract ESM output targets (this rule works with the aspect
   and forwards linker mappings).

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner b37cdd2941 build: fix loader and support rxjs to be used in NodeJS ESM (#48538)
RxJS currently ships ESM output that cannot be executed directly
in NodeJS. This is because RxJS ships ESM as `.js` files but does
not have a `package.json` which instructs Node to execute these as ESM.

RxJS would either need to use the explicit `.mjs` extension, or add
a `type: module` `package.json` next to the `.js` sources.

We manually patch RxJS to do this, while we wait on the upstream fix
to land. See: #7130.

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner 610613d38d build: patch ts_library to not emit a tsickle extern file (#48538)
The prodmode compilation pipeline -that we intend to use more heavily
now given it emitting files with the `.mjs` extension- exposes an
additional tsickle closure externs file. This file is empty most
of the time anyway since tsickle is not wired up.

We remove this generation as otherwise convenient `$(location` of
such ts library targets break because there always is more than 1 file.

PR Close #48538
2022-12-19 20:12:35 +00:00
Paul Gschwendtner 0326c3b4fc build: update jasmine_node_test macro to support ESM (#48538)
Note: `--require` does not work for ESM. `--import` does not exist
in the current Node versions. Started being available in NodeJS v19.

A custom entry-point script, already supported by dev-infra, simplifies
the whole logic and solves the ESM case.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner ff80ced26e build: replace _es2015 shorthand with more flexible _files suffix (#48538)
For every `ts_library` target we expose a shorthand that grants
access to the JS files because `DefaultInfo` of a ts library
only exposes the `.d.ts` files.

We rename this away from `es2015` since in practice it's a much
higher target these days. Additionally we no longer use the devmode
output but rather use the prodmode output which has the explicit
`.mjs` output- compatible with ESM.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner 1ff4db70ec build: support enabling esm interop loader even outside of defaults.bzl (#48538)
We introduced a loader that supports ESM with Bazel. This loader can
only be enabled as part of our `nodejs_binary` defaults.bzl test. This
works fine, but there might be other binaries/tests e.g. from
`@angular/build-tooling` that should be able to use ESM & might need to
for importing the `compiler-cli`.

We move the logic for installing the patch into a `rules_nodejs` patch.
There is an existing one that is just updated to "enable ESM support".

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner e4dfe085a0 build: update madge circular deps tests to use .mjs output (#48538)
The underlyijng nodejs tests of the rule now also use the ESM
output, so normal `.js` artifacts are not even available there.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner 9f9170014a build: include default files when extracting ESM outputs (#48538)
This is necessary for e.g. JSON files from the CLDR data repository.
Otherwise these could not be added to the runfiles of the
binaries/tests.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner e8ebee2c70 build: move nodejs binary patch into more obvious place (#48538)
For the ESM interop patches we expect to have two types
of patches:

* Patches for `node_modules`
* Patches for Bazel repositories.

We move the patches in respective folders to make it very clear
where a patch is used/applied to.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner 51be4c5c52 build: support template make variables in nodejs_binary/test (#48538)
We modified the macros of `nodejs_binary/test` to have a rule
in between that requests the `.mjs` output. This works fine but
breaks make variable substitution for `templated_args` because
Bazel requires referenced labels to be part of the explicit `data`.

The rule in between breaks this, so we add a new argument that
can be used for such "template"/"args" data dependencies.

This can be removed when everything is ESM and we don't need
the rule in between.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner 9e390d8d52 build: refactor ng_package to work with ESM (#48538)
Removes `shelljs` which is a known ESM-problematic dependency.
We don't need it anyway.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner 4c7bbf0e1c build: prioritize ESM output in nodejs_test similar to binary-variant (#48538)
The `nodejs_binary` rule already prioritizes the `.mjs` output as
of the recent commits. The `nodejs_test` rule should do the same,
and also set `use_esm = True`

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner c9caab1583 build: patch rules_nodejs to prioritize ESM files for nodejs_binary/test (#48538)
The Bazel NodeJS rules will always use the `.js` files as entry-points.
Since we only rely on the `.mjs` output going-forward, we need to teach
`nodejs_binary` and `nodejs_test` to use the `.mjs` extensions if
intended.

Our `defaults.bzl` macros will set `use_esm = True`, but other targets
from e.g. external repositories should keep the original behavior.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner 0b31c86e27 refactor: remove __ESM_IMPORT_META_URL__ workaround now that we can use ESM (#48538)
The `__ESM_IMPORT_META_URL__` trick was used because we used both ESM
and CommonJS in this repo. It was an interop needed because
`import.meta.url` syntax couldn't be used as it woud have caused syntax
errors.

We still need to keep the CommonJS/ESM interop in the compiler-cli
because g3 relies on the compiler and uses CommonJS. This affects very
few places, just in the compiler- so this is acceptable.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner 392458b4da build: refactor generate-locales-tool to ESM (#48538)
The `generate-locales-tool` now needs to run as ESM because we changed
the `ts_library` rule. This commit accounts for the ESM syntax but
removing CJS code parts like `require.main === module`.

Also imports using `require` need to be changed to their ESM
equivalents.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner 1b808ec040 build: refactor ngc-wrapped to support ESM (#48538)
Since this repo will now be strict ESM, and Angular Compiler packages
on NPM are also ESM-only, we can rework `ngc-wrapped` to remove
the CJS/ESM interop and we make it strict ESM too.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner 702159963d build: create NodeJS ESM loader for supporting Bazel setup (#48538)
Replaces the existing ESM loader for dealing with external module
imports. This loader was introduced by Aspect for AIO `.mjs` scripts.

The loader will be used as foundation for a more extensive loader
that also properly handles first-party packages.

Additionally another loader is added, all packed as a single
loader because our current NodeJS version only supports a single
loader per node invocation. So we implement chaining ourselves.

The new loader will attempt rewriting `.js` extensions to `.mjs`,
also it will add `.mjs` if not already done. This is necessary
in the transition phase because we don't/cannot use explicit `.mts`
extensions and also we don't specify extensions in imports yet.

Long-term we would likely use `.mts` and explicit import extensions,
but it's not yet clear how we would sync this into g3 too.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner 0304ab32bc build: rename esm-loader.mjs to a more specific filename (#48538)
This is in prearation for having a proper diff when this loader
is adjusted to support more situations than just simple external
node modules. See next commit.

Also the file is formatted to make the diff less verbose later.
The file was never formatted correctly and we don't lint `.mjs` files.

PR Close #48538
2022-12-19 20:12:34 +00:00
Paul Gschwendtner bbd670597e build: switch ng_module and ts_library devmode to ES2020 ESM (#48538)
Currently the devmode output for `ng_module` and `ts_library` is
using ES5 CommonJS UMD. To bring it in sync with prodmode and
to start with our long-term migration to full ESM- the devmode
is updated to to ES2020 ES modules too.

This will require more tricks to make devmod work with the bazel
setup and also tests may need to be refactored given them relying
on ES5 CJS features, like for `spyOn` jasmine patching etc.

PR Close #48538
2022-12-19 20:12:34 +00:00
Joey Perrott 5310164e24 build: enable new merge ready status action (#48494)
Enable new action in preperation for sunset of github robot

PR Close #48494
2022-12-15 15:21:14 +00:00
Andrew Kushnir 6a72a9f683 ci: mark //aio:e2e tests as flaky (#48498)
AIO e2e tests became more flaky recently. More investigation is needed to identify why,
but we mark the `//aio:e2e` as flaky for now to rerun those tests on CI if they fail.

PR Close #48498
2022-12-15 15:17:29 +00:00
Jessica Janiuk 470738c8f7 release: cut the v15.0.4 release 2022-12-14 11:11:28 -08:00
Jens a2cb2b4e2f docs: update date from 2022 to 2023 (#48485)
PR Close #48485
2022-12-14 08:43:32 -08:00
Jens d0fbad97f7 docs: add planned release schedule till v16 (#48485)
Add release dates for v15.1,v15.2 and v16
PR Close #48485
2022-12-14 08:43:32 -08:00
Andrew Scott 9291bd950f refactor(router): Add opt-in provider for upcoming router change (#47988)
This commit adds a swappable provider for an upcoming change to the
implementation of `Router#createUrlTree`. This will be a breaking change
and is planned to be included in V16.

PR Close #47988
2022-12-13 16:57:46 -08:00
Andrew Scott ba8a644477 docs: Add doc page for 'textAttributeNotBinding' extended diagnostic (#48307)
Adds documentation page for `textAttributeNotBinding` extended diagnostic.

fixes #48291

PR Close #48307
2022-12-13 16:56:06 -08:00
Bob Watson aabf8be033 docs: edit suggestion to meet style guide (#47979)
PR Close #47979
2022-12-13 14:47:34 -08:00
lsst25 19c94c15a2 docs: add a link to hierarchical-dependency-injection (#47979)
It is not clear that when we provide a service to some eagerly loaded module of an application, then that service is available for components of all eagerly loaded modules of that application. It would be better to give a link for more information at least.
PR Close #47979
2022-12-13 14:47:34 -08:00
Andrew Scott d181b93405 docs(core): Document invalid multi token (#48267)
Add error page for invalid multi token runtime error

PR Close #48267
2022-12-13 14:05:59 -08:00
Angular Robot 0f616720a7 build: update eslint dependencies to v5.46.1 (#48464)
See associated pull request for more information.

PR Close #48464
2022-12-13 13:25:00 -08:00
Lukas Matta fccf32cd50 fix(devtools): Replace material imports and styles (#48420)
In the #48216 Material deps were updated to v15,
but the components and modules in DevTools were not
updated to MDC nor replaced with the legacy definitions.

PR Close #48420
2022-12-13 13:22:25 -08:00
piyush132000 f7aa210f5a docs: updated docs removed unnecessary imports and empty methods (#48429)
Removed empty methods and unnecessary imports in files

PR Close #48429
2022-12-13 13:14:35 -08:00
BrowserPerson 9e0c464589 docs: add maria korneeva to GDE resources (#48468)
PR Close #48468
2022-12-13 13:14:07 -08:00
Angular Robot 531808efdb docs: update events (#48474)
Generated `events.json` with the latest events retrieved from the Firebase DB.

PR Close #48474
2022-12-13 13:13:17 -08:00
why520crazy 70b2508d22 docs: add docgeni to tooling of resources list (#48061)
PR Close #48061
2022-12-12 16:26:27 -08:00
Jessica Janiuk bdbff8337b Revert "fix(common): Update Location to get a normalized URL valid in case a represented URL starts with the substring equals APP_BASE_HREF" (#48461)
This reverts commit ae0efb6a09.

PR Close #48461
2022-12-12 16:18:47 -08:00
dario-piotrowicz 6c1064c72f fix(animations): fix incorrect handling of camel-case css properties (#48436)
fix the issue of camel-case properties not being handled correctly in
state transition causing them not to be applied to the element

resolves #48246

PR Close #48436
2022-12-12 15:17:45 -08:00
Angular Robot 8981db4f99 docs: update events (#48170)
Generated `events.json` with the latest events retrieved from the Firebase DB.

PR Close #48170
2022-12-12 15:03:05 -08:00
Yannick Baron f24e5148f9 docs: add yannick baron to list of aio GDEs (#48390)
PR Close #48390
2022-12-12 15:01:59 -08:00
Aristeidis Bampakos c23f2860ea docs: modify directive composition API guide (#48439)
Add a minor change to indicate the difference from applying a directive in the template.

PR Close #48439
2022-12-12 14:58:17 -08:00
Aristeidis Bampakos 8ca95b858b docs: fix typo in search keywords guide (#48442)
PR Close #48442
2022-12-12 14:19:58 -08:00
Aristeidis Bampakos d8de15e9be docs: fix typos in reviewing content guide (#48441)
PR Close #48441
2022-12-12 14:05:37 -08:00
Aristeidis Bampakos f64f73df9a docs: fix style in contributors overview guide (#48440)
PR Close #48440
2022-12-12 14:05:00 -08:00
Bob Watson 966c7cfe0d docs: make "app" a suggested replacement for "application" (#48456)
This commit accommodates the recent terminology preference change
from "application" to "app" when describing what an Angular
project produces. For now, using "application" is not a blocker, but
writers should be aware of the change in terminology.

PR Close #48456
2022-12-12 13:49:07 -08:00
Bob Watson 5af826a144 docs: remove spell checker from vale testing until vale bug is resolved (#48456)
With vale 2.21, the spell checker style stopped working.

This commit removes the spell checker from the list of styles to allow Vale to
be used, minus the spell checker, until the bug is resolved or a workaround
can be applied.

PR Close #48456
2022-12-12 13:49:07 -08:00
Bob Watson 1a318155e5 docs: move tour of heroes tutorial to a subdirectory (#48162)
This commit prepares the documentation directories for future tutorials organized by directory.

Also, it moves the Angular Libraries topic from the Tutorials section to Developer Guides in TOC

PR Close #48162
2022-12-12 12:07:47 -08:00
Andrew Scott f30d18a942 fix(common): Fix TestBed.overrideProvider type to include multi (#48424)
TestBed.overrideProvider should include `multi` support in its type. The
underlying implementation already supports it, as documented by the
tests which are currently casting the override to `any` to get around
the bad type.

PR Close #48424
2022-12-12 09:40:23 -08:00
piyush132000 ffb2c9ce0f docs: updated docs removed unnecessary imports and empty methods (#48428)
Removed empty methods and unnecessary imports in files

PR Close #48428
2022-12-12 09:39:22 -08:00
Konstantin Kharitonov 59c6bfb632 fix(common): Update Location to get a normalized URL valid in case a represented URL starts with the substring equals APP_BASE_HREF (#48394)
```ts
@NgModule({
  imports: [RouterModule.forRoot([{path: '/enigma', component: EnigmaComponent}])],
  providers: [{provide: APP_BASE_HREF, useValue: '/en'}]
})
export class AppModule {}
```

Navigating to `/enigma` will redirect to `/en/igma` not to `/en/enigma` as it expects

Fixes: #45744

PR Close #48394
2022-12-12 09:37:36 -08:00
Andrew Scott a3fbc2730a docs(router): Update ROUTES docs to not point to provideRoutes (#48417)
provideRoutes is deprecated in favor of the ROUTES token directly
for complex situations where it's necessary.

fixes #48411

PR Close #48417
2022-12-12 09:36:39 -08:00
Bob Watson 6279fecd52 docs: update of landing page and backup pages (#47047)
Updates the angular.io landing page with new messaging
and new images. The Quick-start app has been updated
to demonstrate a minimalist Angular app and the value
proposition content has been updated.

PR Close #47047
2022-12-09 16:04:34 -08:00
Virginia Dooley c4d17b92f9 docs: Document extracted from the original Introduction document, which is to be retired. (#47913)
docs: add to pullapprove

PR Close #47913
2022-12-09 15:06:50 -08:00
Virginia Dooley 91f82ca5a4 docs: Document extracted from the original Introduction document, which is to be retired. Linting suggested corrections made. Restructuring or rewording sentences to be shorter and clearer. (#47909)
docs: add to pullapprove

PR Close #47909
2022-12-09 14:59:59 -08:00
Virginia Dooley 2925c6a46b docs: Document extracted from the original Introduction document, which is to be retired. Linting suggested corrections made. Restructuring or rewording sentences to be shorter and clearer. (#47912)
PR Close #47912
2022-12-09 14:29:00 -08:00
Virginia Dooley 501ad04a1a docs: Document extracted from the original Introduction document, which is to be retired. Linting suggested corrections made. Restructuring or rewording sentences to be shorter and clearer. (#47908)
docs: add to pullapprove

PR Close #47908
2022-12-09 14:27:57 -08:00
Jessica Janiuk eea71dea80 ci: Add jessicajaniuk to code-ownership pullapprove group (#48426)
Add Jessica to the code-ownership group to allow approve PullApprove
config changes.

PR Close #48426
2022-12-09 14:05:10 -08:00
piyush132000 0b799220ca docs: cleanup the components (#48382)
Removed empty methods and import from files

PR Close #48382
2022-12-09 13:31:45 -08:00
Andrew Scott 126e798edf docs(common): Add note to location about investigating base href handling (#48422)
There have been/are several bugs related to base href handling in
Angular (#45744, #48175, #19296).
These all stem from the attempted custom handling of base href
in the `Location` class. This logic does not really make an attempt
to be fully compliant with the spec.

PR Close #48422
2022-12-09 12:39:00 -08:00
Angular Robot 85d3f6f048 build: update cross-repo angular dependencies (#48405)
See associated pull request for more information.

PR Close #48405
2022-12-09 11:26:15 -08:00
Alan Agius c47dd76590 build: update cross-repo angular dependencies (#48409)
See associated pull request for more information.

Closes: #48339

(cherry picked from commit 31742210a38b3e01e25cfa9c4e13f6f0e13bf1dd)

PR Close #48409
2022-12-09 11:00:59 -08:00
Alan Agius 1f3e9d904a refactor(migrations): remove unused migrations (#48414)
These migrations can no longer run due to a single update version policy (IE: from 13 to 14, 14 to 15 etc..). Therefore these are redundant and can be deleted.

We also remove the `-beta` suffix from the version which is not needed as the Angular CLI will add the prerelease suffixes automatically.

PR Close #48414
2022-12-09 10:04:04 -08:00
piyush132000 4aa4ca8b72 docs: updated local variables and removed empty methods (#48344)
Removed empty methods and import from files and updated variable assignment

PR Close #48344
2022-12-09 09:56:08 -08:00
Angular Robot 06c918ccb0 build: update dependency fs-extra to v11 (#48261)
See associated pull request for more information.

PR Close #48261
2022-12-09 09:54:16 -08:00
Alan Agius fca7d6b9d2 build: update gitignore to ignore files which should not be commited. (#48399)
Previous node_modules and logs where were being tracked.

PR Close #48399
2022-12-09 09:43:30 -08:00
Alan Agius 6c593e314f build: replace package-lock with yarn.lock (#48399)
We use Yarn as our package manager and not NPM.

PR Close #48399
2022-12-09 09:43:30 -08:00
Alan Agius b6e4e1b399 ci: disable renovate from updating marketing-first-app (#48399)
This application was added recently and we will stop renovate updates due to the following
- It is causing `Artifact update problem`. See: https://github.com/angular/angular/pull/48388#issuecomment-1341681430
- Generally `examples` in aio in use a shared `package.json`

PR Close #48399
2022-12-09 09:43:30 -08:00
Joey Perrott 23cac41589 build: update to latest @angular/ng-dev buid (#48416)
Update to the latest commit to get caretaker check fixes.

PR Close #48416
2022-12-09 09:25:42 -08:00
Bob Watson e7707dbf56 docs: move marketing demo out of tested examples (#48404)
PR Close #48404
2022-12-08 23:39:42 +00:00
Andrew Kushnir 5af7ec244d refactor(router): use RegExp to check if a URL is absolute (#48406)
Previously, this check looked like this: `/^(https?:)?\/\//.test(baseHref)`,
but that resulted in syntactically incorrect code after Closure Compiler minification.
This was likely caused by a bug in Closure Compiler, but for now, the check is rewritten
to use `new RegExp` instead.

PR Close #48406
2022-12-08 15:06:17 -08:00
Angular Robot 77ba4aac00 build: update cross-repo angular dependencies (#48398)
See associated pull request for more information.

(cherry picked from commit fb1d108ef1)

PR Close #48398
2022-12-08 12:32:33 -08:00
JoostK b55d2dab5d fix(compiler-cli): evaluate const tuple types statically (#48091)
For standalone components it may be beneficial to group multiple declarations
into a single array, that can then be imported all at once in `Component.imports`.
If this array is declared within a library, however, would the AOT compiler
need to extract the contents of the array from the declaration file. This
requires that the array is constructed using an `as const` cast, which results
in a readonly tuple declaration in the generated .d.ts file of the library:

```ts
export declare const DECLARATIONS: readonly [typeof StandaloneDir];
```

The partial evaluator logic did not support this syntax, so this pattern was
not functional when a library is involved. This commit adds the necessary
logic in the static interpreter to evaluate this type at compile time.

Closes #48089

PR Close #48091
2022-12-07 14:10:27 -08:00
Alan Agius f273666e90 refactor(compiler): replace deprecated sourcemap-codec (#48387)
`sourcemap-codec` as been deprecated in favor of `@jridgewell/sourcemap-codec`.

See: https://www.npmjs.com/package/sourcemap-codec?activeTab=versions

PR Close #48387
2022-12-07 14:09:17 -08:00
Piotr Kowalski d81428435f docs: fix the name of stub component (#48318)
PR Close #48318
2022-12-07 14:08:25 -08:00
Andrew Kushnir 5d5b51599d release: cut the v15.0.3 release 2022-12-07 13:54:02 -08:00
Konstantin Kharitonov bf44dc234a fix(common): Update Location to support base href containing origin (#48327)
In case `APP_BASE_HREF` is set including `origin` the further usage of it might cause failure

e.g.
If an app is placed on `https://example.com` and bundles are on `https://cdn-example.com` you have to set `APP_BASE_HREF` up as `https://example.com/` and build the app with `--base-href` as `https://cdn-example.com/` but it does not work because of the bug

Fixes #48175

PR Close #48327
2022-12-07 09:18:01 -08:00
Angular Robot 7df1989940 build: update cross-repo angular dependencies (#47882) (#48384)
See associated pull request for more information.

PR Close #47882

(cherry picked from commit 7c4e9ce5c0)

PR Close #48384
2022-12-07 09:09:30 -08:00
Angular Robot 6b6bf6332b build: update all non-major dependencies (#48372) (#48384)
See associated pull request for more information.

PR Close #48372

(cherry picked from commit 126573d76b)

PR Close #48384
2022-12-07 09:09:30 -08:00
Alan Agius cb7365a7bd refactor(compiler): replace flatten and map with flatMap. (#48378)
Replace custom `flatten` and `map` with native `flatMap` usage.

Benchmark:
| Test case name 	| Result                                                 	|
|----------------	|--------------------------------------------------------	|
| flatten & map  	| flatten & map x 1,182 ops/sec ±2.18% (63 runs sampled) 	|
| flatMap        	| flatMap x 6,011 ops/sec ±0.91% (35 runs sampled)       	|

The fact that `flatMap` is faster is also highlighted in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap

PR Close #48378
2022-12-07 09:08:26 -08:00
Angular Robot a51e625239 build: update github/codeql-action action to v2.1.35 (#48371)
See associated pull request for more information.

PR Close #48371
2022-12-07 09:07:34 -08:00
Kristiyan Kostadinov e4dcaa513e fix(core): unable to inject ChangeDetectorRef inside host directives (#48355)
When injecting the `ChangeDetectorRef` into a node that matches a component, we create a new ref using the component's LView. This breaks down for host directives, because they run before the component's LView has been created.

These changes resolve the issue by creating the LView before creating the node injector for the directives.

Fixes #48249.

PR Close #48355
2022-12-07 09:06:46 -08:00
Alan Agius c0d04175ff refactor(core): simplify array flatten logic (#48358)
We can now use modern Javascript to get the same result.

PR Close #48358
2022-12-06 12:48:42 -08:00
Angular Robot 5e2cd07a0b build: update dependency jasmine-spec-reporter to v7 (#48367)
See associated pull request for more information.

PR Close #48367
2022-12-06 11:43:05 -08:00
Angular Robot 4c76f94ce0 build: update dependency @types/jasmine to v4 (#48365)
See associated pull request for more information.

PR Close #48365
2022-12-06 10:57:04 -08:00
Angular Robot 0e539eb56d build: update eslint dependencies to v5.45.1 (#48223)
See associated pull request for more information.

PR Close #48223
2022-12-06 10:52:16 -08:00
Angular Robot 39b6cbcf4b build: update dependency karma-jasmine-html-reporter to v2 (#48369)
See associated pull request for more information.

PR Close #48369
2022-12-06 10:09:14 -08:00
dario-piotrowicz 9a5d84249a fix(compiler): make sure selectors inside container queries are correctly scoped (#48353)
improve the emulated shadowDom implementation so that it can correctly
scope selectors present inside the @container at-rule (recently added
to the css specs)

resolves #48264

PR Close #48353
2022-12-06 09:59:00 -08:00
Alan Agius 1e58a8c05d docs: wrap json property in double quotes (#48375)
Previously, the `budgets` was not wrapped in quotes which caused the JSON to be invalid.

PR Close #48375
2022-12-06 09:58:22 -08:00
Alan Agius 40d6a06615 refactor(core): remove old AJD workaround for G3 (#48363)
This workaround does not seem to be needed any longer.

PR Close #48363
2022-12-06 09:14:24 -08:00
Angular Robot fc872b12aa build: update dependency ts-node to v10 (#48370)
See associated pull request for more information.

PR Close #48370
2022-12-06 09:12:27 -08:00
Angular Robot fdb2a38a1b build: update dependency karma-jasmine to v5 (#48368)
See associated pull request for more information.

PR Close #48368
2022-12-06 09:11:48 -08:00
Angular Robot ac51e5c107 build: update dependency jasmine-core to v4 (#48366)
See associated pull request for more information.

PR Close #48366
2022-12-05 15:56:41 -08:00
Paul Gschwendtner 45cc5f49e4 build: switch new AIO preview action to use aio: preview label (#48345)
The new AIO preview deployment should take over the existing `aio:
preview` label- now after it being tested- and working as expected.

PR Close #48345
2022-12-05 14:52:38 -08:00
Paul Gschwendtner 3f9cfae8a4 build: remove docker-based AIO preview deploy setup (#48345)
The docker-based AIO preview deploy setup is replaced with
significantly simpler setup using GitHub actions provided by
dev-infra (also something dev-infra can maintain better then).

The actions under the hood leverage Firebase preview channels.

PR Close #48345
2022-12-05 14:52:38 -08:00
Bob Watson dcab0f48d6 docs: add example app for new landing page (#48360)
PR Close #48360
2022-12-05 14:37:47 -08:00
Alan Agius 0b04da1fd7 refactor(core): remove several private utils and APIs (#48357)
These APIs are no longer used.

PR Close #48357
2022-12-05 14:35:10 -08:00
Alan Agius a4c82ba25b refactor(compiler): remove unused projection const (#48357)
`projection` const is unused in `serializePlaceholderValue`.

PR Close #48357
2022-12-05 14:35:09 -08:00
Alan Agius 28b0b89cb2 refactor(common): remove unused setDOM (#48357)
Remove unused `setDOM` method is unused.

PR Close #48357
2022-12-05 14:35:09 -08:00
Alex Castle 50b1c2bf52 fix(common): Don't generate srcsets with very large sources (#47997)
Fix an issue where users could inadvertently generate very large source images in ngOptimizedImage

PR Close #47997
2022-12-05 12:12:14 -08:00
Joey Perrott 9214e58d44 build: enable the ng-dev auth service (#48361)
Enable the auth service for merging into the repository

PR Close #48361
2022-12-05 12:09:08 -08:00
Paul Gschwendtner 0b388a00da build: add more debug information for occasional windows flakiness (#48351)
Ocassionally the NodeJS version is not correct after NVM on Windows.
This adds some debug information that should help improve stability
here. A recent attempt to update the `$PATH` did not seem to help.

PR Close #48351
2022-12-05 12:04:05 -08:00
piyush132000 dc5f436769 docs: removed empty methods (#48343)
Removed empty methods and import from files

PR Close #48343
2022-12-05 12:03:33 -08:00
Derek Cormier 7f31e55961 build(bazel): mark an AIO sjs e2e test as flakey (#48331)
Like a couple of the the other systemjs e2e tests, this one occasionally fails CI.

PR Close #48331
2022-12-05 12:02:29 -08:00
Andrew Scott 06c34cd99a refactor(router): Remove assignExtraOptionsToRouter helper function (#48313)
This commit removes the unnecessary `assignExtraOptionsToRouter` helper
function. This helper is not necessary because the options can be
retrieved from DI and assigned during the construction on the Router.

PR Close #48313
2022-12-05 12:01:57 -08:00
Andrew Scott 58e55495f2 refactor(router): Eliminate constructor parameters in Router class (#48313)
The Router constructor and `setupRouter` factory mainly exist as a
legacy configuration. Since the Router's creation, the style in Angular
has evolved quite a bit. This commit eliminates and cleans up some
unnecessary comlicated code paths related to the router
constructor/factory.

Note that there are edits to the `setupTestingRouter` that could be seen
as breaking. However, it is not for several reasons:

1. The function is documented as a factory function. If used as
   documented, the parameters should match what's available in DI
2. The function is totally unused by the Router itself and is not used
   in g3 either. I believe it was made publicApi by an error when
   updating documentation annotations long ago.

PR Close #48313
2022-12-05 12:01:57 -08:00
Derek Cormier 1b373067e1 build(bazel): set ci steps that build aio to 2xlarge+ (#48342)
These steps builds AIO which is memory intensive. Running out of memory
may be the cause of some ci flakiness. Change the executor size to test
this theory.

For context: The CLI process is randomly getting `Killed`, likely by the
linux OOM killer. The Angular CLI builds happen on the host machine- no RBE.

Without the Bazel migration they were previously already at ~63% peak RAM.
With Bazel's overhead and e.g. remote caching, it seems to hit 100%
(can be seen in CircleCI machine insights). OOM killer may then choose the
highest consuming task. i.e. the Angular CLI and kill it.

Angular CLI build ram consumption is proportional to the size of the app. AIO is not small

https://app.circleci.com/pipelines/github/angular/angular/53992/workflows/ec47e3d8-2e7d-45b8-a802-7ec8ec4026c4/jobs/1265666/parallel-runs/0/steps/0-106

https://angular-team.slack.com/archives/C02PARQNMC1/p1670067910332809i

PR Close #48342
2022-12-05 11:40:56 +00:00
Paul Gschwendtner 226441fc3a build: set target firebase project when setting deploy target (#48352)
We now set the Firebase deploy target for AIO preview deployment
via GitHub actions. It looks like configuring the deploy target
also requires authentication / or a project.

PR Close #48352
2022-12-04 20:26:10 +00:00
Paul Gschwendtner 38701ce07b build: check out project before setting AIO preview targets (#48347)
Checks out the Firebase project before setting the AIO preview targets.
Surprisingly Firebase requires a project when setting resource
identifiers for the targets. This is already done by the Firebase
deploy action from @FirebaseExtended, but we need to do it earlier.

PR Close #48347
2022-12-04 16:14:11 +00:00
Paul Gschwendtner 09388eb9ab build: use npx for setting firebase deploy targets in AIO preview (#48346)
For the deploy job we still need to use the Firebase CLI to configure
the proper hosting deploy targets. See:
011ef66a04.

We don't have node modules installed in this job, and it would
also be overkill to install them for just using firebase here.

Since the action uses `npx firebase-tools` down the line anyway,
we can use it without any speed downsides.

PR Close #48346
2022-12-04 13:18:40 +00:00
Paul Gschwendtner 95886d8aa9 build: set firebase deploy target when deploying AIO preview (#48338)
The AIO firebase project specifies `aio` as deploy target. This means
that we need to configure this target before being able to deploy AIO
previews.

We use the default project target as target since the preview Firebase
project does not use multi site targets. See:
https://firebase.google.com/docs/hosting/multisites

PR Close #48338
2022-12-04 11:11:40 +00:00
Angular Robot 6f79c2b7fd build: update actions/checkout action to v3 (#48337)
See associated pull request for more information.

PR Close #48337
2022-12-03 16:09:10 +00:00
Angular Robot 59f2d46a16 build: update actions/checkout digest (#48336)
See associated pull request for more information.

PR Close #48336
2022-12-03 10:45:39 +00:00
Paul Gschwendtner 30226f08f3 build: setup github actions for preview deployment of AIO (#48302)
Sets up two new actions for supporting preview deployments
of AIO by applying a label. i.e. `AIO preview`.

PR Close #48302
2022-12-03 10:13:26 +00:00
Paul Gschwendtner 7bc6c2d314 build: introduce common action for installing dependencies w/ cache in actions (#48302)
Instead of repeating the node module installation step in future GitHub
actions, a single place should contain the cache key etc.

PR Close #48302
2022-12-03 10:13:26 +00:00
Paul Gschwendtner dd4fd1f4f4 build: attempt to avoid nodejs version flakiness in test_win job (#48326)
The `test_win` job is occasionally failing where a super old NodeJS
version is used even though we installed a proper one with `nvm`.

It's unclear how the CircleCI windows VMs differ here, it's coming
up rarely and is hard to reproduce when SSH-ing into VMs. Our best
guess is that the existing NodeJS version from the container/image is
super old and somehow takes precedence over the NVM-managed NodeJS
version. This could happen due to bad ordering in the `$PATH`
environment variable, or NVM not properly being wired up there.

We attempt to fix this by always setting `$PATH` to the NVM symlink
directory manually- with highest priority.

PR Close #48326
2022-12-02 14:55:55 -08:00
Andrew Kushnir 49af83e5e3 docs: added missingNgForOfLet extended diagnostics details page (#48320)
Closes #48288.

PR Close #48320
2022-12-02 14:54:10 -08:00
Andrew Kushnir 2131c551cd docs: added missingControlFlowDirective extended diagnostics details page (#48319)
Closes #48287.

PR Close #48319
2022-12-02 11:46:54 -08:00
Alan Agius 2af638818a refactor(platform-browser): simplify flattenStyles method (#48293)
With this change we simplify the `flattenStyles` logic using modern JavaScript.

PR Close #48293
2022-12-02 11:36:13 -08:00
Paul Gschwendtner 2eccfd412e 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:44 -08:00
Paul Gschwendtner f1cb455c1e 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:44 -08:00
Paul Gschwendtner 520946d2e7 build: do not use --config=release when building AIO for development (#48329)
When building AIO using `yarn build` the `--config=release` is added.
This was done as part of the Bazel migration to make sure the footer
shows a Git revision via Bazel stamping.

This does not provide enough benefits, compared to the downside of
reduced caching. Bazel will discard the analysis cache when the stamp
configuration changes.

This may happen easily when you work in framework where
`--config=release` is not used. Then when starting work in AIO: the
config changes and the cache is discarded. This may even mean that
existing framework package build artifacts may be discarded when an
AIO local build is started.

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

PR Close #48329
2022-12-02 09:47:44 -08:00
Paul Gschwendtner cd526c1db6 build: cleanup bazelignore file (#48329)
These folders are no longer used in the source tree, and only exist
in the Bazel sandbox. We can rmeove them. Node modules are kept because
people may create them when editing the integration `package.json`
files.

PR Close #48329
2022-12-02 09:47:43 -08:00
Paul Gschwendtner ff07194e92 build: avoid common node_modules/ bazel slowness pitfall (#48329)
It's very easy to have some random `node_modules/` folder floating
around in the repository. Especially coming from the old AIO
example boilerplate setup (which heavily relied on nested node modules).

These `node_modules/` folders can contain millions of files and might
be accidentally picked up by Bazel `glob`'s (if they are authored
in way that selects all nested files).

This could surface in `aio/tools/examples/shared` or individual content
examples, causing the Bazel analysis phase or runfile forest creation
to take forever given more than 1.5 files being dealt with.

Note that we keep the `examples/shared` node modules folder gitignored
as otherwise Renovate may have problems when updating the folder.

PR Close #48329
2022-12-02 09:47:43 -08:00
Andrew Scott c0fe82049f docs: Add page for 'suffixNotSupported' diagnostic (#48315)
Adds documentation page for `suffixNotSupported` extended diagnostic.

fixes #48290

PR Close #48315
2022-12-02 08:59:01 -08:00
Pawel Kozlowski fab1af764d perf(docs-infra): remove usage of the NgClass directive (#48312)
NgClass has non-negligable performance cost, especially if a
different object is provided as NgClass input (which was the case
for the NavItemComponent). The perfornace problem was noticed
in the scope of the INP score investigations while profiling the
https://angular.io/resources page. On this particular page replacing
NgClass usage with alternatives results in 20x (!) runtime perf
improvement. Such big improvement is possible since we avoid unneeded
CSS classes removal / adding in the DOM.

Part of #25518

PR Close #48312
2022-12-02 08:58:20 -08:00
Paul Gschwendtner 5a85e440a8 build: enable progress messages for Bazel in CircleCI (#48316)
Bazel otherwise may almost look as being stuck when it performs
many slow e2e tests. We should show what is running, even it results
in a little more output in the logs.

PR Close #48316
2022-12-02 08:57:45 -08:00
Paul Gschwendtner 6921bf210a build: patch rules_nodejs to ensure nodejs_binary targets can be used as tools in RBE (#48316)
See full explanation in: https://github.com/bazelbuild/rules_nodejs/pull/3605

PR Close #48316
2022-12-02 08:57:44 -08:00
Paul Gschwendtner b9ef61906e build: fix AIO jobs not running with RBE and CircleCI Bazel settings (#48316)
The `.bazelrc` workspace file attempted to imported the `.bazelrc.user`
file. This user file is set on CI to include the CI specific Bazel
settings.

Apparently this user rc import does not work, and fails silently given
the `try-import`. It fails because for AIO Bazel commands we change
the working directory using `yarn --cwd aio` and the `try-import`
is relative to the working directory..

PR Close #48316
2022-12-02 08:57:44 -08:00
Andrew Scott 167bc0d163 fix(compiler-cli): Produce diagnostic rather than crash when using invalid hostDirective (#48314)
Because the language service uses the compiler, we try to produce as
much useful information as possible rather than throwing hard errors.
Hard errors cause the compiler to crash. While this can be acceptable
when compiling a program as part of a regular build, this is undesirable
for the language service.

PR Close #48314
2022-12-01 13:43:31 -08:00
piyush132000 b620d9b316 docs: removed empty method (#48236)
I removed empty methods from a file and unnecessary import and added export keyword for exportng module

PR Close #48236
2022-12-01 09:39:09 -08:00
Andrew Scott 73ec0c61fa release: cut the v15.0.2 release 2022-11-30 12:20:17 -08:00
Pawel Kozlowski d933b17170 refactor(core): remove debug data structures (#48281)
This commit removes several debug data structures from
the framework runtime. The data structures in question
were introduced in the framework in the past with the
idea of having debugging aid in the form of the human-redable
data structures. It turned out that in practice those
data structures were not used (most of the fwk developers
didn't even know about their existence!), yet we kept
paying the price of maintaining those duplicated (prod
and debug) version of the data structures.

PR Close #48281
2022-11-30 09:27:59 -08:00
Angular Robot db53ce40c5 build: update dependency @types/uuid to v9 (#48285)
See associated pull request for more information.

PR Close #48285
2022-11-30 09:27:04 -08:00
Andrew Scott 2a445923ee refactor(router): Remove DeprecatedLoadChildren (#48292)
This option has already been removed from availability externally. Internally, the last use has been removed
for the type on Route.loadChildren. More testing will be necessary to verify nothing relies on the other
code paths.

PR Close #48292
2022-11-30 08:29:11 -08:00
Andrew Scott 82756e8a5f refactor(router): Move navigationId handling to the transition manager (#48257)
The navigationId is really just a count of how many navigations have been
processed through the navigation pipeline. This tracking should be
done as part of the navigation transition handler

PR Close #48257
2022-11-29 14:55:53 -08:00
Andrew Scott 60af2d091c refactor(router): Move transition subject into transition handler (#48257)
The navigation transitions subject belongs in the navigation transitions handler
rather than the Router.

PR Close #48257
2022-11-29 14:55:53 -08:00
Andrew Scott 92066f162d refactor(router): directly inject internal properties from DI (#48257)
Rather than accessing router internal properties that are available in DI,
this commit directly injects those dependencies in the navigation transition
handler. Note that there are several other items that _should_ be injectable
in DI (like the TitleStrategy) but because those are part of the Router public
interface and writeable(!), they might be changed during runtime. We
have to get these other items from the Router for now...

PR Close #48257
2022-11-29 14:55:53 -08:00
Andrew Scott 0a36f4fbc8 refactor(router): Get EnvironmentInjector directly in transition handler (#48257)
Remove the NgModuleRef from the internal interface of the Router. This
was only used to get the injector (equivalent to EnvironmentInjector).
Instead, the navigation transition handler can directly inject the
EnvironmentInjector

PR Close #48257
2022-11-29 14:55:53 -08:00
Andrew Scott 8e46fb5676 refactor(router): Move configLoader to transition handler (#48257)
The ConfigLoader is only used as part of the navigation transition.
Moving the loader there completes the removal of event triggering in
the router code. This all now lives in the transition handler (plus
the router scroller, but let's ignore that...).

PR Close #48257
2022-11-29 14:55:53 -08:00
Andrew Scott f36cf49330 refactor(router): Move events subject to transition class (#48257)
The events observable is part of the lifecycle of a navigation. This should
be contained in the NavigationTransitions class rather than the Router.
This Subject is re-exported by the router as an observable to maintain
the public API

PR Close #48257
2022-11-29 14:55:52 -08:00
Andrew Scott 2409dd6530 refactor(router): remove malformedUriHandler from interface passed to transitions (#48257)
The malformedUriHandler is not used during the navigation transition and can be removed form the interface

PR Close #48257
2022-11-29 14:55:52 -08:00
Angular Robot 2067643896 build: update eslint dependencies (#48216)
See associated pull request for more information.

PR Close #48216
2022-11-29 12:29:47 -08:00
Alan Agius a3bbc6dcd9 build: remove codelyzer from aio dependencies (#48216)
This package is no longer used.

PR Close #48216
2022-11-29 12:29:47 -08:00
Alan Agius 3c62c70caf build: update cross-repo dependencies to latest stable version (#48216)
With this change we update the cross-repo dependencies to the latest stable version

PR Close #48216
2022-11-29 12:29:46 -08:00
Angular Robot fb4f228d3c build: update github/codeql-action action to v2.1.34 (#48272)
See associated pull request for more information.

PR Close #48272
2022-11-29 12:29:20 -08:00
Rokas Brazdžionis bec0007c82 docs: update date pipe default timezone injection token reference (#48274)
replace deprecated `DATE_PIPE_DEFAULT_TIMEZONE` with `DATE_PIPE_DEFAULT_OPTIONS`
PR Close #48274
2022-11-29 09:40:28 -08:00
Paul Gschwendtner 4df7301093 build: hide --loader warning when ESM import patch is installed (#48282)
Similar to the Rules NodeJS require patch, we have an ESM import patch
as of the AIO Bazel migration (to support ESM scripts better).

This script uses `--loader`, an experimental NodeJS flag. This is
similar to how `ts-node` uses it. We should disable the warnings
as it results in a lot of unreadable Bazel output and the warnings
are okay to be ignored. Note that we cannot fine-grain disable
the specific warning so all others would be disabled too.

Realistically we haven't seen any in the past and long-term we will
be not relying on patched resolution anyway (looking at `rules_js`).

PR Close #48282
2022-11-29 09:39:26 -08:00
Andrew Scott a192dea677 Revert "refactor(router): remove malformedUriHandler from interface passed to transitions (#48257)" (#48270)
This reverts commit c20a7eeba6.

PR Close #48270
2022-11-28 16:58:53 -08:00
Andrew Scott d29cbe885c Revert "refactor(router): Move events subject to transition class (#48257)" (#48270)
This reverts commit f88559eb48.

PR Close #48270
2022-11-28 16:58:53 -08:00
Andrew Scott 1eef647236 Revert "refactor(router): Move configLoader to transition handler (#48257)" (#48270)
This reverts commit 8c8ded8d31.

PR Close #48270
2022-11-28 16:58:53 -08:00
Andrew Scott 9745fac73f Revert "refactor(router): Get EnvironmentInjector directly in transition handler (#48257)" (#48270)
This reverts commit 03519968c0.

PR Close #48270
2022-11-28 16:58:52 -08:00
Andrew Scott 7032bf0780 Revert "refactor(router): directly inject internal properties from DI (#48257)" (#48270)
This reverts commit ce38759f54.

PR Close #48270
2022-11-28 16:58:52 -08:00
Andrew Scott 88aec875c0 Revert "refactor(router): Move transition subject into transition handler (#48257)" (#48270)
This reverts commit 0d88348430.

PR Close #48270
2022-11-28 16:58:52 -08:00
Andrew Scott f2d20d5c50 Revert "refactor(router): Move navigationId handling to the transition manager (#48257)" (#48270)
This reverts commit ea114a0034.

PR Close #48270
2022-11-28 16:58:52 -08:00
Bob Watson bd59a1a395 docs: update docs to use new build and test commands (#48266)
PR Close #48266
2022-11-28 15:33:53 -08:00
Matthieu Riegler c0601db72c test(core): remove some ViewEngine related test code (#48238)
Some tests had comments relating to ViewEngine that were not needed anymore since VE was dropped.

PR Close #48238
2022-11-28 13:08:23 -08:00
Matthieu Riegler aa920aa89a refactor(router): remove non-null assertions (#48244)
As part of #24571, removing non-null assertions (where appropriate)

PR Close #48244
2022-11-28 13:07:59 -08:00
Derek Cormier 6eb2f76fee build(bazel): fix aio deploy script
Move the copy of the bazel dist folder to the firebase dist folder
earlier on in the process so that any checks operate out of a single
folder.
2022-11-28 13:29:35 -07:00
Andrew Scott ea114a0034 refactor(router): Move navigationId handling to the transition manager (#48257)
The navigationId is really just a count of how many navigations have been
processed through the navigation pipeline. This tracking should be
done as part of the navigation transition handler

PR Close #48257
2022-11-28 11:54:43 -08:00
Andrew Scott 0d88348430 refactor(router): Move transition subject into transition handler (#48257)
The navigation transitions subject belongs in the navigation transitions handler
rather than the Router.

PR Close #48257
2022-11-28 11:54:43 -08:00
Andrew Scott ce38759f54 refactor(router): directly inject internal properties from DI (#48257)
Rather than accessing router internal properties that are available in DI,
this commit directly injects those dependencies in the navigation transition
handler. Note that there are several other items that _should_ be injectable
in DI (like the TitleStrategy) but because those are part of the Router public
interface and writeable(!), they might be changed during runtime. We
have to get these other items from the Router for now...

PR Close #48257
2022-11-28 11:54:43 -08:00
Andrew Scott 03519968c0 refactor(router): Get EnvironmentInjector directly in transition handler (#48257)
Remove the NgModuleRef from the internal interface of the Router. This
was only used to get the injector (equivalent to EnvironmentInjector).
Instead, the navigation transition handler can directly inject the
EnvironmentInjector

PR Close #48257
2022-11-28 11:54:43 -08:00
Andrew Scott 8c8ded8d31 refactor(router): Move configLoader to transition handler (#48257)
The ConfigLoader is only used as part of the navigation transition.
Moving the loader there completes the removal of event triggering in
the router code. This all now lives in the transition handler (plus
the router scroller, but let's ignore that...).

PR Close #48257
2022-11-28 11:54:43 -08:00
Andrew Scott f88559eb48 refactor(router): Move events subject to transition class (#48257)
The events observable is part of the lifecycle of a navigation. This should
be contained in the NavigationTransitions class rather than the Router.
This Subject is re-exported by the router as an observable to maintain
the public API

PR Close #48257
2022-11-28 11:54:43 -08:00
Andrew Scott c20a7eeba6 refactor(router): remove malformedUriHandler from interface passed to transitions (#48257)
The malformedUriHandler is not used during the navigation transition and can be removed form the interface

PR Close #48257
2022-11-28 11:54:43 -08:00
Andrew Scott 621013af2a refactor(router): move lastSuccesfulNavigation to navigation transitions (#48257)
lastSuccessfulNavigation is only used in the transition so it does not need to live in Router

PR Close #48257
2022-11-28 11:54:43 -08:00
mgechev 864a96d7a6 docs: add state of javascript banner (#48260)
PR Close #48260
2022-11-28 11:54:18 -08:00
Kristiyan Kostadinov 458d62b7b8 build: update angular version of in-memory-web-api (#48218)
Bumps up the required Angular version of `angular-in-memory-web-api` to 15.

Fixes #48197.

PR Close #48218
2022-11-28 09:13:47 -08:00
piyush132000 ebb3f58f4c docs: removed empty methods (#48230)
I removed empty methods from a file and unnecessary import

PR Close #48230
2022-11-28 09:13:20 -08:00
Alan Agius 1e483ebe18 refactor(platform-server): remove Injector dependency for initDominoAdapter factory (#48231)
The injector is not used by this factory.

PR Close #48231
2022-11-28 09:12:36 -08:00
Alan Agius dab7198a1f refactor(core): remove unused private APIs (#48234)
Remove private code which is not used by the Framework.

PR Close #48234
2022-11-28 09:11:26 -08:00
Aristeidis Bampakos 34ccffe9ab docs: update deployment to GitHub Pages (#48239)
The GitHub Pages section has been moved to the left sidebar of the Settings page.
PR Close #48239
2022-11-28 09:11:00 -08:00
Derek Cormier cfd8702747 build(bazel): fix pwa test metrics (#48214)
Prior to the AIO bazel migration, the pwa test script only tested the
pwa metric. A bug was introduced where the score target was used for all
metrics, causing the AIO deploy test to fail.

PR Close #48214
2022-11-23 23:20:36 +00:00
Derek Cormier e56f6d2187 build(bazel): copy dist folder to aio for firebase deployment (#48214)
Firebase requires the distributable to be in the same folder as
firebase.json.

PR Close #48214
2022-11-23 23:20:36 +00:00
Derek Cormier 86fdcfcc0f build(bazel): point to correct dist folder in firebase config (#48214)
Point to the AIO dist folder in the Bazel output tree.

PR Close #48214
2022-11-23 23:20:36 +00:00
Derek Cormier 00864665a3 build(bazel): fix aio deployment unit tests (#48214)
Missing a spy for the new chmod call.

PR Close #48214
2022-11-23 23:20:36 +00:00
Derek Cormier 78b66b236b build(bazel): remove write protection on aio dist folder for deployment (#48214)
Deploy script adds extra files and needs write access.

PR Close #48214
2022-11-23 23:20:36 +00:00
Derek Cormier 049123cf6c build(bazel): fix AIO deployment unit tests (#48214)
Forgot to update the dist path in these tests.

PR Close #48214
2022-11-23 23:20:36 +00:00
Derek Cormier 7815acd125 build(bazel): fix dist dir in AIO deploy script (#48214)
The script is run cd'ed into aio so the path to the Bazel dist
location is up one folder.

PR Close #48214
2022-11-23 23:20:36 +00:00
Derek Cormier ae812e3936 build(bazel): fix AIO deployment script (#48214)
Don't run the script under Bazel, except for the tests. Configure a
Bazel flag to select the AIO build configuration.

PR Close #48214
2022-11-23 23:20:36 +00:00
Derek Cormier e044939fa9 build(bazel): fix yarn call in aio deploy script (#48214)
Incorrectly calls yarn scripts from the root package.

PR Close #48214
2022-11-23 23:20:36 +00:00
JoostK 86a21f5569 fix(compiler-cli): accept inheriting the constructor from a class in a library (#48156)
The stricter checks under `strictInjectionParameters` in Angular 15 now enforce that
an inherited constructor must be compatible with DI, based on whether all parameters
are valid injection tokens. There is an issue when the constructor is inherited from
a class in a declaration file though, as information on the usage of `@Inject()` is
not present within a declaration file. This means that this stricter check cannot be
accurately performed, resulting in false positives.

This commit disables the stricter check to behave the same as it did prior to
Angular 15, therefore avoiding the false positive.

Fixes #48152

PR Close #48156
2022-11-23 12:10:37 -08:00
Angular Robot c3ccaa83b4 build: update scorecard action dependencies (#47866)
See associated pull request for more information.

PR Close #47866
2022-11-23 10:54:13 -08:00
Angular Robot 6e9075e787 build: update bazel setup to v5.7.1 (#47884)
See associated pull request for more information.

PR Close #47884
2022-11-23 10:53:00 -08:00
Angular Robot 85c35cf693 build: update io_bazel_rules_sass digest to a2fce75 (#47970)
See associated pull request for more information.

PR Close #47970
2022-11-23 10:52:30 -08:00
Alan Agius b8ed822896 build: update safevalues to 0.4.2 (#48153)
This contains a fix which enabled the ESM version of the package to be consumed.

See: https://github.com/angular/angular/issues/48171#issuecomment-1324728758

PR Close #48153
2022-11-23 09:35:41 -08:00
Bob Watson 420af8ee47 docs: update AIO code to v15 (#48153)
PR Close #48153
2022-11-23 09:35:41 -08:00
Kristiyan Kostadinov 665d4650cd refactor(language-service): make selector nullable (#48193)
This is a follow-up from https://github.com/angular/angular/pull/48147. Changes the `DirectiveSymbol.selector` to be nullable since it's possible to have directives without a selector.

PR Close #48193
2022-11-23 09:27:03 -08:00
Dylan Hunn 40c138c13d release: cut the v15.0.1 release 2022-11-22 19:04:21 -08:00
Andrew Scott dc23ad4978 refactor(router): extract navigation transition code to a new file (#48187)
This commit extracts the Router's navigation "transitions" to a separate
file. The goal here is twofold:

- Separate the Router's logic into more manageable chunks. Rather than
  having to always edit a 1000+ line file, this separates different
  pieces into smaller, more focused files
- More importantly, this sets the groundwork for separating the Router
  state from the individual navigation transition. That is, it would be
  good for the rxjs pipeline to _not_ modify the Router state but only
  keep track of its own intermediate stages and emit outwards during
  important events. The Router can subscribe to those events and make
  updates to its state. This would theoretically allow us to swap those
  implementations independently. That is, the Router's state management
  can be changed without changing the transition handling and
  vice-versa.

PR Close #48187
2022-11-22 18:58:38 -08:00
Brooke 3596c44e0c docs: add brooke avery to GDE resources (#47923)
PR Close #47923
2022-11-22 16:22:06 -08:00
Joey Perrott 8600b3077d build: reformat BUILD files
Reformat BUILD file usage of globs.
2022-11-22 13:51:19 -07:00
Derek Cormier 31b2716c1c build(bazel): remaining AIO Bazel migration fixes
Fix the remaining AIO Bazel migration TODOs
2022-11-22 13:51:19 -07:00
Derek Cormier 65712b1d15 build(bazel): add missing dependency to deploy script
Cannot load the root package.json. Surfaced after trying to merge
aio-bazel-migration to main because the deployment short circuits
on ci for feature branhces.
2022-11-22 13:51:19 -07:00
Derek Cormier 4881e75097 build(bazel): mark a couple of aio example tests as flaky
May be caused by resource contention when running the example tests in
parallel.
2022-11-22 13:51:19 -07:00
Derek Cormier 2f5fe32b92 build(bazel): update workspace cli sources ref
Updates to the latest version still used in angular/main.
2022-11-22 13:51:19 -07:00
Derek Cormier 0136eb6d34 build(bazel): tweak parallel jobs for AIO local deps ci
Parallel runs of tests on circleci executor push RAM to the limits.
2022-11-22 13:51:19 -07:00
Derek Cormier 6efefec55c build(bazel): fix a regression when linking local packages for AIO example
tests

Caused by code moving around.
2022-11-22 13:51:19 -07:00
Derek Cormier 371a599c8e build(bazel): fix linking of local angular packages
Npm angular deps were transitively being included, confusing the
rules_nodejs linker.
2022-11-22 13:51:19 -07:00
Derek Cormier a02d114dae 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:19 -07:00
Derek Cormier df5e1802a3 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:19 -07:00
Derek Cormier c142511084 build(bazel): fix regressions for docs-watch
Some earlier refactoring prevented the watchr script from running in
the source tree. There was also a Windows issue where running architect
didn't preserve symlinks causing the app to not be served.
2022-11-22 13:51:19 -07:00
Derek Cormier 9520a029d2 build(bazel): fix remote cache missses on Windows and OSX
Caused by chromium debug logs in @angular/build-tooling.
2022-11-22 13:51:19 -07:00
Derek Cormier afad500f40 build(bazel): fix a regression where github links were incorrectly
written

Incorrectly prepended 'packages/' to docs that were under aio/content.
2022-11-22 13:51:19 -07:00
Derek Cormier 4199a8db08 build(bazel): fix missing dgeni dependencies
Fixes the 'Export has no declarations: unknown' warning and
unresolved type warnings.
2022-11-22 13:51:19 -07:00
Derek Cormier 6d9339559c build(bazel): update rnj and remove launcher patch
rules_nodejs released  a fix for the RUNFILES issue.
2022-11-22 13:51:19 -07:00
Derek Cormier 5769eb0bd2 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:19 -07:00
Derek Cormier da125dbb79 build(bazel): fix an AIO bug where symlinked assets were not loaded on
Windows

Added "followSymlinks" blocks on the assets.
2022-11-22 13:51:19 -07:00
Derek Cormier 84c1896b6b build(bazel): remove unused AIO package.json scripts
No longer needed after the migration
2022-11-22 13:51:19 -07:00
Derek Cormier b13783eeb6 build(bazel): update CLI sources ref for aio build
It was out of date with the current legacy build
2022-11-22 13:51:19 -07:00
Derek Cormier a908ba7a68 build(bazel): use workspace status command for AIO version stamping
Fixes a bug where the navigation map did not have the correct SHAs.
2022-11-22 13:51:19 -07:00
Derek Cormier 500acfcf98 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:19 -07:00
Derek Cormier 8df1deaad5 build(bazel): list docs entrypoints under packages to simplify docgen
target

Follows pattern in @angular/components.
2022-11-22 13:51:19 -07:00
Derek Cormier 9b169f60a6 build(bazel): fix a bug where the esm loader did not point to
node_modules in runfiles

Was passing locally previously due to escaping to the source tree.
2022-11-22 13:51:19 -07:00
Derek Cormier 71ee5d58cf build(bazel): clean up pathing in aio build tooling
Make use of process.env.RUNFILES.
2022-11-22 13:51:19 -07:00
Derek Cormier 0e0ec49f58 build(bazel): allow tag propagation on host machine
Fixes a bug where 'requires-network' tag was not propagated locally.
2022-11-22 13:51:19 -07:00
Derek Cormier 8d685f6997 build(bazel): update documentation for docs authors
Where possible, preseve the original yarn commands.
2022-11-22 13:51:19 -07:00
Derek Cormier 32cc63c067 build(bazel): fix a11y and pwa tests on Windows
Needed to use absoulte paths and fix a separator.
2022-11-22 13:51:19 -07:00
Derek Cormier eb07e5bbda build(bazel): remove old patch rules_nodejs patch
Patch contents included in rules_nodejs 5.6.0.
2022-11-22 13:51:19 -07:00
Derek Cormier 3fa6ae1ba9 build(bazel): fix a bug where $(GIT_BIN_PATH) wasn't providing a correct path on
Windows

Fixed in rules_nodejs 5.6.0
2022-11-22 13:51:19 -07:00
Derek Cormier 347e0139d5 build(bazel): fix windows regression caused by absolute esm loader path
The --loader argument can't handle absolute windows paths.
2022-11-22 13:51:19 -07:00
Derek Cormier 425035b8fd build(bazel): fix broken aio github links on Windows
Caused the aio e2e tests to fail.
2022-11-22 13:51:19 -07:00
Derek Cormier 6c6eaddbe2 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:19 -07:00
Derek Cormier e43686f4d1 build(bazel): fix a bug where the opensearch url coudln't be substituted
The file was write protected in the bazel output tree.
2022-11-22 13:51:19 -07:00
Derek Cormier ef89eb579e build(bazel): fix a bug where the esm loader could not determine the
runfiles dir on bazel run

Was relying RUNFILES_DIR but that seems to not be available when calling
bazel run.
2022-11-22 13:51:19 -07:00
Derek Cormier 5e8159ca2a build(bazel): fix aio payload test to work with bazel output
Was pointing to legacy build dist folder.
2022-11-22 13:51:19 -07:00
Derek Cormier 6700f93183 build(bazel): fix linting errors
Exclude third_party vendored code from linting to preserve original form
2022-11-22 13:51:19 -07:00
Derek Cormier 9e435956f8 build(bazel): fix a bug where deps in aio local build were not included
This was breaking the local deps build.
2022-11-22 13:51:19 -07:00
Derek Cormier a06644b816 build(bazel): selectively enable network access for some aio targets
By default network access is disabled for actions on ci.
2022-11-22 13:51:19 -07:00
Derek Cormier bd20c71391 build(bazel): use git toolchain for dgeni build
Now using a toolchain from dev-infra that provides the
path to git in a template var.
2022-11-22 13:51:19 -07:00
Derek Cormier cc5a35123d build(bazel): fix some regressions
Caused by some incompatible changes that were merged in.
2022-11-22 13:51:19 -07:00
Derek Cormier 47045a5306 build(bazel): avoid network call during aio build by not inlining fonts
Allows the aio build target to be run under remote-exec
2022-11-22 13:51:19 -07:00
Derek Cormier f183129eab build(bazel): avoid writing ngsw-config to the source tree
This was originally done before runfiles was enabled and the output
and source trees were not merged for architect targets.
2022-11-22 13:51:19 -07:00
Derek Cormier b0c110ab3a build(bazel): fix a circular dep in aio
Probably caused by some incompatible merges.
2022-11-22 13:51:19 -07:00
Derek Cormier 19fe298d11 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:19 -07:00
Derek Cormier 57f63bf471 build(bazel): patch architect to not clear output
Otherwise a failed build requires looking in the command log for the
error.
2022-11-22 13:51:19 -07:00
Derek Cormier c0655e447a 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:19 -07:00
Derek Cormier ec286048c9 build(bazel): fix load statement to point to new dev-infra package
This was introduced during a recent rebase.
2022-11-22 13:51:19 -07:00
Derek Cormier 7c12ebb50d build(bazel): adjust aio opensearch substitution with bazel paths
Now points to the bazel dist folder.
2022-11-22 13:51:19 -07:00
Derek Cormier 4cafb67e82 build(bazel): fix a bug where aio firebase utils tests could not link
deps

ts-node doesn't appear to use the require patch
2022-11-22 13:51:19 -07:00
Derek Cormier 20b81d0647 build(bazel): run firebase deployment tests under bazel
The deployment is still run from a yarn script.
2022-11-22 13:51:19 -07:00
Derek Cormier 3603b4dbf3 build(bazel): test aio pwa score under bazel
Refactored the a11y score tests to share the pattern of running an http
server alongside a test script.
2022-11-22 13:51:19 -07:00
Derek Cormier 79554b7a39 build(bazel): run aio a11y tests under bazel
Wrap existsing scripts under bazel and write a new script
to spin up an http server on an unused port.
2022-11-22 13:51:19 -07:00
Derek Cormier 6fb3b6f5ba build(bazel): post-rebase fixes for aio bazel build
Updated cli source snapshot and had to fix up lockfile.
2022-11-22 13:51:19 -07:00
Derek Cormier 8062e7113f build(bazel): run aio firebase redirect tests under bazel
Adjust to run under ci.
2022-11-22 13:51:19 -07:00
Derek Cormier 7b5e073a70 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:19 -07:00
Derek Cormier e20bfda83d build(bazel): Fix a bug where the aio build artifact didn't include assets.
Copy the applicaiton sources to the bin dir in order to find the generated relative asset paths.
2022-11-22 13:51:19 -07:00
Derek Cormier adffd3fdf7 build(bazel): build aio 404 page under bazel
The legacy build injected this file into the dist folder, however that's
not possible under bazel so files are copied to a new directory.
2022-11-22 13:51:19 -07:00
Derek Cormier d9a29e426a build(bazel): clean up manual build contents for aio example deps
This avoids the need to depend on "node_modules" and "node_modules/.bin"
separately.
2022-11-22 13:51:19 -07:00
Derek Cormier 3f92ea57ea build(bazel): fix a failing example e2e test that failed to find the
shadow root

This broke after using the chrome version provided by dev-infra.
2022-11-22 13:51:19 -07:00
Derek Cormier fa92cf055d build(bazel): fix some aio linting errors
Surfaced by modifying ci to include aio targets
2022-11-22 13:51:19 -07:00
Derek Cormier 4aab63f31e build(bazel): add aio targets to ci
This is a first pass. There is more work to do on package.json, adding
more test targets under bazel, and revising documentation.
2022-11-22 13:51:19 -07:00
Derek Cormier 8d24a91c6a 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:19 -07:00
Derek Cormier a36034a135 build(bazel): stamp targets to build, test, and serve aio against
first party deps

Architect is not compatible with disabling the rules_nodejs linker so
these targets must use npm_link to link first party deps
2022-11-22 13:51:19 -07:00
Derek Cormier 12855f3805 build(bazel): incrementally run aio example e2e tests
Replaces the workflow where all example e2es are run at once
2022-11-22 13:51:19 -07:00
Derek Cormier f62339d1d1 build(bazel): remove rules_nodejs patch
This patch was added to remove an unnecessary wrapper script around
nodejs binaries which prevented running esm scripts when the linker
was disabled.
2022-11-22 13:51:19 -07:00
Derek Cormier d7eb429430 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:19 -07:00
Derek Cormier 3d6315e6e8 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:19 -07:00
Derek Cormier 5ece26a6dc 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:19 -07:00
Derek Cormier 1dc641ea30 build(bazel): fix bazel aio regressions after rebase
The aio-bazel-migration branch was rebased onto main to include runfiles
support on windows.
2022-11-22 13:51:19 -07:00
Derek Cormier 592eadd7c3 build(bazel): run aio app tests with bazel-provided chromium
Similar to the e2e protractor tests
2022-11-22 13:51:19 -07:00
Derek Cormier 216372316a build(bazel): run aio application e2e tests under bazel
Includes a postinstall fix for puppeteer so that chromium
can be run with protractor on osx under bazel
2022-11-22 13:51:19 -07:00
Derek Cormier 7cbedba3af build(bazel): create targets for aio example tooling tests
This replaces the boilerplate:test npm script
2022-11-22 13:51:19 -07:00
Derek Cormier 0b55b647aa build(bazel): create targets for aio docs tests
This replaces the docs-test npm script
2022-11-22 13:51:19 -07:00
Derek Cormier 75e623b179 build(bazel): add an aio fast serve target
This is equivalent to docs-watch in the legacy build.
2022-11-22 13:51:19 -07:00
Derek Cormier 472abd7944 build(bazel): generate aio stackblitz and example zips
Can be served by running bazel run //aio:serve
2022-11-22 13:51:19 -07:00
Derek Cormier 4ff8f27bad build(bazel): add a bazel aio serve target
This works with ibazel but is not highly incremental
2022-11-22 13:51:19 -07:00
Derek Cormier c9478f78a2 build(bazel): add bazel targets for aio doc generation
This is an incremental step to produce dgeni output with bazel. The
generated outputs are not yet used by other targets.
2022-11-22 13:51:19 -07:00
Bob Watson 8ab50a13d7 docs: fix broken link in v15 deprecations table (#48157)
PR Close #48157
2022-11-22 11:39:48 -08:00
Bob Watson f689250605 docs: add missing documentation setup instructions (#48174)
PR Close #48174
2022-11-22 11:39:25 -08:00
Wooshaah cfc224983f docs(forms): fix typos in removeValidators and hasValidator usage notes (#48144)
PR Close #48144
2022-11-22 11:39:03 -08:00
Andrew Scott ebcca47402 refactor(router): Update RouterOutlet to not read internal route property (#48112)
The `RouterOutlet` currently reads the `_futureSnapshot` of the Route.
However, by the time `activateWith` is called, this value is the same as
`snapshot` (https://github.com/angular/angular/blob/414b1b2d5ffe8eac33749bf472af7eafcf248dba/packages/router/src/operators/activate_routes.ts#L163-L205).

This change will make it easier for developers to fork the `RouterOutlet`
implementation if necessary without needing to modify any code.

PR Close #48112
2022-11-22 11:37:38 -08:00
Andrew Scott 11d916dcfd refactor(router): Remove unnecessary logic in enabledBlocking option (#48064)
The `initNavigated` flag is not necessary. The way `enabledBlocking`
works is by blocking any navigations from finishing until the
application has bootstrapped. The bootstrap is unblocked as soon as we
hit the `afterPreactivation` step. After that point,
`afterPreactivation` is always unblocked because the `bootstrapDone`
Subject is completed/stopped. There is no need for an additional
variable to track this information.

PR Close #48064
2022-11-22 11:36:14 -08:00
Andrew Scott d50fa6b79e test(router): Update flaky tests to consistently pass (#48176)
This commit makes several updates to the bootstrap tests of the Router.
The change that made the real difference was providing
`MockPlatformLocation`. Other changes include:

* using `async/await` instead of `done`
* not providing APP_BASE_HREF (recent router refactors made this unnecessary)
* using some functional guards to simplify some tests

PR Close #48176
2022-11-22 11:33:19 -08:00
Alan Agius d0631f8aa0 docs: fix dates in release guide (#48173)
A version always stays for about a year in LTS.

PR Close #48173
2022-11-22 11:32:01 -08:00
Kristiyan Kostadinov cc8b76ef7c fix(language-service): correctly handle host directive inputs/outputs (#48147)
Adds some logic to correctly handle hidden or aliased inputs/outputs in the language service.

Fixes #48102.

PR Close #48147
2022-11-22 09:47:49 -08:00
Nebojsa Cvetkovic fa5528fb5f fix(router): restore 'history.state' on popstate even if navigationId missing (#48033)
If `history.pushState()` or `history.replaceState()` were called manually without including the `navigationId` field the state was being incorrectly discarded - that logic was for maintaining the original behavior of `NavigationStart.restoredState`.

Improves on #28176, fully fixes #28108, see also #28954

PR Close #48033
2022-11-21 13:46:17 -08:00
Ikko Ashimine f612fce06f docs: fix typo in navigation.json (#48127)
documenation -> documentation
PR Close #48127
2022-11-21 13:45:51 -08:00
Andrew Scott 930af9dd26 fix(common): Fix MockPlatformLocation events and missing onPopState implementation (#48113)
The MockPlatformLocation forward, back, and historyGo methods should trigger a popstate event.
Additionally, these events should just be synchronous since that's what the majority of the major
browsers do. Lastly, onPopState should be implemented the same way as onHashChange.

PR Close #48113
2022-11-21 13:45:06 -08:00
Ivan Rodriguez 7e3dad1ad2 docs: fix typo in cli-builder.mf (#48129)
Replace `&commat;example/my-builder` with `@example/my-builder`
PR Close #48129
2022-11-21 13:44:42 -08:00
Joe Roxbury cf55aa031c docs(forms): add FormRecord class to API summary (#48136)
Add the missing FormRecord class to the
Reactive forms API summary which is located under Developer Guides ->
Forms -> Reactive Forms.

Fixes #47808

PR Close #48136
2022-11-21 13:44:17 -08:00
Alan Agius 079ec8c651 docs: add version 15 to active version (#48148)
With this change we update the releases docs to include version 15 as an active version and mark version 14 as an LTS.

Closes #48116

PR Close #48148
2022-11-21 13:43:45 -08:00
Andrew Scott 890feb9332 Revert "refactor(router): Remove promise catch and re-reject (#48067)" (#48135)
This reverts commit 07c9396824. This
change caused test failures (both unit and integration). Though the code
looks like it should be a no-op update, it's possible it affecting
something to do with microtasks, zoneJS, and change detection. More
investigation would need to be done into the exact nature of the
failures.

PR Close #48135
2022-11-21 09:24:00 -08:00
Andrew Scott a04c5387e5 Revert "Revert "refactor(router): Simplify router defaults by making the defaults Injectable" (#48121)" (#48135)
This reverts commit 57d9296802. The
original commit was not problematic and was mistakenly reverted.

PR Close #48135
2022-11-21 09:24:00 -08:00
Mikhail Savchuk bf724a257b docs: fix typo in image-directive.md (#48115)
PR Close #48115
2022-11-18 12:17:14 -08:00
Dylan Hunn e73f5e0cd8 Revert "refactor(router): Simplify router defaults by making the defaults Injectable" (#48121)
This reverts commit 18033d5ed2.

PR Close #48121
2022-11-18 12:16:17 -08:00
Greg Magolan a8c33bf931 fix(language-service): update packages/language-service/build.sh script to work with vscode-ng-language-service's new Bazel build (#48120)
Part of fix for angular/vscode-ng-language-service#1815

PR Close #48120
2022-11-18 10:21:05 -08:00
Bjarki 0c3389ecd9 docs: extract XSS security doc URL into a constant (#48082)
We plan to change the link in google3 to point to google3-specific
documentation. Replacing a single constant will make for a smaller and
more maintainable patch.

PR Close #48082
2022-11-17 13:21:16 -08:00
Volodymyr c06911b461 docs: Changed documentation for providers vs. viewProviders (#47281)
Content in ```<ng-content></ng-content>``` sees ```viewProviders``` from ```app-root```

PR Close #47281
2022-11-17 13:20:20 -08:00
Matthieu Riegler a12a120272 fix(forms): FormBuilder.group return right type with shorthand parameters. (#48084)
Extract AbstractControlOptions from type when used in shorthand parameters on FormBuilder.group

Fixes 48073

PR Close #48084
2022-11-17 11:04:54 -08:00
Andrew Scott 9baefd085f fix(router): Ensure renavigating in component init works with enabledBlocking (#48063)
The way to complete the `Subject` in a way that is able to be read on
the subject properties itself is to call `unsubscribe`:
https://github.com/ReactiveX/rxjs/blob/afac3d574323333572987e043adcd0f8d4cff546/src/internal/Subject.ts#L101-L104
This sets the `closed` property to `true` whereas `complete` does not.

fixes #48052

PR Close #48063
2022-11-17 11:01:14 -08:00
Andrew Scott 02b9d435d1 docs(router): Further document rawUrlTree (#48108)
Further document the rawUrlTree and how it's used internally in the Router.

PR Close #48108
2022-11-17 11:00:27 -08:00
Kristiyan Kostadinov b342e55509 fix(forms): don't mutate validators array (#47830)
Fixes that the `AbstractControl` was mutating the validators arrays being passed into the constructor an helper methods like `setValidators`.

Fixes #47827.

PR Close #47830
2022-11-17 09:36:14 -08:00
Matthieu Riegler c7b1cc0f3c fix(devtools): prevent devTools to load when not text/html document (#48021)
On Firefox, Angular DevTools was breaking the XML display because of the script injected
Based on contentType, we won't inject that script anymore

Fixes #48017

PR Close #48021
2022-11-17 09:35:41 -08:00
Matthieu Riegler e4309d57d8 fix(router): correct type of nextState parameter in canDeactivate (#48038)
Correct type of nextState parameter in canDeactivate guard to indicate it's never undefined

Fixes #47153

PR Close #48038
2022-11-17 09:35:03 -08:00
Pawel Kozlowski b42ff8009c refactor(core): remove usage of the useCapture arg to the listener instruction (#48046)
The useCapture argument of the listener instruction was only
meaningful in the Renderer3 case. Since the Renderer3 code was
removed this argument has no use. Note that we can perform
additional cleanup and remove the useCapture argument from the
listener instruction (this would require change to the instruction
signature, though).

PR Close #48046
2022-11-17 09:34:30 -08:00
Pawel Kozlowski 455e359763 refactor(core): remove Renderer3-related cleanup code paths (#48046)
Renderer3 had to store reference to the listener function in order to
properly cleanup event listeners. Since the Renderer3 abstraction was
removed the corresponding code path is no longer needed (Renderer2
returns a cleanup function that can be called directly).

PR Close #48046
2022-11-17 09:34:30 -08:00
George Kalpakas 5a72929d09 build(docs-infra): upgrade cli command docs sources to aa7d3b377 (#48077)
Updating [angular#15.0.x](https://github.com/angular/angular/tree/15.0.x) from
[cli-builds#15.0.x](https://github.com/angular/cli-builds/tree/15.0.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/50d813140...aa7d3b377):

**Modified**
- help/build.json

PR Close #48077
2022-11-17 09:31:19 -08:00
Angular Robot 2e5039bb95 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
Andrew Scott 371871a077 refactor(router): Simplify router defaults by making the defaults Injectable (#48022)
The router has several default strategy implementations that are either
assigned via `new XStrategy()` property assignements or via the factory
function for the `Router` itself. These can be simplified by providing
the default implementation in the strategy `Injectable`. Custom
implementations can still override the defaults by specifying them in
the `providers` list.

Notably, this change also makes the `UrlHandlingStrategy` and
`RouteReuseStrategy` defaults injectable via DI rather than having to
indirectly grab them by going through the `Router` instance and
accessing the properties.

PR Close #48022
2022-11-17 09:25:40 -08:00
Andrew Scott 449512020a refactor(router): remove unused currentRawUrl property from transition (#48067)
The currentRawUrl property of the transition is no longer used after various refactorings in the code over
the past couple years

PR Close #48067
2022-11-17 09:25:05 -08:00
Andrew Scott b491668207 refactor(router): Remove promise catch and re-reject (#48067)
It is not clear what the intention of the promise catch and reject is. Potentially this is
legacy code built around some ZoneJs bug that doesn't exist anymore.

PR Close #48067
2022-11-17 09:25:05 -08:00
Bob Watson 2551c78cc5 docs: add info about v15 changes and update process (#48095)
PR Close #48095
2022-11-16 16:57:43 -08:00
Jessica Janiuk bc063b2f86 docs: Add v15 release blog post link to changelog (#48094)
PR Close #48094
2022-11-16 14:36:10 -08:00
Jessica Janiuk b79ad226b2 release: cut the v15.0.0 release 2022-11-16 09:43:27 -08:00
Jeremy Elbourn bc97322641 docs: add host directives guide (#48057)
PR Close #48057
2022-11-15 20:37:00 +00:00
Jessica Janiuk 4cfb06086b release: cut the v15.0.0-rc.4 release 2022-11-14 12:05:46 -08:00
Alan Agius 933d481a0e docs: remove version 12 from actively supported versions (#48041)
Version 12 is no longer in LTS.

PR Close #48041
2022-11-14 19:28:12 +00:00
ced edea15f2c6 fix(common): export the IMAGE_CONFIG token (#48051)
The token introduced in 4fde292bb5 was not exported publicly.

PR Close #48051
2022-11-14 19:27:17 +00:00
Andrew Kushnir a1b6610c3d test(common): add e2e tests for the fill mode checks in the NgOptimizedImage directive (#48036)
This commit adds extra e2e tests for the fill mode checks in the NgOptimizedImage directive to make
sure a warning is logged in a console.

PR Close #48036
2022-11-14 09:20:40 -08:00
Alex Castle 945432e3fa fix(common): Warn on fill ngOptimizedImage without height (#48036)
Add a warning if a fill-mode image is rendered without height. This is a common occurence if the user doesn't properly set the 'position' attribute of the parent element.

PR Close #48036
2022-11-14 09:20:40 -08:00
Alex Castle 629ebad8eb docs(common): Refine NgOptimizedImage docs (#48035)
Make several changes to the structure of the documentation, based on early feedback about the readability and usefulness of the docs.

PR Close #48035
2022-11-11 15:47:04 -08:00
Andrew Kushnir 154ca82f7b docs(core): add an error details page for unsafe <iframe> bindings (#48027)
PR Close #48027
2022-11-11 11:28:35 -08:00
Mujo Osmanovic 0c0550b536 docs(docs-infra): Fix typo in documentation for standalone components (#48026)
PR Close #48026
2022-11-11 08:48:36 -08:00
Alex Castle 449d29b701 fix(common): Add fetchpriority to ngOptimizedImage preloads (#48010)
Add fetchpriority='high' to ngOptimizedImage preloads to so their priority matches the priority of the image element itself

PR Close #48010
2022-11-10 17:36:40 +00:00
Andrew Kushnir 6a9b1e11c2 release: cut the v15.0.0-rc.3 release 2022-11-09 13:40:24 -08:00
Andrew Scott 6ab9f03baf docs(router): small adjustments to router docs (#48009)
* Update extractedUrl documentation to point to the correct extract method
* Remove authService.redirectUrl from tour of heroes (it's not used anywhere)

PR Close #48009
2022-11-09 10:56:40 -08:00
Alan Agius 37a25486cf fix(core): add zone.js version 0.12.x as a valid peer dependency (#48002)
This commit adds `zone.js` version `0.12.x` as a valid peer dependency

PR Close #48002
2022-11-09 09:54:12 -08:00
Andrew Kushnir 28f289b825 fix(core): hardening attribute and property binding rules for <iframe> elements (#47964)
This commit updates the logic related to the attribute and property binding rules for <iframe> elements. There is a set of <iframe> attributes that may affect the behavior of an iframe and this change enforces that these attributes are only applied as static attributes, making sure that they are taken into account while creating an <iframe>.

If Angular detects that some of the security-sensitive attributes are applied as an attribute or property binding, it throws an error message, which contains the name of an attribute that is causing the problem and the name of a Component where an iframe is located.

BREAKING CHANGE:

Existing iframe usages may have security-sensitive attributes applied as an attribute or property binding in a template or via host bindings in a directive. Such usages would require an update to ensure compliance with the new stricter rules around iframe bindings.

PR Close #47964
2022-11-09 00:47:57 -08:00
Angular Robot 54d0981871 build: update dependency google-closure-compiler to v20221102 (#47992)
See associated pull request for more information.

PR Close #47992
2022-11-08 12:39:21 -08:00
Andrew Scott 2efcc26bb6 docs(router): Update router docs to use guard functions instead of @Injectable (#47989)
This commit updates various router docs to use the functional style
guards instead of the `@Injectable` style.

PR Close #47989
2022-11-08 11:35:08 -08:00
Alex Castle a93a1a5759 docs(common): Merge two ngOptimizedImage docs into one (#47990)
Move the old image-directive-setup.md documentation page to be a section on the main image-directive.md docs page

PR Close #47990
2022-11-08 10:36:06 -08:00
Dylan Hunn ae29f98c20 fix(forms): Runtime error pages must begin with leading zero (#47991)
I recently checked in a new error guide. The corresponding page must have a leading zero because it is a runtime error. Otherwise links to this error guide will be invalid.

PR Close #47991
2022-11-08 10:35:09 -08:00
Andrew Scott 02918c9b5a test(router): Move test for redirect under correct describe block (#47993)
This moves a redirect test to be grouped with other redirect tests.

PR Close #47993
2022-11-08 10:34:23 -08:00
Dylan Hunn 2625dc1312 fix(forms): Improve a very commonly viewed error message by adding a guide. (#47969)
[A Github issue](https://github.com/angular/angular/issues/43821) about an arcane-sounding Forms error is one of the repo's top-ten most visited pages. This converts the error to `RuntimeErrorCode` and adds a dedicated guide to explain how to solve it.

PR Close #47969
2022-11-07 16:00:06 -08:00
Kristiyan Kostadinov 3e490fab1b refactor(core): remove duplicate createRenderer call (#47981)
Fixes that we were calling `createRenderer` even though we had one already. This likely wasn't a performance issue since the renderer factory caches the renderer, but it's still better to reuse it to avoid confusion in the future.

Fixes #47980.

PR Close #47981
2022-11-07 12:33:26 -08:00
Matthieu Riegler 76b64f659c refactor(router): Simplify routerLink selector (#47941)
Since the merge of `RouterLinkWithHref` into `RouterLink` there is no need for a complex selector.

PR Close #47941
2022-11-07 12:32:43 -08:00
Andrew Scott fb7318cb86 refactor(router): Remove code to support relativeLinkResolution (#47933)
The public API for enabling this option has already been removed. This change
updates the internal Router code to not include any logic to support it.

PR Close #47933
2022-11-07 09:26:19 -08:00
Paul Gschwendtner 08ee9b4b26 build: update ng-dev configuration to account for caretaker note label change (#47987)
The caretaker note label has been renamed to the new standardized label
name. This commit updates the ng-dev caretaker check configuration to
account for this.

Also the merge assistance queue query is updated to only show PRs marked
as ready for merge. Other PRs with just a caretaker note should not be
of interest for the caretaker yet.

PR Close #47987
2022-11-07 09:25:40 -08:00
Alan Agius 46c0576efe docs: update polyfills sections for version 15 (#47975)
This commit updates the polyfills section in the browsers support guide. The `polyfills.ts` is no longer generated in version 15+

PR Close #47975
2022-11-07 09:25:04 -08:00
Albert Szekely b8a6f7491b fix(router): fix redirectTo on named outlets - resolves #33783 (#47927)
fix(router): fix redirectTo on named outlets - resolves #33783

PR Close #47927
2022-11-04 09:30:32 -07:00
Andrew Scott 8f38bbaf26 refactor(router): Warn when provideRoutes is used without provideRouter (#47896)
Due to being only 1 letter away from `provideRouter`, it is quite
possible that developers may accidentally use `provideRoutes` rather
than `provideRouter` in the `boostrapApplication` function. This change
will warn developers when `provideRoutes` is used without the `Router`.

PR Close #47896
2022-11-04 09:29:24 -07:00
Andrew Scott 80dff09134 docs(router): deprecate provideRoutes function (#47896)
This function is too similar in name to the new `provideRouter` and can
lead to misconfiguring the router. The function itself is just a small
wrapper around `{provide: ROUTES, multi: true, useValue: routes}`. It is
rarely necessary to provide routes in this way. The harm `provideRoutes`
will cause due to being only 1 letter away from `provideRouter` vastly
outweighs the benefit of a slightly shorter provider.

PR Close #47896
2022-11-04 09:29:24 -07:00
Alex Rickabaugh e7b48da713 fix(http): rename withLegacyInterceptors to withInterceptorsFromDi (#47901)
This rename reflects what the function actually does. Although the intention
is still not to have two different interceptor mechanisms, that is now
communicated in the docs for the function instead of in its name.

Fixes #47764

PR Close #47901
2022-11-03 17:54:04 -07:00
Alex Rickabaugh fe0075bdea docs(http): add public API tags and jsdoc for provideHttpClient (#47901)
This commit adds documentation and API tagging for `provideHttpClient` and
the `with*` feature functions.

PR Close #47901
2022-11-03 17:54:03 -07:00
Doug Parker 1d02e6ad68 build: add --keep_going to components tests. (#47958)
This configures CI to run all the tests and report all the failures instead of aborting after the first one.

PR Close #47958
2022-11-03 17:52:40 -07:00
Alan Agius b4706cf3e8 docs: add searchKeywords in testing guide (#47953)
This is to push up the page in search results when searching for these terms.

Ex: currently when searching using the term `test` this page is displayed at the middle of the results.

PR Close #47953
2022-11-03 17:51:59 -07:00
Peter Scriven cc4f5e6663 docs: fix lint errors for change detection guides (#47952)
PR Close #47952
2022-11-03 17:51:27 -07:00
Alan Agius f35c46a894 docs: remove CI testing setups (#47940)
This section is unnecessary given that all is needed for the user is to run `ng test`, and is also tricky to maintain (Node was hard coded to v14 still).

We have no mechanism of testing or verifying these setups, and we have no motivation to do so.

Users should see their CI providers documentation Any preconfigured Node setup is going to suggest `ng test`, which should "just work" for Angular.

PR Close #47940
2022-11-03 17:50:52 -07:00
Alan Agius f9888d928e docs: update testing document to include karma config (#47940)
In version 15, the Angular CLI will no longer generate a `karma.conf.js` by default.

This commit updates the testing document to include an example of how to include a custom `karma.conf.js`.  Also, we update several parts of the documentation which were outdated.

PR Close #47940
2022-11-03 17:50:51 -07:00
Andrew Kushnir c097c5fbcb refactor(common): improve the NgOptimizedImage error message related to changing inputs (#47926)
This commit updates the error message thrown by the NgOptimizedImage directive, when it detects a situation
when inputs change after initial rendering.

The list of inputs was also updated to include all inputs added recently.

PR Close #47926
2022-11-03 17:50:22 -07:00
Alan Agius a016508768 docs: remove redirects to no longer existing page (#47929)
This redirect is broken as this page no longer exists.

PR Close #47929
2022-11-03 17:47:55 -07:00
Markus Eckstein 164a1713d5 docs: fix missing word (#47876)
PR Close #47876
2022-11-03 17:47:28 -07:00
Alan Agius 604d89eef9 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
Alan Agius 83cec3de51 docs: update analytics gathering documentation (#47840)
Currently there are 3 pages for analytics gathering information. Most of the information is duplicate.

With this change we remove the duplicate pages and outdated content to reflect the changes in version 15.

PR Close #47840
2022-11-03 17:45:35 -07:00
abergquist 7a33d395b3 docs: made code appear better, etc. (#47336)
Made code appear better and resolved some minor grammatical opportunities/issues.
PR Close #47336
2022-11-03 17:44:57 -07:00
Andrew Kushnir 8a19bc63ea release: cut the v15.0.0-rc.2 release 2022-11-03 17:32:10 -07:00
Andrew Kushnir 173dde7681 Revert "fix(core): hardening rules related to the attribute order on iframe elements (#47935)" (#47961)
This reverts commit d4b3c0b47c.

PR Close #47961
2022-11-03 17:03:43 -07:00
Andrew Kushnir d4b3c0b47c fix(core): hardening rules related to the attribute order on iframe elements (#47935)
This commit updates the logic related to the attribute order on iframes and makes the rules more strict. There is a set of iframe attributes that may affect the behavior of an iframe, this change enforces that these attributes are applied before an `src` or `srcdoc` attributes are applied to an iframe, so that they are taken into account.

If Angular detects that some of the attributes are set after the `src` or `srcdoc`, it throws an error message, which contains the name of ann attribute that is causing the problem and the name of a Component where an iframe is located. In most cases, it should be enough to change the order of attributes in a template to move the `src` or `srcdoc` ones to the very end.

BREAKING CHANGE:

Existing iframe usages may have `src` or `srcdoc` preceding other attributes. Such usages may need to be updated to ensure compliance with the new stricter rules around iframe bindings.

PR Close #47935
2022-11-02 07:23:42 -07:00
mgechev e63574774e docs: update roadmap as of q4 2022 (#47910)
PR Close #47910
2022-11-01 04:46:49 -07:00
Kristiyan Kostadinov d5cd79f885 perf(platform-browser): resolve memory leak when using animations with shadow DOM (#47903)
`AnimationRendererFactory` maintains a map between a renderer delegate and the animations renderer it corresponds to, but the renderers are never removed from the map. This leads to memory leaks when used with the `ShadowDom` view encapsulation, because the specific renderer keeps a references to its shadow root which in turn references all the elements in the view.

These changes resolve the leak by clearing the reference when the animations renderer is destroyed.

Fixes #47892.

PR Close #47903
2022-11-01 04:46:09 -07:00
Alex Rickabaugh e683298be6 docs(core): update standalone docs for provideRouter (#47902)
This commit updates the standalone components guide on AIO to showcase the
new `provideRouter` API. Previously the guide demonstrated configuring the
router via `importProvidersFrom(RouterModule.forRoot(...))`. A new section
was added to ensure `importProvidersFrom` was still shown in an example.

PR Close #47902
2022-11-01 04:45:20 -07:00
Paul Gschwendtner 99597c8c57 refactor(bazel): enable typescript strictness flags for package (#47893)
No longer maintains a separate tsconfig for the Bazel package. This
seems to be a legacy artifact back when ngc-wrapped was put into GitHub.

We now use the canonical repository Bazel tsconfig. This commit also
fixes all strictness-related errors and makes ngc-wrapped compatible.

PR Close #47893
2022-11-01 04:44:29 -07:00
Paul Gschwendtner f99cc40c5d refactor(compiler-cli): update emit signature to support for strongly typed emitCallback (#47893)
Currently `ngc-wrapped` mostly relies on any casts/or disabled
strictness checks to be able to use `tsickle`'s emit callback and
emit result merging for ngtsc. We should change this so that supertypes
of `ts.EmitResult` can be used in these optional callbacks- allowing us
to enable strictness checks in `packages/bazel/...` too.

PR Close #47893
2022-11-01 04:44:29 -07:00
Virginia Dooley 623602fc3a docs: Linting corrections. Restructuring or rewording sentences to be shorter and clearer. (#47897)
PR Close #47897
2022-10-28 02:37:47 -07:00
Alan Agius b3ea67e8a7 docs: improve grammer in CLI command template (#47891)
Before
```
This command has the following commands:
```

Now
```
This command has the following sub-commands:
```

PR Close #47891
2022-10-28 02:29:08 -07:00
Alan Agius 31a7ce1268 fix(platform-server): call onSerialize when state is empty (#47888)
Commit https://github.com/angular/angular/commit/a0b2d364156eed0d33831c37b00ea5c58ff4bbec#diff-3975e0ee5aa3e06ecbcd76f5fa5134612f7fd2e6802ca7d370973bd410aab55cR25-R31 changed the serialization phase logic so
that when the state is empty the script tag is not added to the document. As a side effect, this caused the `toJson` not called which caused the `onSerialize` callbacks also not to be called.
These callbacks are used to provide the value for a key when `toJson` is called. Example: https://github.com/ngrx/platform/issues/101#issuecomment-351998548

Closes #47172

PR Close #47888
2022-10-28 02:27:57 -07:00
Charles Lyding c7bc47c509 docs: update CLI related deprecation information (#47885)
There are no new CLI related deprecations for v15. However, multiple
features listed in the deprecation guide have since been removed and
are now also removed from the relevant sections of the guide.

PR Close #47885
2022-10-27 18:03:16 +02:00
Pawel Kozlowski 96c0e42e61 fix(core): allow readonly arrays for standalone imports (#47851)
Standalone components should support readonly arrays in the
`@Component.imports`.

Fixes #47643

PR Close #47851
2022-10-27 09:29:24 +02:00
Pawel Kozlowski f24da6baad release: cut the v15.0.0-rc.1 release 2022-10-26 20:34:19 +02:00
Andrew Scott ea7ff35b30 Revert "build: add atscott to unavailable list for pullapprove (#47658)" (#47877)
This reverts commit cf88a3ce20.

PR Close #47877
2022-10-26 19:00:55 +02:00
George Kalpakas 603194ee20 build(docs-infra): upgrade cli command docs sources to 50d813140 (#47870)
Updating [angular#15.0.x](https://github.com/angular/angular/tree/15.0.x) from
[cli-builds#15.0.x](https://github.com/angular/cli-builds/tree/15.0.x).

##
Relevant changes in
[commit range](https://github.com/angular/cli-builds/compare/46cb32b90...50d813140):

**Modified**
- help/analytics.json
- help/config.json

PR Close #47870
2022-10-26 17:35:02 +02:00
Angular Robot 5dadec56e6 build: update cross-repo angular dependencies (#47874)
See associated pull request for more information.

PR Close #47874
2022-10-26 16:33:21 +02:00
Angular Robot d75e3da429 build: update bazel setup to v5.7.0 (#47436)
See associated pull request for more information.

PR Close #47436
2022-10-26 15:43:20 +02:00
Angular Robot ebd2ddbbd1 build: update cross-repo angular dependencies (#47846)
See associated pull request for more information.

PR Close #47846
2022-10-26 14:12:24 +02:00
Angular Robot df36537bfd build: update babel dependencies (#47765)
See associated pull request for more information.

PR Close #47765
2022-10-25 21:57:13 +02:00
Angular Robot ed48887068 build: update cross-repo angular dependencies (#47871)
See associated pull request for more information.

PR Close #47871
2022-10-25 15:33:43 +02:00
Kristiyan Kostadinov 2908eba59c fix(platform-server): align server renderer interface with base renderer (#47868)
The `ServerRenderer` wasn't aligned with the `Renderer2` interface which meant that it was still referring to the old `debugInfo` parameters. It also wasn't implementing the `preserveContent` argument of `selectRootElement` which can lead to incosistencies between the server and the client.

Fixes #47844.

PR Close #47868
2022-10-25 14:51:46 +02:00
Alan Agius a8ce8f7fc4 docs: update typescript configuration (#47842)
This commits update the TypeScript configuration for the updated version 15 release.

PR Close #47842
2022-10-25 10:29:37 +02:00
Alan Agius 66eb1425e2 docs: update configuring browser compatibility (#47842)
This commits adds more information about why and how Browserslist is used in the Angular CLI.

PR Close #47842
2022-10-25 10:29:37 +02:00
Alan Agius 61f8522410 docs: update projects file structure (#47841)
With this change we update the file structure to reflect that of new projects in version 15.

PR Close #47841
2022-10-25 10:28:32 +02:00
Pawel Kozlowski c0903acbd4 Revert "fix(forms): don't mutate validators array (#47830)" (#47845)
This reverts commit 0329c13e95.

PR Close #47845
2022-10-25 10:05:18 +02:00
vyom1611 588cd3ed50 docs: removing http-server section in Service worker tour (#47613)
- Based on issue #47583
- Updated docs for Service workers by removing the section which used http-server to use service workers with ng serve
- By changelog of v14.2.0, service workers become compatible with ng serve using feature #23679

PR Close #47613
2022-10-24 15:42:57 +02:00
Kristiyan Kostadinov a99d9d67f3 fix(forms): don't mutate validators array (#47830)
Fixes that the `AbstractControl` was mutating the validators arrays being passed into the constructor an helper methods like `setValidators`.

Fixes #47827.

PR Close #47830
2022-10-24 14:12:56 +02:00
Paul Gschwendtner 6471eafde6 build: update recommended launch vscode config to use proper bazel dist path (#47831)
As of Bazel v5, the `bazel-out` symlink no longer exists. This commit
corrects the path in the VSCode recommended launch configuration. This
helps speed up this launch configuration given less files having to be
explored.

PR Close #47831
2022-10-24 10:42:22 +02:00
onrails d1840419d1 docs: fixing copy inconsistencies in schematics description (#47453)
I fixed inconsistent spelling and formatting and replaced a dead link to clarity design system starter.

docs(schematics): revert a change in schematic usage pronoun

docs: parentheses removal from schematic generation description
Co-Authored-By: Bob Watson <104218420+bob-watson@users.noreply.github.com>

PR Close #47453
2022-10-24 10:41:48 +02:00
WD Snoeijer a014ca1760 docs: fix linter errors in user-input.md (#47832)
PR Close #47832
2022-10-21 19:14:01 +02:00
Balaji fb273f6461 docs: fix minor typo in hierarchical-dependency-injection.md (#47812)
Small Typo change 
- renamed oh to or in https://angular.io/guide/hierarchical-dependency-injection#skipself-and-viewproviders
PR Close #47812
2022-10-21 17:33:12 +02:00
Alex Castle 3a18398d83 fix(common): Don't warn about image distortion is fill mode is enabled (#47824)
The image distortion warning (when rendered aspect ratio is noticeably different than intrinsic) doesn't make sense with fill mode, where the user may want the image to stretch, crop or letterbox.

PR Close #47824
2022-10-20 16:50:02 -07:00
Dylan Hunn 44c1770fc9 release: cut the v15.0.0-rc.0 release 2022-10-19 23:53:31 +02:00
Andrew Scott 79e9e8ab77 fix(router): Delay router scroll event until navigated components have rendered (#47563)
Currently, the scroll event is fired immediately after the
`NavigationEnd`. However, this is problematic because a change detection
has not been able to run, meaning that Angular will not yet have run the update
block of the component templates being rendered as part of the navigation.

This change delays the scroll event using a `setTimeout`, which will
allow Angular's change detection to run before the scroll restoration is
performed.

fixes #24547

PR Close #47563
2022-10-19 23:11:18 +02:00
Andrew Kushnir 3d5df576d1 docs: exclude lifecycle hooks of the NgOptimizedImage from docs (#47814)
This commit adds the `@nodoc` annotations to the lifecycle hooks of the `NgOptimizedImage` directive to exclude them from the docs.

PR Close #47814
2022-10-19 23:08:53 +02:00
Andrew Kushnir 074b794c50 fix(docs-infra): display "developer preview" label on class members (#47814)
This commit adds the "developer preview" label for class properties and methods.

PR Close #47814
2022-10-19 23:08:52 +02:00
Alex Castle 4f52d4e474 fix(common): don't generate srcset if noopImageLoader is used (#47804)
Do not generate a srcset if the loader being used is the default noopImageLoader. This loader does not take width into account, so it does not make sense to use it with srcsets.

PR Close #47804
2022-10-19 23:08:02 +02:00
WD Snoeijer 716352c1b0 docs: fix linter errors for accessibility.md (#47725)
PR Close #47725
2022-10-19 20:13:54 +02:00
Andrew Kushnir 6e19a12f6d docs: declare NgOptimizedImage APIs as stable (#47794)
In v14.2, we've introduced a new directive to help developers to configure images for better performance. The directive was initially released in the "developer preview" mode. We've collected the feedback, made several improvements and we are happy to announce that the NgOptimizedImage APIs are promoted to stable!

This commit updates vast majority of APIs to drop the `@developerPreview` label, which effectively documents them as stable.

There are few APIs though that retained the `@developerPreview` annotations:
- the `IMAGE_CONFIG` token
- the `ImageConfig` type
- the `fill` @Input of the directive

We plan to collect some additional feedback for the mentioned APIs and drop the `@developerPreview` annotation after that.

PR Close #47794
2022-10-19 20:13:13 +02:00
urugator 5d3bae283c docs(router): fix misleading description of BaseRouteReuseStrategy (#47786)
The original description gave a false impression that only query params and fragment changes are ignored, while actually `routeParams` changes are ignored as well.
PR Close #47786
2022-10-19 20:12:24 +02:00
Virginia Dooley 6476f158aa docs: Linting suggested corrections made. Restructuring or rewording sentences to be shorter and clearer. (#47790)
PR Close #47790
2022-10-19 20:10:56 +02:00
Kara Erickson 420d6b3054 docs(common): update image directive docs (#47796)
This is a small commit to:
- clarify that loaders aren't mandatory
- remove outdated preconnect option from docs
- clarify how width/height should be set for fixed size images
- minor structural changes for clarity

PR Close #47796
2022-10-19 15:25:14 +02:00
Virginia Dooley c2c96639e2 docs: Linting suggested corrections made. Restructuring or rewording sentences to be shorter and clearer. Inserted an introductory paragraph under level 1 heading. (#47788)
PR Close #47788
2022-10-19 15:24:12 +02:00
Kara Erickson fa4798095e fix(common): update size error to mention 'fill' mode (#47797)
The current error that is thrown when the "width" or
"height" attributes is missing doesn't mention that
"fill" mode is another option. This commit updates
the error with that option.

PR Close #47797
2022-10-19 15:23:38 +02:00
Andrew Kushnir 6f1a4b8217 refactor(common): drop deprecated selector from the NgOptimizedImage directive (#47798)
This commit updates the NgOptimizedImage directive to:
- drop a deprecated selector (the `rawSrc` one)
- drop corresponding input getter

The `rawSrc` was replaced by the `ngSrc` one during the developer preview phase.

PR Close #47798
2022-10-19 15:23:04 +02:00
Kara Erickson 23f210c0ab fix(common): warn if using supported CDN but not built-in loader (#47330)
This commit adds a missing warning if the image directive
detects that you're hosting your image on one of our
supported image CDNs but you're not using the built-in loader
for it. This excludes applications that are using a custom
loader.

PR Close #47330
2022-10-19 15:21:52 +02:00
Andrew Kushnir a2f41703d1 docs: declare Standalone APIs as stable (#47754)
In v14, we've introduced core concepts to allow Components, Directives and Pipes to configure their dependencies
 without the need to use NgModules and without the need to be declared in an NgModule. The concepts and initial
set of APIs were marked as "developer preview" to allow developers to use these APIs and share the feedback.

Since v14, we've been reviewing the entire API surface of the framework and either updating existing APIs to support standalone or creating new APIs that allowed to use Router, HttpClient and other abstractions without NgMod
ules.

Based on the mentioned work to review and stabilize APIs and also based on the positive feedback from the commun
ity, we are happy to announce that the Standalone APIs are promoted to stable!

This commit updates vast majority of standalone-related APIs to drop the `@developerPreview` label, which effect
ively documents then as stable.

Two APIs that retained the `@developerPreview` annotations are:
- withRequestsMadeViaParent (from `@angular/common/http`)
- renderApplication (from `@angular/platform-server`)

We plan to collect some additional feedback for the mentioned APIs and drop the `@developerPreview` annotation b
efore the next major release.

Co-Authored-By: Alex Rickabaugh <alx@alxandria.net>
Co-Authored-By: Andrew Scott <atscott@google.com>
Co-Authored-By: Dylan Hunn <dylhunn@gmail.com>
Co-Authored-By: Jessica Janiuk <jessicajaniuk@google.com>
Co-Authored-By: JoostK <joost.koehoorn@gmail.com>
Co-Authored-By: Kristiyan Kostadinov <crisbeto@abv.bg>
Co-Authored-By: Pawel Kozlowski <pkozlowski.opensource@gmail.com>

PR Close #47754
2022-10-17 12:15:21 +02:00
WD Snoeijer 4d61d8900d docs: fix linter errors for zone.md (#47707)
PR Close #47707
2022-10-17 12:14:45 +02:00
WD Snoeijer cf17a8096d docs: fix linter errors for web-worker.md (#47766)
PR Close #47766
2022-10-17 12:13:41 +02:00
Kristiyan Kostadinov 309b2cde51 fix(compiler-cli): implement more host directive validations as diagnostics (#47768)
Implements more of the runtime validations for host directives as compiler diagnostics so that they can be caught earlier. Also does some minor cleanup.

PR Close #47768
2022-10-17 12:12:22 +02:00
WD Snoeijer d366664007 docs: fix linter errors for view-encapsulation.md (#47772)
PR Close #47772
2022-10-17 12:11:54 +02:00
Paul Gschwendtner b9553882b8 test: update size golden for main bundle reduction (#47717)
The `main` bundle size has been reduced with the Angular CLI update.
This is not worth investigating as it's a positive side reduction likely
due to further optimizations in the Angular CLI devkit.

Also updates the other golden payload entries to capture all other CLI
related payload changes- making future payload update easier to
investigate.

PR Close #47717
2022-10-17 12:11:26 +02:00
Paul Gschwendtner 334a740ec0 build: run ng update for Angular CLI next (#47717)
Runs the Angular CLI v15 migrations for AIO.

PR Close #47717
2022-10-17 12:11:26 +02:00
Paul Gschwendtner 0a87176b74 build: update cross angular deps and lock dependencies (#47717)
Renovate no longer updated the dependencies because they were expanded
to a range. Ranges did not satisfy the `@next` tag anymore- so Renovate
did was not able to update.

This fixes the dependencies by locking them- and also updates the
versions according to our Renovate config.

PR Close #47717
2022-10-17 12:11:26 +02:00
Alan Agius b6fd814542 fix(localize): update ng add schematic to support Angular CLI version 15 (#47763)
Prior to this, the `@angular/localize/init` was added as a polyfill which caused the `@angular/localize` types not to be included in the TypeScript program which caused errors such as the below:

```
Error: src/app/app.component.ts:9:11 - error TS2304: Cannot find name '$localize'.
```

With the recent changes in the CLI (https://github.com/angular/angular-cli/pull/24032), adding `@angular/localize/init` as polyfil or in the `main.server.ts` is no longer necessary. Instead we add this as a TypeScript type. When users are running in JIT mode, we add `@angular/localize/init` as an additional entrypoint.

This change also exposes the `$localize` method as a global when importing `@angular/localize`.

Closes #47677

PR Close #47763
2022-10-17 09:58:21 +02:00
Charles Barnes 4c95484c0a docs(docs-infra): fix errors page hover styles (#47770)
fix hover styles for error messages to be consistent for dark theme

Fixes #47723

PR Close #47770
2022-10-17 09:57:47 +02:00
Paul Gschwendtner b6e9a50d22 build: update ng-dev to fix caretaker check and update label config (#47779)
* Updates ng-dev to support the new g3sync canonical JSON configs
* Updates the google-internal-tests option to support the g3 sync
  canonical JSON config
* Moves the YAML sync config to a dedicated JSON file, used by the
  action and by `yarn ng-dev`.
* Updates the ng-dev caretaker config to fix that the Merge assistance
  queue is always empty.

PR Close #47779
2022-10-17 09:57:17 +02:00
Charles Lyding 874f3fc4d3 refactor(compiler-cli): use mkdirSync recursive option instead of custom implementation (#47678)
The supported Node.js versions for the `@angular/compiler-cli` package (^14.15.0 || >=16.10.0)
allow for the use of the `recursive` option of `mkdirSync`.  Using the `recursive` option
removes the need to manually create each subdirectory in a given path.

PR Close #47678
2022-10-13 13:51:04 -07:00
abergquist 0457b58dfe docs: Separated HTML elements with blank lines (#47331)
Separated HTML elements with judicious use of space. It not only makes it easier to read the HTML; it also makes it consistent with the formatting of https://github.com/angular/angular/edit/main/aio/content/examples/what-is-angular/src/app/hello-world-bindings/hello-world-ngif.component.html.

PR Close #47331
2022-10-13 19:10:28 +00:00
Andrew Kushnir e13d97cf7e refactor(common): make provideHttpClient return EnvironmentProviders (#47758)
This commit updates the `provideHttpClient` function to return the `EnvironmentProviders` instead of a regular `Provider[]`, to make sure that the `provideHttpClient` can only be used where an environment is being setup.

PR Close #47758
2022-10-13 16:44:59 +00:00
Bob Watson 955edf2afd docs: update of documentation contrib. guide (#47381)
This update describes the content authoring and revision process in sufficient detail for technical and non-technical contributors to the angular.io documentation.

PR Close #47381
2022-10-13 16:37:26 +00:00
Paul Gschwendtner 1b48e65e89 build: wire up new github action for identifying g3-affecting PRs (#47735)
Wire up new github action for identifying g3-affecting PRs.

PR Close #47735
2022-10-13 09:43:43 +00:00
Jessica Janiuk 93cc5b2210 release: cut the v15.0.0-next.6 release 2022-10-12 11:38:19 -07:00
2777 changed files with 260163 additions and 363409 deletions
+12 -11
View File
@@ -11,29 +11,30 @@ aio/tools/examples/shared/node_modules
aio/tools/examples/shared/example-scaffold
# All integration test node_modules folders
integration/animations/node_modules
integration/cli-elements-universal/node_modules
integration/cli-hello-world/node_modules
integration/cli-hello-world-ivy-compat/node_modules
integration/cli-hello-world-ivy-i18n/node_modules
integration/cli-hello-world-ivy-minimal/node_modules
integration/cli-hello-world-lazy/node_modules
integration/cli-hello-world-mocha/node_modules
integration/cli-hello-world-ts-47/node_modules
integration/dynamic-compiler/node_modules
integration/forms/node_modules
integration/hello_world__closure/node_modules
integration/hello_world__systemjs_umd/node_modules
integration/i18n/node_modules
integration/injectable-def/node_modules
integration/ivy-i18n/node_modules
integration/ng-add-localize/node_modules
integration/trusted-types/node_modules
integration/forms/node_modules
integration/ng_elements/node_modules
integration/ng_elements_schematics/node_modules
integration/ng_update/node_modules
integration/ng_update_migrations/node_modules
integration/nodenext_resolution/node_modules
integration/npm_package_archives.bzl/node_modules
integration/ngcc/node_modules
integration/platform-server/node_modules
integration/service-worker-schema/node_modules
integration/side-effects/node_modules
integration/standalone-bootstrap/node_modules
integration/terser/node_modules
integration/trusted-types/node_modules
integration/typings_test_rxjs7/node_modules
integration/typings_test_ts49/node_modules
integration/typings_test_ts50/node_modules
integration/typings_test_ts51/node_modules
integration/typings_test_ts36/node_modules
integration/typings_test_ts37/node_modules
+5 -11
View File
@@ -1,10 +1,6 @@
# Enable debugging tests with --config=debug
test:debug --test_arg=--node_options=--inspect-brk --test_output=streamed --test_strategy=exclusive --test_timeout=9999 --nocache_test_results
# Do not attempt to de-flake locally.
# On CI we might set this to `3` to run with deflaking.
test --flaky_test_attempts=1
###############################
# Filesystem interactions #
###############################
@@ -112,10 +108,9 @@ build:remote --define=EXECUTOR=remote
# Set a higher timeout value, just in case.
build:remote --remote_timeout=600
# Bazel detects maximum number of jobs based on host resources.
# Since we run remotely, we can increase this number significantly.
common:remote --jobs=200
# Increase the default number of jobs by 50% because our build has lots of
# parallelism
build:remote --jobs=150
build:remote --google_default_credentials
# Limit the number of test jobs for on an AIO local deps build. The example tests running
@@ -139,10 +134,9 @@ build:remote --project_id=internal-200822
build:remote --remote_cache=remotebuildexecution.googleapis.com
build:remote --remote_executor=remotebuildexecution.googleapis.com
# Ensure that tags like "no-remote-exec" get propagated to actions created by rules,
# even if the rule implementation does not explicitly pass them to the execution requirements.
# Ensure that tags like "no-remote-exec" get propagated to actions created by rules.
# https://bazel.build/reference/command-line-reference#flag--experimental_allow_tags_propagation
common --experimental_allow_tags_propagation
build --experimental_allow_tags_propagation
# Disable network access in the sandbox by default. To enable network access
# for a particular target, use:
+1 -5
View File
@@ -6,11 +6,7 @@
build --announce_rc
# Retry in the event of flakes, eg. https://circleci.com/gh/angular/angular/31309
# By default this is set in the project `.bazelrc` to `1`.
test --flaky_test_attempts=3
test --flaky_test_attempts=2
# More details on failures
build --verbose_failures=true
# CI supports colors but Bazel does not detect it.
common --color=yes
+36 -24
View File
@@ -74,7 +74,7 @@ var_9: &only_release_branches
# https://circleci.com/developer/orbs.
orbs:
node: circleci/node@5.0.1
devinfra: angular/dev-infra@1.0.8
devinfra: angular/dev-infra@1.0.6
# Executor Definitions
# https://circleci.com/docs/2.0/reusing-config/#authoring-reusable-executors
@@ -89,7 +89,7 @@ executors:
type: string
default: medium
docker:
- image: cimg/node:16.14.0
- image: cimg/node:16.13.0
resource_class: << parameters.resource_class >>
working_directory: ~/ng
@@ -99,7 +99,7 @@ executors:
type: string
default: medium
docker:
- image: cimg/node:16.14.0-browsers
- image: cimg/node:16.13.0-browsers
resource_class: << parameters.resource_class >>
working_directory: ~/ng
@@ -150,7 +150,7 @@ commands:
name: Configure git
command: |
mkdir -p ~/.ssh
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCj7ndNxQowgcQnjshcLrqPEiiphnt+VTTvDP6mHBL9j1aNUkY4Ue1gvwnGLVlOhGeYrnZaMgRK6+PKCUXaDbC7qtbW8gIkhL7aGCsOr/C56SJMy/BCZfxd1nWzAOxSDPgVsmerOBYfNqltV9/hWCqBywINIR+5dIg6JTJ72pcEpEjcYgXkE2YEFXV1JHnsKgbLWNlhScqb2UmyRkQyytRLtL+38TGxkxCflmO+5Z8CSSNY7GidjMIZ7Q4zMjA2n1nGrlTDkzwDCsw+wqFPGQA179cnfGWOWRVruj16z6XyvxvjJwbz0wQZ75XK5tKSb7FNyeIEs4TT4jk+S4dhPeAUC5y+bDYirYgM4GC7uEnztnZyaVWQ7B381AK4Qdrwt51ZqExKbQpTUNn+EjqoTwvqNj4kqx5QUCI0ThS/YkOxJCXmPUWZbhjpCg56i+2aB6CmK2JGhn57K5mj0MNdBXA4/WnwH6XoPWJzK5Nyu2zB3nAZp+S5hpQs+p1vN1/wsjk=' >> ~/.ssh/known_hosts
echo 'github.com ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEAq2A7hRGmdnm9tUDbO9IDSwBK6TbQa+PXYPCPy6rbTrTtw7PHkccKrpp0yVhp5HdEIcKr6pLlVDBfOLX9QUsyCOV0wzfjIJNlGEYsdlLJizHhbn2mUjvSAHQqZETYP81eFzLQNnPHt4EVVUh7VfDESU84KezmD5QlWpXLmvU31/yMf+Se8xhHTvKSCZIFImWwoG6mbUoWf9nzpIoaSjB+weqqUUmpaaasXVal72J+UX2B+2RPW3RcT0eOzQgqlJL3RKrTJvdsjE3JEAvGq3lGHSZXy28G3skua2SmVi/w4yCE6gbODqnTWlg7+wC604ydGXA8VJiS5ap43JXiUFFAaQ==' >> ~/.ssh/known_hosts
git config --global url."ssh://git@github.com".insteadOf "https://github.com" || true
git config --global gc.auto 0 || true
@@ -249,6 +249,21 @@ jobs:
- ./ng
- ./bazel_repository_cache
lint:
executor: default-executor
steps:
- custom_attach_workspace
- init_environment
- run: yarn -s tslint
- run: yarn -s --cwd aio lint
- run: yarn -s ng-dev format changed $CI_GIT_BASE_REVISION --check
- run: yarn -s ts-circular-deps:check
- run: yarn -s ng-dev pullapprove verify
- run: yarn -s ng-dev ngbot verify
- run: yarn -s ng-dev commit-message validate-range $CI_GIT_BASE_REVISION $CI_GIT_REVISION
- run: yarn -s check-tooling-setup
test:
executor:
name: test-browser-executor
@@ -260,6 +275,7 @@ jobs:
steps:
- custom_attach_workspace
- init_environment
- install_java
- run:
# We need to explicitly specify the --symlink_prefix option because otherwise we would
# not be able to easily find the output bin directory when uploading artifacts for size
@@ -284,8 +300,6 @@ jobs:
- store_artifacts:
path: dist/bin/packages/core/test/bundling/todo/bundle.min.js.br
destination: core/todo/bundle.br
- notify_webhook_on_fail:
webhook_url_env_var: SLACK_REACTIVITY_CHANNEL_WEBHOOK_URL
# NOTE: This is currently limited to main builds only. See the `monitoring` configuration.
saucelabs:
@@ -295,21 +309,18 @@ jobs:
# container for this job. This is necessary because we launch a lot of browsers concurrently
# and therefore the tunnel and Karma need to process a lot of file requests and tests.
resource_class: xlarge
environment:
NUMBER_OF_PARALLEL_BROWSERS: 2
steps:
- custom_attach_workspace
- init_environment
- init_saucelabs_environment
- run:
name: Start Saucelabs daemon service
command: yarn bazel run //tools/saucelabs-daemon/background-service -- ${NUMBER_OF_PARALLEL_BROWSERS}
background: true
- run:
name: Run Bazel tests on Saucelabs
# See /tools/saucelabs/README.md for more info
command: |
yarn bazel run //tools/saucelabs:sauce_service_setup
TESTS=$(./node_modules/.bin/bazelisk query --output label '(kind(karma_web_test, ...) intersect attr("tags", "saucelabs", ...)) except attr("tags", "fixme-saucelabs", ...)')
yarn bazel test --config=saucelabs --jobs=${NUMBER_OF_PARALLEL_BROWSERS} ${TESTS}
yarn bazel test --config=saucelabs ${TESTS}
yarn bazel run //tools/saucelabs:sauce_service_stop
no_output_timeout: 40m
- notify_webhook_on_fail:
webhook_url_env_var: SLACK_DEV_INFRA_CI_FAILURES_WEBHOOK_URL
@@ -584,16 +595,22 @@ jobs:
executor: windows-executor
steps:
- checkout
- save_month_to_file
- capture_patches_for_cache_key
- init_environment
# Setup the proper NodeJS version. The image comes pre-installed with `nvm-windows`.
# Note: This happens immediately after checkout because environment initialization logic
# might rely on Node and shouldn't use the older image-provided NodeJS version.
- run:
name: Install NodeJS version from `.nvmrc`.
command: |
nvm on
nvm install $(cat .nvmrc)
nvm use $(cat .nvmrc)
- restore_cache:
keys:
- *cache_key_win
- *cache_key_win_fallback
- run:
name: Debug information for flakiness of Windows job
command: |
@@ -604,14 +621,6 @@ jobs:
echo "Path: $PATH"
yarn node -v
- save_month_to_file
- capture_patches_for_cache_key
- init_environment
- restore_cache:
keys:
- *cache_key_win
- *cache_key_win_fallback
# Install project dependencies, and install Bazelisk globally. This is necessary as
# Windows might error when `bazel` is invoked from the project node modules. The Bazel
# invocation might modify the symlinked project `node_modules` again, causing failures.
@@ -655,6 +664,9 @@ workflows:
filters:
branches:
ignore: g3
- lint:
requires:
- setup
- test:
requires:
- setup
+1 -1
View File
@@ -1,7 +1,7 @@
# Image metadata and config.
# Ideally, the Node.js version should match what we use on CI.
# See `executors > default-executor` in `.circleci/config.yml`.
FROM cimg/node:16.13-browsers
FROM cimg/node:14-browsers
LABEL name="Angular dev environment" \
+1 -1
View File
@@ -4,7 +4,7 @@ description: 'Installs the dependencies using Yarn'
runs:
using: 'composite'
steps:
- uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
- uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7 # tag=v3
with:
path: |
./node_modules/
+4 -2
View File
@@ -1,8 +1,8 @@
# Configuration for angular-robot
# options for the size plugin
#options for the size plugin
size:
disabled: true
disabled: false
maxSizeIncrease: 2000
circleCiStatusName: 'ci/circleci: test'
@@ -69,6 +69,8 @@ merge:
# list of PR statuses that need to be successful
requiredStatuses:
- 'ci/circleci: build'
- 'ci/circleci: lint'
- 'ci/angular: size'
- 'google-internal-tests'
- 'pullapprove'
+3 -3
View File
@@ -22,10 +22,10 @@ jobs:
(github.event.action == 'labeled' && github.event.label.name == 'aio: preview') ||
(github.event.action == 'synchronize' && contains(github.event.pull_request.labels.*.name, 'aio: preview'))
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
- uses: ./.github/actions/yarn-install
- uses: angular/dev-infra/github-actions/setup-bazel-remote-exec@97cb376945b07e37671e3b38ee727ff00dc1394b
- uses: angular/dev-infra/github-actions/setup-bazel-remote-exec@96fdaaa056f1cfa7ffbc4c69b7e9007279f76c94
with:
bazelrc: ./.bazelrc.user
@@ -34,7 +34,7 @@ jobs:
# the number of concurrent actions is determined based on the host resources.
- run: bazel build //aio:build --jobs=32 --announce_rc --verbose_failures
- uses: angular/dev-infra/github-actions/deploy-previews/pack-and-upload-artifact@97cb376945b07e37671e3b38ee727ff00dc1394b
- uses: angular/dev-infra/github-actions/deploy-previews/pack-and-upload-artifact@96fdaaa056f1cfa7ffbc4c69b7e9007279f76c94
with:
workflow-artifact-name: 'aio'
pull-number: '${{github.event.pull_request.number}}'
+2 -2
View File
@@ -25,7 +25,7 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3
- name: Configure Firebase deploy target
working-directory: aio/
@@ -34,7 +34,7 @@ jobs:
npx -y firebase-tools@latest target:clear --project ${{env.PREVIEW_PROJECT}} hosting aio
npx -y firebase-tools@latest target:apply --project ${{env.PREVIEW_PROJECT}} hosting aio ${{env.PREVIEW_SITE}}
- uses: angular/dev-infra/github-actions/deploy-previews/upload-artifacts-to-firebase@97cb376945b07e37671e3b38ee727ff00dc1394b
- uses: angular/dev-infra/github-actions/deploy-previews/upload-artifacts-to-firebase@96fdaaa056f1cfa7ffbc4c69b7e9007279f76c94
with:
github-token: '${{secrets.GITHUB_TOKEN}}'
workflow-artifact-name: 'aio'
@@ -13,9 +13,9 @@ jobs:
assistant_to_the_branch_manager:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
with:
persist-credentials: false
- uses: angular/dev-infra/github-actions/branch-manager@97cb376945b07e37671e3b38ee727ff00dc1394b
- uses: angular/dev-infra/github-actions/branch-manager@96fdaaa056f1cfa7ffbc4c69b7e9007279f76c94
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
-68
View File
@@ -1,68 +0,0 @@
name: Run benchmark comparison
on:
issue_comment:
types: [created]
permissions: read-all
jobs:
benchmark-compare:
runs-on: ubuntu-latest
if: ${{ github.event.issue.pull_request && startsWith(github.event.comment.body, '/benchmark-compare ')}}
steps:
- uses: TheModdingInquisition/actions-team-membership@a69636a92bc927f32c3910baac06bacc949c984c # v1.0
with:
team: 'team'
organization: angular
token: ${{secrets.BENCHMARK_COMPARE_MEMBERSHIP_GITHUB_TOKEN}}
exit: true
# Indicate that the benchmark command was received.
- uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3
with:
comment-id: ${{github.event.comment.id}}
token: '${{secrets.BENCHMARK_POST_RESULTS_GITHUB_TOKEN}}'
reactions: 'rocket'
- uses: alessbell/pull-request-comment-branch@aad01d65d6982b8eacabed5e9a684cd8ceb98da6 # v1.1
id: comment-branch
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
# Specify repository as the PR branch might be from a fork.
repository: ${{steps.comment-branch.outputs.head_owner}}/${{steps.comment-branch.outputs.head_repo}}
# Checkout the pull request and assume it being trusted given we've checked
# that the action was triggered by a team member.
ref: ${{steps.comment-branch.outputs.head_ref}}
- uses: ./.github/actions/yarn-install
- uses: angular/dev-infra/github-actions/setup-bazel-remote-exec@97cb376945b07e37671e3b38ee727ff00dc1394b
with:
bazelrc: ./.bazelrc.user
- name: Preparing benchmark for GitHub action
id: info
env:
# Untrusted input used in an executable code, must be wrapped as an env var to prevent injections
COMMENT_BODY: ${{ github.event.comment.body }}
run: yarn benchmarks prepare-for-github-action "$COMMENT_BODY"
- run: yarn benchmarks run-compare ${{steps.info.outputs.compareSha}} ${{steps.info.outputs.benchmarkTarget}}
id: benchmark
name: Running benchmark
- uses: peter-evans/create-or-update-comment@c6c9a1a66007646a28c153e2a8580a5bad27bcfa # v3
with:
issue-number: ${{github.event.issue.number}}
token: '${{secrets.BENCHMARK_POST_RESULTS_GITHUB_TOKEN}}'
body: |
## Benchmark Test Results
**Test**: `${{steps.info.outputs.benchmarkTarget}}`
### PR (${{steps.info.outputs.prHeadSha}})
${{steps.benchmark.outputs.workingStageResultsText}}
### Compare Ref (${{steps.info.outputs.compareSha}})
${{steps.benchmark.outputs.comparisonResultsText}}
-57
View File
@@ -1,57 +0,0 @@
name: CI
on:
push:
branches:
- main
- '[0-9]+.[0-9]+.x'
pull_request:
types: [opened, synchronize, reopened]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions: {}
defaults:
run:
shell: bash
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Initialize environment
uses: angular/dev-infra/github-actions/npm/checkout-and-setup-node@852c3d1898775ec9fbc87213e519f16e78805b57
with:
cache-node-modules: true
node-module-directories: |
./node_modules
./aio/node_modules
- name: Install node modules
run: yarn install --frozen-lockfile
- name: Install node modules in aio
run: yarn install --frozen-lockfile --cwd aio
- name: Check code lint
run: yarn -s tslint
- name: Check code lint in aio
run: yarn -s --cwd aio lint
- name: Check for circular dependencies
run: yarn -s ts-circular-deps:check
- name: Validate pull approve configuration
run: yarn -s ng-dev pullapprove verify
- name: Validate angular robot configuration
run: yarn -s ng-dev ngbot verify
- name: Confirm code builds with typescript as expected
run: yarn -s check-tooling-setup
- name: Check commit message
# Commit message validation is only done on pull requests as its too late to validate once
# it has been merged.
if: github.event_name == 'pull_request'
run: yarn ng-dev commit-message validate-range ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
- name: Check code format
# Code formatting checks are only done on pull requests as its too late to validate once
# it has been merged.
if: github.event_name == 'pull_request'
run: yarn ng-dev format changed --check ${{ github.event.pull_request.base.sha }}
+4 -4
View File
@@ -12,14 +12,14 @@ jobs:
labels:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: angular/dev-infra/github-actions/commit-message-based-labels@97cb376945b07e37671e3b38ee727ff00dc1394b
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
- uses: angular/dev-infra/github-actions/commit-message-based-labels@96fdaaa056f1cfa7ffbc4c69b7e9007279f76c94
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
post_approval_changes:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: angular/dev-infra/github-actions/post-approval-changes@97cb376945b07e37671e3b38ee727ff00dc1394b
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
- uses: angular/dev-infra/github-actions/post-approval-changes@96fdaaa056f1cfa7ffbc4c69b7e9007279f76c94
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+1 -1
View File
@@ -14,6 +14,6 @@ jobs:
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/feature-request@97cb376945b07e37671e3b38ee727ff00dc1394b
- uses: angular/dev-infra/github-actions/feature-request@96fdaaa056f1cfa7ffbc4c69b7e9007279f76c94
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+3 -3
View File
@@ -12,9 +12,9 @@ jobs:
trigger:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
- uses: angular/dev-infra/github-actions/google-internal-tests@97cb376945b07e37671e3b38ee727ff00dc1394b
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
- uses: angular/dev-infra/github-actions/google-internal-tests@96fdaaa056f1cfa7ffbc4c69b7e9007279f76c94
with:
run-tests-guide-url: http://go/angular-g3sync-start
run-tests-guide-url: http://go/angular/g3sync
github-token: ${{ secrets.GITHUB_TOKEN }}
sync-config: ./.ng-dev/google-sync-config.json
+19
View File
@@ -0,0 +1,19 @@
name: Lock closed inactive issues
on:
schedule:
# Run at 16:00 every day
- cron: '0 16 * * *'
# Declare default permissions as read only.
permissions:
contents: read
jobs:
lock_closed:
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/lock-closed@96fdaaa056f1cfa7ffbc4c69b7e9007279f76c94
with:
lock-bot-key: ${{ secrets.LOCK_BOT_PRIVATE_KEY }}
+1 -1
View File
@@ -9,6 +9,6 @@ jobs:
status:
runs-on: ubuntu-latest
steps:
- uses: angular/dev-infra/github-actions/unified-status-check@97cb376945b07e37671e3b38ee727ff00dc1394b
- uses: angular/dev-infra/github-actions/unified-status-check@f1e8862e5034f046cc0bc66641d37f5b36d3e9b5
with:
angular-robot-key: ${{ secrets.ANGULAR_ROBOT_PRIVATE_KEY }}
+4 -4
View File
@@ -25,12 +25,12 @@ jobs:
steps:
- name: 'Checkout code'
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
with:
persist-credentials: false
- name: 'Run analysis'
uses: ossf/scorecard-action@08b4669551908b1024bb425080c797723083c031 # v2.2.0
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # tag=v2.0.6
with:
results_file: results.sarif
results_format: sarif
@@ -39,7 +39,7 @@ jobs:
# Upload the results as artifacts.
- name: 'Upload artifact'
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3.1.2
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # tag=v3.1.1
with:
name: SARIF file
path: results.sarif
@@ -47,6 +47,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@46ed16ded91731b2df79a2893d3aea8e9f03b5c4 # v2.20.3
uses: github/codeql-action/upload-sarif@b2a92eb56d8cb930006a1c6ed86b0782dd8a4297 # tag=v2.1.35
with:
sarif_file: results.sarif
-44
View File
@@ -1,44 +0,0 @@
name: Update AIO Angular CLI help
on:
workflow_dispatch:
inputs: {}
push:
branches:
- 'main'
- '[0-9]+.[0-9]+.x'
# Declare default permissions as read only.
permissions:
contents: read
jobs:
update_cli_help:
name: Update Angular CLI help (if necessary)
if: github.repository == 'angular/angular'
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
# an authenticated URL.
persist-credentials: false
# This is needed as otherwise the PR creation will fail with `shallow update not allowed` when the forked branch is not in sync.
fetch-depth: 0
- name: Generate CLI help
run: node aio/scripts/update-cli-help/index.mjs
env:
ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN: ${{ secrets.ANGULAR_CLI_BUILDS_READONLY_GITHUB_TOKEN }}
- name: Create a PR (if necessary)
uses: angular/dev-infra/github-actions/create-pr-for-changes@97cb376945b07e37671e3b38ee727ff00dc1394b
with:
branch-prefix: update-cli-help
pr-title: 'docs: update Angular CLI help [${{github.ref_name}}]'
pr-description: |
Updated Angular CLI help contents.
pr-labels: |
action: review
area: docs
angular-robot-token: ${{ secrets.ANGULAR_ROBOT_ACCESS_TOKEN }}
+2 -4
View File
@@ -24,18 +24,16 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout the repository
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3.5.3
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # tag=v3.1.0
with:
# Setting `persist-credentials: false` prevents the github-action account from being the
# account that is attempted to be used for authentication, instead the remote is set to
# an authenticated URL.
persist-credentials: false
# This is needed as otherwise the PR creation will fail with `shallow update not allowed` when the forked branch is not in sync.
fetch-depth: 0
- name: Generate `events.json`
run: node aio/scripts/generate-events/index.mjs --ignore-invalid-dates
- name: Create a PR (if necessary)
uses: angular/dev-infra/github-actions/create-pr-for-changes@97cb376945b07e37671e3b38ee727ff00dc1394b
uses: angular/dev-infra/github-actions/create-pr-for-changes@96fdaaa056f1cfa7ffbc4c69b7e9007279f76c94
with:
branch-prefix: docs-update-events
pr-title: 'docs: update events'
+1 -1
View File
@@ -14,7 +14,7 @@ export const caretaker: CaretakerConfig = {
},
{
name: 'Initial Triage Queue',
query: `is:open no:milestone -draft:true`,
query: `is:open no:milestone`,
},
],
caretakerGroup: 'angular-caretaker',
+3
View File
@@ -25,10 +25,13 @@ export const commitMessage: CommitMessageConfig = {
'language-service',
'localize',
'migrations',
'ngcc',
'packaging',
'platform-browser',
'platform-browser-dynamic',
'platform-server',
'platform-webworker',
'platform-webworker-dynamic',
'router',
'service-worker',
'upgrade',
+2
View File
@@ -11,7 +11,9 @@
"packages/bazel/src/protractor/**",
"packages/bazel/src/schematics/**",
"packages/bazel/src/types_bundle/**",
"packages/compiler-cli/src/ngcc/**",
"packages/compiler-cli/linker/**",
"packages/compiler-cli/ngcc/**",
"packages/compiler-cli/src/ngtsc/sourcemaps/**",
"packages/compiler-cli/src/ngtsc/testing/**",
"packages/compiler-cli/private/bazel.ts",
+1
View File
@@ -6,6 +6,7 @@ export const release: ReleaseConfig = {
representativeNpmPackage: '@angular/core',
npmPackages: [
{name: '@angular/animations'},
{name: '@angular/bazel'},
{name: '@angular/common'},
{name: '@angular/compiler'},
{name: '@angular/compiler-cli'},
+1 -1
View File
@@ -1 +1 @@
16.14.0
16.13.0
+54 -42
View File
@@ -53,12 +53,16 @@
# @angular/framework-global-approvers-for-docs-only-changes
# =========================================================
# Used for approving minor documentation-only changes that don't require engineering review.
#
# josmar-crwdstffng
# ileil
# TeriGlover
# bob-watson
version: 3
availability:
users_unavailable:
- atscott
# availability:
# users_unavailable:
# Meta field that goes unused by PullApprove to allow for defining aliases to be
# used throughout the config.
@@ -123,10 +127,8 @@ groups:
'packages/animations/**/{*,.*}',
'packages/platform-browser/animations/**/{*,.*}',
'aio/content/guide/animations.md',
'aio/content/guide/add-an-animation.md',
'aio/content/guide/animate-state-style.md',
'aio/content/guide/animation-api-summary.md',
'aio/content/guide/understanding-angular-animation.md',
'aio/content/examples/animations/**/{*,.*}',
'aio/content/images/guide/animations/**/{*,.*}',
'aio/content/guide/complex-animation-sequences.md',
@@ -150,7 +152,7 @@ groups:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
contains_any_globs(files.exclude('packages/compiler-cli/ngcc/*'), [
'packages/compiler/**/{*,.*}',
'packages/examples/compiler/**/{*,.*}',
'aio/content/examples/angular-compiler-options/**/{*,.*}',
@@ -158,15 +160,25 @@ groups:
'aio/content/guide/angular-compiler-options.md',
'aio/content/guide/aot-compiler.md',
'aio/content/guide/aot-metadata-errors.md',
'aio/content/guide/template-typecheck.md',
'aio/content/extended-diagnostics/*.md'
'aio/content/guide/template-typecheck.md'
])
reviewers:
users:
- alxhub
- AndrewKushnir
- atscott
- crisbeto
- JoostK
# =========================================================
# Framework: Compiler / ngcc
# =========================================================
fw-ngcc:
<<: *defaults
conditions:
- files.include('packages/compiler-cli/ngcc/*')
reviewers:
users:
- alxhub
- JoostK
# =========================================================
@@ -205,7 +217,6 @@ groups:
'aio/content/guide/architecture-services.md',
'aio/content/guide/architecture.md',
'aio/content/examples/architecture/**/{*,.*}',
'aio/content/guide/rxjs-interop.md',
'aio/content/images/guide/architecture/**/{*,.*}',
'aio/content/guide/attribute-directives.md',
'aio/content/examples/attribute-directives/**/{*,.*}',
@@ -219,12 +230,31 @@ groups:
'aio/content/images/guide/change-detection/**/{*,.*}',
'aio/content/guide/class-binding.md',
'aio/content/guide/cheatsheet.md',
'aio/content/guide/component/component-content-projection-complex.md',
'aio/content/guide/component/component-content-projection-conditional.md',
'aio/content/guide/component/component-content-projection-multi-slot.md',
'aio/content/guide/component/component-content-projection-overview.md',
'aio/content/guide/component/component-content-projection-single-slot.md',
'aio/content/guide/component/component-create-cli.md',
'aio/content/guide/component/component-create-manual.md',
'aio/content/guide/component/component-example-dynamic-load.md',
'aio/content/guide/component/component-example-interaction.md',
'aio/content/guide/component/component-example.md',
'aio/content/guide/component/component-exchange-data.md',
'aio/content/guide/component/component-lifecycle-overview.md',
'aio/content/guide/component/component-overview.md',
'aio/content/guide/component/component-share-data-overview.md',
'aio/content/guide/component/component-share-data-to-child.md',
'aio/content/guide/component/component-share-data-to-parent.md',
'aio/content/guide/component/component-structure.md',
'aio/content/guide/component/component-style-overview.md',
'aio/content/guide/component/component-style-view-encapsulate.md',
'aio/content/guide/component/component-style.md',
'aio/content/guide/component/component-use-overview.md',
'aio/content/guide/component-interaction.md',
'aio/content/examples/component-interaction/**/{*,.*}',
'aio/content/images/guide/component-interaction/**/{*,.*}',
'aio/content/guide/component-overview.md',
'aio/content/errors/*.md',
'aio/content/examples/errors/**/{*,.*}',
'aio/content/examples/component-overview/**/{*,.*}',
'aio/content/guide/component-styles.md',
'aio/content/guide/developer-guide-overview.md',
@@ -242,7 +272,6 @@ groups:
'aio/content/images/guide/dependency-injection-in-action/**/{*,.*}',
'aio/content/guide/dependency-injection-navtree.md',
'aio/content/guide/dependency-injection-providers.md',
'aio/content/guide/dependency-injection-context.md',
'aio/content/guide/lightweight-injection-tokens.md',
'aio/content/guide/displaying-data.md',
'aio/content/examples/displaying-data/**/{*,.*}',
@@ -251,6 +280,7 @@ groups:
'aio/content/examples/dynamic-component-loader/**/{*,.*}',
'aio/content/images/guide/dynamic-component-loader/**/{*,.*}',
'aio/content/guide/example-apps-list.md',
'aio/content/guide/entry-components.md',
'aio/content/guide/feature-modules.md',
'aio/content/examples/feature-modules/**/{*,.*}',
'aio/content/images/guide/feature-modules/**/{*,.*}',
@@ -265,6 +295,8 @@ groups:
'aio/content/guide/lazy-loading-ngmodules.md',
'aio/content/examples/lazy-loading-ngmodules/**/{*,.*}',
'aio/content/images/guide/lazy-loading-ngmodules/**/{*,.*}',
'aio/content/guide/lifecycle-hook/lifecycle-hook-example.md',
'aio/content/guide/lifecycle-hook/lifecycle-hook-overview.md',
'aio/content/guide/lifecycle-hooks.md',
'aio/content/examples/lifecycle-hooks/**/{*,.*}',
'aio/content/images/guide/lifecycle-hooks/**/{*,.*}',
@@ -321,7 +353,6 @@ groups:
'aio/content/guide/singleton-services.md',
'aio/content/guide/sharing-ngmodules.md',
'aio/content/guide/standalone-components.md',
'aio/content/guide/standalone-migration.md',
'aio/content/guide/structural-directives.md',
'aio/content/examples/structural-directives/**/{*,.*}',
'aio/content/guide/svg-in-templates.md',
@@ -335,16 +366,13 @@ groups:
'aio/content/guide/view-encapsulation.md',
'aio/content/examples/view-encapsulation/**/{*,.*}',
'aio/content/images/guide/view-encapsulation/**/{*,.*}',
'aio/content/special-elements/**/{*,.*}',
'aio/content/guide/hydration.md',
'aio/content/guide/signals.md'
'aio/content/special-elements/**/{*,.*}'
])
reviewers:
users:
- alxhub
- AndrewKushnir
- atscott
- crisbeto
- dylhunn
- jessicajaniuk
- pkozlowski-opensource
@@ -379,21 +407,7 @@ groups:
contains_any_globs(files, [
'packages/common/http/**/{*,.*}',
'packages/examples/http/**/{*,.*}',
'aio/content/guide/understanding-communicating-with-http.md',
'aio/content/guide/http-configure-http-url-parameters.md',
'aio/content/guide/http-handle-request-errors.md',
'aio/content/guide/http-intercept-requests-and-responses.md',
'aio/content/guide/http-interceptor-use-cases.md',
'aio/content/guide/http-make-jsonp-request.md',
'aio/content/guide/http-optimize-server-interaction.md',
'aio/content/guide/http-pass-metadata-to-interceptors.md',
'aio/content/guide/http-request-data-from-server.md',
'aio/content/guide/http-security-xsrf-protection.md',
'aio/content/guide/http-send-data-to-server.md',
'aio/content/guide/http-server-communication.md',
'aio/content/guide/http-setup-server-communication.md',
'aio/content/guide/http-test-requests.md',
'aio/content/guide/http-track-show-request-progress.md',
'aio/content/guide/http.md',
'aio/content/examples/http/**/{*,.*}',
'aio/content/images/guide/http/**/{*,.*}'
])
@@ -781,9 +795,8 @@ groups:
])
reviewers:
users:
- devversion
- alxhub
- josephperrott
- pkozlowski-opensource
# =========================================================
# Integration Tests
@@ -835,8 +848,6 @@ groups:
'aio/content/tutorial/**/{*,.*}',
'aio/content/images/guide/toh/**/{*,.*}',
'aio/content/demos/first-app/**/{*,.*}',
'aio/content/examples/first-app-*/**/{*,.*}',
'aio/content/images/guide/faa/**/{*,.*}',
'aio/content/examples/toh-pt0/**/{*,.*}',
'aio/content/examples/toh-pt1/**/{*,.*}',
'aio/content/examples/toh-pt2/**/{*,.*}',
@@ -929,10 +940,8 @@ groups:
'aio/content/guide/migration-module-with-providers.md',
'aio/content/guide/static-query-migration.md',
'aio/content/guide/update-to-latest-version.md',
'aio/content/guide/versions.md',
'aio/content/guide/update-to-version-14.md',
'aio/content/guide/update-to-version-15.md',
'aio/content/guide/update-to-version-16.md',
'aio/content/guide/update-to-version-15.md'
])
reviewers:
users:
@@ -1006,7 +1015,6 @@ groups:
'aio/content/guide/workspace-config.md',
'aio/content/guide/migration-solution-style-tsconfig.md',
'aio/content/guide/migration-update-libraries-tslib.md',
'aio/content/guide/esbuild.md',
])
reviewers:
users:
@@ -1167,7 +1175,6 @@ groups:
'tools/legacy-saucelabs/**/{*,.*}',
'tools/rxjs/**/{*,.*}',
'tools/saucelabs/**/{*,.*}',
'tools/saucelabs-daemon/**/{*,.*}',
'tools/symbol-extractor/**/{*,.*}',
'tools/testing/**/{*,.*}',
'tools/tslint/**/{*,.*}',
@@ -1194,8 +1201,11 @@ groups:
'goldens/public-api/**/{*,.*}',
'docs/NAMING.md',
'aio/content/guide/angular-package-format.md',
'aio/content/errors/*.md',
'aio/content/extended-diagnostics/*.md',
'aio/content/guide/glossary.md',
'aio/content/guide/styleguide.md',
'aio/content/examples/errors/**/{*,.*}',
'aio/content/examples/styleguide/**/{*,.*}',
'aio/content/images/guide/styleguide/{*,.*}'
])
@@ -1373,6 +1383,7 @@ groups:
- devversion # Paul Gschwendtner
- dgp1130 # Doug Parker
- dylhunn # Dylan Hunn
- filipesilva # Filipe Silva
- jelbourn # Jeremy Elbourn
- jessicajaniuk # Jessica Janiuk
- JiaLiPassion # Jia Li
@@ -1382,5 +1393,6 @@ groups:
- mgechev # Minko Gechev
- mmalerba # Miles Malerba
- pkozlowski-opensource # Pawel Kozlowski
- Splaktar # Michael Prentice
- twerske # Emma Twersky
- zarend # Zach Arend
+147520
View File
File diff suppressed because one or more lines are too long
-147529
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -2,4 +2,4 @@
# yarn lockfile v1
yarn-path ".yarn/releases/yarn-1.22.19.cjs"
yarn-path ".yarn/releases/yarn-1.22.17.cjs"
+2 -20
View File
@@ -1,5 +1,4 @@
load("//tools:defaults.bzl", "nodejs_binary")
load("@build_bazel_rules_nodejs//:index.bzl", "js_library")
load("//:yarn.bzl", "YARN_PATH")
package(default_visibility = ["//visibility:public"])
@@ -27,14 +26,6 @@ alias(
actual = "//packages:tsconfig-build.json",
)
js_library(
name = "browser-providers",
srcs = [
"browser-providers.conf.d.ts",
"browser-providers.conf.js",
],
)
filegroup(
name = "angularjs_scripts",
srcs = [
@@ -63,19 +54,10 @@ config_setting(
nodejs_binary(
name = "yarn_vendored",
data = [".yarn/releases/yarn-1.22.19.cjs"],
entry_point = ".yarn/releases/yarn-1.22.19.cjs",
data = [".yarn/releases/yarn-1.22.17.cjs"],
entry_point = ".yarn/releases/yarn-1.22.17.cjs",
visibility = [
"//aio/tools/examples/shared:__pkg__",
"//integration:__subpackages__",
],
)
alias(
name = "sauce_connect",
actual = select({
"@npm//@angular/build-tooling/bazel/constraints:linux_x64": "@sauce_connect_linux_amd64//:bin/sc",
"@npm//@angular/build-tooling/bazel/constraints:macos_x64": "@sauce_connect_mac//:bin/sc",
"@npm//@angular/build-tooling/bazel/constraints:macos_arm64": "@sauce_connect_mac//:bin/sc",
}),
)
+2618 -1077
View File
File diff suppressed because it is too large Load Diff
-2618
View File
File diff suppressed because it is too large Load Diff
-8
View File
@@ -65,14 +65,6 @@ Angular maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.
### Appeal
If you are banned you may contest the decision. To do so email conduct@angular.io with the subject line "Repeal Ban for {{your name here}}" and body with the responses to the following:
* Why do you believe you did not violate the Code of Conduct?
* Were other factors involved in this situation the leadership team may have been unaware of?
* Why do you wish to be a part of the Angular community?
## Attribution
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 1.4,
+5 -1
View File
@@ -246,7 +246,7 @@ The `footer` is optional. The [Commit Message Footer](#commit-footer) format des
│ └─⫸ Commit Scope: animations|bazel|benchpress|common|compiler|compiler-cli|core|
│ elements|forms|http|language-service|localize|platform-browser|
│ platform-browser-dynamic|platform-server|router|service-worker|
│ upgrade|zone.js|packaging|changelog|docs-infra|migrations|
│ upgrade|zone.js|packaging|changelog|docs-infra|migrations|ngcc|ve|
│ devtools
│
└─⫸ Commit Type: build|ci|docs|feat|fix|perf|refactor|test
@@ -306,6 +306,10 @@ There are currently a few exceptions to the "use package name" rule:
* `migrations`: used for changes to the `ng update` migrations.
* `ngcc`: used for changes to the [Angular Compatibility Compiler](./packages/compiler-cli/ngcc/README.md)
* `ve`: used for changes specific to ViewEngine (legacy compiler/renderer).
* `devtools`: used for changes in the [browser extension](./devtools/README.md).
* none/empty string: useful for `test` and `refactor` changes that are done across all packages (e.g. `test: add missing unit tests`) and for docs changes that are not related to a specific package (e.g. `docs: fix typo in tutorial`).
+1 -1
View File
@@ -1,6 +1,6 @@
The MIT License
Copyright (c) 2010-2023 Google LLC. https://angular.io/license
Copyright (c) 2010-2022 Google LLC. https://angular.io/license
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
+3 -3
View File
@@ -1,10 +1,10 @@
<h1 align="center">Angular - The modern web developer's platform</h1>
<h1 align="center">Angular - The modern web developer's platform.</h1>
<p align="center">
<img src="aio/src/assets/images/logos/angular/angular.png" alt="angular-logo" width="120px" height="120px"/>
<br>
<em>Angular is a development platform for building mobile and desktop web applications
<br> using TypeScript/JavaScript and other languages.</em>
<i>Angular is a development platform for building mobile and desktop web applications
<br> using Typescript/JavaScript and other languages.</i>
<br>
</p>
+2 -2
View File
@@ -1,3 +1,3 @@
Angular is part of Google [Open Source Software Vulnerability Reward Program](https://bughunters.google.com/about/rules/6521337925468160/google-open-source-software-vulnerability-reward-program-rules). For vulnerabilities in Angular, please submit your report [here](https://bughunters.google.com/report).
Angular is part of Google [Open Source Software Vulnerability Reward Program](https://bughunters.google.com/about/rules/6521337925468160/google-open-source-software-vulnerability-reward-program-rules), for vulnerabilities in Angular please submit your report [here](https://bughunters.google.com/report).
For more information, check out [Angular's security policy](https://angular.io/guide/security).
For more information on Angular's security policy visit: https://angular.io/guide/security
+41 -37
View File
@@ -26,10 +26,12 @@ http_archive(
http_archive(
name = "build_bazel_rules_nodejs",
patches = [
# TODO(devversion): remove when https://github.com/bazelbuild/rules_nodejs/pull/3605 is available.
"//tools:bazel-repo-patches/rules_nodejs__#3605.patch",
"//tools/esm-interop:patches/bazel/nodejs_binary_esm_support.patch",
],
sha256 = "5dd1e5dea1322174c57d3ca7b899da381d516220793d0adef3ba03b9d23baa8e",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.8.3/rules_nodejs-5.8.3.tar.gz"],
sha256 = "c29944ba9b0b430aadcaf3bf2570fece6fc5ebfb76df145c6cdad40d65c20811",
urls = ["https://github.com/bazelbuild/rules_nodejs/releases/download/5.7.0/rules_nodejs-5.7.0.tar.gz"],
)
load("@build_bazel_rules_nodejs//:repositories.bzl", "build_bazel_rules_nodejs_dependencies")
@@ -38,8 +40,6 @@ build_bazel_rules_nodejs_dependencies()
# The PKG rules are needed to build tar packages for integration tests. The builtin
# rule in `@bazel_tools` is not Windows compatible and outdated.
# NOTE: We cannot move past version 0.6.0 as pkg_tar no longer works on directories, which rules_nodejs
# relies on for node_modules setup.
http_archive(
name = "rules_pkg",
sha256 = "62eeb544ff1ef41d786e329e1536c1d541bb9bcad27ae984d57f18f314018e66",
@@ -50,13 +50,37 @@ http_archive(
)
# Fetch Aspect lib for utilities like write_source_files
# NOTE: We cannot move past version 1.23.2 of aspect_bazel_lib because it requires us to move to bazel 6.0.0 which
# breaks our usage of managed_directories
http_archive(
name = "aspect_bazel_lib",
sha256 = "4b2e774387bae6242879820086b7b738d49bf3d0659522ea5d9363be01a27582",
strip_prefix = "bazel-lib-1.23.2",
url = "https://github.com/aspect-build/bazel-lib/archive/refs/tags/v1.23.2.tar.gz",
sha256 = "be236556c7b9c7b91cb370e837fdcec62b6e8893408cd4465ae883c9d7c67024",
strip_prefix = "bazel-lib-1.18.0",
url = "https://github.com/aspect-build/bazel-lib/archive/refs/tags/v1.18.0.tar.gz",
)
# Download cli source from angular/cli-builds for doc generation at a specific tag or commit.
# If the ref is a commit sha, use the full sha instead of the abbreviated form. Tags, which
# hold an abbreviated sha by convention in cli-builds, can continue to use the short form.
CLI_SRC_REF = "6ccbc6b4cba4fde7898b67d2e195a1ea3bf4553e"
http_archive(
name = "angular_cli_src",
build_file_content = """
# Include files used in doc generation
filegroup(
name = "files_for_docgen",
srcs = glob([
"help/**/*.json",
"package.json",
]),
visibility = ["//visibility:public"],
)
""",
# Run the following command to calculate the sha256, substituting the CLI_SRC_REF
# wget -O- -q https://github.com/angular/cli-builds/archive/{CLI_SRC_REF}.tar.gz | sha256sum
# Alternatively, just remove the parameter and bazel debug will output the sha as a suggestion.
sha256 = "6558e1774904719d0615f01b88368d7fe3a927ea1e54cb0436e7957bc8f6d0a6",
strip_prefix = "cli-builds-%s" % CLI_SRC_REF,
url = "https://github.com/angular/cli-builds/archive/%s.tar.gz" % CLI_SRC_REF,
)
# Setup the Node.js toolchain.
@@ -64,12 +88,7 @@ load("@rules_nodejs//nodejs:repositories.bzl", "nodejs_register_toolchains")
nodejs_register_toolchains(
name = "nodejs",
node_version = "16.14.0",
)
nodejs_register_toolchains(
name = "node18",
node_version = "18.10.0",
node_version = "16.13.0",
)
# Download npm dependencies.
@@ -83,9 +102,11 @@ yarn_install(
data = [
YARN_LABEL,
"//:.yarnrc",
"//:scripts/puppeteer-chromedriver-versions.js",
"//:scripts/webdriver-manager-update.js",
"//tools:postinstall-patches.js",
"//tools/esm-interop:patches/npm/@angular+build-tooling+0.0.0-8d4803573edc70b90a1134ffa996303d1dcc18a9.patch",
"//tools/esm-interop:patches/npm/@bazel+concatjs+5.8.1.patch",
"//tools/esm-interop:patches/npm/@angular+build-tooling+0.0.0-246cebbf2a78566ff1fe9b88fdde2459606568dc.patch",
"//tools/esm-interop:patches/npm/@bazel+concatjs+5.7.1.patch",
"//tools/esm-interop:patches/npm/@bazel+esbuild+5.7.1.patch",
"//tools/esm-interop:patches/npm/@bazel+protractor+5.7.1.patch",
"//tools/esm-interop:patches/npm/rxjs+6.6.7.patch",
@@ -199,10 +220,10 @@ cldr_xml_data_repository(
# sass rules
http_archive(
name = "io_bazel_rules_sass",
sha256 = "4bb36a654166e1b629717e55a9c0cc30590f6615c122c054f38409c20ee5ec6f",
strip_prefix = "rules_sass-f89fc59345a5074cf184ec215e9858152b7258e7",
sha256 = "618f0b7aae019c149ac2ff4142a66c110de116fb5c173dbeccedbaee06fc5f6d",
strip_prefix = "rules_sass-a2fce75bcf103750f7accbf7f966ad48bcbca2d4",
urls = [
"https://github.com/bazelbuild/rules_sass/archive/f89fc59345a5074cf184ec215e9858152b7258e7.zip",
"https://github.com/bazelbuild/rules_sass/archive/a2fce75bcf103750f7accbf7f966ad48bcbca2d4.zip",
],
)
@@ -220,20 +241,3 @@ register_toolchains(
"@npm//@angular/build-tooling/bazel/git-toolchain:git_macos_arm64_toolchain",
"@npm//@angular/build-tooling/bazel/git-toolchain:git_windows_toolchain",
)
# Fetch sauce connect (tool to open Saucelabs tunnel for Saucelabs browser tests)
http_archive(
name = "sauce_connect_linux_amd64",
build_file_content = """exports_files(["bin/sc"], visibility = ["//visibility:public"])""",
sha256 = "26b9c3630f441b47854b6032f7eca6f1d88d3f62e50ee44c27015d71a5155c36",
strip_prefix = "sc-4.8.2-linux",
url = "https://saucelabs.com/downloads/sc-4.8.2-linux.tar.gz",
)
http_archive(
name = "sauce_connect_mac",
build_file_content = """exports_files(["bin/sc"], visibility = ["//visibility:public"])""",
sha256 = "28277ce81ef9ab84f5b87b526258920a8ead44789a5034346e872629bbf38089",
strip_prefix = "sc-4.8.2-osx",
url = "https://saucelabs.com/downloads/sc-4.8.2-osx.zip",
)
+28 -181
View File
@@ -13,213 +13,60 @@
"createDefaultProgram": true
},
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"plugins": [
"@typescript-eslint",
"@angular-eslint",
"eslint-plugin-jsdoc",
"eslint-plugin-import",
"eslint-plugin-jsdoc",
"eslint-plugin-prefer-arrow"
],
"rules": {
"@angular-eslint/component-class-suffix": "error",
"@typescript-eslint/ban-types": "error",
"@angular-eslint/component-selector": [
"error",
{
"type": "element",
"prefix": "aio",
"style": "kebab-case",
"type": "element"
"style": "kebab-case"
}
],
"@angular-eslint/contextual-lifecycle": "error",
"@angular-eslint/directive-class-suffix": "error",
"@angular-eslint/directive-selector": [
"error",
{
"type": "attribute",
"prefix": "aio",
"style": "camelCase",
"type": "attribute"
"style": "camelCase"
}
],
"@angular-eslint/no-conflicting-lifecycle": "error",
"@angular-eslint/no-host-metadata-property": "off",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-inputs-metadata-property": "error",
"@angular-eslint/no-output-native": "error",
"@angular-eslint/no-output-on-prefix": "error",
"@angular-eslint/no-output-rename": "error",
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/use-lifecycle-interface": "error",
"@angular-eslint/use-pipe-transform-interface": "error",
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/ban-types": "error",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/dot-notation": "error",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/member-delimiter-style": [
"error",
{
"singleline": {
"delimiter": "comma",
"requireLast": false
}
"dot-notation": "error",
"indent": "off",
"max-len": ["error", 120],
"@typescript-eslint/member-delimiter-style": ["error", {
"singleline": {
"delimiter": "comma",
"requireLast": false
}
],
}],
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/naming-convention": "off",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": [
"error",
{
"ignoreParameters": true
}
],
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-non-null-assertion": "error",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-shadow": [
"error"
],
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/quotes": [
"error",
"single",
{
"avoidEscape": true
}
],
"@typescript-eslint/semi": [
"error",
"always"
],
"@typescript-eslint/triple-slash-reference": [
"error",
{
"lib": "always",
"path": "always",
"types": "prefer-import"
}
],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/unified-signatures": "error",
"arrow-body-style": "error",
"arrow-parens": "off",
"comma-dangle": "off",
"complexity": "off",
"constructor-super": "error",
"curly": "error",
"dot-notation": "error",
"eol-last": "error",
"eqeqeq": [
"error",
"smart"
],
"guard-for-in": "error",
"id-denylist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": "error",
"import/no-deprecated": "warn",
"indent": "off",
"jsdoc/check-alignment": "error",
"jsdoc/no-types": "error",
"max-classes-per-file": "off",
"max-len": [
"error",
120
],
"new-parens": "error",
"no-bitwise": "error",
"no-caller": "error",
"no-cond-assign": "error",
"no-console": [
"error",
{
"allow": [
"log",
"warn",
"error"
]
}
],
"no-debugger": "error",
"no-empty": "off",
"no-console": ["error", {"allow": ["log", "warn", "error"]}],
"no-empty-function": "off",
"no-eval": "error",
"no-fallthrough": "error",
"no-invalid-this": "off",
"no-multiple-empty-lines": "off",
"no-new-wrappers": "error",
"no-restricted-imports": [
"error",
{
"message": "Please import directly from 'rxjs' instead",
"name": "rxjs/Rx"
}
],
"@angular-eslint/no-host-metadata-property": "off",
"no-restricted-syntax": [
"error",
{
"message": "Don't keep jasmine focus methods.",
"selector": "CallExpression[callee.name=/^(fdescribe|fit)$/]"
"selector": "CallExpression[callee.name=/^(fdescribe|fit)$/]",
"message": "Don't keep jasmine focus methods."
}
],
"no-shadow": "off",
"@typescript-eslint/no-shadow": ["error"],
"no-tabs": "error",
"no-throw-literal": "error",
"no-trailing-spaces": "error",
"no-undef-init": "error",
"no-underscore-dangle": "off",
"no-unsafe-finally": "error",
"no-unused-expressions": "off",
"no-unused-labels": "error",
"@typescript-eslint/no-unused-expressions": ["error"],
"no-use-before-define": "off",
"no-var": "error",
"object-shorthand": "error",
"one-var": [
"error",
"never"
],
"prefer-arrow/prefer-arrow-functions": "off",
"prefer-const": "error",
"quote-props": [
"error",
"as-needed"
],
"quotes": "off",
"radix": "error",
"sort-keys": "off",
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"asyncArrow": "always",
"named": "never"
}
],
"use-isnan": "error",
"valid-typeof": "off"
"@typescript-eslint/quotes": ["error", "single", {"avoidEscape": true}],
"semi": "error"
}
},
{
@@ -230,11 +77,11 @@
"plugin:@angular-eslint/template/recommended"
],
"rules": {
"@angular-eslint/template/alt-text": "error",
"@angular-eslint/template/elements-content": "error",
"@angular-eslint/template/label-has-associated-control": "error",
"@angular-eslint/template/table-scope": "error",
"@angular-eslint/template/valid-aria": "error",
"@angular-eslint/template/accessibility-alt-text": "error",
"@angular-eslint/template/accessibility-elements-content": "error",
"@angular-eslint/template/accessibility-label-has-associated-control": "error",
"@angular-eslint/template/accessibility-table-scope": "error",
"@angular-eslint/template/accessibility-valid-aria": "error",
"@angular-eslint/template/click-events-have-key-events": "error",
"@angular-eslint/template/eqeqeq": "off",
"@angular-eslint/template/mouse-events-have-key-events": "error",
+2 -2
View File
@@ -36,7 +36,7 @@
"outputPath": "dist",
"index": "src/index.html",
"main": "src/main.ts",
"polyfills": ["zone.js"],
"polyfills": "src/polyfills.ts",
"ngswConfigPath": "src/generated/ngsw-config.json",
"tsConfig": "tsconfig.app.json",
"webWorkerTsConfig": "tsconfig.worker.json",
@@ -216,7 +216,7 @@
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"polyfills": ["zone.js", "zone.js/testing"],
"polyfills": "src/polyfills.ts",
"tsConfig": "tsconfig.spec.json",
"webWorkerTsConfig": "tsconfig.worker.json",
"karmaConfig": "karma.conf.js",
+1 -3
View File
@@ -4,8 +4,6 @@ filegroup(
name = "content",
srcs = glob(
["**"],
exclude = [
"BUILD.bazel",
],
exclude = ["BUILD.bazel"],
),
)
-11
View File
@@ -1,11 +0,0 @@
package(default_visibility = ["//visibility:public"])
filegroup(
name = "cli",
srcs = glob(
["**"],
exclude = [
"BUILD.bazel",
],
),
)
-63
View File
@@ -1,63 +0,0 @@
{
"name": "add",
"command": "ng add <collection>",
"shortDescription": "Adds support for an external library to your project.",
"longDescriptionRelativePath": "@angular/cli/src/commands/add/long-description.md",
"longDescription": "Adds the npm package for a published library to your workspace, and configures\nthe project in the current working directory to use that library, as specified by the library's schematic.\nFor example, adding `@angular/pwa` configures your project for PWA support:\n\n```bash\nng add @angular/pwa\n```\n",
"aliases": [],
"deprecated": false,
"options": [
{
"name": "collection",
"type": "string",
"description": "The package to be added.",
"positional": 0
},
{
"name": "defaults",
"type": "boolean",
"default": false,
"description": "Disable interactive input prompts for options with a default."
},
{
"name": "dry-run",
"type": "boolean",
"default": false,
"description": "Run through and reports activity without writing out results."
},
{
"name": "force",
"type": "boolean",
"default": false,
"description": "Force overwriting of existing files."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "interactive",
"type": "boolean",
"default": true,
"description": "Enable interactive input prompts."
},
{
"name": "registry",
"type": "string",
"description": "The NPM registry to use."
},
{
"name": "skip-confirmation",
"type": "boolean",
"default": false,
"description": "Skip asking a confirmation prompt before installing and executing the package. Ensure package name is correct prior to using this option."
},
{
"name": "verbose",
"type": "boolean",
"default": false,
"description": "Display additional details about internal operations during execution."
}
]
}
-84
View File
@@ -1,84 +0,0 @@
{
"name": "analytics",
"command": "ng analytics",
"shortDescription": "Configures the gathering of Angular CLI usage metrics.",
"longDescriptionRelativePath": "@angular/cli/src/commands/analytics/long-description.md",
"longDescription": "You can help the Angular Team to prioritize features and improvements by permitting the Angular team to send command-line command usage statistics to Google.\nThe Angular Team does not collect usage statistics unless you explicitly opt in. When installing the Angular CLI you are prompted to allow global collection of usage statistics.\nIf you say no or skip the prompt, no data is collected.\n\n### What is collected?\n\nUsage analytics include the commands and selected flags for each execution.\nUsage analytics may include the following information:\n\n- Your operating system \\(macOS, Linux distribution, Windows\\) and its version.\n- Package manager name and version \\(local version only\\).\n- Node.js version \\(local version only\\).\n- Angular CLI version \\(local version only\\).\n- Command name that was run.\n- Workspace information, the number of application and library projects.\n- For schematics commands \\(add, generate and new\\), the schematic collection and name and a list of selected flags.\n- For build commands \\(build, serve\\), the builder name, the number and size of bundles \\(initial and lazy\\), compilation units, the time it took to build and rebuild, and basic Angular-specific API usage.\n\nOnly Angular owned and developed schematics and builders are reported.\nThird-party schematics and builders do not send data to the Angular Team.\n",
"aliases": [],
"deprecated": false,
"options": [
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
}
],
"subcommands": [
{
"name": "disable",
"command": "disable",
"shortDescription": "Disables analytics gathering and reporting for the user.",
"options": [
{
"name": "global",
"type": "boolean",
"aliases": [
"g"
],
"default": false,
"description": "Configure analytics gathering and reporting globally in the caller's home directory."
}
],
"aliases": [
"off"
],
"deprecated": false
},
{
"name": "enable",
"command": "enable",
"shortDescription": "Enables analytics gathering and reporting for the user.",
"options": [
{
"name": "global",
"type": "boolean",
"aliases": [
"g"
],
"default": false,
"description": "Configure analytics gathering and reporting globally in the caller's home directory."
}
],
"aliases": [
"on"
],
"deprecated": false
},
{
"name": "info",
"command": "info",
"shortDescription": "Prints analytics gathering and reporting configuration in the console.",
"options": [],
"aliases": [],
"deprecated": false
},
{
"name": "prompt",
"command": "prompt",
"shortDescription": "Prompts the user to set the analytics gathering status interactively.",
"options": [
{
"name": "global",
"type": "boolean",
"aliases": [
"g"
],
"default": false,
"description": "Configure analytics gathering and reporting globally in the caller's home directory."
}
],
"aliases": [],
"deprecated": false
}
]
}
-4
View File
@@ -1,4 +0,0 @@
{
"branchName": "refs/heads/main",
"sha": "d29cbad7e25ed9114be351b9582eb8723db14773"
}
-250
View File
@@ -1,250 +0,0 @@
{
"name": "build",
"command": "ng build [project]",
"shortDescription": "Compiles an Angular application or library into an output directory named dist/ at the given output path.",
"longDescriptionRelativePath": "@angular/cli/src/commands/build/long-description.md",
"longDescription": "The command can be used to build a project of type \"application\" or \"library\".\nWhen used to build a library, a different builder is invoked, and only the `ts-config`, `configuration`, and `watch` options are applied.\nAll other options apply only to building applications.\n\nThe application builder uses the [webpack](https://webpack.js.org/) build tool, with default configuration options specified in the workspace configuration file (`angular.json`) or with a named alternative configuration.\nA \"development\" configuration is created by default when you use the CLI to create the project, and you can use that configuration by specifying the `--configuration development`.\n\nThe configuration options generally correspond to the command options.\nYou can override individual configuration defaults by specifying the corresponding options on the command line.\nThe command can accept option names given in either dash-case or camelCase.\nNote that in the configuration file, you must specify names in camelCase.\n\nSome additional options can only be set through the configuration file,\neither by direct editing or with the `ng config` command.\nThese include `assets`, `styles`, and `scripts` objects that provide runtime-global resources to include in the project.\nResources in CSS, such as images and fonts, are automatically written and fingerprinted at the root of the output folder.\n\nFor further details, see [Workspace Configuration](guide/workspace-config).\n",
"aliases": [
"b"
],
"deprecated": false,
"options": [
{
"name": "allowed-common-js-dependencies",
"type": "array",
"description": "A list of CommonJS packages that are allowed to be used without a build time warning."
},
{
"name": "aot",
"type": "boolean",
"default": true,
"description": "Build using Ahead of Time compilation."
},
{
"name": "base-href",
"type": "string",
"description": "Base url for the application being built."
},
{
"name": "build-optimizer",
"type": "boolean",
"default": true,
"description": "Enables advanced build optimizations when using the 'aot' option."
},
{
"name": "common-chunk",
"type": "boolean",
"default": true,
"description": "Generate a seperate bundle containing code used across multiple bundles."
},
{
"name": "configuration",
"type": "string",
"aliases": [
"c"
],
"description": "One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section in angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations."
},
{
"name": "cross-origin",
"type": "string",
"default": "none",
"enum": [
"none",
"anonymous",
"use-credentials"
],
"description": "Define the crossorigin attribute setting of elements that provide CORS support."
},
{
"name": "delete-output-path",
"type": "boolean",
"default": true,
"description": "Delete the output path before building."
},
{
"name": "deploy-url",
"type": "string",
"deprecated": "Use \"baseHref\" option, \"APP_BASE_HREF\" DI token or a combination of both instead. For more information, see https://angular.io/guide/deployment#the-deploy-url.",
"description": "URL where files will be deployed."
},
{
"name": "extract-licenses",
"type": "boolean",
"default": true,
"description": "Extract all licenses in a separate file."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "i18n-duplicate-translation",
"type": "string",
"default": "warning",
"enum": [
"warning",
"error",
"ignore"
],
"description": "How to handle duplicate translations for i18n."
},
{
"name": "i18n-missing-translation",
"type": "string",
"default": "warning",
"enum": [
"warning",
"error",
"ignore"
],
"description": "How to handle missing translations for i18n."
},
{
"name": "index",
"type": "string",
"description": "Configures the generation of the application's HTML index."
},
{
"name": "inline-style-language",
"type": "string",
"default": "css",
"enum": [
"css",
"less",
"sass",
"scss"
],
"description": "The stylesheet language to use for the application's inline component styles."
},
{
"name": "localize",
"type": "boolean",
"description": "Translate the bundles in one or more locales."
},
{
"name": "main",
"type": "string",
"description": "The full path for the main entry point to the app, relative to the current workspace."
},
{
"name": "named-chunks",
"type": "boolean",
"default": false,
"description": "Use file name for lazy loaded chunks."
},
{
"name": "ngsw-config-path",
"type": "string",
"description": "Path to ngsw-config.json."
},
{
"name": "optimization",
"type": "boolean",
"default": true,
"description": "Enables optimization of the build output. Including minification of scripts and styles, tree-shaking, dead-code elimination, inlining of critical CSS and fonts inlining. For more information, see https://angular.io/guide/workspace-config#optimization-configuration."
},
{
"name": "output-hashing",
"type": "string",
"default": "none",
"enum": [
"none",
"all",
"media",
"bundles"
],
"description": "Define the output filename cache-busting hashing mode."
},
{
"name": "output-path",
"type": "string",
"description": "The full path for the new output directory, relative to the current workspace.\nBy default, writes output to a folder named dist/ in the current project."
},
{
"name": "poll",
"type": "number",
"description": "Enable and define the file watching poll time period in milliseconds."
},
{
"name": "polyfills",
"type": "string",
"description": "Polyfills to be included in the build."
},
{
"name": "preserve-symlinks",
"type": "boolean",
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
},
{
"name": "progress",
"type": "boolean",
"default": true,
"description": "Log progress to the console while building."
},
{
"name": "project",
"type": "string",
"description": "The name of the project to build. Can be an application or a library.",
"positional": 0
},
{
"name": "resources-output-path",
"type": "string",
"description": "The path where style resources will be placed, relative to outputPath."
},
{
"name": "service-worker",
"type": "boolean",
"default": false,
"description": "Generates a service worker config for production builds."
},
{
"name": "source-map",
"type": "boolean",
"default": false,
"description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration."
},
{
"name": "stats-json",
"type": "boolean",
"default": false,
"description": "Generates a 'stats.json' file which can be analyzed using tools such as 'webpack-bundle-analyzer'."
},
{
"name": "subresource-integrity",
"type": "boolean",
"default": false,
"description": "Enables the use of subresource integrity validation."
},
{
"name": "ts-config",
"type": "string",
"description": "The full path for the TypeScript configuration file, relative to the current workspace."
},
{
"name": "vendor-chunk",
"type": "boolean",
"default": false,
"description": "Generate a seperate bundle containing only vendor libraries. This option should only be used for development to reduce the incremental compilation time."
},
{
"name": "verbose",
"type": "boolean",
"default": false,
"description": "Adds more details to output logging."
},
{
"name": "watch",
"type": "boolean",
"default": false,
"description": "Run build when files change."
},
{
"name": "web-worker-ts-config",
"type": "string",
"description": "TypeScript configuration for Web Worker modules."
}
]
}
-54
View File
@@ -1,54 +0,0 @@
{
"name": "cache",
"command": "ng cache",
"shortDescription": "Configure persistent disk cache and retrieve cache statistics.",
"longDescriptionRelativePath": "@angular/cli/src/commands/cache/long-description.md",
"longDescription": "Angular CLI saves a number of cachable operations on disk by default.\n\nWhen you re-run the same build, the build system restores the state of the previous build and re-uses previously performed operations, which decreases the time taken to build and test your applications and libraries.\n\nTo amend the default cache settings, add the `cli.cache` object to your [Workspace Configuration](guide/workspace-config).\nThe object goes under `cli.cache` at the top level of the file, outside the `projects` sections.\n\n```jsonc\n{\n \"$schema\": \"./node_modules/@angular/cli/lib/config/schema.json\",\n \"version\": 1,\n \"cli\": {\n \"cache\": {\n // ...\n }\n },\n \"projects\": {}\n}\n```\n\nFor more information, see [cache options](guide/workspace-config#cache-options).\n\n### Cache environments\n\nBy default, disk cache is only enabled for local environments. The value of environment can be one of the following:\n\n- `all` - allows disk cache on all machines.\n- `local` - allows disk cache only on development machines.\n- `ci` - allows disk cache only on continuous integration (CI) systems.\n\nTo change the environment setting to `all`, run the following command:\n\n```bash\nng config cli.cache.environment all\n```\n\nFor more information, see `environment` in [cache options](guide/workspace-config#cache-options).\n\n<div class=\"alert is-helpful\">\n\nThe Angular CLI checks for the presence and value of the `CI` environment variable to determine in which environment it is running.\n\n</div>\n\n### Cache path\n\nBy default, `.angular/cache` is used as a base directory to store cache results.\n\nTo change this path to `.cache/ng`, run the following command:\n\n```bash\nng config cli.cache.path \".cache/ng\"\n```\n",
"aliases": [],
"deprecated": false,
"options": [
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
}
],
"subcommands": [
{
"name": "clean",
"command": "clean",
"shortDescription": "Deletes persistent disk cache from disk.",
"options": [],
"aliases": [],
"deprecated": false
},
{
"name": "disable",
"command": "disable",
"shortDescription": "Disables persistent disk cache for all projects in the workspace.",
"options": [],
"aliases": [
"off"
],
"deprecated": false
},
{
"name": "enable",
"command": "enable",
"shortDescription": "Enables disk cache for all projects in the workspace.",
"options": [],
"aliases": [
"on"
],
"deprecated": false
},
{
"name": "info",
"command": "info",
"shortDescription": "Prints persistent disk cache configuration and statistics in the console.",
"options": [],
"aliases": [],
"deprecated": false
}
]
}
-26
View File
@@ -1,26 +0,0 @@
{
"name": "completion",
"command": "ng completion",
"shortDescription": "Set up Angular CLI autocompletion for your terminal.",
"longDescriptionRelativePath": "@angular/cli/src/commands/completion/long-description.md",
"longDescription": "Setting up autocompletion configures your terminal, so pressing the `<TAB>` key while in the middle\nof typing will display various commands and options available to you. This makes it very easy to\ndiscover and use CLI commands without lots of memorization.\n\n![A demo of Angular CLI autocompletion in a terminal. The user types several partial `ng` commands,\nusing autocompletion to finish several arguments and list contextual options.\n](generated/images/guide/cli/completion.gif)\n\n## Automated setup\n\nThe CLI should prompt and ask to set up autocompletion for you the first time you use it (v14+).\nSimply answer \"Yes\" and the CLI will take care of the rest.\n\n```\n$ ng serve\n? Would you like to enable autocompletion? This will set up your terminal so pressing TAB while typing Angular CLI commands will show possible options and autocomplete arguments. (Enabling autocompletion will modify configuration files in your home directory.) Yes\nAppended `source <(ng completion script)` to `/home/my-username/.bashrc`. Restart your terminal or run:\n\nsource <(ng completion script)\n\nto autocomplete `ng` commands.\n\n# Serve output...\n```\n\nIf you already refused the prompt, it won't ask again. But you can run `ng completion` to\ndo the same thing automatically.\n\nThis modifies your terminal environment to load Angular CLI autocompletion, but can't update your\ncurrent terminal session. Either restart it or run `source <(ng completion script)` directly to\nenable autocompletion in your current session.\n\nTest it out by typing `ng ser<TAB>` and it should autocomplete to `ng serve`. Ambiguous arguments\nwill show all possible options and their documentation, such as `ng generate <TAB>`.\n\n## Manual setup\n\nSome users may have highly customized terminal setups, possibly with configuration files checked\ninto source control with an opinionated structure. `ng completion` only ever appends Angular's setup\nto an existing configuration file for your current shell, or creates one if none exists. If you want\nmore control over exactly where this configuration lives, you can manually set it up by having your\nshell run at startup:\n\n```bash\nsource <(ng completion script)\n```\n\nThis is equivalent to what `ng completion` will automatically set up, and gives power users more\nflexibility in their environments when desired.\n\n## Platform support\n\nAngular CLI supports autocompletion for the Bash and Zsh shells on MacOS and Linux operating\nsystems. On Windows, Git Bash and [Windows Subsystem for Linux](https://docs.microsoft.com/en-us/windows/wsl/)\nusing Bash or Zsh are supported.\n\n## Global install\n\nAutocompletion works by configuring your terminal to invoke the Angular CLI on startup to load the\nsetup script. This means the terminal must be able to find and execute the Angular CLI, typically\nthrough a global install that places the binary on the user's `$PATH`. If you get\n`command not found: ng`, make sure the CLI is installed globally which you can do with the `-g`\nflag:\n\n```bash\nnpm install -g @angular/cli\n```\n",
"aliases": [],
"deprecated": false,
"options": [
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
}
],
"subcommands": [
{
"name": "script",
"command": "script",
"shortDescription": "Generate a bash and zsh real-time type-ahead autocompletion script.",
"options": [],
"aliases": [],
"deprecated": false
}
]
}
-37
View File
@@ -1,37 +0,0 @@
{
"name": "config",
"command": "ng config [json-path] [value]",
"shortDescription": "Retrieves or sets Angular configuration values in the angular.json file for the workspace.",
"longDescriptionRelativePath": "@angular/cli/src/commands/config/long-description.md",
"longDescription": "A workspace has a single CLI configuration file, `angular.json`, at the top level.\nThe `projects` object contains a configuration object for each project in the workspace.\n\nYou can edit the configuration directly in a code editor,\nor indirectly on the command line using this command.\n\nThe configurable property names match command option names,\nexcept that in the configuration file, all names must use camelCase,\nwhile on the command line options can be given dash-case.\n\nFor further details, see [Workspace Configuration](guide/workspace-config).\n\nFor configuration of CLI usage analytics, see [ng analytics](cli/analytics).\n",
"aliases": [],
"deprecated": false,
"options": [
{
"name": "global",
"type": "boolean",
"aliases": [
"g"
],
"default": false,
"description": "Access the global configuration in the caller's home directory."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "json-path",
"type": "string",
"description": "The configuration key to set or query, in JSON path format. For example: \"a[3].foo.bar[2]\". If no new value is provided, returns the current value of this key.",
"positional": 0
},
{
"name": "value",
"type": "string",
"description": "If provided, a new value for the given configuration key.",
"positional": 1
}
]
}
-30
View File
@@ -1,30 +0,0 @@
{
"name": "deploy",
"command": "ng deploy [project]",
"shortDescription": "Invokes the deploy builder for a specified project or for the default project in the workspace.",
"longDescriptionRelativePath": "@angular/cli/src/commands/deploy/long-description.md",
"longDescription": "The command takes an optional project name, as specified in the `projects` section of the `angular.json` workspace configuration file.\nWhen a project name is not supplied, executes the `deploy` builder for the default project.\n\nTo use the `ng deploy` command, use `ng add` to add a package that implements deployment capabilities to your favorite platform.\nAdding the package automatically updates your workspace configuration, adding a deployment\n[CLI builder](guide/cli-builder).\nFor example:\n\n```json\n\"projects\": {\n \"my-project\": {\n ...\n \"architect\": {\n ...\n \"deploy\": {\n \"builder\": \"@angular/fire:deploy\",\n \"options\": {}\n }\n }\n }\n}\n```\n",
"aliases": [],
"deprecated": false,
"options": [
{
"name": "configuration",
"type": "string",
"aliases": [
"c"
],
"description": "One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section in angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "project",
"type": "string",
"description": "The name of the project to build. Can be an application or a library.",
"positional": 0
}
]
}
-36
View File
@@ -1,36 +0,0 @@
{
"name": "doc",
"command": "ng doc <keyword>",
"shortDescription": "Opens the official Angular documentation (angular.io) in a browser, and searches for a given keyword.",
"aliases": [
"d"
],
"deprecated": false,
"options": [
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "keyword",
"type": "string",
"description": "The keyword to search for, as provided in the search bar in angular.io.",
"positional": 0
},
{
"name": "search",
"type": "boolean",
"aliases": [
"s"
],
"default": false,
"description": "Search all of angular.io. Otherwise, searches only API reference documentation."
},
{
"name": "version",
"type": "string",
"description": "The version of Angular to use for the documentation. If not provided, the command uses your current Angular core version."
}
]
}
-30
View File
@@ -1,30 +0,0 @@
{
"name": "e2e",
"command": "ng e2e [project]",
"shortDescription": "Builds and serves an Angular application, then runs end-to-end tests.",
"aliases": [
"e"
],
"deprecated": false,
"options": [
{
"name": "configuration",
"type": "string",
"aliases": [
"c"
],
"description": "One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section in angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "project",
"type": "string",
"description": "The name of the project to build. Can be an application or a library.",
"positional": 0
}
]
}
-66
View File
@@ -1,66 +0,0 @@
{
"name": "extract-i18n",
"command": "ng extract-i18n [project]",
"shortDescription": "Extracts i18n messages from source code.",
"aliases": [],
"deprecated": false,
"options": [
{
"name": "browser-target",
"type": "string",
"description": "A browser builder target to extract i18n messages in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`."
},
{
"name": "configuration",
"type": "string",
"aliases": [
"c"
],
"description": "One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section in angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations."
},
{
"name": "format",
"type": "string",
"default": "xlf",
"enum": [
"xmb",
"xlf",
"xlif",
"xliff",
"xlf2",
"xliff2",
"json",
"arb",
"legacy-migrate"
],
"description": "Output format for the generated file."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "out-file",
"type": "string",
"description": "Name of the file to output."
},
{
"name": "output-path",
"type": "string",
"description": "Path where output will be placed."
},
{
"name": "progress",
"type": "boolean",
"default": true,
"description": "Log progress to the console."
},
{
"name": "project",
"type": "string",
"description": "The name of the project to build. Can be an application or a library.",
"positional": 0
}
]
}
-946
View File
@@ -1,946 +0,0 @@
{
"name": "generate",
"command": "ng generate <schematic>",
"shortDescription": "Generates and/or modifies files based on a schematic.",
"aliases": [
"g"
],
"deprecated": false,
"options": [
{
"name": "defaults",
"type": "boolean",
"default": false,
"description": "Disable interactive input prompts for options with a default."
},
{
"name": "dry-run",
"type": "boolean",
"default": false,
"description": "Run through and reports activity without writing out results."
},
{
"name": "force",
"type": "boolean",
"default": false,
"description": "Force overwriting of existing files."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "interactive",
"type": "boolean",
"default": true,
"description": "Enable interactive input prompts."
},
{
"name": "schematic",
"type": "string",
"description": "The [collection:schematic] to run.",
"positional": 0
}
],
"subcommands": [
{
"name": "app-shell",
"command": "app-shell",
"shortDescription": "Generates an application shell for running a server-side version of an app.",
"options": [
{
"name": "app-id",
"type": "string",
"deprecated": "This option is no longer used.",
"default": "serverApp",
"description": "The application ID to use in withServerTransition()."
},
{
"name": "main",
"type": "string",
"default": "main.server.ts",
"description": "The name of the main entry-point file."
},
{
"name": "project",
"type": "string",
"description": "The name of the related client app."
},
{
"name": "root-module-class-name",
"type": "string",
"default": "AppServerModule",
"description": "The name of the root module class."
},
{
"name": "root-module-file-name",
"type": "string",
"default": "app.module.server.ts",
"description": "The name of the root module file"
},
{
"name": "route",
"type": "string",
"default": "shell",
"description": "Route path used to produce the application shell."
}
],
"aliases": [],
"deprecated": false
},
{
"name": "application",
"command": "application [name]",
"shortDescription": "Generates a new basic application definition in the \"projects\" subfolder of the workspace.",
"options": [
{
"name": "inline-style",
"type": "boolean",
"aliases": [
"s"
],
"description": "Include styles inline in the root component.ts file. Only CSS styles can be included inline. Default is false, meaning that an external styles file is created and referenced in the root component.ts file."
},
{
"name": "inline-template",
"type": "boolean",
"aliases": [
"t"
],
"description": "Include template inline in the root component.ts file. Default is false, meaning that an external template file is created and referenced in the root component.ts file. "
},
{
"name": "minimal",
"type": "boolean",
"default": false,
"description": "Create a bare-bones project without any testing frameworks. (Use for learning purposes only.)"
},
{
"name": "name",
"type": "string",
"description": "The name of the new application.",
"positional": 0
},
{
"name": "prefix",
"type": "string",
"aliases": [
"p"
],
"default": "app",
"description": "A prefix to apply to generated selectors."
},
{
"name": "project-root",
"type": "string",
"description": "The root directory of the new application."
},
{
"name": "routing",
"type": "boolean",
"default": false,
"description": "Create a routing NgModule."
},
{
"name": "skip-install",
"type": "boolean",
"default": false,
"description": "Skip installing dependency packages."
},
{
"name": "skip-package-json",
"type": "boolean",
"default": false,
"description": "Do not add dependencies to the \"package.json\" file."
},
{
"name": "skip-tests",
"type": "boolean",
"aliases": [
"S"
],
"default": false,
"description": "Do not create \"spec.ts\" test files for the application."
},
{
"name": "standalone",
"type": "boolean",
"default": false,
"description": "Creates an application based upon the standalone API, without NgModules."
},
{
"name": "strict",
"type": "boolean",
"default": true,
"description": "Creates an application with stricter bundle budgets settings."
},
{
"name": "style",
"type": "string",
"default": "css",
"enum": [
"css",
"scss",
"sass",
"less"
],
"description": "The file extension or preprocessor to use for style files."
},
{
"name": "view-encapsulation",
"type": "string",
"enum": [
"Emulated",
"None",
"ShadowDom"
],
"description": "The view encapsulation strategy to use in the new application."
}
],
"aliases": [
"app"
],
"deprecated": false
},
{
"name": "class",
"command": "class [name]",
"shortDescription": "Creates a new, generic class definition in the given project.",
"options": [
{
"name": "name",
"type": "string",
"description": "The name of the new class.",
"positional": 0
},
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "skip-tests",
"type": "boolean",
"default": false,
"description": "Do not create \"spec.ts\" test files for the new class."
},
{
"name": "type",
"type": "string",
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
}
],
"aliases": [
"cl"
],
"deprecated": false
},
{
"name": "component",
"command": "component [name]",
"shortDescription": "Creates a new, generic component definition in the given project.",
"options": [
{
"name": "change-detection",
"type": "string",
"aliases": [
"c"
],
"default": "Default",
"enum": [
"Default",
"OnPush"
],
"description": "The change detection strategy to use in the new component."
},
{
"name": "display-block",
"type": "boolean",
"aliases": [
"b"
],
"default": false,
"description": "Specifies if the style will contain `:host { display: block; }`."
},
{
"name": "export",
"type": "boolean",
"default": false,
"description": "The declaring NgModule exports this component."
},
{
"name": "flat",
"type": "boolean",
"default": false,
"description": "Create the new files at the top level of the current project."
},
{
"name": "inline-style",
"type": "boolean",
"aliases": [
"s"
],
"default": false,
"description": "Include styles inline in the component.ts file. Only CSS styles can be included inline. By default, an external styles file is created and referenced in the component.ts file."
},
{
"name": "inline-template",
"type": "boolean",
"aliases": [
"t"
],
"default": false,
"description": "Include template inline in the component.ts file. By default, an external template file is created and referenced in the component.ts file."
},
{
"name": "module",
"type": "string",
"aliases": [
"m"
],
"description": "The declaring NgModule."
},
{
"name": "name",
"type": "string",
"description": "The name of the component.",
"positional": 0
},
{
"name": "prefix",
"type": "string",
"aliases": [
"p"
],
"description": "The prefix to apply to the generated component selector."
},
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "selector",
"type": "string",
"description": "The HTML selector to use for this component."
},
{
"name": "skip-import",
"type": "boolean",
"default": false,
"description": "Do not import this component into the owning NgModule."
},
{
"name": "skip-selector",
"type": "boolean",
"default": false,
"description": "Specifies if the component should have a selector or not."
},
{
"name": "skip-tests",
"type": "boolean",
"default": false,
"description": "Do not create \"spec.ts\" test files for the new component."
},
{
"name": "standalone",
"type": "boolean",
"default": false,
"description": "Whether the generated component is standalone."
},
{
"name": "style",
"type": "string",
"default": "css",
"enum": [
"css",
"scss",
"sass",
"less",
"none"
],
"description": "The file extension or preprocessor to use for style files, or 'none' to skip generating the style file."
},
{
"name": "type",
"type": "string",
"default": "Component",
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
},
{
"name": "view-encapsulation",
"type": "string",
"aliases": [
"v"
],
"enum": [
"Emulated",
"None",
"ShadowDom"
],
"description": "The view encapsulation strategy to use in the new component."
}
],
"aliases": [
"c"
],
"deprecated": false
},
{
"name": "config",
"command": "config [type]",
"shortDescription": "Generates a configuration file in the given project.",
"options": [
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "type",
"type": "string",
"enum": [
"karma",
"browserslist"
],
"description": "Specifies which type of configuration file to create.",
"positional": 0
}
],
"aliases": [],
"deprecated": false
},
{
"name": "directive",
"command": "directive [name]",
"shortDescription": "Creates a new, generic directive definition in the given project.",
"options": [
{
"name": "export",
"type": "boolean",
"default": false,
"description": "The declaring NgModule exports this directive."
},
{
"name": "flat",
"type": "boolean",
"default": true,
"description": "When true (the default), creates the new files at the top level of the current project."
},
{
"name": "module",
"type": "string",
"aliases": [
"m"
],
"description": "The declaring NgModule."
},
{
"name": "name",
"type": "string",
"description": "The name of the new directive.",
"positional": 0
},
{
"name": "prefix",
"type": "string",
"aliases": [
"p"
],
"description": "A prefix to apply to generated selectors."
},
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "selector",
"type": "string",
"description": "The HTML selector to use for this directive."
},
{
"name": "skip-import",
"type": "boolean",
"default": false,
"description": "Do not import this directive into the owning NgModule."
},
{
"name": "skip-tests",
"type": "boolean",
"default": false,
"description": "Do not create \"spec.ts\" test files for the new class."
},
{
"name": "standalone",
"type": "boolean",
"default": false,
"description": "Whether the generated directive is standalone."
}
],
"aliases": [
"d"
],
"deprecated": false
},
{
"name": "enum",
"command": "enum [name]",
"shortDescription": "Generates a new, generic enum definition in the given project.",
"options": [
{
"name": "name",
"type": "string",
"description": "The name of the enum.",
"positional": 0
},
{
"name": "project",
"type": "string",
"description": "The name of the project in which to create the enum. Default is the configured default project for the workspace."
},
{
"name": "type",
"type": "string",
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\"."
}
],
"aliases": [
"e"
],
"deprecated": false
},
{
"name": "environments",
"command": "environments",
"shortDescription": "Generates and configures environment files for a project.",
"options": [
{
"name": "project",
"type": "string",
"description": "The name of the project."
}
],
"aliases": [],
"deprecated": false
},
{
"name": "guard",
"command": "guard [name]",
"shortDescription": "Generates a new, generic route guard definition in the given project.",
"options": [
{
"name": "flat",
"type": "boolean",
"default": true,
"description": "When true (the default), creates the new files at the top level of the current project."
},
{
"name": "functional",
"type": "boolean",
"default": true,
"description": "Specifies whether to generate a guard as a function."
},
{
"name": "implements",
"type": "array",
"aliases": [
"guardType"
],
"description": "Specifies which type of guard to create."
},
{
"name": "name",
"type": "string",
"description": "The name of the new route guard.",
"positional": 0
},
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "skip-tests",
"type": "boolean",
"default": false,
"description": "Do not create \"spec.ts\" test files for the new guard."
}
],
"aliases": [
"g"
],
"deprecated": false
},
{
"name": "interceptor",
"command": "interceptor [name]",
"shortDescription": "Creates a new, generic interceptor definition in the given project.",
"options": [
{
"name": "flat",
"type": "boolean",
"default": true,
"description": "When true (the default), creates files at the top level of the project."
},
{
"name": "functional",
"type": "boolean",
"default": false,
"description": "Creates the interceptor as a `HttpInterceptorFn`."
},
{
"name": "name",
"type": "string",
"description": "The name of the interceptor.",
"positional": 0
},
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "skip-tests",
"type": "boolean",
"default": false,
"description": "Do not create \"spec.ts\" test files for the new interceptor."
}
],
"aliases": [],
"deprecated": false
},
{
"name": "interface",
"command": "interface [name] [type]",
"shortDescription": "Creates a new, generic interface definition in the given project.",
"options": [
{
"name": "name",
"type": "string",
"description": "The name of the interface.",
"positional": 0
},
{
"name": "prefix",
"type": "string",
"description": "A prefix to apply to generated selectors."
},
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "type",
"type": "string",
"description": "Adds a developer-defined type to the filename, in the format \"name.type.ts\".",
"positional": 1
}
],
"aliases": [
"i"
],
"deprecated": false
},
{
"name": "library",
"command": "library [name]",
"shortDescription": "Creates a new, generic library project in the current workspace.",
"options": [
{
"name": "entry-file",
"type": "string",
"default": "public-api",
"description": "The path at which to create the library's public API file, relative to the workspace root."
},
{
"name": "name",
"type": "string",
"description": "The name of the library.",
"positional": 0
},
{
"name": "prefix",
"type": "string",
"aliases": [
"p"
],
"default": "lib",
"description": "A prefix to apply to generated selectors."
},
{
"name": "project-root",
"type": "string",
"description": "The root directory of the new library."
},
{
"name": "skip-install",
"type": "boolean",
"default": false,
"description": "Do not install dependency packages."
},
{
"name": "skip-package-json",
"type": "boolean",
"default": false,
"description": "Do not add dependencies to the \"package.json\" file. "
},
{
"name": "skip-ts-config",
"type": "boolean",
"default": false,
"description": "Do not update \"tsconfig.json\" to add a path mapping for the new library. The path mapping is needed to use the library in an app, but can be disabled here to simplify development."
},
{
"name": "standalone",
"type": "boolean",
"default": false,
"description": "Creates a library based upon the standalone API, without NgModules."
}
],
"aliases": [
"lib"
],
"deprecated": false
},
{
"name": "module",
"command": "module [name]",
"shortDescription": "Creates a new, generic NgModule definition in the given project.",
"options": [
{
"name": "flat",
"type": "boolean",
"default": false,
"description": "Create the new files at the top level of the current project root. "
},
{
"name": "module",
"type": "string",
"aliases": [
"m"
],
"description": "The declaring NgModule."
},
{
"name": "name",
"type": "string",
"description": "The name of the NgModule.",
"positional": 0
},
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "route",
"type": "string",
"description": "The route path for a lazy-loaded module. When supplied, creates a component in the new module, and adds the route to that component in the `Routes` array declared in the module provided in the `--module` option."
},
{
"name": "routing",
"type": "boolean",
"default": false,
"description": "Create a routing module."
},
{
"name": "routing-scope",
"type": "string",
"default": "Child",
"enum": [
"Child",
"Root"
],
"description": "The scope for the new routing module."
}
],
"aliases": [
"m"
],
"deprecated": false
},
{
"name": "pipe",
"command": "pipe [name]",
"shortDescription": "Creates a new, generic pipe definition in the given project.",
"options": [
{
"name": "export",
"type": "boolean",
"default": false,
"description": "The declaring NgModule exports this pipe."
},
{
"name": "flat",
"type": "boolean",
"default": true,
"description": "When true (the default) creates files at the top level of the project."
},
{
"name": "module",
"type": "string",
"aliases": [
"m"
],
"description": "The declaring NgModule."
},
{
"name": "name",
"type": "string",
"description": "The name of the pipe.",
"positional": 0
},
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "skip-import",
"type": "boolean",
"default": false,
"description": "Do not import this pipe into the owning NgModule."
},
{
"name": "skip-tests",
"type": "boolean",
"default": false,
"description": "Do not create \"spec.ts\" test files for the new pipe."
},
{
"name": "standalone",
"type": "boolean",
"default": false,
"description": "Whether the generated pipe is standalone."
}
],
"aliases": [
"p"
],
"deprecated": false
},
{
"name": "resolver",
"command": "resolver [name]",
"shortDescription": "Generates a new, generic resolver definition in the given project.",
"options": [
{
"name": "flat",
"type": "boolean",
"default": true,
"description": "When true (the default), creates the new files at the top level of the current project."
},
{
"name": "functional",
"type": "boolean",
"default": true,
"description": "Creates the resolver as a `ResolveFn`."
},
{
"name": "name",
"type": "string",
"description": "The name of the new resolver.",
"positional": 0
},
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "skip-tests",
"type": "boolean",
"default": false,
"description": "Do not create \"spec.ts\" test files for the new resolver."
}
],
"aliases": [
"r"
],
"deprecated": false
},
{
"name": "service",
"command": "service [name]",
"shortDescription": "Creates a new, generic service definition in the given project.",
"options": [
{
"name": "flat",
"type": "boolean",
"default": true,
"description": "When true (the default), creates files at the top level of the project."
},
{
"name": "name",
"type": "string",
"description": "The name of the service.",
"positional": 0
},
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "skip-tests",
"type": "boolean",
"default": false,
"description": "Do not create \"spec.ts\" test files for the new service."
}
],
"aliases": [
"s"
],
"deprecated": false
},
{
"name": "service-worker",
"command": "service-worker",
"shortDescription": "Pass this schematic to the \"run\" command to create a service worker",
"options": [
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "target",
"type": "string",
"default": "build",
"description": "The target to apply service worker to."
}
],
"aliases": [],
"deprecated": false
},
{
"name": "web-worker",
"command": "web-worker [name]",
"shortDescription": "Creates a new, generic web worker definition in the given project.",
"options": [
{
"name": "name",
"type": "string",
"description": "The name of the worker.",
"positional": 0
},
{
"name": "project",
"type": "string",
"description": "The name of the project."
},
{
"name": "snippet",
"type": "boolean",
"default": true,
"description": "Add a worker creation snippet in a sibling file of the same name."
}
],
"aliases": [],
"deprecated": false
}
]
}
-30
View File
@@ -1,30 +0,0 @@
{
"name": "lint",
"command": "ng lint [project]",
"shortDescription": "Runs linting tools on Angular application code in a given project folder.",
"longDescriptionRelativePath": "@angular/cli/src/commands/lint/long-description.md",
"longDescription": "The command takes an optional project name, as specified in the `projects` section of the `angular.json` workspace configuration file.\nWhen a project name is not supplied, executes the `lint` builder for all projects.\n\nTo use the `ng lint` command, use `ng add` to add a package that implements linting capabilities. Adding the package automatically updates your workspace configuration, adding a lint [CLI builder](guide/cli-builder).\nFor example:\n\n```json\n\"projects\": {\n \"my-project\": {\n ...\n \"architect\": {\n ...\n \"lint\": {\n \"builder\": \"@angular-eslint/builder:lint\",\n \"options\": {}\n }\n }\n }\n}\n```\n",
"aliases": [],
"deprecated": false,
"options": [
{
"name": "configuration",
"type": "string",
"aliases": [
"c"
],
"description": "One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section in angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "project",
"type": "string",
"description": "The name of the project to build. Can be an application or a library.",
"positional": 0
}
]
}
-183
View File
@@ -1,183 +0,0 @@
{
"name": "new",
"command": "ng new [name]",
"shortDescription": "Creates a new Angular workspace.",
"longDescriptionRelativePath": "@angular/cli/src/commands/new/long-description.md",
"longDescription": "Creates and initializes a new Angular application that is the default project for a new workspace.\n\nProvides interactive prompts for optional configuration, such as adding routing support.\nAll prompts can safely be allowed to default.\n\n- The new workspace folder is given the specified project name, and contains configuration files at the top level.\n\n- By default, the files for a new initial application (with the same name as the workspace) are placed in the `src/` subfolder.\n- The new application's configuration appears in the `projects` section of the `angular.json` workspace configuration file, under its project name.\n\n- Subsequent applications that you generate in the workspace reside in the `projects/` subfolder.\n\nIf you plan to have multiple applications in the workspace, you can create an empty workspace by using the `--no-create-application` option.\nYou can then use `ng generate application` to create an initial application.\nThis allows a workspace name different from the initial app name, and ensures that all applications reside in the `/projects` subfolder, matching the structure of the configuration file.\n",
"aliases": [
"n"
],
"deprecated": false,
"options": [
{
"name": "collection",
"type": "string",
"aliases": [
"c"
],
"description": "A collection of schematics to use in generating the initial application."
},
{
"name": "commit",
"type": "boolean",
"default": true,
"description": "Initial git repository commit information."
},
{
"name": "create-application",
"type": "boolean",
"default": true,
"description": "Create a new initial application project in the 'src' folder of the new workspace. When false, creates an empty workspace with no initial application. You can then use the generate application command so that all applications are created in the projects folder."
},
{
"name": "defaults",
"type": "boolean",
"default": false,
"description": "Disable interactive input prompts for options with a default."
},
{
"name": "directory",
"type": "string",
"description": "The directory name to create the workspace in."
},
{
"name": "dry-run",
"type": "boolean",
"default": false,
"description": "Run through and reports activity without writing out results."
},
{
"name": "force",
"type": "boolean",
"default": false,
"description": "Force overwriting of existing files."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "inline-style",
"type": "boolean",
"aliases": [
"s"
],
"description": "Include styles inline in the component TS file. By default, an external styles file is created and referenced in the component TypeScript file."
},
{
"name": "inline-template",
"type": "boolean",
"aliases": [
"t"
],
"description": "Include template inline in the component TS file. By default, an external template file is created and referenced in the component TypeScript file."
},
{
"name": "interactive",
"type": "boolean",
"default": true,
"description": "Enable interactive input prompts."
},
{
"name": "minimal",
"type": "boolean",
"default": false,
"description": "Create a workspace without any testing frameworks. (Use for learning purposes only.)"
},
{
"name": "name",
"type": "string",
"description": "The name of the new workspace and initial project.",
"positional": 0
},
{
"name": "new-project-root",
"type": "string",
"default": "projects",
"description": "The path where new projects will be created, relative to the new workspace root."
},
{
"name": "package-manager",
"type": "string",
"enum": [
"npm",
"yarn",
"pnpm",
"cnpm"
],
"description": "The package manager used to install dependencies."
},
{
"name": "prefix",
"type": "string",
"aliases": [
"p"
],
"default": "app",
"description": "The prefix to apply to generated selectors for the initial project."
},
{
"name": "routing",
"type": "boolean",
"description": "Generate a routing module for the initial project."
},
{
"name": "skip-git",
"type": "boolean",
"aliases": [
"g"
],
"default": false,
"description": "Do not initialize a git repository."
},
{
"name": "skip-install",
"type": "boolean",
"default": false,
"description": "Do not install dependency packages."
},
{
"name": "skip-tests",
"type": "boolean",
"aliases": [
"S"
],
"default": false,
"description": "Do not generate \"spec.ts\" test files for the new project."
},
{
"name": "standalone",
"type": "boolean",
"default": false,
"description": "Creates an application based upon the standalone API, without NgModules."
},
{
"name": "strict",
"type": "boolean",
"default": true,
"description": "Creates a workspace with stricter type checking and stricter bundle budgets settings. This setting helps improve maintainability and catch bugs ahead of time. For more information, see https://angular.io/guide/strict-mode"
},
{
"name": "style",
"type": "string",
"enum": [
"css",
"scss",
"sass",
"less"
],
"description": "The file extension or preprocessor to use for style files."
},
{
"name": "view-encapsulation",
"type": "string",
"enum": [
"Emulated",
"None",
"ShadowDom"
],
"description": "The view encapsulation strategy to use in the initial project."
}
]
}
-22
View File
@@ -1,22 +0,0 @@
{
"name": "run",
"command": "ng run <target>",
"shortDescription": "Runs an Architect target with an optional custom builder configuration defined in your project.",
"longDescriptionRelativePath": "@angular/cli/src/commands/run/long-description.md",
"longDescription": "Architect is the tool that the CLI uses to perform complex tasks such as compilation, according to provided configurations.\nThe CLI commands run Architect targets such as `build`, `serve`, `test`, and `lint`.\nEach named target has a default configuration, specified by an `options` object,\nand an optional set of named alternate configurations in the `configurations` object.\n\nFor example, the `serve` target for a newly generated app has a predefined\nalternate configuration named `production`.\n\nYou can define new targets and their configuration options in the `architect` section\nof the `angular.json` file which you can run them from the command line using the `ng run` command.\n",
"aliases": [],
"deprecated": false,
"options": [
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "target",
"type": "string",
"description": "The Architect target to run provided in the following format `project:target[:configuration]`.",
"positional": 0
}
]
}
-132
View File
@@ -1,132 +0,0 @@
{
"name": "serve",
"command": "ng serve [project]",
"shortDescription": "Builds and serves your application, rebuilding on file changes.",
"aliases": [
"s"
],
"deprecated": false,
"options": [
{
"name": "allowed-hosts",
"type": "array",
"description": "List of hosts that are allowed to access the dev server."
},
{
"name": "browser-target",
"type": "string",
"description": "A browser builder target to serve in the format of `project:target[:configuration]`. You can also pass in more than one configuration name as a comma-separated list. Example: `project:target:production,staging`."
},
{
"name": "configuration",
"type": "string",
"aliases": [
"c"
],
"description": "One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section in angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations."
},
{
"name": "disable-host-check",
"type": "boolean",
"default": false,
"description": "Don't verify connected clients are part of allowed hosts."
},
{
"name": "force-esbuild",
"type": "boolean",
"default": false,
"description": "Force the development server to use the 'browser-esbuild' builder when building. This is a developer preview option for the esbuild-based build system."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "hmr",
"type": "boolean",
"default": false,
"description": "Enable hot module replacement."
},
{
"name": "host",
"type": "string",
"default": "localhost",
"description": "Host to listen on."
},
{
"name": "live-reload",
"type": "boolean",
"default": true,
"description": "Whether to reload the page on change, using live-reload."
},
{
"name": "open",
"type": "boolean",
"aliases": [
"o"
],
"default": false,
"description": "Opens the url in default browser."
},
{
"name": "poll",
"type": "number",
"description": "Enable and define the file watching poll time period in milliseconds."
},
{
"name": "port",
"type": "number",
"default": 4200,
"description": "Port to listen on."
},
{
"name": "project",
"type": "string",
"description": "The name of the project to build. Can be an application or a library.",
"positional": 0
},
{
"name": "proxy-config",
"type": "string",
"description": "Proxy configuration file. For more information, see https://angular.io/guide/build#proxying-to-a-backend-server."
},
{
"name": "public-host",
"type": "string",
"description": "The URL that the browser client (or live-reload client, if enabled) should use to connect to the development server. Use for a complex dev server setup, such as one with reverse proxies."
},
{
"name": "serve-path",
"type": "string",
"description": "The pathname where the application will be served."
},
{
"name": "ssl",
"type": "boolean",
"default": false,
"description": "Serve using HTTPS."
},
{
"name": "ssl-cert",
"type": "string",
"description": "SSL certificate to use for serving HTTPS."
},
{
"name": "ssl-key",
"type": "string",
"description": "SSL key to use for serving HTTPS."
},
{
"name": "verbose",
"type": "boolean",
"description": "Adds more details to output logging."
},
{
"name": "watch",
"type": "boolean",
"default": true,
"description": "Rebuild on change."
}
]
}
-127
View File
@@ -1,127 +0,0 @@
{
"name": "test",
"command": "ng test [project]",
"shortDescription": "Runs unit tests in a project.",
"longDescriptionRelativePath": "@angular/cli/src/commands/test/long-description.md",
"longDescription": "Takes the name of the project, as specified in the `projects` section of the `angular.json` workspace configuration file.\nWhen a project name is not supplied, it will execute for all projects.\n",
"aliases": [
"t"
],
"deprecated": false,
"options": [
{
"name": "browsers",
"type": "string",
"description": "Override which browsers tests are run against."
},
{
"name": "code-coverage",
"type": "boolean",
"default": false,
"description": "Output a code coverage report."
},
{
"name": "code-coverage-exclude",
"type": "array",
"description": "Globs to exclude from code coverage."
},
{
"name": "configuration",
"type": "string",
"aliases": [
"c"
],
"description": "One or more named builder configurations as a comma-separated list as specified in the \"configurations\" section in angular.json.\nThe builder uses the named configurations to run the given target.\nFor more information, see https://angular.io/guide/workspace-config#alternate-build-configurations."
},
{
"name": "exclude",
"type": "array",
"description": "Globs of files to exclude, relative to the project root."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "include",
"type": "array",
"description": "Globs of files to include, relative to project root. \nThere are 2 special cases:\n - when a path to directory is provided, all spec files ending \".spec.@(ts|tsx)\" will be included\n - when a path to a file is provided, and a matching spec file exists it will be included instead."
},
{
"name": "inline-style-language",
"type": "string",
"default": "css",
"enum": [
"css",
"less",
"sass",
"scss"
],
"description": "The stylesheet language to use for the application's inline component styles."
},
{
"name": "karma-config",
"type": "string",
"description": "The name of the Karma configuration file."
},
{
"name": "main",
"type": "string",
"description": "The name of the main entry-point file."
},
{
"name": "poll",
"type": "number",
"description": "Enable and define the file watching poll time period in milliseconds."
},
{
"name": "polyfills",
"type": "string",
"description": "Polyfills to be included in the build."
},
{
"name": "preserve-symlinks",
"type": "boolean",
"description": "Do not use the real path when resolving modules. If unset then will default to `true` if NodeJS option --preserve-symlinks is set."
},
{
"name": "progress",
"type": "boolean",
"default": true,
"description": "Log progress to the console while building."
},
{
"name": "project",
"type": "string",
"description": "The name of the project to build. Can be an application or a library.",
"positional": 0
},
{
"name": "reporters",
"type": "array",
"description": "Karma reporters to use. Directly passed to the karma runner."
},
{
"name": "source-map",
"type": "boolean",
"default": true,
"description": "Output source maps for scripts and styles. For more information, see https://angular.io/guide/workspace-config#source-map-configuration."
},
{
"name": "ts-config",
"type": "string",
"description": "The name of the TypeScript configuration file."
},
{
"name": "watch",
"type": "boolean",
"description": "Run build when files change."
},
{
"name": "web-worker-ts-config",
"type": "string",
"description": "TypeScript configuration for Web Worker modules."
}
]
}
-83
View File
@@ -1,83 +0,0 @@
{
"name": "update",
"command": "ng update [packages..]",
"shortDescription": "Updates your workspace and its dependencies. See https://update.angular.io/.",
"longDescriptionRelativePath": "@angular/cli/src/commands/update/long-description.md",
"longDescription": "Perform a basic update to the current stable release of the core framework and CLI by running the following command.\n\n```\nng update @angular/cli @angular/core\n```\n\nTo update to the next beta or pre-release version, use the `--next` option.\n\nTo update from one major version to another, use the format\n\n```\nng update @angular/cli@^<major_version> @angular/core@^<major_version>\n```\n\nWe recommend that you always update to the latest patch version, as it contains fixes we released since the initial major release.\nFor example, use the following command to take the latest 10.x.x version and use that to update.\n\n```\nng update @angular/cli@^10 @angular/core@^10\n```\n\nFor detailed information and guidance on updating your application, see the interactive [Angular Update Guide](https://update.angular.io/).\n",
"aliases": [],
"deprecated": false,
"options": [
{
"name": "allow-dirty",
"type": "boolean",
"default": false,
"description": "Whether to allow updating when the repository contains modified or untracked files."
},
{
"name": "create-commits",
"type": "boolean",
"aliases": [
"C"
],
"default": false,
"description": "Create source control commits for updates and migrations."
},
{
"name": "force",
"type": "boolean",
"default": false,
"description": "Ignore peer dependency version mismatches."
},
{
"name": "from",
"type": "string",
"description": "Version from which to migrate from. Only available with a single package being updated, and only with 'migrate-only'."
},
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
},
{
"name": "migrate-only",
"type": "boolean",
"description": "Only perform a migration, do not update the installed version."
},
{
"name": "name",
"type": "string",
"description": "The name of the migration to run. Only available with a single package being updated, and only with 'migrate-only' option."
},
{
"name": "next",
"type": "boolean",
"default": false,
"description": "Use the prerelease version, including beta and RCs."
},
{
"name": "packages",
"type": "array",
"default": [],
"description": "The names of package(s) to update.",
"positional": 0
},
{
"name": "packages",
"type": "string",
"default": [],
"description": "The names of package(s) to update.",
"positional": 0
},
{
"name": "to",
"type": "string",
"description": "Version up to which to apply migrations. Only available with a single package being updated, and only with 'migrate-only' option. Requires 'from' to be specified. Default to the installed version detected."
},
{
"name": "verbose",
"type": "boolean",
"default": false,
"description": "Display additional details about internal operations during execution."
}
]
}
-16
View File
@@ -1,16 +0,0 @@
{
"name": "version",
"command": "ng version",
"shortDescription": "Outputs Angular CLI version.",
"aliases": [
"v"
],
"deprecated": false,
"options": [
{
"name": "help",
"type": "boolean",
"description": "Shows a help message for this command in the console."
}
]
}
+3 -3
View File
@@ -20,12 +20,12 @@ For details about changes between versions, and information about updating from
Invoke the tool on the command line through the `ng` executable.
Online help is available on the command line.
Enter the following to list commands or options for a given command \(such as [new](cli/new)\) with a short description.
Enter the following to list commands or options for a given command \(such as [generate](cli/generate)\) with a short description.
<code-example format="shell" language="shell">
ng --help
ng new --help
ng help
ng generate --help
</code-example>
+15 -25
View File
@@ -23,13 +23,16 @@
],
"styles": [
],
"scripts": [],
"polyfills": [
"zone.js"
]
"scripts": []
},
"configurations": {
"production": {
"fileReplacements": [
{
"replace": "src/environments/environment.ts",
"with": "src/environments/environment.prod.ts"
}
],
"optimization": true,
"outputHashing": "all",
"sourceMap": false,
@@ -39,14 +42,6 @@
"extractLicenses": true,
"vendorChunk": false,
"buildOptimizer": true
},
"development": {
"buildOptimizer": false,
"optimization": false,
"vendorChunk": true,
"extractLicenses": false,
"sourceMap": true,
"namedChunks": true
}
}
},
@@ -58,12 +53,8 @@
"configurations": {
"production": {
"browserTarget": "addOneButton:build:production"
},
"development": {
"browserTarget": "addOneButton:build:development"
}
},
"defaultConfiguration": "development"
}
},
"extract-i18n": {
"builder": "@angular-devkit/build-angular:extract-i18n",
@@ -83,19 +74,18 @@
"assets": [
"src/favicon.ico",
"src/assets"
],
"polyfills": [
"zone.js",
"zone.js/testing"
]
}
},
"lint": {
"builder": "@angular-eslint/builder:lint",
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"lintFilePatterns": [
"src/**/*.ts",
"src/**/*.html"
"tsConfig": [
"src/tsconfig.app.json",
"src/tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
+18 -19
View File
@@ -3,13 +3,15 @@
"version": "0.0.0",
"private": true,
"dependencies": {
"@angular/common": "^16.0.0",
"@angular/compiler": "^16.0.0",
"@angular/core": "^16.0.0",
"@angular/platform-browser": "^16.0.0",
"rxjs": "^7.8.0",
"tslib": "^2.5.3",
"zone.js": "^0.13.0"
"@angular/animations": "15.1.0-next.2",
"@angular/common": "15.1.0-next.2",
"@angular/compiler": "15.1.0-next.2",
"@angular/core": "15.1.0-next.2",
"@angular/platform-browser": "15.1.0-next.2",
"@angular/platform-browser-dynamic": "15.1.0-next.2",
"rxjs": "^7.5.2",
"tslib": "^2.3.1",
"zone.js": "^0.12.0"
},
"scripts": {
"ng": "ng",
@@ -20,18 +22,12 @@
"e2e": "ng e2e"
},
"devDependencies": {
"@angular-devkit/build-angular": "^16.0.0",
"@angular-eslint/builder": "16.0.3",
"@angular-eslint/eslint-plugin": "16.0.3",
"@angular-eslint/eslint-plugin-template": "16.0.3",
"@angular-eslint/schematics": "16.0.3",
"@angular-eslint/template-parser": "16.0.3",
"@angular/cli": "^16.0.0",
"@angular/compiler-cli": "^16.0.0",
"@angular-devkit/build-angular": "~15.0.1",
"@angular/cli": "~15.0.1",
"@angular/compiler-cli": "~15.0.1",
"@types/jasmine": "~4.3.0",
"@typescript-eslint/eslint-plugin": "5.59.7",
"@typescript-eslint/parser": "5.59.7",
"eslint": "^8.40.0",
"@types/node": "^12.11.1",
"codelyzer": "^6.0.0",
"jasmine-core": "~4.5.0",
"jasmine-spec-reporter": "~7.0.0",
"karma": "~6.4.1",
@@ -39,6 +35,9 @@
"karma-coverage": "~2.2.0",
"karma-jasmine": "~5.1.0",
"karma-jasmine-html-reporter": "^2.0.0",
"typescript": "~5.0.0"
"protractor": "~7.0.0",
"ts-node": "~10.9.0",
"tslint": "~6.1.0",
"typescript": "~4.8.4"
}
}
+1 -1
View File
@@ -1,5 +1,5 @@
// import required packages
import 'zone.js';
import 'zone.js/dist/zone';
import { Component } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
@@ -0,0 +1 @@
import 'zone.js/dist/zone';
+1 -1
View File
@@ -10,7 +10,7 @@
"module": "esnext",
"moduleResolution": "node",
"importHelpers": true,
"target": "es2022",
"target": "es2015",
"typeRoots": [
"node_modules/@types"
],
File diff suppressed because it is too large Load Diff
+7 -15
View File
@@ -1,10 +1,10 @@
@name `inject()` must be called from an injection context
@category runtime
@shortDescription `inject()` must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `runInInjectionContext`.
@shortDescription `inject()` must be called from an injection context such as a constructor, a factory function, a field initializer, or a function used with `EnvironmentInjector#runInContext`.
@description
You see this error when you try to use the [`inject`](api/core/inject) function outside of the allowed [injection context](guide/dependency-injection-context). The injection context is available during the class creation and initialization. It is also available to functions
used with `runInInjectionContext`.
You see this error when you try to use the `inject()` function outside of the allowed injection context. The injection context is available during the class creation and initialization. It is also available to functions
used with `EnvironmentInjector#runInContext`.
In practice the `inject()` calls are allowed in a constructor, a constructor parameter and a field initializer:
@@ -23,7 +23,7 @@ export class Car {
}
```
It is also legal to call [`inject`](api/core/inject) from a provider's factory:
It is also legal to call `inject` from a provider's factory:
```typescript
providers: [
@@ -35,7 +35,7 @@ providers: [
]
```
Calls to the [`inject`](api/core/inject) function outside of the class creation or `runInInjectionContext` will result in error. Most notably, calls to `inject()` are disallowed after a class instance was created, in methods (including lifecycle hooks):
Calls to the `inject()` function outside of the class creation or `runInContext` will result in error. Most notably, calls to `inject()` are disallowed after a class instance was created, in methods (including lifecycle hooks):
```typescript
@Component({ ... })
@@ -52,15 +52,7 @@ export class CarComponent {
Work backwards from the stack trace of the error to identify a place where the disallowed call to `inject()` is located.
To fix the error move the [`inject`](api/core/inject) call to an allowed place (usually a class constructor or a field initializer).
**Note:** If you are running in a test context, `TestBed.runInInjectionContext` will enable `inject()` to succeed.
```typescript
TestBed.runInInjectionContext(() => {
// ...
});
```
To fix the error move the `inject()` call to an allowed place (usually a class constructor or a field initializer).
<!-- links -->
@@ -68,4 +60,4 @@ TestBed.runInInjectionContext(() => {
<!-- end links -->
@reviewed 2023-04-11
@reviewed 2022-05-27
-23
View File
@@ -1,23 +0,0 @@
@name JSONP support in HttpClient configuration
@category runtime
@shortDescription Missing JSONP support in HttpClient configuration
@description
Angular produces this error when you attempt a `JSONP` request without providing the necessary support for it in the `HttpClient` configuration.
To enable `JSONP` support, you can do one of the following:
- add the `withJsonpSupport()` as an argument during the `provideHttpClient` function call (e.g. `provideHttpClient(withJsonpSupport())`) when `bootstrapApplication` is used
- import the `HttpClientJsonpModule` in your root AppModule, when NgModule-based bootstrap is used.
@debugging
Make sure that the JSONP support is added into your application either by calling the `withJsonpSupport()` function (when the `provideHttpClient()` is used) or importing the `HttpClientJsonpModule` module as described above.
See [Make a JSONP request](/guide/http-make-jsonp-request) for more info.
<!-- links -->
<!-- external links -->
<!-- end links -->
@reviewed 2023-05-02
-44
View File
@@ -1,44 +0,0 @@
@name Hydration Node Mismatch
@category runtime
@shortDescription During hydration, Angular expected a DOM node, but either the actual DOM was different or was not found.
@description
This error means that during the hydration process, Angular expected a DOM structure as rendered and annotated during server side rendering. However, on the client, the DOM tree was different than the server rendered DOM tree.
This error typically happens due to direct DOM manipulation using native browser APIs that alter the DOM structure outside of what Angular produced. It will also occur if you use `innerHTML` or `outerHTML` to set HTML content, which similarly alters the DOM structure outside of what Angular produced. You can resolve this by refactoring the component to use native Angular APIs instead of native APIs. If that's not possible, you can add the `ngSkipHydration` attribute to your component's host node, which will disable hydration for the component and its children. `ngSkipHydration` should only be used as a last resort and should be considered a bug that needs to be fixed.
More information about hydration can be found in [this guide](guide/hydration).
The following example will trigger the error.
```typescript
@Component({
standalone: true,
selector: 'example-cmp',
template: '<div><span>world</span></div>',
})
export class ExampleCmp {
hostElement = inject(ElementRef).nativeElement;
ngOnInit() {
// Create a new <p> element with the `Hello` text inside
const newNode = document.createElement('p');
newNode.innerHTML = 'Hello';
// Insert the <p> before the first element. Since Angular has no information
// about the <p> element, it will be looking for the <div> element at the first
// element position instead. As a result, a hydration mismatch error would be
// thrown. Instead, update component's template to create the <p> element.
this.hostElement.insertBefore(newNode, this.hostElement.firstChild);
}
}
```
@debugging
The error message in the developer console should contain information on a specific part of the application's DOM structure that is causing the problem. Review that part of the application for hydration-related errors, such as direct DOM manipulation using native APIs.
Check that your template has valid HTML structure. See more information in the [hydration guide](guide/hydration#valid-html-structure).
You can add the `ngSkipHydration` attribute to your component host node as a possible workaround.
If your application works in development environment, but you see hydration errors in production builds, make sure that the generated HTML that is delivered to a browser contains comment nodes produced by Angular during the rendering on the server. Those comment nodes are used by Angular runtime as anchors for view containers (with and without hydration) and hydration process expects them to be present at their original locations. If you have a custom logic to remove comment nodes from the HTML generated by the server-side rendering or you've configured your CDN to remove them before serving the content - disable the comment nodes removal and check if hydration errors are gone.
-9
View File
@@ -1,9 +0,0 @@
@name Hydration Missing Siblings
@category runtime
@shortDescription During hydration, Angular expected more sibling DOM nodes to be present than what was found.
@description
This error is similar to the [error NG0500](errors/NG0500), but it indicates that Angular hydration process expected more siblings present in the DOM structure at a particular location. Please refer to the [error NG0500](errors/NG0500) page for additional information.
@debugging
See the [error NG0500](errors/NG0500) for more information on how to debug this error.
-9
View File
@@ -1,9 +0,0 @@
@name Hydration Missing Node
@category runtime
@shortDescription During hydration, Angular expected to find a DOM node, but it did not exist.
@description
This error is similar to the [error NG0500](errors/NG0500), but it indicates that Angular hydration process expected a node to be present in the DOM structure at a particular location and none was found. Please refer to the [error NG0500](errors/NG0500) page for additional information.
@debugging
See the [error NG0500](errors/NG0500) for more information on how to debug this error.
-49
View File
@@ -1,49 +0,0 @@
@name Hydration Unsupported Projection of DOM Nodes
@category runtime
@shortDescription During serialization, Angular detected DOM nodes that were created outside of Angular's context and used for content projection.
@description
This error means that during the server side serialization process, Angular encountered nodes that were created outside of Angular's context (i.e. using native DOM APIs) and found those nodes were provided as projectible nodes. They were likely provided using `ViewContainerRef.createComponent` or `createComponent` APIs. Angular hydration does not support this use case.
More information about hydration can be found in [this guide](guide/hydration).
The following examples will trigger the error.
```typescript
@Component({
standalone: true,
selector: 'dynamic',
template: `
<ng-content />
`,
})
class DynamicComponent {
}
@Component({
standalone: true,
selector: 'app',
template: `<div #target></div>`,
})
class SimpleComponent {
@ViewChild('target', {read: ViewContainerRef}) vcr!: ViewContainerRef;
envInjector = inject(EnvironmentInjector);
ngAfterViewInit() {
const div = document.createElement('div');
const p = document.createElement('p');
// In this test we create DOM nodes outside of Angular context
// (i.e. not using Angular APIs) and try to content-project them.
// This is an unsupported pattern and an exception will be thrown.
const compRef = createComponent(DynamicComponent, {
environmentInjector: this.envInjector,
projectableNodes: [[div, p]]
});
}
}
```
@debugging
The error message in the developer console should contain information on a specific part of the application's DOM structure that is causing the problem. Review that part of the application for hydration-related errors, such as direct DOM manipulation using native APIs.
You can add the `ngSkipHydration` attribute to your component host node as a possible workaround.
-55
View File
@@ -1,55 +0,0 @@
@name Skip hydration flag is applied to an invalid node
@category runtime
@shortDescription The ngSkipHydration attribute was added to an element that is not a component host.
@description
This error occurs when the `ngSkipHydration` attribute was added to an inappropriate DOM node. The `ngSkipHydration` attribute can only be applied to component host nodes either directly in the template or via a host binding. It cannot be applied to other DOM nodes and will have no effect if done so other than causing this error.
More information about hydration can be found in [this guide](guide/hydration).
The following examples will trigger the error.
**Example 1**
In this example, the `ngSkipHydration` attribute is applied to a `<div>` using host bindings of a directive. Since the `<div>` doesn't act as a component host node, Angular will throw an error.
```typescript
@Directive({
standalone: true,
selector: '[dir]',
host: {ngSkipHydration: 'true'},
})
class Dir {
}
@Component({
standalone: true,
selector: 'app',
imports: [Dir],
template: `
<div dir></div>
`,
})
class SimpleComponent {
}
```
**Example 2**
In this example, the `ngSkipHydration` is applied to a `<div>` as an attribute via a template.
Since the `<div>` doesn't act as a component host node, Angular will throw an error.
```typescript
@Component({
standalone: true,
selector: 'app',
template: `
<div ngSkipHydration></div>
`,
})
class SimpleComponent {
}
```
@debugging
Remove the `ngSkipHydration` attribute from any invalid DOM nodes. Alternatively, move the `ngSkipHydration` attribute to the component host node either in a template or via a host binding.
-26
View File
@@ -1,26 +0,0 @@
@name No hydration info in server response
@category runtime
@shortDescription No hydration info is present in server response.
@description
This error occurs when hydration is enabled on the client, but the server response
doesn't contain special serialized information about the application that hydration
logic relies on.
This can happen when the `provideClientHydration()` function is included in the client
part of the application configuration, but is missing in the server part of the configuration.
In applications with the default project structure (generated by the `ng new`),
the `provideClientHydration()` call is added either into the `providers` array of
the main `AppModule` (which is imported into the server module) or into a set of
providers that are included into both client and server configurations.
If you have a custom setup where client and server configuration are independent
and do not share common set of providers, make sure that the `provideClientHydration()`
is also included into the set of providers used to bootstrap an application on the server.
More information about hydration can be found in [this guide](guide/hydration).
@debugging
Verify that the `provideClientHydration()` call is included into a set of providers
that is used to bootstrap an application on the server.
-53
View File
@@ -1,53 +0,0 @@
@name NgZone remains unstable
@category runtime
@shortDescription NgZone remains unstable after a long period of time
@description
This warning occurs when hydration is enabled on the client but the NgZone remains unstable for a long period of time.
The {@link ApplicationRef#isStable} API uses NgZone to report when an application becomes `stable` and `unstable`. An application is considered stable when there are no pending microtasks or macrotasks.
Angular Hydration relies on a signal from Zone.js when it becomes stable inside an application:
* during the server-side rendering (SSR) to start the serialization process
* in a browser this signal is used to start the post-hydration cleanup to remove DOM nodes that remained unclaimed
This warning is displayed when the `ApplicationRef.isStable()` doesn't emit `true` within 10 seconds. If this is intentional and your application becomes stable later, you can ignore this warning.
**Macrotasks**
Macrotasks include functions like `setInterval`, `setTimeout`, `requestAnimationFrame` etc.
If one of these functions is called in the initialization phase of the app or the bootstrapped components, the application will remain unstable.
```typescript
@Component({
standalone: true,
selector: 'app',
template: ``,
})
class SimpleComponent {
constructor() {
setInterval(() => { ... }, 1000)
// or
setTimeout(() => { ... }, 10_000)
}
}
```
If these functions need to be called in the initialization phase, invoking them outside the angular zone solves the issue.
```typescript
class SimpleComponent {
constructor() {
inject(NgZone).runOutsideAngular(() => {
setInterval(() => {}, 1000);
})
}
}
```
@debugging
Verify that you don't have any long standing microtask or macrotasks.
-33
View File
@@ -1,33 +0,0 @@
@name Root element was not found.
@category runtime
@shortDescription Root element was not found during bootstrap.
@description
Boostraped components are defined in the `bootstrap` property of an `@NgModule` decorator or as the first parameter of `boopstrapApplication` for standalone components.
This error happens when Angular tries to boostrap one of these components but cannot find its corresponing node in the DOM.
@debugging
This issue occurs when the selector mismatches the tag
```typescript
@Component({
selector: 'my-app',
...
})
class AppComponent {}
```
```html
<html>
<app-root></app-root> <!-- Doesn't match the selector -->
</html>
```
Replace the tag with the correct one:
```html
<html>
<my-app></my-app> <!-- OK -->
</html>
```
-65
View File
@@ -1,65 +0,0 @@
@name Component ID generation collision
@category runtime
@shortDescription Component ID generation collision detected
@description
When creating components, Angular generates a unique component ID for each component. This is generated using the Angular component metadata, including but not limited: selectors, the number of host bindings, class property names, view and content queries. When two components metadata are identical (often times sharing the same selector), an ID generation collision will occur.
Component IDs are used in Angular internally:
- for extra annotations of DOM nodes for style encapsulation
- during [hydration](guide/hydration) to restore an application state after [server-side rendering](guide/universal).
To avoid issues that might be caused by the component ID collision, it's recommended to resolve them as described below.
** Example of a Component ID collision **
```typescript
@Component({
selector: 'my-component',
template: 'complex-template',
})
class SomeComponent {}
@Component({
selector: 'my-component',
template: 'empty-template',
})
class SomeMockedComponent {}
```
Having these two components defined will trigger an ID generation collision and during development a warning will be displayed.
@debugging
The warning message includes the class name of the two components whose IDs are colliding.
The problem can be resolved using one of the solutions below:
1. Change the selector of one of the two components. For example by using a pseudo-selector with no effect like `:not()` and a different tag name.
```typescript
@Component({
selector: 'my-component:not(p)',
template: 'empty-template',
})
class SomeMockedComponent {}
```
2. Add an extra host attribute to one of the components.
```typescript
@Component({
selector: 'my-component',
template: 'complex-template',
host: {'some-binding': 'some-value'},
})
class SomeComponent {}
```
<!-- links -->
<!-- external links -->
<!-- end links -->
@reviewed 2023-04-25
-14
View File
@@ -1,14 +0,0 @@
@name Hydration with unsupported Zone.js instance.
@category runtime
@shortDescription Hydration was enabled with unsupported Zone.js instance.
@description
This warning means that the hydration was enabled for an application that was configured to use an unsupported version of Zone.js: either a custom or a "noop" one (see more info [here](api/core/BootstrapOptions#ngZone)).
Hydration relies on a signal from Zone.js when it becomes stable inside an application, so that Angular can start the serialization process on the server or post-hydration cleanup on the client (to remove DOM nodes that remained unclaimed).
Providing a custom or a "noop" Zone.js implementation may lead to a different timing of the "stable" event, thus triggering the serialization or the cleanup too early or too late. This is not yet a fully supported configuration.
If you use a custom Zone.js implementation, make sure that the "onStable" event is emitted at the right time and does not result in incorrect application behavior with hydration.
More information about hydration can be found in the [hydration guide](guide/hydration).
+26 -142
View File
@@ -1,16 +1,23 @@
{
"root": true,
"ignorePatterns": ["*.js", "styleguide/**/*.avoid.ts"],
"ignorePatterns": [
"*.js",
"styleguide/**/*.avoid.ts"
],
"overrides": [
{
"files": ["*.html"],
"extends": ["plugin:@angular-eslint/template/recommended"],
"files": [
"*.html"
],
"extends": [
"plugin:@angular-eslint/template/recommended"
],
"rules": {
"@angular-eslint/template/alt-text": "error",
"@angular-eslint/template/elements-content": "error",
"@angular-eslint/template/label-has-associated-control": "error",
"@angular-eslint/template/table-scope": "error",
"@angular-eslint/template/valid-aria": "error",
"@angular-eslint/template/accessibility-alt-text": "error",
"@angular-eslint/template/accessibility-elements-content": "error",
"@angular-eslint/template/accessibility-label-has-associated-control": "error",
"@angular-eslint/template/accessibility-table-scope": "error",
"@angular-eslint/template/accessibility-valid-aria": "error",
"@angular-eslint/template/click-events-have-key-events": "error",
"@angular-eslint/template/eqeqeq": "off",
"@angular-eslint/template/mouse-events-have-key-events": "error",
@@ -20,135 +27,19 @@
}
},
{
"files": ["*.ts"],
"files": [
"*.ts"
],
"extends": [
"plugin:@angular-eslint/ng-cli-compat",
"plugin:@angular-eslint/ng-cli-compat--formatting-add-on",
"plugin:@angular-eslint/template/process-inline-templates"
],
"parserOptions": {
"createDefaultProgram": false,
"project": "content/examples/tsconfig.eslint.json"
},
"plugins": [
"@typescript-eslint",
"@angular-eslint", "eslint-plugin-import", "eslint-plugin-jsdoc", "eslint-plugin-prefer-arrow"],
"rules": {
"@typescript-eslint/interface-name-prefix": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"sort-keys": "off",
"@angular-eslint/component-class-suffix": "error",
"@angular-eslint/contextual-lifecycle": "error",
"@angular-eslint/directive-class-suffix": "error",
"@angular-eslint/no-conflicting-lifecycle": "error",
"@angular-eslint/no-host-metadata-property": "error",
"@angular-eslint/no-input-rename": "error",
"@angular-eslint/no-inputs-metadata-property": "error",
"@angular-eslint/no-output-native": "error",
"@angular-eslint/no-output-on-prefix": "error",
"@angular-eslint/no-output-rename": "error",
"@angular-eslint/no-outputs-metadata-property": "error",
"@angular-eslint/use-lifecycle-interface": "error",
"@angular-eslint/use-pipe-transform-interface": "error",
"@typescript-eslint/adjacent-overload-signatures": "error",
"@typescript-eslint/array-type": "off",
"@typescript-eslint/consistent-type-assertions": "error",
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-inferrable-types": [
"error",
{
"ignoreParameters": true
}
],
"@typescript-eslint/no-misused-new": "error",
"@typescript-eslint/no-namespace": "error",
"@typescript-eslint/no-parameter-properties": "off",
"@typescript-eslint/no-use-before-define": "off",
"@typescript-eslint/no-var-requires": "off",
"@typescript-eslint/prefer-for-of": "error",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-namespace-keyword": "error",
"@typescript-eslint/triple-slash-reference": [
"error",
{
"path": "always",
"types": "prefer-import",
"lib": "always"
}
],
"@typescript-eslint/unified-signatures": "error",
"complexity": "off",
"constructor-super": "error",
"eqeqeq": ["error", "smart"],
"guard-for-in": "error",
"id-blacklist": [
"error",
"any",
"Number",
"number",
"String",
"string",
"Boolean",
"boolean",
"Undefined",
"undefined"
],
"id-match": "error",
"import/no-deprecated": "warn",
"jsdoc/no-types": "error",
"max-classes-per-file": "off",
"no-bitwise": "error",
"no-caller": "error",
"no-cond-assign": "error",
"no-debugger": "error",
"no-empty": "off",
"no-eval": "error",
"no-fallthrough": "error",
"no-invalid-this": "off",
"no-new-wrappers": "error",
"no-restricted-imports": [
"error",
{
"name": "rxjs/Rx",
"message": "Please import directly from 'rxjs' instead"
}
],
"no-throw-literal": "error",
"no-undef-init": "error",
"no-unsafe-finally": "error",
"no-unused-labels": "error",
"no-var": "error",
"object-shorthand": "error",
"one-var": ["error", "never"],
"prefer-const": "error",
"radix": "error",
"use-isnan": "error",
"valid-typeof": "off",
"arrow-body-style": "error",
"arrow-parens": "off",
"comma-dangle": "off",
"curly": "error",
"eol-last": "error",
"jsdoc/check-alignment": "error",
"new-parens": "error",
"no-multiple-empty-lines": "off",
"no-trailing-spaces": "error",
"quote-props": ["error", "as-needed"],
"space-before-function-paren": [
"error",
{
"anonymous": "never",
"asyncArrow": "always",
"named": "never"
}
],
"@typescript-eslint/semi": ["error", "always"],
"@typescript-eslint/type-annotation-spacing": "error",
"@typescript-eslint/ban-types": "error",
"@angular-eslint/component-selector": [
"error",
@@ -170,15 +61,12 @@
"@typescript-eslint/dot-notation": ["error", {"allowIndexSignaturePropertyAccess": true}],
"indent": "off",
"max-len": ["error", {"code": 120, "ignoreUrls": true}],
"@typescript-eslint/member-delimiter-style": [
"error",
{
"singleline": {
"delimiter": "comma",
"requireLast": false
}
"@typescript-eslint/member-delimiter-style": ["error", {
"singleline": {
"delimiter": "comma",
"requireLast": false
}
],
}],
"@typescript-eslint/member-ordering": "off",
"@typescript-eslint/naming-convention": "off",
"no-console": ["error", {"allow": ["log", "warn", "error"]}],
@@ -200,11 +88,7 @@
"no-use-before-define": "off",
"prefer-arrow/prefer-arrow-functions": "off",
"quotes": "off",
"@typescript-eslint/quotes": [
"error",
"single",
{"avoidEscape": true, "allowTemplateLiterals": true}
],
"@typescript-eslint/quotes": ["off", "single", {"avoidEscape": true}], // TODO: Fix the code violating this rule and enable it.
"semi": "error"
}
}
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html>
<head>
<meta charset="utf-8">
<title>Accessibility Example</title>
@@ -11,13 +11,13 @@ describe('AngularJS to Angular Quick Reference Tests', () => {
it('should display proper movie data', async () => {
// We check only a few samples
const expectedSamples: any[] = [
{row: 0, column: 0, element: 'img', attr: 'src', value: 'images/hero.svg', contains: true},
{row: 0, column: 0, element: 'img', attr: 'src', value: 'images/hero.png', contains: true},
{row: 0, column: 2, value: 'Celeritas'},
{row: 1, column: 3, matches: /Dec 1[678], 2015/}, // absorb timezone dif; we care about date format
{row: 1, column: 5, value: '$14.95'},
{row: 2, column: 4, value: 'PG-13'},
{row: 2, column: 7, value: '100%'},
{row: 2, column: 0, element: 'img', attr: 'src', value: 'images/ng-logo.svg', contains: true},
{row: 2, column: 0, element: 'img', attr: 'src', value: 'images/ng-logo.png', contains: true},
];
// Go through the samples
@@ -8,7 +8,7 @@ export class MovieService {
return [
{
hero: 'Celeritas',
imageurl: 'assets/images/hero.svg',
imageurl: 'assets/images/hero.png',
movieId: 1,
mpaa: 'pg-13',
releaseDate: '2015-12-19T00:00:00',
@@ -19,7 +19,7 @@ export class MovieService {
},
{
hero: 'Dr Nice',
imageurl: 'assets/images/villain.svg',
imageurl: 'assets/images/villain.png',
movieId: 2,
mpaa: 'pg-13',
releaseDate: '2015-12-18T00:00:00',
@@ -30,7 +30,7 @@ export class MovieService {
},
{
hero: 'Angular',
imageurl: 'assets/images/ng-logo.svg',
imageurl: 'assets/images/ng-logo.png',
movieId: 3,
mpaa: 'pg-13',
releaseDate: '2015-12-17T00:00:00',
Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

@@ -1,202 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<svg version="1.1" viewBox="0 0 267.64 295.96" xmlns="http://www.w3.org/2000/svg"
xmlns:cc="http://creativecommons.org/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<defs>
<filter id="g" x="-.6875" y="-.36871" width="2.375" height="1.7374"
color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="9.821428" />
</filter>
<filter id="a" x="-.32323" y="-.20911" width="1.6465" height="1.4182"
color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="6.113183" />
</filter>
<filter id="i" x="-.60711" y="-.3192" width="2.2142" height="1.6384"
color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="2.235874" />
</filter>
<filter id="h" x="-.20228" y="-.6072" width="1.4046" height="2.2144"
color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="2.235874" />
</filter>
<filter id="b" x="-.16212" y="-.3564" width="1.3242" height="1.7128"
color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="6.351255" />
</filter>
<filter id="c" x="-.26311" y="-.22062" width="1.5262" height="1.4412"
color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="1.868782" />
</filter>
<filter id="j" x="-.29184" y="-.46969" width="1.5837" height="1.9394"
color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="6.32608" />
</filter>
<filter id="e" x="-.57354" y="-1.4081" width="2.1471" height="3.8162"
color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="6.182556" />
</filter>
<filter id="f" x="-.2876" y="-1.4502" width="1.5752" height="3.9004"
color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="2.586588" />
</filter>
<filter id="d" x="-.16498" y="-.36227" width="1.33" height="1.7245"
color-interpolation-filters="sRGB">
<feGaussianBlur stdDeviation="2.252435" />
</filter>
</defs>
<metadata>image/svg+xml <rdf:RDF>
<cc:Work rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g transform="translate(11.042 -9.5012)">
<title>Layer 1</title>
<g>
<path
d="m91.945 72.496c27.138 0.30258 57.949 34.887 81.317 0 29.92-34.193 62.363-13.391 82.833 0v80.812c-27.915-2.8567-46.364-29.419-82.507-11.859-42.127 20.468-87.981-29.714-123.56-66.428 24.504 2.919 36.216 1.2694 41.921-2.5254z"
stroke="#000" />
<path d="m74.518 172.69-23.218-7.317-13.861 51.109 21.254 6.4241 15.825-50.216h3.1e-5z"
stroke-width="0" />
<path d="m59.709 215.32-22.38 1.2045-7.4787 74.929 30.058-0.31159-0.19983-75.822-3.1e-5 3e-5z"
stroke-width="0" />
<path
d="m62.226 194.75c-4.3262 13.599-11.065 24.104-15.052 23.464-3.9867-0.64052-3.7114-12.184 0.6148-25.783 4.3262-13.599 11.065-24.104 15.052-23.464 3.9867 0.64052 3.7114 12.184-0.61482 25.783l-4e-6 2e-5z"
filter="url(#a)" opacity=".54808" stroke="#000" />
<path d="m69.99 173.14 22.807-8.5128 16.391 49.832-20.787 8.0076-18.411-49.327v3e-5z"
stroke-width="0" />
<path
d="m41.241 77.574 11.859 10.31-39.133 45.01s-10.562-4.4301-11.24-9.8059c-0.67784-5.3758 38.514-45.515 38.514-45.515h-1.5e-5 -3.1e-5z"
stroke="#000" />
<path
d="m64.067 47.483s4.2083 25.538-11.28 27.021 10.552 23.843 10.552 23.843l19.782 8.2676 33.094-14.913s-7.5285-12.225-10.031-12.562c-2.5028-0.33676-13.448-2.319-16.173-12.369-2.7249-10.05-0.41495-15.854-0.41495-15.854l-25.529-3.4349h-6.1e-5z"
stroke="#000" />
<path
d="m61.325 52.192c5.8849 10.744 25.445 15.003 35.243 5.1137 3.7641-4.1141 2.9136-11.869 2.1797-16.998s-4.1074-5.8897-4.1006-8.0152c7e-3 -2.1255 1.1313-1.8719 0.51407-4.3746-6.2657-27.818-53.688-12.607-40.426 12.625-3.7319 7.1826 0.1217 11.174 6.5897 11.649v3.1e-5z"
stroke="#000" />
<path
d="m62.096 52.409c5.7656 10.526 24.929 14.699 34.529 5.01 3.6878-4.0308 2.8546-11.628 2.1356-16.653s-4.0241-5.7703-4.0175-7.8528c7e-3 -2.0825 1.1083-1.834 0.50366-4.2859-6.1387-27.254-52.6-12.351-39.607 12.369-3.6562 7.037 0.11923 10.948 6.4561 11.413v-3.1e-5z"
stroke="#000" />
<path
d="m63.507 54.818c12.538 13.071 26.191 9.2315 34.417 1.4728-14.553 10.143-25.788 6.1748-34.417-1.4728z"
stroke="#000" />
<path
d="m84.621 30.575s2.7779 14.9 5.8084 14.647c-0.44134 0.17191-6.3155 3.8076-8.8388 1.2627 0.69727-1.2367 3.1921 1.681 5.3688-1.3929 0.81992-1.7809-1.1302-6.0501-2.3384-14.517z"
stroke="#000" />
<path
d="m84.621 30.575s2.7779 14.9 5.8084 14.647c-0.44134 0.17191-6.3155 3.8076-8.8388 1.2627 0.69727-1.2367 3.1921 1.681 5.3688-1.3929 0.81992-1.7809-1.1302-6.0501-2.3384-14.517z"
filter="url(#i)" stroke="#000" />
<path
d="m69.03 37.466c0.14066 1.798 12.691-0.98444 14.467-3.9984 4.3018 0.6434 10.735-0.22946 11.178-1.4225 1.7027-4.5798-4.6747-2.635-11.629-1.0497-6.9547 1.5854-16.541-0.92746-14.284 6.4706l0.26788-3.1e-5h-3.1e-5z"
stroke="#000" />
<path
d="m69.03 37.466c0.14066 1.798 12.691-0.98444 14.467-3.9984 4.3018 0.6434 10.735-0.22946 11.178-1.4225 1.7027-4.5798-4.6747-2.635-11.629-1.0497-6.9547 1.5854-16.541-0.92746-14.284 6.4706l0.26788-3.1e-5h-3.1e-5z"
filter="url(#h)" stroke="#000" />
<path
d="m81.522 32.928c0.84876 1.8448-2.5194 2.5192-5.6442 3.5081-3.1248 0.98904-5.5627 1.8298-5.7602 0.63113-0.53281-3.234 1.5685-3.0128 4.6933-4.0019 3.1248-0.98901 6.4079-1.0954 6.7111-0.13742z"
stroke="#000" />
<path
d="m84.818 32.076c-0.05411 1.7074 2.7767 1.1278 5.5219 0.87174 2.7452-0.2561 4.9095-0.40228 4.6703-1.3958-0.64536-2.6805-2.2014-1.8215-4.9466-1.5654-2.7452 0.2561-5.3242 1.248-5.2457 2.0895l3.1e-5 -6.1e-5z"
stroke="#000" />
<path d="m68.05 34.513s9.1964-4.2857 12.768-3.4821" stroke="#000" stroke-width="1px" />
<path d="m84.568 30.674s8.4821-0.625 9.1964-2.7679" stroke="#000" stroke-width="1px" />
<path
d="m93.883 48.197c1.6163 2.5565-0.35864 6.4995-5.2404 6.2187-4.8401-0.27841-9.5687 0.93256-9.655 0.28659-0.09891-0.741 4.0474-1.0987 8.7613-2.3987 4.7139-1.3 5.2702-4.6136 6.1341-4.1066z"
stroke="#000" />
<path
d="m110.66 80.232-12.591 9.4031 35.689 47.787s10.861-3.6351 11.936-8.9458c1.0744-5.3107-35.034-48.244-35.034-48.244h3e-5z"
stroke="#000" />
<path
d="m2.4678 124.59c1.517-10.859 11.535-8.3905 11.535-8.3905l23.973 43.264-3.7433 5.6921s-33.281-29.707-31.764-40.566z"
stroke="#000" />
<path
d="m22.743 116.29c-8.5536 7.5969-16.55 12.56-17.859 11.085-1.3098-1.4748 4.5625-8.8288 13.116-16.426 8.5536-7.5969 16.55-12.56 17.859-11.085 1.3098 1.4748-4.5625 8.8288-13.116 16.426z"
filter="url(#b)" opacity=".54808" stroke="#000" />
<path
d="m146.55 130.82c-0.70239-10.942-10.876-9.2279-10.876-9.2279l-27.135 41.354 3.3081 5.9555s35.405-27.14 34.703-38.082v3e-5z"
stroke="#000" />
<path
d="m125.14 117c8.5536 7.5969 16.55 12.56 17.859 11.085 1.3098-1.4748-4.5625-8.8288-13.116-16.426-8.5536-7.5969-16.55-12.56-17.859-11.085-1.3098 1.4748 4.5625 8.8288 13.116 16.426z"
filter="url(#b)" opacity=".54808" stroke="#000" />
<path
d="m51.988 74.692s14.415 17.143 24.394 16.071c9.9796-1.0714 20.329-8.5714 19.589-13.929-0.73923-5.3571 16.866 2.8571 16.866 2.8571s6.4495 11.429 11.105 15.357c2.4727 2.0867-8.0362 18.214-8.0362 18.214s-4.5227-7.0144-5.1931-5.3497c-7.2437 17.984-22.657 50.095-17.154 57.998 4.7157 6.7723-42.977 1.7603-42.977 1.7603 9.8284-22.663-12.917-54.815-14.158-59.888 0 0 1.5326-1.1295-5.3796 5.8368-1.4805 1.4921-11.031-15.357-11.031-15.357s9.9751-4.2857 16.828-20.357l15.146-3.2143v-6.1e-5z"
stroke="#000" />
<path
d="m50.258 166.49c-0.5813-1.1995 48.173-2.4055 45.637 0-5.6648 5.3748-9.9369 13.418-15.812 21.568-4.4765 2.3502-8.9531 1.5652-13.43 0.38849-7.2687-17.08-14.251-17.531-16.396-21.957z"
stroke="#000" />
<path
d="m81.464 177.49c0 5.6138-3.8159 10.165-8.5232 10.165-4.7072 0-8.5232-4.5509-8.5232-10.165s3.816-10.165 8.5232-10.165c4.7072 0 8.5232 4.5509 8.5232 10.165z"
filter="url(#c)" stroke="#000" />
<path
d="m67.644 181.15c-0.12726 1.2675-0.58893 7.3753 7.556 6.4745 2.901-0.32086 5.0615-2.6568 5.0615-6.2899 0-9.8345-0.20319-14.736-0.20319-14.736"
stroke="#000" stroke-dasharray="4.18484951, 1.04621238" stroke-width="1.0462" />
<path d="m79.991 186.04c3.9193-7.455 7.1667-13.986 14.038-18.663" stroke="#000"
stroke-dasharray="4.18484951, 1.04621238" stroke-width="1.0462" />
<path d="m66.662 185.88c-1.7544-10.631-9.8827-13.64-15.159-18.663" stroke="#000"
stroke-dasharray="4.18484951, 1.04621238" stroke-width="1.0462" />
<path d="m85.887 213.73 23.271 0.7644 5.1592 75.19-28.63-0.13312 0.19983-75.822v3e-5z"
stroke-width="0" />
<path
d="m127.66 150.32c5.5904-7.0652 9.0979-13.555 7.8342-14.495-1.2637-0.94047-6.82 4.0246-12.41 11.09-5.5904 7.0652-9.0978 13.555-7.8341 14.496 1.2637 0.94047 6.82-4.0246 12.41-11.09z"
filter="url(#b)" opacity=".54808" stroke="#000" />
<path
d="m98.34 177.58c-3.5569-3.6226-6.0251-8.294-4.6952-11.345 1.1842-2.7169 4.5644-4.3068 8.2529-5.5964 7.4352-2.5995 10.578-0.1094 13.177 7.3258 0.90197 4.619-12.495 12.423-16.735 9.6159z"
stroke="#000" />
<path
d="m47.058 174.81c3.8174-3.347 6.6273-7.8212 5.5287-10.963-0.97815-2.7977-4.2303-4.6354-7.8123-6.1967-7.2205-3.1471-10.54-0.89846-13.687 6.3221-1.2442 4.5388 11.533 13.321 15.971 10.838z"
stroke="#000" />
<path
d="m101.02 113.41c-1.4005 8.0312-10.098 11.211-17.308 7.3128-5.7908-3.1309-10.8-13.875-8.9424-7.3128 1.5825 5.5888-2.3873 6.6157-3.5214 6.712-15.173 1.2892-23.275 10.274-25.759-6.712-1.1159-7.6288-16.491-24.668-4.7454-27.457 4.396-1.0436 23.015 12.939 32.511 11.294 13.012-2.2532 27.316-12.292 32.892-12.088 13.339 0.48917 2.9559 16.665-5.1263 28.25h1e-5z"
filter="url(#j)" stroke-width="0" />
<path
d="m52.928 74.769s8.8478 14.348 21.62 13.89c4.8502-0.17236-11.688 9.8029-10.751 10.607 1.1307 0.9697 14.023-9.5964 14.023-9.5964s11.682 10.669 12.621 9.5964c0.87979-1.005-13.938-10.352-9.349-11.238 6.9099-1.3343 12.621-15.026 12.621-15.026s-9.7724 12.814-16.711 13.637c-8.7678 1.0404-24.074-11.869-24.074-11.869v3.1e-5z"
stroke="#000" />
<path
d="m80.371 88.218c0 1.0602-1.0593 1.9196-2.3661 1.9196-1.3067 0-2.3661-0.85945-2.3661-1.9196 0-1.0602 1.0593-1.9196 2.3661-1.9196 1.3067 0 2.3661 0.85945 2.3661 1.9196z"
stroke="#000" />
<path
d="m227.51 98.084c3e-5 17.653-7.6751 31.964-17.143 31.964-9.4677 0-17.143-14.311-17.143-31.964-3e-5 -17.653 7.6751-31.964 17.143-31.964 9.4678 0 17.143 14.311 17.143 31.964h3e-5z"
filter="url(#g)" stroke="#000" />
<path
d="m81.464 177.49c0 5.6138-3.8159 10.165-8.5232 10.165-4.7072 0-8.5232-4.5509-8.5232-10.165s3.816-10.165 8.5232-10.165c4.7072 0 8.5232 4.5509 8.5232 10.165z"
filter="url(#c)" opacity=".54808" stroke="#000" />
<path
d="m20.226 149.61c-5.5904-7.0652-9.0979-13.555-7.8342-14.495 1.2637-0.94048 6.82 4.0246 12.41 11.09 5.5904 7.0651 9.0978 13.555 7.8341 14.495-1.2637 0.94048-6.82-4.0246-12.41-11.09h4e-6z"
filter="url(#b)" opacity=".54808" stroke="#000" />
<path
d="m53.645 252.36c0.0925 15.459-3.0668 28.588-7.0565 29.325-3.9897 0.73627-7.2989-11.199-7.3914-26.658-0.0925-15.459 3.0668-28.588 7.0564-29.325 3.9897-0.73628 7.2989 11.199 7.3914 26.658v1e-5z"
filter="url(#a)" opacity=".54808" stroke="#000" />
<path
d="m86.032 197.78c4.3262 13.599 11.065 24.104 15.052 23.464 3.9867-0.64052 3.7114-12.184-0.61481-25.783-4.3262-13.599-11.065-24.104-15.052-23.464-3.9867 0.6405-3.7114 12.184 0.61481 25.783z"
filter="url(#a)" opacity=".54808" stroke="#000" />
<path
d="m94.613 255.39c-0.0925 15.459 3.0668 28.588 7.0565 29.325 3.9897 0.7363 7.2989-11.199 7.3914-26.658 0.0925-15.459-3.0668-28.588-7.0564-29.325-3.9897-0.73628-7.2989 11.199-7.3914 26.658v1e-5z"
filter="url(#a)" opacity=".54808" stroke="#000" />
<path
d="m115.33 288.38c0 6.1368-7.3851 4.326-15.614 4.326-8.2289 0-14.185 1.8108-14.185-4.326s0.24228-10.04 17.043-5.7545c7.9735 2.034 12.757-0.38232 12.757 5.7545h-3e-5z"
stroke="#000" />
<path
d="m60.328 288.52c0 6.1368-7.5622 4.326-15.988 4.326-8.4261 0-14.525 1.8108-14.525-4.326s0.24809-10.04 17.451-5.7546c8.1647 2.0341 13.063-0.38221 13.063 5.7546z"
stroke="#000" />
<path
d="m111.7 288.42c0 2.2871-5.2513 1.6123-11.103 1.6123-5.8513 0-10.087 0.67487-10.087-1.6123s0.17226-3.7419 12.118-2.1447c5.6697 0.75808 9.071-0.14246 9.071 2.1447h2e-5z"
filter="url(#e)" stroke="#000" />
<path
d="m54.971 288.27c0 2.1643-5.3494 1.5256-11.31 1.5256-5.9606 0-10.275 0.63867-10.275-1.5256 0-2.1643 0.17549-3.5409 12.345-2.0295 5.7756 0.71741 9.2404-0.13482 9.2404 2.0295z"
filter="url(#f)" stroke="#000" />
<path
d="m54.864 42.292 6.1149 8.6494 7.5525-2.3529s-6.2699-3.0363-8.6098-5.8115c-1.0703-1.2694-0.48761-3.4601-0.67963-5.0671-0.62283-5.2123-0.13116-10.121 6.7356-13.896l11.909-0.61054s3.2668-0.35864 4.1671 1.0819c0.90036 1.4406-4.11 2.58-4.11 2.58 0.06 0 4.6575 0.29971 6.016-1.6668 0.87598-1.2681-0.1138-5.0548-0.86157-5.0548 7.6948 2.0927 1.2081-7.2626 8.4904 0.90784 1.8007 1.6206 1.6252 3.4243 1.6252 3.4243l1.8007 2.521s-2.1609-19.448-24.13-14.046c-21.969 5.4022-18.726 20.908-18.726 20.908l2.7056 8.4334 3.1e-5 6.1e-5z"
stroke="#000" />
<path
d="m85.482 20.196c-0.21223 0.71253-3.3723-0.51432-3.9431 0.64492-0.41602 0.845 0.45606 2.1323-0.20563 2.611-0.53284 0.38547-2.1553-3.7216-2.7381-3.346-2.905 1.8722-6.0592 2.0577-7.897 2.0577-2.462 0-3.6555 2.1072-5.3396 1.1138-0.44664-0.26346-3.661 1.9328-5.2406 2.9736-0.60786 0.40049-4.8062 8.2142-5.9874 8.8461-1.6078 0.86008-0.10704-4.8796-0.133-5.1018-0.32276-2.7612 8.8307-11.236 9.4887-11.48 1.939-0.71674 5.4451-1.0058 7.3904-1.8905 2.7168-1.2356 9.6646-2.1329 12.725 0.40945 1.2978 1.0781 1.8801 2.338 1.8801 3.1615z"
filter="url(#d)" opacity=".87019" stroke="#000" />
<path
d="m78.43 34.347c0 0.74966-0.60773 1.3574-1.3574 1.3574-0.74967 0-1.3574-0.60774-1.3574-1.3574 0-0.74966 0.60772-1.3574 1.3574-1.3574 0.74966 0 1.3574 0.60773 1.3574 1.3574z"
opacity=".87019" stroke="#000" />
<path
d="m93.341 31.311c0 0.74966-0.60773 1.3574-1.3574 1.3574-0.74967 0-1.3574-0.60774-1.3574-1.3574 0-0.74966 0.60772-1.3574 1.3574-1.3574 0.74966 0 1.3574 0.60773 1.3574 1.3574z"
opacity=".87019" stroke="#000" />
</g>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 15 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

@@ -1,17 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 250 250" style="enable-background:new 0 0 250 250;" xml:space="preserve">
<style type="text/css">
.st0{fill:#DD0031;}
.st1{fill:#C3002F;}
.st2{fill:#FFFFFF;}
</style>
<g>
<polygon class="st0" points="125,30 125,30 125,30 31.9,63.2 46.1,186.3 125,230 125,230 125,230 203.9,186.3 218.1,63.2 "/>
<polygon class="st1" points="125,30 125,52.2 125,52.1 125,153.4 125,153.4 125,230 125,230 203.9,186.3 218.1,63.2 125,30 "/>
<path class="st2" d="M125,52.1L66.8,182.6h0h21.7h0l11.7-29.2h49.4l11.7,29.2h0h21.7h0L125,52.1L125,52.1L125,52.1L125,52.1
L125,52.1z M142,135.4H108l17-40.9L142,135.4z"/>
</g>
</svg>

Before

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 11 KiB

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 10 KiB

@@ -1,5 +1,5 @@
// #docplaster ...
/* To learn more about this file see: https://angular.io/guide/typescript-configuration. */
/* To learn more about this file see: https://angular.io/config/tsconfig. */
// #docregion angular-compiler-options-app
{
"extends": "./tsconfig.json",
@@ -1,5 +1,5 @@
// #docplaster ...
/* To learn more about this file see: https://angular.io/guide/typescript-configuration. */
/* To learn more about this file see: https://angular.io/config/tsconfig. */
// #docregion angular-compiler-options
{
"compileOnSave": false,
@@ -66,9 +66,9 @@ import { HEROES } from './mock-heroes';
]),
trigger('animateMe', [
transition('* <=> *', animate('500ms cubic-bezier(.68,-0.73,.26,1.65)', keyframes([
style({ backgroundColor: 'transparent', color: '*', offset: 0 }),
style({ backgroundColor: 'blue', color: 'white', offset: 0.2 }),
style({ backgroundColor: 'transparent', color: '*', offset: 1 })
style({ backgroundColor: "transparent", color: '*', offset: 0 }),
style({ backgroundColor: "blue", color: 'white', offset: 0.2 }),
style({ backgroundColor: "transparent", color: '*', offset: 1 })
])))
]),
]
@@ -1,6 +1,6 @@
<!-- #docregion -->
<!DOCTYPE html>
<html lang="en">
<html>
<head>
<base href="/">
<title>Angular binding syntax example</title>
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html>
<head>
<meta charset="utf-8">
<title>NgmoduleDemo</title>
@@ -150,14 +150,14 @@
<h4 id="ngFor-index">*ngFor with index</h4>
<p>with <em>semi-colon</em> separator</p>
<p>with <i>semi-colon</i> separator</p>
<div class="box">
<!-- #docregion NgFor-3 -->
<div *ngFor="let item of items; let i=index">{{i + 1}} - {{item.name}}</div>
<!-- #enddocregion NgFor-3 -->
</div>
<p>with <em>comma</em> separator</p>
<p>with <i>comma</i> separator</p>
<div class="box">
<div *ngFor="let item of items, let i=index">{{i + 1}} - {{item.name}}</div>
</div>
@@ -167,7 +167,7 @@
<button type="button" (click)="changeIds()">Change ids</button>
<button type="button" (click)="clearTrackByCounts()">Clear counts</button>
<p><em>without</em> trackBy</p>
<p><i>without</i> trackBy</p>
<div class="box">
<div #noTrackBy *ngFor="let item of items">({{item.id}}) {{item.name}}</div>
@@ -187,7 +187,7 @@
<br><br><br>
<p>with trackBy and <em>semi-colon</em> separator</p>
<p>with trackBy and <i>semi-colon</i> separator</p>
<div class="box">
<!-- #docregion trackBy -->
<div *ngFor="let item of items; trackBy: trackByItems">
@@ -196,17 +196,17 @@
<!-- #enddocregion trackBy -->
</div>
<p>with trackBy and <em>comma</em> separator</p>
<p>with trackBy and <i>comma</i> separator</p>
<div class="box">
<div *ngFor="let item of items, trackBy: trackByItems">({{item.id}}) {{item.name}}</div>
</div>
<p>with trackBy and <em>space</em> separator</p>
<p>with trackBy and <i>space</i> separator</p>
<div class="box">
<div *ngFor="let item of items trackBy: trackByItems">({{item.id}}) {{item.name}}</div>
</div>
<p>with <em>generic</em> trackById function</p>
<p>with <i>generic</i> trackById function</p>
<div class="box">
<div *ngFor="let item of items, trackBy: trackById">({{item.id}}) {{item.name}}</div>
</div>
@@ -1,5 +1,5 @@
<!doctype html>
<html lang="en">
<html>
<head>
<meta charset="utf-8">
<title>Built-in Template Functions Example</title>
@@ -2,10 +2,10 @@
<a href="#parent-to-child">Pass data from parent to child with input binding ("Heroes")</a><br/>
<a href="#parent-to-child-setter">Intercept input property changes with a setter ("Master")</a><br/>
<a href="#parent-to-child-on-changes">Intercept input property changes with <em>ngOnChanges</em> ("Source code version")</a><br/>
<a href="#parent-to-child-on-changes">Intercept input property changes with <i>ngOnChanges</i> ("Source code version")</a><br/>
<a href="#child-to-parent">Parent listens for child event ("Colonize Universe")</a><br/>
<a href="#parent-to-child-local-var">Parent to child via <em>local variable</em>("Countdown to Liftoff")</a><br/>
<a href="#parent-to-view-child">Parent calls <em>ViewChild</em>("Countdown to Liftoff")</a><br/>
<a href="#parent-to-child-local-var">Parent to child via <i>local variable</i>("Countdown to Liftoff")</a><br/>
<a href="#parent-to-view-child">Parent calls <i>ViewChild</i>("Countdown to Liftoff")</a><br/>
<a href="#bidirectional-service">Parent and children communicate via a service ("Mission Control")</a><br/>
<div id="parent-to-child">
@@ -6,22 +6,24 @@ import { Component, OnDestroy } from '@angular/core';
template: '<p>{{message}}</p>'
})
export class CountdownTimerComponent implements OnDestroy {
intervalId = 0;
message = '';
seconds = 11;
ngOnDestroy() { this.clearTimer?.(); }
ngOnDestroy() { this.clearTimer(); }
start() { this.countDown(); }
stop() {
this.clearTimer?.();
this.clearTimer();
this.message = `Holding at T-${this.seconds} seconds`;
}
private clearTimer: VoidFunction | undefined;
private clearTimer() { clearInterval(this.intervalId); }
private countDown() {
this.clearTimer?.();
const interval = setInterval(() => {
this.clearTimer();
this.intervalId = window.setInterval(() => {
this.seconds -= 1;
if (this.seconds === 0) {
this.message = 'Blast off!';
@@ -30,6 +32,5 @@ export class CountdownTimerComponent implements OnDestroy {
this.message = `T-${this.seconds} seconds and counting`;
}
}, 1000);
this.clearTimer = () => clearInterval(interval);
}
}

Some files were not shown because too many files have changed in this diff Show More