Compare commits

...

81 Commits

Author SHA1 Message Date
Andrew Kushnir 4002f0121e release: cut the v14.2.1 release 2022-09-07 10:34:36 -07:00
JoostK 0e35829580 fix(compiler): avoid errors for inputs with Object-builtin names (#47220)
Using raw objects as a lookup structure will inadvertently find methods defined on
`Object`, where strings are expected. This causes errors downstream when string
operations are applied on functions.

This commit switches over to use `Map`s in the DOM element schema registry to fix
this category of issues.

Fixes #46936

PR Close #47220
2022-09-06 11:55:13 -07:00
Bob Watson 124a600535 docs: add new words to vocabulary (#47344)
docs: add VMWare to spell check dictionary
docs: add rebase, rebases, rebased to spell check dictionary
docs: add repos to spell check dictionary
docs: change repeated string regex

PR Close #47344
2022-09-06 11:33:15 -07:00
Joe Martin (Crowdstaffing) 2b503c8da9 docs: Update markdown and formatting in image-directive topic. (#47259)
PR Close #47259
2022-09-06 11:30:50 -07:00
George Kalpakas 6091786696 fix(service-worker): include headers in requests for assets (#47260)
Previously, when requesting non-cached asset resources from the network,
the ServiceWorker would strip off all request metadata (including
headers). This was done in order to avoid issues with opaque responses,
but it turned out to be overly aggressive, breaking/worsening legit
usecases (such as requesting compressed data).

This commit fixes this by preserving the headers of such requests.

For reference, Workbox passes the original request as is. (See for
example the [NetworkFirst][1] strategy).

> **Note**
> Data requests (i.e. requests for URLs that belong to a data-group) are
  not affected by this. They already use the original resource as is.

[1]: https://github.com/GoogleChrome/workbox/blob/95f97a207fd51efb3f8a653f6e3e58224183a778/packages/workbox-strategies/src/NetworkFirst.ts#L90

Fixes #24227

PR Close #47260
2022-09-06 10:03:13 -07:00
George Kalpakas 65d936296d test(service-worker): simplify how redirects are defined in MockServerState (#47260)
Previously, the `MockServerStateBuilder#withRedirect()` method did two
things: (a) define a redirect from one path to another and (b) specify
the contents of the redirect destination. This was confusing, because it
deviated from the regular way of specifying file contents, which is via
a `MockFileSystem` instance.

This commit slightly simplifies the process of defining redirects by
having the `withRedirect()` method only define the redirect and let the
contents of the redirect destination be specified as usual via
`MockFileSystem`. This makes `MockFileSystem` the single source of truth
for file contents used with `MockServerState`.

PR Close #47260
2022-09-06 10:03:13 -07:00
George Kalpakas f5cfbe00df test(service-worker): fix default value of Request#credentials (omit --> same-origin) (#47260)
Previously, the default value of `MockRequest#credentials` (used in
testing) was set to `omit`. This was different than the default value
used in browsers, which is `same-origin` (see [Request docs on MDN][1])
and could lead to incorrect test results.

This commit changes the default value for `credentials` to `same-origin`
to match what would happen in the browser.

[1]: https://developer.mozilla.org/en-US/docs/Web/API/Request/credentials

PR Close #47260
2022-09-06 10:03:13 -07:00
George Kalpakas 28d33505fd fix(service-worker): only consider GET requests as navigation requests (#47263)
Previously, the criteria for determining if a request was a
[navigation request][1] did not account for the request method. This
incorrectly identified HTML form submit POST requests as navigation
requests and served `index.html` instead of passing them through to the
server, thus breaking the form submission.

This commit fixes this by ensuring that only GET requests are considered
navigation requests.

> **Note**
> HTML forms with their method set to `GET` will still be affected by
> the issue. This is not a big concern, because using `GET` for form
> submission is quite uncommon and generally discouraged (due to
> limitations and security considerations).

[1]: https://angular.io/guide/service-worker-config#handling-navigation-requests

Fixes #36368

PR Close #47263
2022-09-06 10:02:11 -07:00
Angular Robot 56304d6b95 build: update io_bazel_rules_sass digest to f3874ae (#47292)
See associated pull request for more information.

PR Close #47292
2022-09-06 09:59:22 -07:00
Jeremy Elbourn d8cfb7cbe5 refactor(router): remove unnecesary null (#47238)
These null values are unused and unecessary. I suspect it's a remnant from when the codebase was transpiled to Dart.

PR Close #47238
2022-09-06 09:57:38 -07:00
Jeremy Elbourn f4825c7b9d refactor(common): remove unnecesary null (#47238)
These null values are unused and unecessary. I suspect it's a remnant from when the codebase was transpiled to Dart.

PR Close #47238
2022-09-06 09:57:38 -07:00
Jeremy Elbourn e6b6e89163 refactor(animations): remove unnecesary null (#47238)
These null values are unused and unecessary. I suspect it's a remnant from when the codebase was transpiled to Dart.

PR Close #47238
2022-09-06 09:57:38 -07:00
Jeremy Elbourn da7dc4670c refactor(forms): remove unnecesary null (#47238)
These null values are unused and unecessary. I suspect it's a remnant from when the codebase was transpiled to Dart.

PR Close #47238
2022-09-06 09:57:38 -07:00
jaybell 1875ce520a fix(common): use DOCUMENT token to query for preconnect links (#47353)
`PreconnectLinkChecker` checks to see if preconnect links have been added to the `<head>` element but uses `document` directly which does not exist when rendering in Angular Universal. This PR switches the `PreconnectLinkChecker` to use the `DOCUMENT` token instead so that the query works when SSR'ing

PR Close #47353
2022-09-06 09:56:27 -07:00
Kara Erickson c0d7ac9ec2 fix(common): improve formatting of image warnings (#47299)
This is a tiny fix to add paragraph breaks in
image distortion warnings to make them a bit
easier to read. With this change, the intrinsic
and rendered image sizes are printed on their
own lines instead of mid-paragraph.

PR Close #47299
2022-09-06 09:55:57 -07:00
Angular Robot 0d337c9ff2 build: update github/codeql-action action to v2.1.22 (#47223)
See associated pull request for more information.

PR Close #47223
2022-09-06 09:51:56 -07:00
Sabareesh Kappagantu b7c1d72a61 docs: fix linting errors in component overview guide (#47352)
PR Close #47352
2022-09-06 09:41:13 -07:00
Sabareesh Kappagantu 844f48ccdb docs: add substitution entry for camel case (#47351)
PR Close #47351
2022-09-06 09:40:40 -07:00
Sabareesh Kappagantu 57f13bfe73 docs: fix linting errors in class binding guide (#47351)
PR Close #47351
2022-09-06 09:40:40 -07:00
Bingo's Code f11d6ffbb1 docs: apply suggestions from code review (#47350)
Co-authored-by: Bob Watson <104218420+bob-watson@users.noreply.github.com>
PR Close #47350
2022-09-06 09:38:33 -07:00
Sabareesh Kappagantu 798a92db91 docs: fix linting errors in architecture components guide (#47350)
PR Close #47350
2022-09-06 09:38:32 -07:00
Sonu Sindhu be5180a6e0 docs: formatting issue (#47349)
There were some formatting issue and I just updated * to & in migration-undecorated-classes.md
PR Close #47349
2022-09-06 09:37:49 -07:00
Sabareesh Kappagantu 200ddce88f docs: update angular-package-format guide (#47342)
PR Close #47342
2022-09-06 09:35:39 -07:00
Bingo's Code 0ba363d5b5 docs: update aio/content/guide/angular-package-format.md with suggestion (#47342)
Co-authored-by: Bob Watson <104218420+bob-watson@users.noreply.github.com>

PR Close #47342
2022-09-06 09:35:39 -07:00
Bingo's Code 5f065441ca docs: apply suggestions from code review (#47342)
adding suggestions from Bob.

Co-authored-by: Bob Watson <104218420+bob-watson@users.noreply.github.com>

PR Close #47342
2022-09-06 09:35:39 -07:00
Sabareesh Kappagantu 55cc287ad5 docs: fix linting errors in angular package format guide (#47342)
PR Close #47342
2022-09-06 09:35:38 -07:00
Asaf M 0e2d2a576b docs: fix grammar (#47333)
there aren't many forms here, the object model belongs to the form, hence the apostroph is needed before the letter s
PR Close #47333
2022-09-06 09:33:15 -07:00
abergquist a62f3fab45 docs: fixed a "grammatical opportunity" (#47328)
Since "application design" is being used as an adjective in the following sentence:

Angular is an application design framework and development platform for creating efficient and sophisticated single-page apps.

I recommend replacing it with "application-design" (cf. https://en.wikipedia.org/wiki/Compound_modifier).
PR Close #47328
2022-09-06 09:32:26 -07:00
Sabareesh Kappagantu 577673dcf7 docs: fix linting errors in change detection guide (#47324)
PR Close #47324
2022-09-06 09:31:21 -07:00
Simona Cotin 58fd2dccdc docs: update cloudinary url (#47320)
PR Close #47320
2022-09-06 09:30:49 -07:00
Aristeidis Bampakos d10b6f54c7 docs: fix typo in image directive guide (#47313)
PR Close #47313
2022-09-06 09:30:14 -07:00
Yann Provoost c5d0da9dce docs: fix doc linter warnings in app-shell.md (#47282)
PR Close #47282
2022-09-06 09:24:05 -07:00
Yann Provoost 3f81b2ac33 docs: fix doc linter warning and error in accessibility.md (#47282)
PR Close #47282
2022-09-06 09:24:04 -07:00
Yann Provoost 24660f6a37 docs: fix doc linter warnings in angular-compiler-options.md (#47282)
PR Close #47282
2022-09-06 09:24:04 -07:00
George Kalpakas 80155e8605 docs(service-worker): add note regarding assets and CORS (#47262)
Fixes #41931

PR Close #47262
2022-09-06 09:23:29 -07:00
vyom1611 921ab02b3b refactor(service-worker): refactored code to remove useless code (#47255)
- Removes useless code in `generator.ts` and `module.ts` in service-workers
- Uses inline variables to return values from functions

PR Close #47255
2022-09-06 09:15:07 -07:00
vyom1611 5d9f93395c docs: fixing typos and grammatical errors in several documentation files (#47254)
- Fixes grammar issues in various markdown files, like the `DEBUG.md` or `DEVELOPER.md`

PR Close #47254
2022-09-06 09:14:25 -07:00
George Kalpakas fd1bfaa823 docs(docs-infra): improve docs on updating angular.io and docs examples apps (#47250)
Add a new doc, `aio/UPDATING.md`, with instructions on updating the
angular.io app to align with the latest Angular CLI/framework/Material.
Also, update the instructions on updating the docs examples apps.

PR Close #47250
2022-09-06 09:13:54 -07:00
George Kalpakas ee8a3a25b8 docs(docs-infra): add instructions on using Let's Encrypt for preview server certificates (#47250)
Add a new doc with instructions on how to use TLS certificates issues by
[Let's Encrypt][1] in the PR preview server.

[1]: https://letsencrypt.org/

PR Close #47250
2022-09-06 09:13:53 -07:00
George Kalpakas 6ef1d37453 docs(docs-infra): minor improvements in preview server docs (#47250)
PR Close #47250
2022-09-06 09:13:53 -07:00
Jobayer Hossain 41c845b4a7 docs: typo (#47246)
It appears that the indefinite pronoun either does not agree with the verb occur in your sentence. Consider changing the form of the verb.
PR Close #47246
2022-09-06 09:13:22 -07:00
Maina Wycliffe acfa5cb2db docs: compress the bios image (#47244)
PR Close #47244
2022-09-06 09:12:39 -07:00
Maina Wycliffe 8c6227f186 docs: add Maina Wycliffe to GDE resources (#47244)
PR Close #47244
2022-09-06 09:12:39 -07:00
George Kalpakas 7b92f214bb docs(service-worker): improve docs related to SwUpdate APIs (#46960)
This commit improves documentation related to recently improved or
deprecated `SwUpdate` APIs in the following ways:

- Update [check-for-update.service.ts][1] to make use of the return
  value of [SwUpdate#checkForUpdate()][2].
- Update [prompt-update.service.ts][3] to not call
  [SwUpdate#activateUpdate()][4] and just reload the page.
- Update the [SwUpdate#activateUpdate()][4] API docs to explain that it
  is only useful if you want to update a client without reloading and
  that it can easily lead to version skew.
- Update [a code-snippet][5] to no longer be [hard-coded][6].

[1]: https://github.com/angular/angular/blob/9d9d05911dbd6e2f30e4c7bced0e41fd20ec4285/aio/content/examples/service-worker-getting-started/src/app/check-for-update.service.ts#L16
[2]: https://angular.io/api/service-worker/SwUpdate#checkForUpdate
[3]: https://github.com/angular/angular/blob/9d9d05911dbd6e2f30e4c7bced0e41fd20ec4285/aio/content/examples/service-worker-getting-started/src/app/prompt-update.service.ts#L15
[4]: https://angular.io/api/service-worker/SwUpdate#activateUpdate
[5]: https://github.com/angular/angular/blob/96c6139c9ab35aa6ab2330a5a79a5906d5c2e8be/packages/service-worker/src/update.ts#L44-L54
[6]: https://angular.io/guide/docs-style-guide#hard-coded-snippets

Fixes #43665

PR Close #46960
2022-09-06 09:11:58 -07:00
Daniel Ostrovsky 626340b2a6 docs(http): Update HttClient "JSON object" to "JavaScript object" (#47325)
updated all references of "JSON object" to "JavaScript object" in HttpClient `common/http/src/client.ts`

Fixes #43242

PR Close #47325
2022-09-03 11:00:44 -07:00
Giovanni Alberto Rivas af975d5bef docs(http): replace http method return description (#47322)
PR Close #47322
2022-09-01 19:14:56 -07:00
Joey Perrott 4ac5ea3ee8 docs: update security guide (#47296)
Update the security guide to our new vulnerability intake process.

PR Close #47296
2022-08-30 18:03:44 +00:00
Kristiyan Kostadinov 20e1a2470b build: update to TypeScript 4.8 final (#47270) (#47278)
Bumps up to the final version of TS 4.8 and removes some workarounds.

PR Close #47270

PR Close #47278
2022-08-26 10:27:55 -07:00
Kristiyan Kostadinov 59a6fe72a0 refactor(compiler): replace most usages of getMutableClone (#47167) (#47271)
Replaces (almost) all of the usages of the deprecated `getMutableClone` function from TypeScript which has started to log deprecation warnings in version 4.8 and will likely be removed in version 5.0. The one place we have left is in the default import handling of ngtsc which will be more difficult to remove.

PR Close #47167

PR Close #47271
2022-08-26 09:44:31 -07:00
Kara Erickson fed626d4cb docs(common): fix code examples in image directive guide (#47269)
PR Close #47269
2022-08-26 09:20:58 -07:00
Alex Rickabaugh e9b3d2072b release: cut the v14.2.0 release 2022-08-25 14:30:43 -07:00
Kara Erickson c5db867ddc fix(common): remove duplicate deepForEach (#47189)
This commit removes a duplicate deepForEach
function from url.ts. It is also in the
preconnect_link_checker, where it is actually
used.

PR Close #47189
2022-08-24 12:20:58 -07:00
Pawel Kozlowski f9511bf6e8 fix(common): avoid interacting with a destroyed injector (#47243)
The NgOptimizedImage directive was previously trying to use an
already destroyed injector in the ngOnDestroy callback. This fix
pre-injects necessery tokens so no injector calls are done
in the destroy process.

PR Close #47243
2022-08-24 12:20:24 -07:00
Katie Hempenius 40d8821dde docs: add image directive guide (#47155)
PR Close #47155
2022-08-24 12:16:48 -07:00
Paul Gschwendtner 9e02af8c7c build: invalidate circleci cache to prune unused nested node modules (#47240)
Yarn 1.x has a bug where it keeps nested unused node modules and doesn't
delete them automatically. This throws off Bazel in some scenarios when
the lock file is updated. This commit invalidates the cache to get a
fresh clean node modules cache without any unused nested directories.

PR Close #47240
2022-08-24 11:04:19 -07:00
Pawel Kozlowski dc29e21b14 fix(common): consider density descriptors with multiple digits as valid (#47230)
Valid density descriptors used in the NgOptimizedImage can contain multiple
digits (ex. 1.25x, 25x). This change fixes the issue where density descriptors
with multiple digits (ex. 25x) where considered invalid.

Please note that a valid density descriptor might still be rejected by the
directive's validation logic if the supplied value is too big.

PR Close #47230
2022-08-23 16:21:14 -07:00
Kalbarczyk e05d6db2cd docs: add Angular & JavaScript Master Podcast to resources list (#47227)
PR Close #47227
2022-08-23 16:20:44 -07:00
Kara Erickson 32caa8b669 fix(common): support density descriptors with 2+ decimals (#47197) (#47232)
This commit fixes a bug where `rawSrcset` in the image
directive would allow density descriptors like `1.5x`
but not like `1.25x`. Now descriptors with 2+ digits
after the decimal point should work.

PR Close #47197

PR Close #47232
2022-08-23 16:12:41 -07:00
Pawel Kozlowski 6790d3ceb1 refactor(common): post-review image directive cleanup (#47170) (#47232)
Minor cleanups based on the review comments that were
not addressed after the initial review.

PR Close #47170

PR Close #47232
2022-08-23 16:12:41 -07:00
Kara Erickson fff8056e7f fix(common): fix formatting on oversized image error (#47188) (#47232)
This is a tiny commit to add newlines in the image
directive's "oversized image" error. Currently, the
rendered and intrinsic image sizes are printed
mid-line, which make them a little hard to read.
This commit puts them each on their own line.

PR Close #47188

PR Close #47232
2022-08-23 16:12:41 -07:00
Angular Robot 0dd6102c79 build: update io_bazel_rules_sass digest to 6802532 (#47104)
See associated pull request for more information.

PR Close #47104
2022-08-23 09:24:57 -07:00
Paul Gschwendtner 78e72db19c ci: do not match dev-infra group for pullapprove owner changes (#47216)
Back when we fixed the pullapprove verify command and our config to
properly include dot-prefixed files, we accidentally started matching
the pullapprove file in the dev-infra group.

This commit fixes this so that dev-infra is not triggered for basic
code owner config changes.

PR Close #47216
2022-08-23 09:22:42 -07:00
Jessica Janiuk e2be52671e docs: update peek-a-boo example (#47219)
The peek-a-boo example image does not exactly reflect what happens. This updates the hook table and the image of the peek-a-boo output. Closes #40138

PR Close #47219
2022-08-22 16:03:19 -07:00
Kalbarczyk e717980d77 docs: add Angular Master website to resources list (#47129)
PR Close #47129
2022-08-22 16:02:19 -07:00
Alex Rickabaugh e9ac16ad02 Revert "fix(animations): fix stagger timing not handling params (#47208)" (#47222)
This reverts commit 05f5e8ad86.

Reason: breaks internal g3 tests

PR Close #47222
2022-08-22 14:53:21 -07:00
Dylan Hunn b8562eaf01 refactor(compiler): Add a new helper method getOwningNgModule. (#47166)
This helper accepts a class for an Angular trait, and returns the NgModule which owns that trait. This will be useful for the language service import project, which needs to edit import arrays on the module.

PR Close #47166
2022-08-22 10:57:49 -07:00
vyom 9aeede60cb docs: fix grammar issues in various markdown files (#47200)
Fixes grammar issues in various markdown files, like the `CHANGELOG.md`

PR Close #47200
2022-08-22 10:54:57 -07:00
dario-piotrowicz b96e571897 fix(animations): fix stagger timing not handling params (#47208)
prior to this change the stagger timing was being built during the
ast building instead of dynamically when visiting the stagger animation,
thus it could not handle params correctly, this change makes it so that
during ast building a timing ast is built instead and that ast is used
dynammically to build animations which can handle params correctly

resolves #19786

PR Close #47208
2022-08-22 10:51:30 -07:00
George Kalpakas 45a5aa8e01 refactor(docs-infra): fix TypeScript warnings due to property types (#47201)
Fix some TypeScript build warnings related to things like redundant `?.`
and `??` operators and uninitialized/non-nullable `@Input` properties.

You can see an example build with the warnings [on CI][1].

[1]: https://circleci.com/gh/angular/angular/1215057#step-104-232

PR Close #47201
2022-08-22 10:51:02 -07:00
George Kalpakas 33f9dba686 fix(docs-infra): prevent unnecessary warning in mergeOverridenImplementation Dgeni processor (#47201)
The `mergeOverridenImplementation` processor tries to ensure that any
doc used with the `@overrideImplementation` annotation is not itself
public (and explicitly marks is as internal if it is).

Previously, it determined the public/private status of a doc by only
checking the value of the doc's `internal` property (which is mainly set
via the `@internal` annotation). This failed to account for docs marked
as "private exports" (such as those prefixed with `ɵ`), which are
essentially also treated as internal.

This would result in incorrect warnings. [Example warning][1]:

> Constructor doc forms/ɵFormControlCtor was not marked '@internal';
> adding this annotation.

This commit prevents the incorrect warning by also checking the value of
the doc's `privateExport` property to determine its public/private
status.

[1]: https://circleci.com/gh/angular/angular/1215057#step-104-164

PR Close #47201
2022-08-22 10:51:02 -07:00
George Kalpakas b9aa77d1d0 build(docs-infra): improve error message in mergeOverridenImplementation Dgeni processor (#47201)
Previously, error messages related to an overriden constructor doc would
stringify the doc as `[object Object]`, which is not helpful for
debugging the issue. For example:

> Constructor doc [object Object] was not marked '@internal'

This commit improves the error message by including the doc's ID
instead. For example, the above error message would become:

> Constructor doc forms/ɵFormControlCtor was not marked '@internal'

PR Close #47201
2022-08-22 10:51:02 -07:00
Dylan Hunn 7f74e35ffc refactor(language-service): Create helper methods for manipulating object and array ASTs. (#47181)
Create three new helper methods: `addElementToArrayLiteral`, `objectPropertyAssignmentForKey`, and `updateObjectValueForKey`. These methods make interacting with array and object literals easier.

These will be useful for the standalone imports feature, which will need to add new terms to import arrays in Component and NgModule decorators.

PR Close #47181
2022-08-22 10:44:22 -07:00
Dylan Hunn 8e9ab02444 refactor(compiler): Add a new helper method getPrimaryAngularDecorator. (#47180)
This helper accepts a class, and returns the primary Angular Decorator associated with that trait (e.g. the Component, Pipe, Directive, or NgModule decorator). This will be useful for the language service import project, which needs to edit import arrays inside the decorator.

PR Close #47180
2022-08-22 10:39:43 -07:00
Bob Watson e5de9a0722 docs: Add Bob Watson as a member of the Angular team (#47217)
PR Close #47217
2022-08-22 10:28:05 -07:00
George Kalpakas 7c5ede6552 fix(docs-infra): avoid distorting contributor images (#47215)
Ensure contributor images are not distorted.
This was accidentally broken in #46347.

PR Close #47215
2022-08-22 13:05:17 +00:00
Jeremy Elbourn d14603fdb5 refactor(core): remove obsolete data: url validation (#45860)
Validation for `data:` urls is obsolete now that modern browsers ([Firefox as of v57+](https://blog.mozilla.org/security/2017/10/04/treating-data-urls-unique-origins-firefox-57)) don't treat `data:` urls as same-origin resources.

Googlers can see  internal change cl/363609175 for additional context.

PR Close #45860
2022-08-18 13:41:44 -07:00
Jan Kuehle 591068afc7 refactor(compiler): /a/.exec() returns RegExpExecArray (#47169)
Fix compilation issue with TypeScript nightly. TypeScript added a field
`0` to `RegExpMatchArray` in
https://github.com/microsoft/TypeScript/commit/3b80ddca212959ae5dcf2f48704be627283c6468.
Before that, `RegExpMatchArray` and `RegExpExecArray` were identical.

In one place Angular incorrectly expects `RegExpMatchArray` as the
result of a RegExp#exec() call. This assignment fails on TypeScript
nightly with the error:

    Property '0' is missing in type 'RegExpExecArray' but required in type 'RegExpMatchArray'.

Fix the issue by using the type `RegExpExecArray` instead. This also
works for older TypeScript versions.

PR Close #47169
2022-08-18 12:22:45 -07:00
FatalMerlin 482b6119c2 fix(service-worker): update golden index.md (#47044)
Missing updated on golden `index.md`
Updated with api-extractor

PR Close #47044
2022-08-18 12:09:11 -07:00
FatalMerlin 1142a1026b refactor(service-worker): formatting of index.ts (#47044)
Fixed formatting of index.ts.

PR Close #47044
2022-08-18 12:09:11 -07:00
Merlin 3f548610dd fix(service-worker): export NoNewVersionDetectedEvent (#47044)
NoNewVersionDetectedEvent is marked as @publicApi but not exported.
PR Close #47044
2022-08-18 12:09:11 -07:00
Pawel Kozlowski c83e861a3f release: cut the v14.2.0-rc.0 release 2022-08-17 17:11:25 +02:00
148 changed files with 5971 additions and 3374 deletions
+6 -6
View File
@@ -24,20 +24,20 @@ version: 2.1
# **NOTE 2 **: If you change the cache key prefix, also sync the cache_key_fallback to match.
# **NOTE 3 **: Keep the static part of the cache key as prefix to enable correct fallbacks.
# See https://circleci.com/docs/2.0/caching/#restoring-cache for how prefixes work in CircleCI.
var_3: &cache_key v7-angular-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "aio/yarn.lock" }}
var_3: &cache_key v8-angular-node-16-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}-{{ checksum "aio/yarn.lock" }}
# We invalidate the cache if the Bazel version changes because otherwise the `bazelisk` cache
# folder will contain all previously used versions and ultimately cause the cache restoring to
# be slower due to its growing size.
var_4: &cache_key_fallback v7-angular-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}
var_4: &cache_key_fallback v8-angular-node-16-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}
# Windows needs its own cache key because binaries in node_modules are different.
var_3_win: &cache_key_win v9-angular-win-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}
var_4_win: &cache_key_win_fallback v9-angular-win-node-14-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}
var_3_win: &cache_key_win v10-angular-win-node-16-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}-{{ checksum "yarn.lock" }}-{{ checksum "WORKSPACE" }}
var_4_win: &cache_key_win_fallback v10-angular-win-node-16-{{ checksum "month.txt" }}-{{ checksum ".bazelversion" }}
# Cache key for the `components-repo-unit-tests` job. **Note** when updating the SHA in the
# cache keys also update the SHA for the "COMPONENTS_REPO_COMMIT" environment variable.
var_5: &components_repo_unit_tests_cache_key v1-angular-components-{{ checksum "month.txt" }}-7a24e95bafbdeb697f74a48e275c2442bcbefc74
var_6: &components_repo_unit_tests_cache_key_fallback v1-angular-components-{{ checksum "month.txt" }}
var_5: &components_repo_unit_tests_cache_key v2-angular-components-{{ checksum "month.txt" }}-7a24e95bafbdeb697f74a48e275c2442bcbefc74
var_6: &components_repo_unit_tests_cache_key_fallback v2-angular-components-{{ checksum "month.txt" }}
# Workspace initially persisted by the `setup` job, and then enhanced by `build-npm-packages`.
# https://circleci.com/docs/2.0/workflows/#using-workspaces-to-share-data-among-jobs
+1 -1
View File
@@ -45,6 +45,6 @@ jobs:
# Upload the results to GitHub's code scanning dashboard.
- name: 'Upload to code-scanning'
uses: github/codeql-action/upload-sarif@2ca79b6fa8d3ec278944088b4aa5f46912db5d63 # tag=v2.1.18
uses: github/codeql-action/upload-sarif@b398f525a5587552e573b247ac661067fafa920b # tag=v2.1.22
with:
sarif_file: results.sarif
+3 -1
View File
@@ -266,6 +266,8 @@ groups:
'aio/content/images/guide/frequent-ngmodules/**/{*,.*}',
'aio/content/guide/hierarchical-dependency-injection.md',
'aio/content/examples/hierarchical-dependency-injection/**/{*,.*}',
'aio/content/guide/image-directive.md',
'aio/content/guide/image-directive-setup.md',
'aio/content/examples/providers-viewproviders/**/{*,.*}',
'aio/content/examples/resolution-modifiers/**/{*,.*}',
'aio/content/guide/lazy-loading-ngmodules.md',
@@ -1096,7 +1098,7 @@ groups:
<<: *defaults
conditions:
- >
contains_any_globs(files, [
contains_any_globs(files.exclude('.pullapprove.yml'), [
'{*,.*}',
'.circleci/**/{*,.*}',
'.devcontainer/**/{*,.*}',
+91 -85
View File
@@ -1,3 +1,78 @@
<a name="14.2.1"></a>
# 14.2.1 (2022-09-07)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [c0d7ac9ec2](https://github.com/angular/angular/commit/c0d7ac9ec2df9af36d80382bc70c4580720f35a3) | fix | improve formatting of image warnings ([#47299](https://github.com/angular/angular/pull/47299)) |
| [1875ce520a](https://github.com/angular/angular/commit/1875ce520afe7b5c55680b8c6a938a2331dda599) | fix | use DOCUMENT token to query for preconnect links ([#47353](https://github.com/angular/angular/pull/47353)) |
### compiler
| Commit | Type | Description |
| -- | -- | -- |
| [0e35829580](https://github.com/angular/angular/commit/0e3582958079f798a75240873aebf3c4f5e3df5b) | fix | avoid errors for inputs with Object-builtin names ([#47220](https://github.com/angular/angular/pull/47220)) |
### service-worker
| Commit | Type | Description |
| -- | -- | -- |
| [6091786696](https://github.com/angular/angular/commit/60917866961b7ab80ec9637c72300f2707aadd09) | fix | include headers in requests for assets ([#47260](https://github.com/angular/angular/pull/47260)) |
| [28d33505fd](https://github.com/angular/angular/commit/28d33505fd4be00eaf4bf417cd27e20733ddfb80) | fix | only consider GET requests as navigation requests ([#47263](https://github.com/angular/angular/pull/47263)) |
## Special Thanks
Aristeidis Bampakos, Asaf M, Bingo's Code, Bob Watson, Daniel Ostrovsky, George Kalpakas, Giovanni Alberto Rivas, Jeremy Elbourn, Jobayer Hossain, Joe Martin (Crowdstaffing), Joey Perrott, JoostK, Kara Erickson, Kristiyan Kostadinov, Maina Wycliffe, Sabareesh Kappagantu, Simona Cotin, Sonu Sindhu, Yann Provoost, abergquist, jaybell and vyom1611
<!-- CHANGELOG SPLIT MARKER -->
<a name="14.2.0"></a>
# 14.2.0 (2022-08-25)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [d5f7da2120](https://github.com/angular/angular/commit/d5f7da21207f7808dffb3932fa61d22614e6bd57) | feat | introduce the NgOptimizedImage directive ([#47082](https://github.com/angular/angular/pull/47082)) |
| [e2ab99b95e](https://github.com/angular/angular/commit/e2ab99b95efd893c49d15c02cccd72ef82ea1cae) | fix | allow null/undefined to be passed to ngClass input ([#39280](https://github.com/angular/angular/pull/39280)) ([#46906](https://github.com/angular/angular/pull/46906)) |
| [bedf537951](https://github.com/angular/angular/commit/bedf537951e64c55dde9b38936e451daa4a4bde9) | fix | allow null/undefined to be passed to ngStyle input ([#47069](https://github.com/angular/angular/pull/47069)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [d1e83e1b30](https://github.com/angular/angular/commit/d1e83e1b30f2cea9f2ed16bff2d3b969335072ab) | feat | add `createComponent` function ([#46685](https://github.com/angular/angular/pull/46685)) |
| [10becab70e](https://github.com/angular/angular/commit/10becab70e0f2afee29da7b3358eedcc22f655a2) | feat | add `reflectComponentType` function ([#46685](https://github.com/angular/angular/pull/46685)) |
| [4b377d3a6d](https://github.com/angular/angular/commit/4b377d3a6d069da23ec577f8deca761b01d4e2f5) | feat | introduce createApplication API ([#46475](https://github.com/angular/angular/pull/46475)) |
| [31429eaccc](https://github.com/angular/angular/commit/31429eaccc973672efb4ed98a628cf9842e24b02) | feat | support TypeScript 4.8 ([#47038](https://github.com/angular/angular/pull/47038)) |
| [796840209c](https://github.com/angular/angular/commit/796840209cd38aacc5061a31701efe7eda1f6587) | fix | align TestBed interfaces and implementation ([#46635](https://github.com/angular/angular/pull/46635)) |
### forms
| Commit | Type | Description |
| -- | -- | -- |
| [426af91a42](https://github.com/angular/angular/commit/426af91a42104d6ce227ab52c8c4db3e218f5e03) | feat | add `FormBuilder.record()` method ([#46485](https://github.com/angular/angular/pull/46485)) |
| [b302797de4](https://github.com/angular/angular/commit/b302797de47409b988ad77e87f766a5f18374ded) | fix | Correctly infer `FormBuilder` types involving `[value, validators]` shorthand in more cases. ([#47034](https://github.com/angular/angular/pull/47034)) |
### language-service
| Commit | Type | Description |
| -- | -- | -- |
| [598b72bd05](https://github.com/angular/angular/commit/598b72bd05ea33468c70ac35b8ea5286439f41d9) | feat | support fix the component missing member ([#46764](https://github.com/angular/angular/pull/46764)) |
### platform-browser
| Commit | Type | Description |
| -- | -- | -- |
| [07606e3181](https://github.com/angular/angular/commit/07606e3181fc7aa9f9185eb771fc9c44f01fe344) | feat | add `isEmpty` method to the `TransferState` class ([#46915](https://github.com/angular/angular/pull/46915)) |
### platform-server
| Commit | Type | Description |
| -- | -- | -- |
| [2b4d7f6733](https://github.com/angular/angular/commit/2b4d7f6733e10e45e3ca8a448307bbc2834fc4a1) | feat | support document reference in render functions ([#47032](https://github.com/angular/angular/pull/47032)) |
### router
| Commit | Type | Description |
| -- | -- | -- |
| [0abb67af59](https://github.com/angular/angular/commit/0abb67af59a92a2b29082a259aa9f4ea3fbaab7d) | feat | allow guards and resolvers to be plain functions ([#46684](https://github.com/angular/angular/pull/46684)) |
| [75df404467](https://github.com/angular/angular/commit/75df4044675c61d2b646437cfe64fe828a39b3a0) | feat | Create APIs for using Router without RouterModule ([#47010](https://github.com/angular/angular/pull/47010)) |
| [10289f1f6e](https://github.com/angular/angular/commit/10289f1f6e3d5935304a38d4300d4dadfea66150) | feat | expose resolved route title ([#46826](https://github.com/angular/angular/pull/46826)) |
| [8600732b09](https://github.com/angular/angular/commit/8600732b090a4c253eb89ffde6db3858e4a2021c) | feat | Expose the default matcher for `Routes` used by the `Router` ([#46913](https://github.com/angular/angular/pull/46913)) |
| [422323cee0](https://github.com/angular/angular/commit/422323cee00192239d1ab279e6a7c3a808098169) | feat | improve typings for RouterLink boolean inputs ([#47101](https://github.com/angular/angular/pull/47101)) |
| [26ea97688c](https://github.com/angular/angular/commit/26ea97688cba5850588d8da83abaf8b539577241) | feat | Make router directives standalone ([#46758](https://github.com/angular/angular/pull/46758)) |
| [2a43beec15](https://github.com/angular/angular/commit/2a43beec159990b8c4bafc7f189e2bd85002dc7a) | fix | Fix route recognition behavior with some versions of rxjs ([#47098](https://github.com/angular/angular/pull/47098)) |
### service-worker
| Commit | Type | Description |
| -- | -- | -- |
| [383090858c](https://github.com/angular/angular/commit/383090858caf04c27ee8b320cceca2da0ae54bb3) | feat | support `sendRequest` as a `notificationclick` action ([#46912](https://github.com/angular/angular/pull/46912)) |
| [3f548610dd](https://github.com/angular/angular/commit/3f548610dd05f484cd33fa2cee4e3693ed731126) | fix | export NoNewVersionDetectedEvent ([#47044](https://github.com/angular/angular/pull/47044)) |
| [482b6119c2](https://github.com/angular/angular/commit/482b6119c2f3fff5ec0623e101d308a49c416b42) | fix | update golden `index.md` ([#47044](https://github.com/angular/angular/pull/47044)) |
## Special Thanks
Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Bob Watson, Cédric Exbrayat, Dylan Hunn, Emmanuel Roux, FatalMerlin, George Kalpakas, Ilia Mirkin, Jan Kuehle, Jeremy Elbourn, Jessica Janiuk, JiaLiPassion, Kalbarczyk, Kara Erickson, Katie Hempenius, Kristiyan Kostadinov, Merlin, Paul Gschwendtner, Pawel Kozlowski, Tristan Sprößer, Victor Porof, angular-robot[bot], dario-piotrowicz, ivanwonder and vyom
<!-- CHANGELOG SPLIT MARKER -->
<a name="14.1.3"></a>
# 14.1.3 (2022-08-17)
### compiler
@@ -24,74 +99,6 @@ AlirezaEbrahimkhani, Alma Eyre, Andrew Scott, Bob Watson, George Kalpakas, Kalba
<!-- CHANGELOG SPLIT MARKER -->
<a name="14.2.0-next.1"></a>
# 14.2.0-next.1 (2022-08-10)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [bedf537951](https://github.com/angular/angular/commit/bedf537951e64c55dde9b38936e451daa4a4bde9) | fix | allow null/undefined to be passed to ngStyle input ([#47069](https://github.com/angular/angular/pull/47069)) |
### compiler-cli
| Commit | Type | Description |
| -- | -- | -- |
| [ea89677c12](https://github.com/angular/angular/commit/ea89677c125c16654e3e521998b575687c2bd20c) | feat | support more recent version of `tsickle` ([#47018](https://github.com/angular/angular/pull/47018)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [dbed2cf079](https://github.com/angular/angular/commit/dbed2cf079c52825ce0aa67fc2a46bc3d38f408f) | fix | check if transplanted views are attached to change detector ([#46974](https://github.com/angular/angular/pull/46974)) |
### platform-server
| Commit | Type | Description |
| -- | -- | -- |
| [2b4d7f6733](https://github.com/angular/angular/commit/2b4d7f6733e10e45e3ca8a448307bbc2834fc4a1) | feat | support document reference in render functions ([#47032](https://github.com/angular/angular/pull/47032)) |
### router
| Commit | Type | Description |
| -- | -- | -- |
| [0abb67af59](https://github.com/angular/angular/commit/0abb67af59a92a2b29082a259aa9f4ea3fbaab7d) | feat | allow guards and resolvers to be plain functions ([#46684](https://github.com/angular/angular/pull/46684)) |
| [2a43beec15](https://github.com/angular/angular/commit/2a43beec159990b8c4bafc7f189e2bd85002dc7a) | fix | Fix route recognition behavior with some versions of rxjs ([#47098](https://github.com/angular/angular/pull/47098)) |
## Special Thanks
4javier, Andrew Kushnir, Andrew Scott, AntonioCardenas, Bob Watson, Bruno Barbosa, Eduardo Speroni, Edward, George Kalpakas, Ilia Mirkin, Jan Melcher, Jessica Janiuk, JiaLiPassion, Kristiyan Kostadinov, Mladen Jakovljević, Paul Gschwendtner, Pawel Kozlowski, Roman Matusevich, Victor Porof, Vovch, ashide2729, ileil and onrails
<!-- CHANGELOG SPLIT MARKER -->
<a name="14.2.0-next.0"></a>
# 14.2.0-next.0 (2022-08-03)
### common
| Commit | Type | Description |
| -- | -- | -- |
| [e2ab99b95e](https://github.com/angular/angular/commit/e2ab99b95efd893c49d15c02cccd72ef82ea1cae) | fix | allow null/undefined to be passed to ngClass input ([#39280](https://github.com/angular/angular/pull/39280)) ([#46906](https://github.com/angular/angular/pull/46906)) |
### core
| Commit | Type | Description |
| -- | -- | -- |
| [d1e83e1b30](https://github.com/angular/angular/commit/d1e83e1b30f2cea9f2ed16bff2d3b969335072ab) | feat | add `createComponent` function ([#46685](https://github.com/angular/angular/pull/46685)) |
| [10becab70e](https://github.com/angular/angular/commit/10becab70e0f2afee29da7b3358eedcc22f655a2) | feat | add `reflectComponentType` function ([#46685](https://github.com/angular/angular/pull/46685)) |
| [4b377d3a6d](https://github.com/angular/angular/commit/4b377d3a6d069da23ec577f8deca761b01d4e2f5) | feat | introduce createApplication API ([#46475](https://github.com/angular/angular/pull/46475)) |
| [796840209c](https://github.com/angular/angular/commit/796840209cd38aacc5061a31701efe7eda1f6587) | fix | align TestBed interfaces and implementation ([#46635](https://github.com/angular/angular/pull/46635)) |
### forms
| Commit | Type | Description |
| -- | -- | -- |
| [426af91a42](https://github.com/angular/angular/commit/426af91a42104d6ce227ab52c8c4db3e218f5e03) | feat | add `FormBuilder.record()` method ([#46485](https://github.com/angular/angular/pull/46485)) |
### language-service
| Commit | Type | Description |
| -- | -- | -- |
| [598b72bd05](https://github.com/angular/angular/commit/598b72bd05ea33468c70ac35b8ea5286439f41d9) | feat | support fix the component missing member ([#46764](https://github.com/angular/angular/pull/46764)) |
### platform-browser
| Commit | Type | Description |
| -- | -- | -- |
| [07606e3181](https://github.com/angular/angular/commit/07606e3181fc7aa9f9185eb771fc9c44f01fe344) | feat | add `isEmpty` method to the `TransferState` class ([#46915](https://github.com/angular/angular/pull/46915)) |
### router
| Commit | Type | Description |
| -- | -- | -- |
| [10289f1f6e](https://github.com/angular/angular/commit/10289f1f6e3d5935304a38d4300d4dadfea66150) | feat | expose resolved route title ([#46826](https://github.com/angular/angular/pull/46826)) |
| [8600732b09](https://github.com/angular/angular/commit/8600732b090a4c253eb89ffde6db3858e4a2021c) | feat | Expose the default matcher for `Routes` used by the `Router` ([#46913](https://github.com/angular/angular/pull/46913)) |
| [26ea97688c](https://github.com/angular/angular/commit/26ea97688cba5850588d8da83abaf8b539577241) | feat | Make router directives standalone ([#46758](https://github.com/angular/angular/pull/46758)) |
### service-worker
| Commit | Type | Description |
| -- | -- | -- |
| [383090858c](https://github.com/angular/angular/commit/383090858caf04c27ee8b320cceca2da0ae54bb3) | feat | support `sendRequest` as a `notificationclick` action ([#46912](https://github.com/angular/angular/pull/46912)) |
## Special Thanks
Andrew Kushnir, Andrew Scott, Cédric Exbrayat, Emmanuel Roux, George Kalpakas, Ilia Mirkin, Jessica Janiuk, Paul Gschwendtner, Pawel Kozlowski, Tristan Sprößer, angular-robot[bot], dario-piotrowicz and ivanwonder
<!-- CHANGELOG SPLIT MARKER -->
<a name="14.1.1"></a>
# 14.1.1 (2022-08-03)
### core
@@ -166,7 +173,7 @@ Alan Agius, Andrew Kushnir, Andrew Quinn, Andrew Scott, Aristeidis Bampakos, Asa
| [ce20ed067f](https://github.com/angular/angular/commit/ce20ed067f12714ee6488ffe07f1a1c18bb60a15) | fix | Ensure Route injector is created before running CanMatch guards ([#46394](https://github.com/angular/angular/pull/46394)) |
| [6a7b818d94](https://github.com/angular/angular/commit/6a7b818d94fdd13d81a01285e3e4be953a29cc06) | fix | Ensure target `RouterStateSnapshot` is defined in `NavigationError` ([#46842](https://github.com/angular/angular/pull/46842)) |
| [f94c6f433d](https://github.com/angular/angular/commit/f94c6f433dba3924b79f137cfcc49d2dfd4d679c) | fix | Expose CanMatchFn as public API ([#46394](https://github.com/angular/angular/pull/46394)) |
| [e8ae0fe3e9](https://github.com/angular/angular/commit/e8ae0fe3e91e2e805146fad0d2f0976b1f886112) | fix | Fix cancellation code for canLoad rejections ([#46752](https://github.com/angular/angular/pull/46752)) |
| [e8ae0fe3e9](https://github.com/angular/angular/commit/e8ae0fe3e91e2e805146fad0d2f0976b1f886112) | fix | Fix cancelation code for canLoad rejections ([#46752](https://github.com/angular/angular/pull/46752)) |
### upgrade
| Commit | Type | Description |
| -- | -- | -- |
@@ -380,7 +387,7 @@ Adrien Crivelli, Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Dyla
This tightens parameter types of `TransferState` usage, and is a minor breaking change which may reveal existing problematic calls.
### router
- The type of `Route.pathMatch` is now more strict. Places that use
- The type of `Route.pathMatch` is now stricter. Places that use
`pathMatch` will likely need to be updated to have an explicit
`Route`/`Routes` type so that TypeScript does not infer the type as
`string`.
@@ -620,7 +627,7 @@ Adrien Crivelli, Alan Agius, Alex Rickabaugh, Andrew Kushnir, Andrew Scott, Dyla
| Commit | Type | Description |
| -- | -- | -- |
| [ec0a0e0669](https://github.com/angular/angular/commit/ec0a0e0669ef5d2f524fbf9a540eb2b306b2e24a) | feat | add `cacheOpaqueResponses` option for data-groups ([#44723](https://github.com/angular/angular/pull/44723)) |
| [bd04fbc05b](https://github.com/angular/angular/commit/bd04fbc05b0397de966a493a863e1054203c86d9) | feat | emit a notification when the service worker is already up to date after check ([#45216](https://github.com/angular/angular/pull/45216)) |
| [bd04fbc05b](https://github.com/angular/angular/commit/bd04fbc05b0397de966a493a863e1054203c86d9) | feat | emit a notification when the service worker is already up-to-date after check ([#45216](https://github.com/angular/angular/pull/45216)) |
## Special Thanks
Adrian Kunz, Alan Agius, AleksanderBodurri, Alex Rickabaugh, AlirezaEbrahimkhani, Amir Rustamzadeh, Andrew Kushnir, Andrew Scott, Chabbey François, Charles Lyding, Cédric Exbrayat, Daan De Smedt, David Schmidt, Derek Cormier, Dmitrij Kuba, Doug Parker, Dylan Hunn, Emma Twersky, George Kalpakas, George Looshch, Jan Kuehle, Jessica Janiuk, JiaLiPassion, JimMorrison723, Joe Martin (Crowdstaffing), Joey Perrott, JoostK, Kristiyan Kostadinov, Krzysztof Platis, Leosvel Pérez Espinosa, Maddie Klein, Mark Whitfeld, Martin Sikora, Michael-Doner, Michal Materowski, Minko Gechev, Paul Gschwendtner, Pawel Kozlowski, Payam Shahidi, Pusztai Tibor, Ricardo Mattiazzi Baumgartner, Roy Dorombozi, Ruslan Lekhman, Samuel Littley, Sergej Grilborzer, Sumit Arora, Tobias Speicher, Virginia Dooley, Zack Elliott, alirezaghey, ananyahs96, arturovt, cexbrayat, dario-piotrowicz, ivanwonder, kamikopi, markostanimirovic, markwhitfeld, mgechev, renovate[bot], twerske and zverbeta
@@ -1040,7 +1047,7 @@ Aristeidis Bampakos, Dylan Hunn, George Kalpakas, JoostK, Kristiyan Kostadinov,
- The `downgradeModule` function calls with NgModule factories are deprecated. Please use NgModule class based `downgradeModule` calls instead.
### common
- `TestRequest` from `@angular/common/http/testing` no longer
accepts `ErrorEvent` when simulating XHR errors. Instead instances of
accepts `ErrorEvent` when simulating XHR errors. Instead, instances of
`ProgressEvent` should be passed, matching with the native browser behavior.
###
| Commit | Type | Description |
@@ -1262,11 +1269,11 @@ return type.
### core
- Angular no longer requires component factories to dynamically create components. The factory-based signature of the `ViewContainerRef.createComponent` function is deprecated in favor of a different signature that allows passing component classes instead.
- The `getModuleFactory` function is deprecated in favor of the `getNgModuleById` one. With Ivy it's possible to work with NgModule classes directly, without retrieving corresponding factories, so the `getNgModuleById` should be used instead.
- The `getModuleFactory` function is deprecated in favor of the `getNgModuleById` one. With Ivy, it's possible to work with NgModule classes directly, without retrieving corresponding factories, so the `getNgModuleById` should be used instead.
- Ivy made it possible to avoid the need to resolve Component and NgModule factories. Framework APIs allow to use Component and NgModule Types directly. As a result, the `PlatformRef.bootstrapModuleFactory` and a factory-based signature of the `ApplicationRef.bootstrap` method are now obsolete and are now deprecated. The `PlatformRef.bootstrapModuleFactory` calls can be replaced with `PlatformRef.bootstrapModule` ones. The `ApplicationRef.bootstrap` method allows to provide Component Type, so this can be used a replacement for the factory-based calls.
- In ViewEngine, [JIT compilation](https://angular.io/guide/glossary#jit) required special providers (like `Compiler`, `CompilerFactory`, etc) to be injected in the app and corresponding methods to be invoked. With Ivy, JIT compilation takes place implicitly if the Component, NgModule, etc have not already been [AOT compiled](https://angular.io/guide/glossary#aot). Those special providers were made available in Ivy for backwards-compatibility with ViewEngine to make the transition to Ivy smoother. Since ViewEngine is deprecated and will soon be removed, those symbols are now deprecated as well:
- In ViewEngine, [JIT compilation](https://angular.io/guide/glossary#jit) required special providers (like `Compiler`, `CompilerFactory`, etc) to be injected in the app and corresponding methods to be invoked. With Ivy, JIT compilation takes place implicitly if the Component, NgModule, etc. have not already been [AOT compiled](https://angular.io/guide/glossary#aot). Those special providers were made available in Ivy for backwards-compatibility with ViewEngine to make the transition to Ivy smoother. Since ViewEngine is deprecated and will soon be removed, those symbols are now deprecated as well:
- `ModuleWithComponentFactories`
- `Compiler`
@@ -2207,7 +2214,7 @@ Alex Rickabaugh, Daniel Díaz, David Shevitz, Dylan Hunn, Front-end developer, G
* **router:** update type castings for JSON.parse usage ([#40710](https://github.com/angular/angular/issues/40710)) ([350dada](https://github.com/angular/angular/commit/350dada))
* **service-worker:** update supported range of node versions to only include LTS versions ([#41822](https://github.com/angular/angular/issues/41822)) ([6b823d7](https://github.com/angular/angular/commit/6b823d7071d59234ab52bdf7eaa248df6b7d9faa))
* **service-worker:** update type castings for JSON.parse usage ([#40710](https://github.com/angular/angular/issues/40710)) ([4f7ff96](https://github.com/angular/angular/commit/4f7ff96))
* **upgrade:** preserve $interval.flush when ngMocks is being used ([#30229](https://github.com/angular/angular/issues/30229)) ([87dc851](https://github.com/angular/angular/commit/87dc8511ccb9c75d78866ebd2c250ea96fc91bd0))
* **upgrade:** preserve $interval flush when ngMocks is being used ([#30229](https://github.com/angular/angular/issues/30229)) ([87dc851](https://github.com/angular/angular/commit/87dc8511ccb9c75d78866ebd2c250ea96fc91bd0))
* **upgrade:** update supported range of node versions to only include LTS versions ([#41822](https://github.com/angular/angular/issues/41822)) ([10c4523](https://github.com/angular/angular/commit/10c45239a68e82ea52c1601fae09953aa7843351))
@@ -2223,7 +2230,7 @@ Alex Rickabaugh, Daniel Díaz, David Shevitz, Dylan Hunn, Front-end developer, G
* **bazel:** update supported range of node versions ([#41544](https://github.com/angular/angular/issues/41544)) ([d583d92](https://github.com/angular/angular/commit/d583d926db537cc74f9235cad51189dbe83fbb44))
* **common:** update supported range of node versions ([#41544](https://github.com/angular/angular/issues/41544)) ([e0250e5](https://github.com/angular/angular/commit/e0250e567ae47ed7b77e9d88a3289727c056a6f1))
* **common:** add `historyGo` method to `Location` service ([#38890](https://github.com/angular/angular/issues/38890)) ([e05a6f3](https://github.com/angular/angular/commit/e05a6f3bb3048e9a94a4b154526221dea290312d))
* **common:** support ICU standard "stand alone day of week" with `DatePipe` ([#40766](https://github.com/angular/angular/issues/40766)) ([c56ecab](https://github.com/angular/angular/commit/c56ecab515c28d2ad45c630080bfbf549675528a)), closes [#26922](https://github.com/angular/angular/issues/26922)
* **common:** support ICU standard "stand-alone day of week" with `DatePipe` ([#40766](https://github.com/angular/angular/issues/40766)) ([c56ecab](https://github.com/angular/angular/commit/c56ecab515c28d2ad45c630080bfbf549675528a)), closes [#26922](https://github.com/angular/angular/issues/26922)
* **common:** implement `appendAll()` method on `HttpParams` ([#20930](https://github.com/angular/angular/issues/20930)) ([575a2d1](https://github.com/angular/angular/commit/575a2d1)), closes [#20798](https://github.com/angular/angular/issues/20798)
* **compiler:** support nullish coalescing in templates ([#41437](https://github.com/angular/angular/issues/41437)) ([ec27bd4](https://github.com/angular/angular/commit/ec27bd4ed1cc086d76d8142fadf87354b38aa61a)), closes [#36528](https://github.com/angular/angular/issues/36528)
* **compiler:** update supported range of node versions ([#41544](https://github.com/angular/angular/issues/41544)) ([75cc813](https://github.com/angular/angular/commit/75cc8133ad8efd6453694f222e2cc6789c4de7b2))
@@ -2307,7 +2314,7 @@ migrate their message ids using the `localize-migrate` command line tool.
* **core:** Angular no longer maintains support for node v10
* **core:** Previously the `ng.getDirectives` function threw an error in case a
given DOM node had no Angular context associated with it (for example
if a function was called for a DOM element outside of an Angular app).
if a function was called for a DOM element outside an Angular app).
This behavior was inconsistent with other debugging utilities under `ng`
namespace, which handled this situation without raising an exception.
Now calling the `ng.getDirectives` function for such DOM nodes would
@@ -2341,8 +2348,7 @@ export class QueryCompWithStrictChangeEmitParent {
}
```
For backward compatibility before v12
`emitDistinctChangesOnlyDefaultValue` was set to `false`. This change
changes the default to `true`.
`emitDistinctChangesOnlyDefaultValue` was set to `false`. This change the default to `true`.
* **core:** The type of the `APP_INITIALIZER` token has been changed to more accurately
reflect the types of return values that are handled by Angular. Previously,
each initializer callback was typed to return `any`, this is now
@@ -2353,7 +2359,7 @@ the stricter type.
Additionally, TypeScript may report the TS2742 error if the `APP_INITIALIZER`
token is used in an expression of which its inferred type has to be emitted
into a .d.ts file. To workaround this, an explicit type annotation is needed,
into a .d.ts file. To work around this, an explicit type annotation is needed,
which would typically be `Provider` or `Provider[]`.
* **core:** Minimum supported `zone.js` version is `0.11.4`
* **forms:** The `emitEvent` option was added to the following `FormArray` and `FormGroup` methods:
@@ -2438,7 +2444,7 @@ Alex Rickabaugh, Andrew J Asche, Georgii Dolzhykov, Joey Perrott, Joost Koehoorn
* **core:** Angular no longer maintains support for node v10
* **core:** Previously the `ng.getDirectives` function threw an error in case a
given DOM node had no Angular context associated with it (for example
if a function was called for a DOM element outside of an Angular app).
if a function was called for a DOM element outside an Angular app).
This behavior was inconsistent with other debugging utilities under `ng`
namespace, which handled this situation without raising an exception.
Now calling the `ng.getDirectives` function for such DOM nodes would
@@ -2782,7 +2788,7 @@ This release contains the same set the of changes as 11.2.0-next.1.
* **core:** Allow passing AbstractType to the inject function ([#37958](https://github.com/angular/angular/issues/37958)) ([a1b6ad0](https://github.com/angular/angular/commit/a1b6ad0))
* **core:** Ensure OnPush ancestors are marked dirty when events occur ([#39833](https://github.com/angular/angular/issues/39833)) ([68d4a74](https://github.com/angular/angular/commit/68d4a74)), closes [#39832](https://github.com/angular/angular/issues/39832)
* **core:** meta addTag() adds incorrect attribute for httpEquiv ([#32531](https://github.com/angular/angular/issues/32531)) ([ff0a90e](https://github.com/angular/angular/commit/ff0a90e))
* **core:** migration error if program contains files outside of the project ([#39790](https://github.com/angular/angular/issues/39790)) ([1a26f6d](https://github.com/angular/angular/commit/1a26f6d)), closes [#39778](https://github.com/angular/angular/issues/39778)
* **core:** migration error if program contains files outside the project ([#39790](https://github.com/angular/angular/issues/39790)) ([1a26f6d](https://github.com/angular/angular/commit/1a26f6d)), closes [#39778](https://github.com/angular/angular/issues/39778)
* **core:** not invoking object's toString when rendering to the DOM ([#39843](https://github.com/angular/angular/issues/39843)) ([11cd37f](https://github.com/angular/angular/commit/11cd37f)), closes [#38839](https://github.com/angular/angular/issues/38839)
* **core:** remove duplicated noop function ([#39761](https://github.com/angular/angular/issues/39761)) ([066126a](https://github.com/angular/angular/commit/066126a))
* **core:** support `Attribute` DI decorator in `deps` section of a token ([#37085](https://github.com/angular/angular/issues/37085)) ([f5cbf0b](https://github.com/angular/angular/commit/f5cbf0b)), closes [#36479](https://github.com/angular/angular/issues/36479)
@@ -2980,7 +2986,7 @@ This release contains the same set the of changes as 11.2.0-next.1.
* **compiler-cli:** report error when a reference target is missing instead of crashing ([#39805](https://github.com/angular/angular/issues/39805)) ([8634611](https://github.com/angular/angular/commit/8634611)), closes [#38618](https://github.com/angular/angular/issues/38618) [#39744](https://github.com/angular/angular/issues/39744)
* **core:** Ensure OnPush ancestors are marked dirty when events occur ([#39833](https://github.com/angular/angular/issues/39833)) ([01c1bfd](https://github.com/angular/angular/commit/01c1bfd)), closes [#39832](https://github.com/angular/angular/issues/39832)
* **core:** meta addTag() adds incorrect attribute for httpEquiv ([#32531](https://github.com/angular/angular/issues/32531)) ([3114b0a](https://github.com/angular/angular/commit/3114b0a))
* **core:** migration error if program contains files outside of the project ([#39790](https://github.com/angular/angular/issues/39790)) ([7dcc212](https://github.com/angular/angular/commit/7dcc212)), closes [#39778](https://github.com/angular/angular/issues/39778)
* **core:** migration error if program contains files outside the project ([#39790](https://github.com/angular/angular/issues/39790)) ([7dcc212](https://github.com/angular/angular/commit/7dcc212)), closes [#39778](https://github.com/angular/angular/issues/39778)
* **core:** not invoking object's toString when rendering to the DOM ([#39843](https://github.com/angular/angular/issues/39843)) ([75e22ab](https://github.com/angular/angular/commit/75e22ab)), closes [#38839](https://github.com/angular/angular/issues/38839)
* **core:** remove duplicated noop function ([#39761](https://github.com/angular/angular/issues/39761)) ([26a1337](https://github.com/angular/angular/commit/26a1337))
* **core:** support `Attribute` DI decorator in `deps` section of a token ([#37085](https://github.com/angular/angular/issues/37085)) ([aaa3111](https://github.com/angular/angular/commit/aaa3111)), closes [#36479](https://github.com/angular/angular/issues/36479)
@@ -3183,7 +3189,7 @@ This release contains the same set the of changes as 11.2.0-next.1.
`CollectionChangeRecord` has been removed, use `IterableChangeRecord` instead.
- **[c8f056b](https://github.com/angular/angular/commit/c8f056beb696d176530ee4e86f64964c3b834c9a):**
If you call `TestBed.overrideProvider` after TestBed initialization, provider overrides are not applied.
This behavior is consistent with other override methods (such as `TestBed.overrideDirective`, etc) but they throw an error to indicate that, when the check was missing in the `TestBed.overrideProvider` function.
This behavior is consistent with other override methods (such as `TestBed.overrideDirective`, etc.) but they throw an error to indicate that, when the check was missing in the `TestBed.overrideProvider` function.
Now calling `TestBed.overrideProvider` after `TestBed` initialization also triggers an error, thus there is a chance that some tests (where `TestBed.overrideProvider` is called after `TestBed` initialization) will start to fail and require updates to move `TestBed.overrideProvider` calls before `TestBed` initialization is completed.
- **[4ca1c73](https://github.com/angular/angular/commit/4ca1c736bb020de166b6a1fbfb9fe264602ccd5c):**
In v10, IE 9, 10, and IE mobile support was deprecated.
@@ -3209,7 +3215,7 @@ This release contains the same set the of changes as 11.2.0-next.1.
In an unlikely case your code was testing the parent against `undefined` with strict equality, you'll need to change this to `=== null` instead, since the parent is now explicitly initialized with `null` instead of being left `undefined`.
* **platform-server:**
- **[b4e8399](https://github.com/angular/angular/commit/b4e8399144ae4b6d4f0da9ff2a8e1fa73643f766):**
If you use `useAbsoluteUrl` to setup `platform-server`, you now need to also specify `baseUrl`.
If you use `useAbsoluteUrl` to set up `platform-server`, you now need to also specify `baseUrl`.
We are intentionally making this a breaking change in a minor release, because if `useAbsoluteUrl` is set to `true` then the behavior of the application could be unpredictable, resulting in issues that are hard to discover but could be affecting production environments.
* **platform-webworker:**
- **[93c3d8f](https://github.com/angular/angular/commit/93c3d8f9fd79014bf700a1447503f5ee6f170bf9):**
+1 -1
View File
@@ -2,7 +2,7 @@
## Our Pledge
In the interest of fostering an safe and welcoming environment, we as
In the interest of fostering a safe and welcoming environment, we as
the Angular team pledge to make participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, sex characteristics, gender identity, gender expression,
+1 -1
View File
@@ -68,7 +68,7 @@ A minimal reproduction allows us to quickly confirm a bug (or point out a coding
We require a minimal reproduction to save maintainers' time and ultimately be able to fix more bugs.
Often, developers find coding problems themselves while preparing a minimal reproduction.
We understand that sometimes it might be hard to extract essential bits of code from a larger codebase but we really need to isolate the problem before we can fix it.
We understand that sometimes it might be hard to extract essential bits of code from a larger codebase, but we really need to isolate the problem before we can fix it.
Unfortunately, we are not able to investigate / fix bugs without a minimal reproduction, so if we don't hear back from you, we are going to close an issue that doesn't have enough info to be reproduced.
+3 -3
View File
@@ -158,10 +158,10 @@ cldr_xml_data_repository(
# sass rules
http_archive(
name = "io_bazel_rules_sass",
sha256 = "85b34f2e5e227aa586b6e0fd6942262e17b3cface596891eeef5a29a0b7467e3",
strip_prefix = "rules_sass-697e5a08bdd39aee49f2c6f4eb621ef59e677e49",
sha256 = "a5ff47737667d644dba00af5444b6723fd5ddae2db80ee2f1e202bf0ccfcd4ef",
strip_prefix = "rules_sass-f3874ae3ddbdab73a0a0e7bc14909d498c464ad9",
urls = [
"https://github.com/bazelbuild/rules_sass/archive/697e5a08bdd39aee49f2c6f4eb621ef59e677e49.zip",
"https://github.com/bazelbuild/rules_sass/archive/f3874ae3ddbdab73a0a0e7bc14909d498c464ad9.zip",
],
)
+42
View File
@@ -0,0 +1,42 @@
# Update the angular.io app
The dependencies of the angular.io app (including Angular, Angular Material and Angular CLI) are automatically updated using [Renovate](https://renovatebot.com/).
However, it is useful to periodically also manually update the app to more closely match (in file layout, configs, etc.) what a new Angular CLI app would look like.
This is typically only needed once for each new major Angular version.
Since angular.io is an Angular CLI app, we can take advantage of `ng update` to apply migrations.
Follow these steps to align the angular.io app with new CLI apps.
> **Note:**
> The following steps assume that the related Angular dependencies have already been updated in [aio/package.json](./package.json) (for example, automatically by Renovate).
> **Note:**
> All commands shown below are expected to be executed from inside the [aio/](./) directory (unless specified otherwise).
- Determine (for example, by examining git history) what is the last versions for which this process was performed.
These will be referred to as `<FROM_VERSION_*>`.
If you can't determine these, use arbitrary versions, such as the previous major version.
- Run the following commands to automatically apply any available migrations to the project:
```sh
# Ensure dependencies are installed.
yarn install
# Migrate project to new versions.
yarn ng update @angular/cli --allow-dirty --migrate-only --from=<FROM_VERSION_CLI>
yarn ng update @angular/core --allow-dirty --migrate-only --from=<FROM_VERSION_ANGULAR>
yarn ng update @angular/material --allow-dirty --migrate-only --from=<FROM_VERSION_MATERIAL>
```
> **Note:**
> Depending on the number of changes generated from each `ng update` command, it might make sense to create a separate commit for each update.
- Inspect [package.json](./package.json) to determine what is the current version of Angular CLI (i.e. `@angular/cli`) used in the app.
This will be referred to as `<TO_VERSION_CLI>`.
- Use the [angular-cli-diff](https://github.com/cexbrayat/angular-cli-diff) repository to discover more changes (which are not automatically applied via `ng update` migrations) between Angular CLI apps of different versions.
Visit https://github.com/cexbrayat/angular-cli-diff/compare/<FROM_VERSION_CLI>...<TO_VERSION_CLI>, inspect the changes between the two versions and apply the ones that make sense to the angular.io source code.
- Commit all changes and [submit a pull request](../CONTRIBUTING.md#submit-pr).
+1
View File
@@ -30,4 +30,5 @@
## Miscellaneous
- [Debug docker container](misc--debug-docker-container.md)
- [Use Let's Encrypt certificates](misc--use-lets-encrypt-certs.md)
- [Integrate with CI](misc--integrate-with-ci.md)
@@ -0,0 +1,80 @@
# Miscellaneous - Use Let's Encrypt TLS certificates
[Let's Encrypt](https://letsencrypt.org/) is a free, automated, and open certificate authority (CA),
provided by the [Internet Security Research Group (ISRG)](https://www.abetterinternet.org/). It can
be used for issuing the certificates needed by the preview server. See the "Create TLS certificates"
section in [this doc](vm-setup--create-host-dirs-and-files.md) for more details.
Let's Encrypt supports issuing
[wildcard certificates](https://letsencrypt.org/docs/faq/#does-let-s-encrypt-issue-wildcard-certificates),
but they have to be renewed every 3 months using a
[DNS-01 challenge](https://letsencrypt.org/docs/challenge-types/#dns-01-challenge).
Below are instructions for the creation of certificates using Let's Encrypt.
**Note 1:**
It is assumed that the commands are executed on the VM that hosts the preview server. You can run
the commands on any machine and adjust accordingly the steps for transfering the generated
certificate and private key to the preview server VM.
**Note 2:**
In order to complete the DNS-01 challenge and generate the certificate, one needs to have access
to update the DNS records associated with the `ngbuilds.io` domain and subdomains.
## Prerequisites
- Install [certbot](https://certbot.eff.org/):
- Old method: `sudo apt-get install certbot`
- New method: Follow the instructions [here](https://certbot.eff.org/instructions).
## Create new certificate
- Run the following command and follow the on-screen instructions:
```sh
sudo certbot certonly \
-d "ngbuilds.io,*.ngbuilds.io" \
-m "devops@angular.io" \
--agree-tos \
--manual \
--manual-public-ip-logging-ok \
--preferred-challenges="dns"
```
**Hint:**
You can use `dig -t txt _acme-challenge.ngbuilds.io` (on Linux/macOS) or something like
[DNSChecker.org](https://dnschecker.org/all-dns-records-of-domain.php?query=_acme-challenge.ngbuilds.io&rtype=TXT) to verify that the DNS updates have been successfully deployed and propagated.
- [Optional] Remove the DNS TXT records added in the previous step.
(They are no longer needed, unless you want to create more certificates now.)
## Deploy new certificate
- Copy files to the host machine's `/etc/ssl/localcerts` directory, replacing `YYYY-MM` in the file
names with the current year and month (for example, `2022-08`):
```sh
# Copy certificate.
sudo cp /etc/letsencrypt/live/ngbuilds.io/fullchain.pem /etc/ssl/localcerts/ngbuilds.io.crt.YYYY-MM
sudo cp /etc/letsencrypt/live/ngbuilds.io/fullchain.pem /etc/ssl/localcerts/ngbuilds.io.crt
# Copy private key.
sudo cp /etc/letsencrypt/live/ngbuilds.io/privkey.pem /etc/ssl/localcerts/ngbuilds.io.key.YYYY-MM
sudo cp /etc/letsencrypt/live/ngbuilds.io/privkey.pem /etc/ssl/localcerts/ngbuilds.io.key
# Update permissions.
sudo find /etc/ssl/localcerts -type f -exec chmod 400 {} \;
```
**Note:**
The `.YYYY-MM`-suffixed copies are not needed/used. They are just kept for reference and backup
purposes.
- Reload `nginx`:
```sh
# Connect to the Docker container and reload reload `nginx`.
sudo docker exec -it aio service nginx reload
```
- [Optional] Verify that the certificate has been successfully deployed by visiting
https://ngbuilds.io/ in a browser and inspecting the TLS certificate details. See, for example,
[how to view certificate details in Chrome](https://www.howtogeek.com/292076/how-do-you-view-ssl-certificate-details-in-google-chrome/).
@@ -19,8 +19,8 @@ persistent disk can be used (as described [here](vm-setup--attach-persistent-dis
**Note:** The directories created inside that directory will be owned by user `www-data`.
## Create SSL certificates (Optional for dev)
The host VM can attach a directory containing the SSL certificate and key to be used by the nginx
## Create TLS certificates (Optional for dev)
The host VM can attach a directory containing the TLS certificate and key to be used by the nginx
server for serving the hosted previews. More info on how to attach the directory when
starting the container can be found [here](vm-setup--start-docker-container.md).
@@ -32,10 +32,15 @@ specify the domain name see [here](vm-setup--create-docker-image.md).
If no directory is attached, nginx will use an internal self-signed certificate. This is convenient
during development, but is not suitable for production.
Certificates from any certificate authority can be used. As an example, see
[here](misc--use-lets-encrypt-certs) for instructions on using certificates from
[Let's Encrypt](https://letsencrypt.org/).
**Note:**
Since nginx needs to be able to serve requests for both the main domain as well as any subdomain
(e.g. `ngbuilds.io/` and `foo-bar.ngbuilds.io/`), the provided certificate needs to be a wildcard
certificate covering both the domain and subdomains.
(e.g. `ngbuilds.io/` and `foo-bar.ngbuilds.io/`), the provided certificate needs to be a
[wildcard certificate](https://en.wikipedia.org/wiki/Wildcard_certificate) covering both the domain
and all subdomains.
## Create directory for logs (Optional)
@@ -48,14 +48,22 @@ sudo docker run \
# The directory the contains the secrets (e.g. GitHub token, JWT secret, etc).
# (See [here](vm-setup--set-up-secrets.md) for more info.)
#
# NOTE:
# Omitting this is OK during development/debugging, when you don't care to interact with real
# external services.
--volume <host-secrets-dir>:/aio-secrets:ro \
# The build artifacts and hosted previews will stored to and served from this directory.
# (If you are using a persistent disk - as described [here](vm-setup--attach-persistent-disk.md) -
# this will be a directory inside the disk.)
#
# NOTE:
# Omitting this is OK during development/debugging, when you don't care to interact with real
# external services.
--volume <host-builds-dir>:/var/www/aio-builds \
# The directory the contains the SSL certificates.
# The directory the contains the TLS certificates.
# (See [here](vm-setup--create-host-dirs-and-files.md) for more info.)
# If not provided, the container will use self-signed certificates.
[--volume <host-cert-dir>:/etc/ssl/localcerts:ro] \
@@ -77,10 +85,13 @@ sudo docker run \
## Example
The following command would start a docker container based on the previously created `foobar-builds`
docker image, alias it as 'foobar-builds-1' and map predefined directories on the host VM to be used
by the container for accessing secrets and SSL certificates and keeping the build artifacts and logs;
and will map the source scripts from the host to the container.
The following command would do the following:
1. Start a docker container based on the previously created `foobar-builds` docker image.
2. Alias the docker container as `foobar-builds-1` (so it can be references in subsequent docker
commands).
3. Map predefined directories on the host VM to be used by the container for accessing secrets and
TLS certificates and keeping the build artifacts and logs.
4. Map the source scripts from the host to the container (for debugging purposes).
```
sudo docker run \
+1 -1
View File
@@ -7,7 +7,7 @@
Angular throws an `ExpressionChangedAfterItHasBeenCheckedError` when an expression value has been changed after change detection has completed. Angular only throws this error in development mode.
In development mode, Angular performs an additional check after each change detection run, to ensure the bindings haven't changed. This catches errors where the view is left in an inconsistent state. This can occur, for example, if a method or getter returns a different value each time it is called, or if a child component changes values on its parent. If either of these occur, this is a sign that change detection is not stabilized. Angular throws the error to ensure data is always reflected correctly in the view, which prevents erratic UI behavior or a possible infinite loop.
In development mode, Angular performs an additional check after each change detection run, to ensure the bindings haven't changed. This catches errors where the view is left in an inconsistent state. This can occur, for example, if a method or getter returns a different value each time it is called, or if a child component changes values on its parent. If either of these occurs, this is a sign that change detection is not stabilized. Angular throws the error to ensure data is always reflected correctly in the view, which prevents erratic UI behavior or a possible infinite loop.
This error commonly occurs when you've added template expressions or have begun to implement lifecycle hooks like `ngAfterViewInit` or `ngOnChanges`. It is also common when dealing with loading status and asynchronous operations, or when a child component changes its parent bindings.
@@ -13,6 +13,13 @@ export class CheckForUpdateService {
const everySixHours$ = interval(6 * 60 * 60 * 1000);
const everySixHoursOnceAppIsStable$ = concat(appIsStable$, everySixHours$);
everySixHoursOnceAppIsStable$.subscribe(() => updates.checkForUpdate());
everySixHoursOnceAppIsStable$.subscribe(async () => {
try {
const updateFound = await updates.checkForUpdate();
console.log(updateFound ? 'A new version is available.' : 'Already on the latest version.');
} catch (err) {
console.error('Failed to check for updates:', err);
}
});
}
}
@@ -1,20 +1,40 @@
// #docplaster
import { Injectable } from '@angular/core';
import { SwUpdate, UpdateAvailableEvent } from '@angular/service-worker';
// #docregion sw-replicate-available
import { filter, map } from 'rxjs/operators';
// #enddocregion sw-replicate-available
import { SwUpdate, VersionReadyEvent } from '@angular/service-worker';
function promptUser(event: UpdateAvailableEvent): boolean {
function promptUser(event: VersionReadyEvent): boolean {
return true;
}
// #docregion sw-activate
// #docregion sw-version-ready
@Injectable()
export class PromptUpdateService {
constructor(updates: SwUpdate) {
updates.available.subscribe(event => {
if (promptUser(event)) {
updates.activateUpdate().then(() => document.location.reload());
}
});
constructor(swUpdate: SwUpdate) {
swUpdate.versionUpdates
.pipe(filter((evt): evt is VersionReadyEvent => evt.type === 'VERSION_READY'))
.subscribe(evt => {
if (promptUser(evt)) {
// Reload the page to update to the latest version.
document.location.reload();
}
});
// #enddocregion sw-version-ready
// #docregion sw-replicate-available
// ...
const updatesAvailable = swUpdate.versionUpdates.pipe(
filter((evt): evt is VersionReadyEvent => evt.type === 'VERSION_READY'),
map(evt => ({
type: 'UPDATE_AVAILABLE',
current: evt.currentVersion,
available: evt.latestVersion,
})));
// #enddocregion sw-replicate-available
// #docregion sw-version-ready
}
}
// #enddocregion sw-activate
// #enddocregion sw-version-ready
+5 -1
View File
@@ -121,7 +121,7 @@ router.events.pipe(filter(e =&gt; e instanceof NavigationEnd)).subscribe(() =&gt
</code-example>
In a real application, the element that receives focus will depend on your specific application structure and layout.
In a real application, the element that receives focus depends on your specific application structure and layout.
The focused element should put users in a position to immediately move into the main content that has just been routed into view.
You should avoid situations where focus returns to the `body` element after a route change.
@@ -167,9 +167,13 @@ The following example shows how to apply the `active-page` class to active links
Books
<!-- vale Angular.Google_Quotes = NO -->
* "A Web for Everyone: Designing Accessible User Experiences", Sarah Horton and Whitney Quesenbery
* "Inclusive Design Patterns", Heydon Pickering
<!-- vale Angular.Google_Quotes = YES -->
<!-- links -->
<!-- external links -->
+12 -12
View File
@@ -47,7 +47,7 @@ One of `static fields` \(the default\) or `decorators`.
<div class="alert is-helpful">
**NOTE**: <br />
That the resulting code will not properly tree-shake.
That the resulting code cannot tree-shake properly.
</div>
@@ -97,11 +97,11 @@ This allows `$localize` messages in application code to use the same ID as ident
### `enableResourceInlining`
When `true`, replaces the `templateUrl` and `styleUrls` property in all `@Component` decorators with inlined contents in `template` and `styles` properties.
When `true`, replaces the `templateUrl` and `styleUrls` properties in all `@Component` decorators with inline content in the `template` and `styles` properties.
When enabled, the `.js` output of `ngc` does not include any lazy-loaded template or style URLs.
For library projects generated with the CLI, the development configuration default is `true`.
For library projects generated with the Angular CLI, the development configuration default is `true`.
<a id="enablelegacytemplate"></a>
@@ -119,12 +119,12 @@ Ignored if `flatModuleOutFile` is `false`.
### `flatModuleOutFile`
When `true`, generates a flat module index of the given file name and the corresponding flat module metadata.
When `true`, generates a flat module index of the given filename and the corresponding flat module metadata.
Use to create flat modules that are packaged similarly to `@angular/core` and `@angular/common`.
When this option is used, the `package.json` for the library should refer to the generated flat module index instead of the library index file.
Produces only one `.metadata.json` file, which contains all the metadata necessary for symbols exported from the library index.
In the generated `.ngfactory.js` files, the flat module index is used to import symbols that include both the public API from the library index as well as shrowded internal symbols.
In the generated `.ngfactory.js` files, the flat module index is used to import symbols that include both the public API from the library index as well as shrouded internal symbols.
By default the `.ts` file supplied in the `files` field is assumed to be the library index.
If more than one `.ts` file is specified, `libraryIndex` is used to select the file to use.
@@ -141,7 +141,7 @@ The `module` field of the library's `package.json` would be `"index.js"` and the
When `true` \(recommended\), enables the [binding expression validation](guide/aot-compiler#binding-expression-validation) phase of the template compiler, which uses TypeScript to validate binding expressions.
For more information, see [Template type checking](guide/template-typecheck).
Default is `false`, but when you use the CLI command `ng new --strict`, it is set to `true` in the generated project's configuration.
Default is `false`, but when you use the Angular CLI command `ng new --strict`, it is set to `true` in the generated project's configuration.
<div class="alert is-important">
@@ -172,7 +172,7 @@ This information includes, for example, the content of annotations \(such as a c
You can set to `true` when using factory summaries, because the factory summaries include a copy of the information that is in the `.metadata.json` file.
Set to `true` if you are using TypeScript's `--outFile` option, because the metadata files are not valid for this style of TypeScript output.
However, we do not recommend using `--outFile` with Angular.
However, the Angular community does not recommend using `--outFile` with Angular.
Use a bundler, such as [webpack](https://webpack.js.org), instead.
### `skipTemplateCodegen`
@@ -182,7 +182,7 @@ This turns off most of the template compiler and disables the reporting of templ
Can be used to instruct the template compiler to produce `.metadata.json` files for distribution with an `npm` package while avoiding the production of `.ngfactory.js` and `.ngstyle.js` files that cannot be distributed to `npm`.
For library projects generated with the CLI, the development configuration default is `true`.
For library projects generated with the Angular CLI, the development configuration default is `true`.
### `strictMetadataEmit`
@@ -202,14 +202,14 @@ The template compiler can then use the error nodes to report an error if these s
If the client of a library intends to use a symbol in an annotation, the template compiler does not normally report this until the client uses the symbol.
This option allows detection of these errors during the build phase of the library and is used, for example, in producing Angular libraries themselves.
For library projects generated with the CLI, the development configuration default is `true`.
For library projects generated with the Angular CLI, the development configuration default is `true`.
### `strictInjectionParameters`
When `true` \(recommended\), reports an error for a supplied parameter whose injection type cannot be determined.
When `false` \(currently the default\), constructor parameters of classes marked with `@Injectable` whose type cannot be resolved produce a warning.
When you use the CLI command `ng new --strict`, it is set to `true` in the generated project's configuration.
When you use the Angular CLI command `ng new --strict`, it is set to `true` in the generated project's configuration.
### `strictTemplates`
@@ -218,7 +218,7 @@ When `true`, enables [strict template type checking](guide/template-typecheck#st
Additional strictness flags allow you to enable and disable specific types of strict template type checking.
See [troubleshooting template errors](guide/template-typecheck#troubleshooting-template-errors).
When you use the CLI command `ng new --strict`, it is set to `true` in the generated project's configuration.
When you use the Angular CLI command `ng new --strict`, it is set to `true` in the generated project's configuration.
### `trace`
@@ -227,7 +227,7 @@ Default is `false`.
<a id="cli-options"></a>
## Command Line Options
## Command line options
While most of the time you interact with the Angular Compiler indirectly using Angular CLI, when debugging certain issues, you might find it useful to invoke the Angular Compiler directly.
You can use the `ngc` command provided by the `@angular/compiler-cli` npm package to call the compiler from the command line.
+43 -41
View File
@@ -1,4 +1,4 @@
# Angular Package Format
# Angular package format
This document describes the Angular Package Format \(APF\).
APF is an Angular specific specification for the structure and format of npm packages that is used by all first-party Angular packages \(`@angular/core`, `@angular/material`, etc.\) and most third-party Angular libraries.
@@ -16,7 +16,7 @@ You can find the versions of the specification prior to v13 in this [google doc]
## Why specify a package format?
In today's JavaScript landscape, developers will consume packages in many different ways, using many different toolchains \(Webpack, rollup, esbuild, etc.\).
In today's JavaScript landscape, developers consume packages in many different ways, using many different toolchains \(Webpack, rollup, esbuild, etc.\).
These tools may understand and require different inputs - some tools may be able to process the latest ES language version, while others may benefit from directly consuming an older ES version.
The Angular distribution format supports all of the commonly used development tools and workflows, and adds emphasis on optimizations that result either in smaller application payload size or faster development iteration cycle \(build time\).
@@ -113,8 +113,8 @@ This table describes the file layout under `node_modules/@angular/core` annotate
| `index.d.ts` | Bundled `.d.ts` for the primary entrypoint `@angular/core`. |
| `esm2020/` <br /> &nbsp;&nbsp;─ `core.mjs` <br /> &nbsp;&nbsp;─ `index.mjs` <br /> &nbsp;&nbsp;─ `public_api.mjs` | Tree of `@angular/core` sources in unflattened ES2020 format. |
| `esm2020/testing/` | Tree of the `@angular/core/testing` entrypoint in unflattened ES2020 format. |
| `fesm2015/` <br /> &nbsp;&nbsp;─ `core.mjs` <br /> &nbsp;&nbsp;─ `core.mjs.map` <br /> &nbsp;&nbsp;─ `testing.mjs` <br /> &nbsp;&nbsp;─ `testing.mjs.map` | Code for all entrypoints in a flattened \(FESM\) ES2015 format, along with sourcemaps. |
| `fesm2020/` <br /> &nbsp;&nbsp;─ `core.mjs` <br /> &nbsp;&nbsp;─ `core.mjs.map` <br /> &nbsp;&nbsp;─ `testing.mjs` <br /> &nbsp;&nbsp;─ `testing.mjs.map` | Code for all entrypoints in flattened \(FESM\) ES2020 format, along with sourcemaps. |
| `fesm2015/` <br /> &nbsp;&nbsp;─ `core.mjs` <br /> &nbsp;&nbsp;─ `core.mjs.map` <br /> &nbsp;&nbsp;─ `testing.mjs` <br /> &nbsp;&nbsp;─ `testing.mjs.map` | Code for all entrypoints in a flattened \(FESM\) ES2015 format, along with source maps. |
| `fesm2020/` <br /> &nbsp;&nbsp;─ `core.mjs` <br /> &nbsp;&nbsp;─ `core.mjs.map` <br /> &nbsp;&nbsp;─ `testing.mjs` <br /> &nbsp;&nbsp;─ `testing.mjs.map` | Code for all entrypoints in flattened \(FESM\) ES2020 format, along with source maps. |
| `testing/` | Directory representing the "testing" entrypoint. |
| `testing/index.d.ts` | Bundled `.d.ts` for the `@angular/core/testing` entrypoint. |
@@ -125,7 +125,7 @@ The primary `package.json` contains important package metadata, including the fo
* It [declares](#esm-declaration) the package to be in EcmaScript Module \(ESM\) format
* It contains an [`"exports"` field](#exports) which defines the available source code formats of all entrypoints
* It contains [keys](#legacy-resolution-keys) which define the available source code formats of the primary `@angular/core` entrypoint, for tools which do not understand `"exports"`.
These keys are considered deprecated, and will be removed as the support for `"exports"` rolls out across the ecosystem.
These keys are considered deprecated, and could be removed as the support for `"exports"` rolls out across the ecosystem.
* It declares whether the package contains [side-effects](#side-effects)
@@ -218,7 +218,7 @@ For `@angular/core` these are:
</code-example>
As above, a module resolver can use these keys to load a specific code format.
As shown in the preceding code snippet, a module resolver can use these keys to load a specific code format.
<div class="alert is-helpful">
@@ -242,14 +242,14 @@ The last function of `package.json` is to declare whether the package has [side-
Most Angular packages should not depend on top-level side effects, and thus should include this declaration.
## Entrypoints and Code Splitting
## Entrypoints and code splitting
Packages in the Angular Package Format contain one primary entrypoint and zero or more secondary entrypoints \(for example, `@angular/common/http`\).
Entrypoints serve several functions.
1. They define the module specifiers from which users import code \(for example, `@angular/core` and `@angular/core/testing`\).
Users typically perceive these entrypoints as distinct groups of symbols, with different purposes or functionality.
Users typically perceive these entrypoints as distinct groups of symbols, with different purposes or capability.
Specific entrypoints might only be used for special purposes, such as testing.
Such APIs can be separated out from the primary entrypoint to reduce the chance of them being used accidentally or incorrectly.
@@ -257,7 +257,7 @@ Entrypoints serve several functions.
1. They define the granularity at which code can be lazily loaded.
Many modern build tools are only capable of "code splitting" \(aka lazy loading\) at the ES Module level.
Since the Angular Package Format uses primarily a single "flat" ES Module per entrypoint, this means that most build tooling will not be able to split code in a single entrypoint into multiple output chunks.
The Angular Package Format uses primarily a single "flat" ES Module per entry point. This means that most build tooling is not able to split code with a single entry point into multiple output chunks.
The general rule for APF packages is to use entrypoints for the smallest sets of logically connected code possible.
For example, the Angular Material package publishes each logical component or set of components as a separate entrypoint - one for Button, one for Tabs, etc.
@@ -267,15 +267,15 @@ Not all libraries require such granularity.
Most libraries with a single logical purpose should be published as a single entrypoint.
`@angular/core` for example uses a single entrypoint for the runtime, because the Angular runtime is generally used as a single entity.
### Resolution of Secondary Entrypoints
### Resolution of secondary entry points
Secondary entrypoints can be resolved via the `"exports"` field of the `package.json` for the package.
## README.md
The readme file in the markdown format that is used to display description of a package on npm and github.
The README file in the markdown format that is used to display description of a package on npm and github.
Example readme content of &commat;angular/core package:
Example README content of &commat;angular/core package:
<code-example language="html">
@@ -288,20 +288,22 @@ License: MIT
</code-example>
## Partial Compilation
## Partial compilation
Libraries in the Angular Package Format must be published in "partial compilation" mode.
This is a compilation mode for `ngc` which produces compiled Angular code that is not tied to a specific Angular runtime version, in contrast to the full compilation used for applications, where the Angular compiler and runtime versions must match exactly.
To partially compile Angular code, use the `"compilationMode"` flag in `"angularCompilerOptions"` in your `tsconfig.json`:
To partially compile Angular code, use the `compilationMode` flag in the `angularCompilerOptions` property of your `tsconfig.json`:
<code-example language="javascript">
{
&hellip;
"angularCompilerOptions": {
"compilationMode": "partial",
}
}
</code-example>
Partially compiled library code is then converted to fully compiled code during the application build process by the Angular CLI.
@@ -310,20 +312,20 @@ If your build pipeline does not use the Angular CLI then refer to the [Consuming
## Optimizations
### Flattening of ES Modules
### Flattening of ES modules
The Angular Package Format specifies that code be published in "flattened" ES module format.
This significantly reduces the build time of Angular applications as well as download and parse time of the final application bundle.
Please check out the excellent post ["The cost of small modules"](https://nolanlawson.com/2016/08/15/the-cost-of-small-modules) by Nolan Lawson.
The Angular compiler has support for generating index ES module files that can then be used to generate flattened modules using tools like Rollup, resulting in a file format we call Flattened ES Module or FESM.
The Angular compiler can generate index ES module files. Tools like Rollup can use these files to generate flattened modules in a *Flattened ES Module* (FESM) file format.
FESM is a file format created by flattening all ES Modules accessible from an entrypoint into a single ES Module.
It's formed by following all imports from a package and copying that code into a single file while preserving all public ES exports and removing all private imports.
The shortened name "FESM" \(pronounced "phesom"\) can have a number after it such as "FESM5" or "FESM2015".
The abbreviated name, FESM, pronounced *phe-som*, can be followed by a number such as FESM5 or FESM2015.
The number refers to the language level of the JavaScript inside the module.
So a FESM5 file would be ESM+ES5 \(import/export statements and ES5 source code\).
Accordingly a FESM5 file would be ESM+ES5 and include import/export statements and ES5 source code.
To generate a flattened ES Module index file, use the following configuration options in your tsconfig.json file:
@@ -349,40 +351,40 @@ Once the index file \(for example, `my-ui-lib.js`\) is generated by ngc, bundler
#### Note about the defaults in package.json
As of webpack v4 the flattening of ES modules optimization should not be necessary for webpack users, and in fact theoretically we should be able to get better code-splitting without flattening of modules in webpack.
In practice we still see size regressions when using unflattened modules as input for webpack v4.
This is why `"module"` and `"es2020"` package.json entries still point to fesm files.
We are investigating this issue and expect that we'll switch the `"module"` and `"es2020"` package.json entry points to unflattened files when the size regression issue is resolved.
As of webpack v4, the flattening of ES modules optimization should not be necessary for webpack users. It should be possible to get better code-splitting without flattening of modules in webpack.
In practice, size regressions can still be seen when using unflattened modules as input for webpack v4.
This is why `module` and `es2020` package.json entries still point to FESM files.
This issue is being investigated. It is expected to switch the `module` and `es2020` package.json entry points to unflattened files after the size regression issue is resolved.
The APF currently includes unflattened ESM2020 code for the purpose of validating such a future change.
### "sideEffects" flag
By default, EcmaScript Modules are side-effectful: importing from a module ensures that any code at the top level of that module will execute.
By default, EcmaScript Modules are side-effectful: importing from a module ensures that any code at the top level of that module should run.
This is often undesirable, as most side-effectful code in typical modules is not truly side-effectful, but instead only affects specific symbols.
If those symbols are not imported and used, it's often desirable to remove them in an optimization process known as tree-shaking, and the side-effectful code can prevent this.
Build tools such as Webpack support a flag which allows packages to declare that they do not depend on side-effectful code at the top level of their modules, giving the tools more freedom to tree-shake code from the package.
The end result of these optimizations should be smaller bundle size and better code distribution in bundle chunks after code-splitting.
This optimization can break your code if it contains non-local side-effects - this is however not common in Angular applications and it's usually a sign of bad design.
Our recommendation is for all packages to claim the side-effect free status by setting the `sideEffects` property to `false`, and that developers follow the [Angular Style Guide](https://angular.io/guide/styleguide) which naturally results in code without non-local side-effects.
The recommendation is for all packages to claim the side-effect free status by setting the `sideEffects` property to `false`, and that developers follow the [Angular Style Guide](https://angular.io/guide/styleguide) which naturally results in code without non-local side-effects.
More info: [webpack docs on side-effects](https://github.com/webpack/webpack/tree/master/examples/side-effects)
### ES2020 Language Level
### ES2020 language level
ES2020 Language level is now the default language level that is consumed by Angular CLI and other tooling.
The Angular CLI will downlevel the bundle to a language level that is supported by all targeted browsers at application build time.
The Angular CLI down-levels the bundle to a language level that is supported by all targeted browsers at application build time.
### d.ts bundling / type definition flattening
As of APF v8 we now prefer to run [API Extractor](https://api-extractor.com), to bundle TypeScript definitions so that the entire API appears in a single file.
As of APF v8 it is now preferred to run [API Extractor](https://api-extractor.com), to bundle TypeScript definitions so that the entire API appears in a single file.
In prior APF versions each entry point would have a `src` directory next to the .d.ts entry point and this directory contained individual d.ts files matching the structure of the original source code.
While this distribution format is still allowed and supported, it is highly discouraged because it confuses tools like IDEs that then offer incorrect autocompletion, and allows users to depend on deep-import paths which are typically not considered to be public API of a library or a package.
### Tslib
As of APF v10, we recommend adding tslib as a direct dependency of your primary entry-point.
As of APF v10, it is recommended to add tslib as a direct dependency of your primary entry-point.
This is because the tslib version is tied to the TypeScript version used to compile your library.
## Examples
@@ -390,10 +392,10 @@ This is because the tslib version is tied to the TypeScript version used to comp
* [@angular/core package](https://unpkg.com/browse/@angular/core@13.0.0-rc.0)
* [@angular/material package](https://unpkg.com/browse/@angular/material@13.0.0-rc.0)
## Definition of Terms
## Definition of terms
The following terms are used throughout this document very intentionally.
In this section we define all of them to provide additional clarity.
The following terms are used throughout this document intentionally.
In this section are the definitions of all of them to provide additional clarity.
#### Package
@@ -403,7 +405,7 @@ The package is installed with `npm install @angular/core`.
#### Symbol
A class, function, constant or variable contained in a module and optionally made visible to the external world via a module export.
A class, function, constant, or variable contained in a module and optionally made visible to the external world via a module export.
#### Module
@@ -424,16 +426,16 @@ Short for Flattened ES Modules and consists of a file format created by flatteni
The identifier of a module used in the import statements \(for example, `@angular/core`\).
The ID often maps directly to a path on the filesystem, but this is not always the case due to various module resolution strategies.
#### Module Specifier
#### Module specifier
A module identifier \(see above\).
#### Module Resolution Strategy
#### Module resolution strategy
Algorithm used to convert Module IDs to paths on the filesystem.
Node.js has one that is well specified and widely used, TypeScript supports several module resolution strategies, [Closure Compiler](https://developers.google.com/closure/compiler) has yet another strategy.
#### Module Format
#### Module format
Specification of the module syntax that covers at minimum the syntax for the importing and exporting from a file.
Common module formats are CommonJS \(CJS, typically used for Node.js applications\) or ECMAScript Modules \(ESM\).
@@ -447,12 +449,12 @@ Bundles are a browser-specific workaround that reduce network strain that would
Node.js typically doesn't use bundles.
Common bundle formats are UMD and System.register.
#### Language Level
#### Language level
The language of the code \(ES2015 or ES2020\).
Independent of the module format.
#### Entry Point
#### Entry point
A module intended to be imported by the user.
It is referenced by a unique module ID and exports the public API referenced by that module ID.
@@ -460,12 +462,12 @@ An example is `@angular/core` or `@angular/core/testing`.
Both entry points exist in the `@angular/core` package, but they export different symbols.
A package can have many entry points.
#### Deep Import
#### Deep import
A process of retrieving symbols from modules that are not Entry Points.
These module IDs are usually considered to be private APIs that can change over the lifetime of the project or while the bundle for the given package is being created.
#### Top-Level Import
#### Top-Level import
An import coming from an entry point.
The available top-level imports are what define the public API and are exposed in "&commat;angular/name" modules, such as `@angular/core` or `@angular/common`.
@@ -475,11 +477,11 @@ The available top-level imports are what define the public API and are exposed i
The process of identifying and removing code not used by an application - also known as dead code elimination.
This is a global optimization performed at the application level using tools like [Rollup](https://rollupjs.org), [Closure Compiler](https://developers.google.com/closure/compiler), or [Terser](https://github.com/terser/terser).
#### AOT Compiler
#### AOT compiler
The Ahead of Time Compiler for Angular.
#### Flattened Type Definitions
#### Flattened type definitions
The bundled TypeScript definitions generated from [API Extractor](https://api-extractor.com).
+5 -5
View File
@@ -9,7 +9,7 @@ Learn more in [The App Shell Model](https://developers.google.com/web/fundamenta
## Step 1: Prepare the application
Do this with the following CLI command:
Do this with the following Angular CLI command:
<code-example format="shell" language="shell">
@@ -19,9 +19,9 @@ ng new my-app --routing
For an existing application, you have to manually add the `RouterModule` and defining a `<router-outlet>` within your application.
## Step 2: Create the app shell
## Step 2: Create the application shell
Use the CLI to automatically create the application shell.
Use the Angular CLI to automatically create the application shell.
<code-example format="shell" language="shell">
@@ -80,9 +80,9 @@ After running this command you can see that the `angular.json` configuration fil
</code-example>
## Step 3: Verify the app is built with the shell content
## Step 3: Verify the application is built with the shell content
Use the CLI to build the `app-shell` target.
Use the Angular CLI to build the `app-shell` target.
<code-example format="shell" language="shell">
+5 -5
View File
@@ -51,7 +51,7 @@ This example shows some of the most useful `@Component` configuration options:
| Configuration options | Details |
|:--- |:--- |
| `selector` | A CSS selector that tells Angular to create and insert an instance of this component wherever it finds the corresponding tag in template HTML. For example, if an application's HTML contains `<app-hero-list></app-hero-list>`, then Angular inserts an instance of the `HeroListComponent` view between those tags. |
| `templateUrl` | The module-relative address of this component's HTML template. Alternatively, you can provide the HTML template inline, as the value of the `template` property. This template defines the component's *host view*. |
| `templateUrl` | The module-relative address of this component's HTML template. Alternatively, you can provide the HTML template inline, as the value of the `template` property. This template defines the component's *host view*. |
| `providers` | An array of [providers](guide/glossary#provider) for services that the component requires. In the example, this tells Angular how to provide the `HeroService` instance that the component's constructor uses to get the list of heroes to display. |
## Templates and views
@@ -86,7 +86,7 @@ For example, here is a template for the Tutorial's `HeroListComponent`.
<code-example header="src/app/hero-list.component.html" path="architecture/src/app/hero-list.component.html" ></code-example>
This template uses typical HTML elements like `<h2>` and `<p>`, and also includes Angular template-syntax elements, `*ngFor`, `{{hero.name}}`, `(click)`, `[hero]`, and `<app-hero-detail>`.
This template uses typical HTML elements like `<h2>` and `<p>`. It also includes Angular template-syntax elements, `*ngFor`, `{{hero.name}}`, `(click)`, `[hero]`, and `<app-hero-detail>`.
The template-syntax elements tell Angular how to render the HTML to the screen, using program logic and data.
* The `*ngFor` directive tells Angular to iterate over a list
@@ -154,7 +154,7 @@ Data binding plays an important role in communication between a template and its
Angular pipes let you declare display-value transformations in your template HTML.
A class with the `@Pipe` decorator defines a function that transforms input values to output values for display in a view.
Angular defines various pipes, such as the [date](api/common/DatePipe) pipe and [currency](api/common/CurrencyPipe) pipe; for a complete list, see the [Pipes API list](api?type=pipe).
Angular defines various pipes, such as the [date](api/common/DatePipe) pipe and [currency](api/common/CurrencyPipe) pipe. For a complete list, see the [Pipes API list](api?type=pipe).
You can also define new pipes.
To specify a value transformation in an HTML template, use the [pipe operator (`|`)](guide/pipes).
@@ -212,8 +212,8 @@ The example template uses two built-in structural directives to add application
| Directives | Details |
|:--- |:--- |
| [`*ngFor`](guide/built-in-directives#ngFor) | An iterative; it tells Angular to stamp out one `<li>` per hero in the `heroes` list. |
| [`*ngIf`](guide/built-in-directives#ngIf) | A conditional; it includes the `HeroDetail` component only if a selected hero exists. |
| [`*ngFor`](guide/built-in-directives#ngFor) | An *iterative*, which tells Angular to create one `<li>` per hero in the `heroes` list. |
| [`*ngIf`](guide/built-in-directives#ngIf) | A *conditional*, which includes the `HeroDetail` component only if a selected hero exists. |
#### Attribute directives
+1 -1
View File
@@ -1,6 +1,6 @@
# Angular change detection and runtime optimization
**Change detection** is the process through which Angular checks to see whether your application state has changed, and if any DOM needs to be updated. At a high level, Angular walks your components from top to bottom, looking for changes. Angular runs its change detection mechanism periodically so that changes to the data model are reflected in an app’s view. Change detection can be triggered either manually or through an asynchronous event (for example, a user interaction or an XHR completion).
**Change detection** is the process through which Angular checks to see whether your application state has changed, and if any DOM needs to be updated. At a high level, Angular walks your components from top to bottom, looking for changes. Angular runs its change detection mechanism periodically so that changes to the data model are reflected in an application’s view. Change detection can be triggered either manually or through an asynchronous event (for example, a user interaction or an XMLHttpRequest completion).
Change detection is a highly optimized performant, but it can still cause slowdowns if the application runs it too frequently.
+2 -2
View File
@@ -30,7 +30,7 @@ With the object format, Angular adds a class only if its associated value is tru
<div class="alert is-important">
With any object-like expression&mdash;such as `object`, `Array`, `Map`, or `Set`&mdash;the identity of the object must change for Angular to update the class list.
With any object-like expression&mdash;such as `object`, `Array`, `Map`, or `Set` &mdash;the identity of the object must change for Angular to update the class list.
Updating the property without changing object identity has no effect.
</div>
@@ -52,7 +52,7 @@ To create a single style binding, use the prefix `style` followed by a dot and t
For example, to set the `width` style, type the following: `[style.width]="width"`
Angular sets the property to the value of the bound expression, which is usually a string. Optionally, you can add a unit extension like `em` or `%`, which requires a number type.
Angular sets the property to the value of the bound expression, which is usually a string. Optionally, you can add a unit extension like `em` or `%`, which requires a number type.
1. To write a style in dash-case, type the following:
+2 -2
View File
@@ -1,4 +1,4 @@
# Angular Components Overview
# Angular components overview
Components are the main building block for Angular applications.
Each component consists of:
@@ -38,7 +38,7 @@ To create a component using the Angular CLI:
By default, this command creates the following:
* A folder named after the component
* A directory named after the component
* A component file, `<component-name>.component.ts`
* A template file, `<component-name>.component.html`
* A CSS file, `<component-name>.component.css`
+1 -1
View File
@@ -25,7 +25,7 @@ Each approach offers different advantages.
| Forms | Details |
|:--- |:--- |
| Reactive forms | Provide direct, explicit access to the underlying forms object model. Compared to template-driven forms, they are more robust: they're more scalable, reusable, and testable. If forms are a key part of your application, or you're already using reactive patterns for building your application, use reactive forms. |
| Reactive forms | Provide direct, explicit access to the underlying form's object model. Compared to template-driven forms, they are more robust: they're more scalable, reusable, and testable. If forms are a key part of your application, or you're already using reactive patterns for building your application, use reactive forms. |
| Template-driven forms | Rely on directives in the template to create and manipulate the underlying object model. They are useful for adding a simple form to an app, such as an email list signup form. They're straightforward to add to an app, but they don't scale as well as reactive forms. If you have very basic form requirements and logic that can be managed solely in the template, template-driven forms could be a good fit. |
### Key differences
@@ -0,0 +1,96 @@
# Setting up `NgOptimizedImage`
This tutorial explains how to setup the `NgOptimizedImage`. For information on using `NgOptimizedImage`, see [Getting Started with NgOptimizedImage](/guide/image-directive).
## Import `NgOptimizedImage`
You can import `NgOptimizedImage` from the `@angular/common` module. The directive is defined as a [standalone directive](/guide/standalone-components), so components should import it directly.
## Configure an `ImageLoader`
A "loader" is a function that generates the [image transformation URL](https://web.dev/image-cdns/#how-image-cdns-use-urls-to-indicate-optimization-options) for a given image file. When appropriate, `NgOptimizedImage` sets the size, format, and image quality transformations for an image.
`NgOptimizedImage` provides a generic loader as well as loaders for various third-party image services; it also supports writing your own custom loader.
| Loader type| Behavior |
|:--- |:--- |
| Generic loader | The URL returned by the generic loader will always match the value of `src`. In other words, this loader applies no transformations. Sites that use Angular to serve images are the primary intended use case for this loader.|
| Loaders for third-party image services | The URL returned by the loaders for third-party image services will follow API conventions used by that particular image service. |
| Custom loaders | A custom loader's behavior is defined by its developer. You should use a custom loader if your image service isn't supported by the loaders that come preconfigured with `NgOptimizedImage`.|
Based on the image services commonly used with Angular applications, `NgOptimizedImage` provides loaders preconfigured to work with the following image services:
| Image Service | Angular API | Documentation |
|:--- |:--- |:--- |
| Cloudflare Image Resizing | `provideCloudflareLoader` | [Documentation](https://developers.cloudflare.com/images/image-resizing/) |
| Cloudinary | `provideCloudinaryLoader` | [Documentation](https://cloudinary.com/documentation/resizing_and_cropping) |
| ImageKit | `provideImageKitLoader` | [Documentation](https://docs.imagekit.io/) |
| Imgix | `provideImgixLoader` | [Documentation](https://docs.imgix.com/) |
You must configure an image loader to use `NgOptimizedImage`.
These instructions explain how to setup an image loader for use with the `NgOptimizedImage`.
1. Import the `NgOptimizedImage` directive into the application by adding it to the `imports` section of an NgModule or a standalone Component.
<code-example format="typescript" language="typescript">
import { NgOptimizedImage } from '@angular/common';
// Include NgOptimizedImage in the appropriate NgModule
@NgModule({
imports: [
// ... other imports
NgOptimizedImage,
],
})
class AppModule {}
</code-example>
<code-example format="typescript" language="typescript">
@Component({
standalone: true,
imports: [
// ... other imports
NgOptimizedImage,
],
})
class MyStandaloneComponent {}
</code-example>
2. Configure a loader that you want to use.
To use the **generic loader**: no additional code changes are necessary.
To use an existing loader for a **third-party image service**: add the provider factory for your chosen service to the `providers` array. In the example below, the Imgix loader is used:
<code-example format="typescript" language="typescript">
providers: [
provideImgixLoader('https://my.base.url/'),
],
</code-example>
The base URL for your image assets should be passed to the provider factory as an argument. For most sites, this base URL should match one of the following patterns:
* https://yoursite.yourcdn.com
* https://subdomain.yoursite.com
* https://subdomain.yourcdn.com/yoursite
You can learn more about the base URL structure in the docs of a corresponding CDN provider.
To use a **custom loader**: provide your loader function as a value for the `IMAGE_LOADER` DI token. In the example below, the custom loader function returns a URL starting with `https://example.com` that includes `src` and `width` as URL parameters.
<code-example format="typescript" language="typescript">
providers: [
{
provide: IMAGE_LOADER,
useValue: (config: ImageLoaderConfig) => {
return `https://example.com/images?src=${config.src}&width=${config.width}`;
},
},
],
</code-example>
A loader function for the `NgOptimizedImage` directive takes an object with the `ImageLoaderConfig` type (from `@angular/common`) as its argument and returns the absolute URL of the image asset. The `ImageLoaderConfig` object contains the `src`and `width` properties.
Note: a custom loader must support requesting images at various widths in order for `rawSrcset` to work properly.
+121
View File
@@ -0,0 +1,121 @@
# Getting started with NgOptimizedImage
Note: the `NgOptimizedImage` directive is currently in the ["Developer Preview" mode](https://angular.io/guide/releases#developer-preview). The Angular team will stabilize the APIs based on the feedback and will make an announcement once the APIs are fully stable.
The `NgOptimizedImage` directive makes it easy to adopt performance best practices for loading images.
The `NgOptimizedImage` directive ensures that the loading of the [Largest Contentful Paint](http://web.dev/lcp) image is prioritized by:
* Automatically setting the `fetchpriority` attribute on the `<img>` tag
* Lazy loading other images by default
* Asserting that there is a corresponding preconnect link tag in the document head
In addition to optimizing the loading of the LCP image, `NgOptimizedImage` enforces a number of image best practices:
* Using [image URLs to apply image optimizations](https://web.dev/image-cdns/#how-image-cdns-use-urls-to-indicate-optimization-options)
* Requires that `width` and `height` are set
* Warns if `width` or `height` have been set incorrectly
* Warns if the image will be visually distorted when rendered
## Prerequisites
You will need to import the directive into your application. In addition, you will need to setup an image loader. These steps are explained in the [Setting up `NgOptimizedImage`](/guide/image-directive-setup) tutorial.
## Usage in a template
### Overview
To activate the `NgOptimizedImage` directive, replace your image's `src` attribute with `rawSrc`.
<code-example format="typescript" language="typescript">
&lt;img rawSrc="cat.jpg" width="400" height="200"&gt;
</code-example>
The built-in third-party loaders prepend a shared base URL to `src`. If you're using one of these loaders (or any other loader that does this), make sure to omit the shared base URL path from `src` to prevent unnecessary duplication.
You must also set the `width` and `height` attributes. This is done to prevent [image-related layout shifts](https://web.dev/css-web-vitals/#images-and-layout-shifts). The `width` and `height` attributes should reflect the [intrinsic size](https://developer.mozilla.org/en-US/docs/Glossary/Intrinsic_Size) of the image. During development, the `NgOptimizedImage` warns if it detects that the `width` and `height` attributes have been set incorrectly.
### Marking images as `priority`
Always mark the [LCP image](https://web.dev/lcp/#what-elements-are-considered) on your page as `priority` to prioritize its loading.
<code-example format="typescript" language="typescript">
&lt;img rawSrc="cat.jpg" width="400" height="200" priority&gt;
</code-example>
Marking an image as `priority` applies the following optimizations:
* Sets `fetchpriority=high` (read more about priority hints [here](https://web.dev/priority-hints))
* Sets `loading=eager` (read more about native lazy loading [here](https://web.dev/browser-level-image-lazy-loading))
Angular displays a warning during development if the LCP element is an image that does not have the `priority` attribute. A page’s LCP element can vary based on a number of factors - such as the dimensions of a user's screen. A page may have multiple images that should be marked `priority`. See [CSS for Web Vitals](https://web.dev/css-web-vitals/#images-and-largest-contentful-paint-lcp) for more details.
### Adding resource hints
You can add a [`preconnect` resource hint](https://web.dev/preconnect-and-dns-prefetch) for your image origin to ensure that the LCP image loads as quickly as possible. Always put resource hints in the `<head>` of the document.
<code-example format="html" language="html">
&lt;link rel="preconnect" href="https://my.cdn.origin" /&gt;
</code-example>
By default, if you use a loader for a third-party image service, the `NgOptimizedImage` directive will warn during development if it detects that there is no `preconnect` resource hint for the origin that serves the LCP image.
To disable these warnings, add `{ensurePreconnect: false}` to the arguments passed to the provider factory for your chosen image service:
<code-example format="typescript" language="typescript">
providers: [
provideImgixLoader('https://my.base.url', {ensurePreconnect: false})
],
</code-example>
### Adjusting image styling
Depending on the image's styling, adding `width` and `height` attributes may cause the image to render differently. `NgOptimizedImage` warns you if your image styling renders the image at a distorted aspect ratio.
You can typically fix this by adding `height: auto` or `width: auto` to your image styles. For more information, see the [web.dev article on the `<img>` tag](https://web.dev/patterns/web-vitals-patterns/images/img-tag).
### Handling `srcset` attributes
If your `<img>` tag defines a `srcset` attribute, replace it with `rawSrcset`.
<code-example format="html" language="html">
&lt;img rawSrc="hero.jpg" rawSrcset="100w, 200w, 300w"&gt;
</code-example>
If the `rawSrcset` attribute is present, `NgOptimizedImage` generates and sets the [`srcset` attribute](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/srcset) using the configured image loader. Do not include image file names in `rawSrcset` - the directive infers this information from `rawSrc`. The directive supports both width descriptors (e.g. `100w`) and density descriptors (e.g. `1x`) are supported.
You can also use `rawSrcset` with the standard image [`sizes` attribute](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/sizes).
<code-example format="html" language="html">
&lt;img rawSrc="hero.jpg" rawSrcset="100w, 200w, 300w" sizes="50vw"&gt;
</code-example>
### Disabling image lazy loading
By default, `NgOptimizedImage` sets `loading=lazy` for all images that are not marked `priority`. You can disable this behavior for non-priority images by setting the `loading` attribute. This attribute accepts values: `eager`, `auto`, and `lazy`. [See the documentation for the standard image `loading` attribute for details](https://developer.mozilla.org/en-US/docs/Web/API/HTMLImageElement/loading#value).
<code-example format="html" language="html">
&lt;img rawSrc="cat.jpg" width="400" height="200" loading="eager"&gt;
</code-example>
<!-- links -->
<!-- external links -->
<!--end links -->
@reviewed 2022-08-25
+17 -13
View File
@@ -40,7 +40,7 @@ Use them to perform the following kinds of operations.
| Hook method | Purpose | Timing |
|:--- |:--- |:--- |
| `ngOnChanges()` | Respond when Angular sets or resets data-bound input properties. The method receives a `SimpleChanges` object of current and previous property values. <br /> <div class="alert is-helpful"> **NOTE**: <br /> This happens very frequently, so any operation you perform here impacts performance significantly. </div> See details in [Using change detection hooks](#onchanges) in this document. | Called before `ngOnInit()` \(if the component has bound inputs\) and whenever one or more data-bound input properties change. <br /> <div class="alert is-helpful"> **NOTE**: <br /> If your component has no inputs or you use it without providing any inputs, the framework will not call `ngOnChanges()`. </div> |
| `ngOnChanges()` | Respond when Angular sets or resets data-bound input properties. The method receives a `SimpleChanges` object of current and previous property values. <br /> <div class="alert is-helpful"> **NOTE**: <br /> This happens frequently, so any operation you perform here impacts performance significantly. </div> See details in [Using change detection hooks](#onchanges) in this document. | Called before `ngOnInit()` \(if the component has bound inputs\) and whenever one or more data-bound input properties change. <br /> <div class="alert is-helpful"> **NOTE**: <br /> If your component has no inputs or you use it without providing any inputs, the framework will not call `ngOnChanges()`. </div> |
| `ngOnInit()` | Initialize the directive or component after Angular first displays the data-bound properties and sets the directive or component's input properties. See details in [Initializing a component or directive](#oninit) in this document. | Called once, after the first `ngOnChanges()`. `ngOnInit()` is still called even when `ngOnChanges()` is not \(which is the case when there are no template-bound inputs\). |
| `ngDoCheck()` | Detect and act upon changes that Angular can't or won't detect on its own. See details and example in [Defining custom change detection](#docheck) in this document. | Called immediately after `ngOnChanges()` on every change detection run, and immediately after `ngOnInit()` on the first run. |
| `ngAfterContentInit()` | Respond after Angular projects external content into the component's view, or into the view that a directive is in. <br /> See details and example in [Responding to changes in content](#aftercontent) in this document. | Called *once* after the first `ngDoCheck()`. |
@@ -121,12 +121,16 @@ The sequence of log messages follows the prescribed hook calling order:
|:--- |:--- |
| 1 | `OnChanges` |
| 2 | `OnInit` |
| 3-5 | `DoCheck` |
| 6 | `AfterContentInit` |
| 7-9 | `AfterContentChecked` |
| 10 | `AfterViewInit` |
| 11-13 | `AfterViewChecked` |
| 14 | `OnDestroy` |
| 3 | `DoCheck` |
| 4 | `AfterContentInit` |
| 5 | `AfterContentChecked` |
| 6 | `AfterViewInit` |
| 7 | `AfterViewChecked` |
| 8 | `DoCheck` |
| 9 | `AfterContentChecked` |
| 10 | `AfterViewChecked` |
| 11 | `OnDestroy` |
<div class="alert is-helpful">
@@ -151,8 +155,8 @@ The example does not perform any initialization or clean-up.
It just tracks the appearance and disappearance of an element in the view by recording when the directive itself is instantiated and destroyed.
A spy directive like this can provide insight into a DOM object that you cannot change directly.
You can't touch the implementation of a built-in `<div>`, or modify a third party component.
You can, however watch these elements with a directive.
You can't access the implementation of a built-in `<div>`, or modify a third party component.
You do have the option to watch these elements with a directive.
The directive defines `ngOnInit()` and `ngOnDestroy()` hooks
that log messages to the parent using an injected `LoggerService`.
@@ -253,8 +257,8 @@ The `LoggerService.tick_then()` statement postpones the log update for one turn
#### Write lean hook methods to avoid performance problems
When you run the *AfterView* sample, notice how frequently Angular calls `AfterViewChecked()`-often when there are no changes of interest.
Be very careful about how much logic or computation you put into one of these methods.
When you run the *AfterView* sample, notice how frequently Angular calls `AfterViewChecked()` - often when there are no changes of interest.
Be careful about how much logic or computation you put into one of these methods.
<div class="lightbox">
@@ -284,7 +288,7 @@ AngularJS developers know this technique as *transclusion*.
The *AfterContent* sample explores the `AfterContentInit()` and `AfterContentChecked()` hooks that Angular calls *after* Angular projects external content into the component.
Consider this variation on the [previous *AfterView*](#afterview) example.
This time, instead of including the child view within the template, it imports the content from the `AfterContentComponent`'s parent.
This time, instead of including the child view within the template, it imports the content from the `AfterContentComponent` hook's parent.
The following is the parent's template.
<code-example header="AfterContentParentComponent (template excerpt)" path="lifecycle-hooks/src/app/after-content-parent.component.ts" region="parent-template"></code-example>
@@ -354,7 +358,7 @@ The results are illuminating.
</div>
While the `ngDoCheck()` hook can detect when the hero's `name` has changed, it is very expensive.
While the `ngDoCheck()` hook can detect when the hero's `name` has changed, it is an expensive hook.
This hook is called with enormous frequency &mdash;after *every* change detection cycle no matter where the change occurred.
It's called over twenty times in this example before the user can do anything.
@@ -65,7 +65,7 @@ class BaseMenu {}
&commat;Component({
selector: 'base-menu',
template: '&lt;div&gt;&lt;/div*gt;'
template: '&lt;div&gt;&lt;/div&gt;'
})
export class SettingsMenu extends BaseMenu {}
+1 -1
View File
@@ -13,7 +13,7 @@ You can run the <live-example></live-example> in Stackblitz and download the cod
<header>Reporting vulnerabilities</header>
To report vulnerabilities in Angular itself, email us at [security@angular.io](mailto:security@angular.io).
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 about how Google handles security issues, see [Google's security philosophy](https://www.google.com/about/appsecurity).
@@ -64,16 +64,20 @@ Alternatively, you might want to define a different [registration strategy](api/
</div>
### Forcing update activation
### Updating to the latest version
If the current tab needs to be updated to the latest application version immediately, it can ask to do so with the `activateUpdate()` method:
You can update an existing tab to the latest version by reloading the page as soon as a new version is ready.
To avoid disrupting the user's progress, it is generally a good idea to prompt the user and let them confirm that it is OK to reload the page and update to the latest version:
<code-example header="prompt-update.service.ts" path="service-worker-getting-started/src/app/prompt-update.service.ts" region="sw-activate"></code-example>
<code-example header="prompt-update.service.ts" path="service-worker-getting-started/src/app/prompt-update.service.ts" region="sw-version-ready"></code-example>
<div class="alert is-important">
Calling `activateUpdate()` without reloading the page could break lazy-loading in a currently running app, especially if the lazy-loaded chunks use filenames with hashes, which change every version.
Therefore, it is recommended to reload the page once the promise returned by `activateUpdate()` is resolved.
Calling {@link SwUpdate#activateUpdate SwUpdate#activateUpdate()} updates a tab to the latest version without reloading the page, but this could break the application.
Updating without reloading can create a version mismatch between the [application shell](guide/glossary#app-shell) and other page resources, such as [lazy-loaded chunks](guide/glossary#lazy-loading), whose filenames may change between versions.
You should only use `activateUpdate()`, if you are certain it is safe for your specific use case.
</div>
@@ -90,6 +90,12 @@ Usually this is `/index.html`.
They can include resources loaded from the page's origin as well as third-party resources loaded from CDNs and other external URLs.
As not all such external URLs might be known at build time, URL patterns can be matched.
<div class="alert is-important">
For the service worker to handle resources that are loaded from different origins, make sure that [CORS][MozillaDeveloperDocsWebHttpCors] is correctly configured on each origin's server.
</div>
This field contains an array of asset groups, each of which defines a set of asset resources and the policy by which they are cached.
<code-example format="json" language="json">
@@ -370,6 +376,7 @@ This optional section enables you to specify a custom list of URLs that will be
The ServiceWorker redirects navigation requests that don't match any `asset` or `data` group to the specified [index file](#index-file).
A request is considered to be a navigation request if:
* Its [method](https://developer.mozilla.org/docs/Web/API/Request/method) is `GET`
* Its [mode](https://developer.mozilla.org/docs/Web/API/Request/mode) is `navigation`
* It accepts a `text/html` response as determined by the value of the `Accept` header
* Its URL matches the following criteria:
@@ -440,6 +447,8 @@ It is recommended that you use the default performance strategy whenever possibl
[WhatwgFetchSpecConceptFilteredResponseOpaque]: https://fetch.spec.whatwg.org#concept-filtered-response-opaque
[MozillaDeveloperDocsWebHttpCors]: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
<!-- end links -->
@reviewed 2022-02-28
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

After

Width:  |  Height:  |  Size: 50 KiB

+19 -6
View File
@@ -169,6 +169,15 @@
"bio": "Brian is a software engineer and GDE in Angular with a passion for learning, writing, speaking, teaching and mentoring. Brian has been building web applications for over 20 years and has long been a fanboy of JavaScript. When not in front of his Macbook Pro Brian is in the Rocky Mountains skiing or hiking.",
"groups": ["GDE"]
},
"bobwatson": {
"name": "Bob Watson",
"lead": "mgechev",
"picture": "bob-watson.jpg",
"twitter": "bobwatsonphd",
"website": "https://docsbydesign.com",
"bio": "Bob is the documentation lead for angular.io. When he's not obsessing over the i-dotting and t-crossing of documentation, he enjoys seeing the world from up in the air and below the sea.",
"groups": ["Angular"]
},
"brocco": {
"name": "Mike Brocchi",
"picture": "mike-brocchi.jpg",
@@ -601,6 +610,16 @@
"groups": ["Angular"],
"mentor": "jelbourn"
},
"MainaWycliffe": {
"name": "Maina Wycliffe",
"picture": "MainaWycliffe.jpg",
"twitter": "mwycliffe_dev",
"website": "https://mainawycliffe.dev/",
"bio": "Wycliffe is a Software Engineer from Kenya passionate about Teaching, Speaking, Writing, Open Source, and Mentorship. On top of that, he is passionate about Typescript and loves teaching developers how to get the most out of it.",
"groups": [
"GDE"
]
},
"manekinekko": {
"name": "Wassim Chegham",
"picture": "wassim.jpg",
@@ -916,12 +935,6 @@
"bio": "Andrew is a software engineer using Angular and .NET. He spends most of his spare time staying up-to-date, helping other people, and experimenting with web tech.",
"groups": ["GDE"]
},
"tmdavisgoogle": {
"name": "Tiffany Davis",
"bio": "Tiffany is an editor working on Angular documentation.",
"groups": ["Angular"],
"lead": "mgechev"
},
"toddmotto": {
"name": "Todd Motto",
"picture": "toddmotto.jpg",
+1 -1
View File
@@ -1,6 +1,6 @@
<h1 class="no-toc">Introduction to the Angular Docs</h1>
Angular is an application design framework and development platform for creating efficient and sophisticated single-page apps.
Angular is an application-design framework and development platform for creating efficient and sophisticated single-page apps.
These Angular docs help you learn and use the Angular framework and development platform, from your first application to optimizing complex single-page apps for enterprises.
Tutorials and guides include downloadable examples to accelerate your projects.
+17
View File
@@ -84,6 +84,18 @@
"title": "Angular Rocks",
"url": "https://angularrocks.com"
},
"angular-master-podcast": {
"desc": "Listen / Code / Repeat. Everything you need to fall in love with Angular for a long time.",
"logo": "https://ng-poland.pl/images/podcast/angular-master-podcast-logo.png",
"title": "Angular Master Podcast",
"url": "https://anchor.fm/angular-master/"
},
"javascript-master-podcast": {
"desc": "Listen / Code / Repeat. Everything you need to know to become an informed JavaScript developer.",
"logo": "https://ng-poland.pl/images/podcast/javascript-master-podcast-logo.png",
"title": "JavaScript Master Podcast",
"url": "https://anchor.fm/javascript-master/"
},
"happy-angular": {
"desc": "A weekly German podcast for Angular on the go",
"logo": "",
@@ -816,6 +828,11 @@
"title": "Angular University",
"url": "https://angular-university.io/"
},
"angular-master-dev": {
"desc": "Angular Architecture: Strategic Design with Nx - Online Video Course",
"title": "Angular Master",
"url": "https://angularmaster.dev/"
},
"-acceleb": {
"desc": "Customized, Instructor-Led Angular Training",
"title": "Accelebrate",
+11 -1
View File
@@ -637,6 +637,11 @@
"url": "guide/prerendering",
"title": "Prerendering",
"tooltip": "Prerender HTML server-side with Angular Universal."
},
{
"url": "guide/image-directive",
"title": "Image Directive",
"tooltip": "Performant images with the Angular image directive."
}
]
},
@@ -816,7 +821,12 @@
"tooltip": "Create a template-driven form using directives and Angular template syntax."
},
{
"title": "Angular libraries",
"url": "guide/image-directive-setup",
"title": "Setting up NgOptimizedImage",
"tooltip": "Setup the Angular image directive"
},
{
"title": "Angular Libraries",
"tooltip": "Extending Angular with shared libraries.",
"children": [
{
+3 -3
View File
@@ -32,7 +32,7 @@
<img *ngSwitchCase="true" src="assets/images/logos/angular/logo-nav@2x.png" width="150" height="40" title="Home" alt="Home">
<img *ngSwitchDefault src="assets/images/logos/angular/shield-large.svg" width="37" height="40" title="Home" alt="Home">
</a>
<aio-top-menu *ngIf="showTopMenu" [nodes]="topMenuNodes" [currentNode]="currentNodes?.TopBar"></aio-top-menu>
<aio-top-menu *ngIf="showTopMenu" [nodes]="topMenuNodes" [currentNode]="currentNodes.TopBar"></aio-top-menu>
<aio-search-box class="search-container" #searchBox (onSearch)="doSearch($event)" (onFocus)="doSearch($event, true)"></aio-search-box>
<aio-theme-toggle #themeToggle></aio-theme-toggle>
<div #externalIcons class="toolbar-external-icons-container">
@@ -60,8 +60,8 @@
<mat-sidenav-container class="sidenav-container" [class.no-animations]="disableAnimations" [class.has-floating-toc]="hasFloatingToc">
<mat-sidenav [ngClass]="{'collapsed': !dockSideNav}" #sidenav class="sidenav" [mode]="mode" [opened]="isOpened" (openedChange)="updateHostClasses()">
<aio-nav-menu *ngIf="!showTopMenu" [nodes]="topMenuNarrowNodes" [currentNode]="currentNodes?.TopBarNarrow" [isWide]="dockSideNav" navLabel="primary"></aio-nav-menu>
<aio-nav-menu [nodes]="sideNavNodes" [currentNode]="currentNodes?.SideNav" [isWide]="dockSideNav" navLabel="guides and docs"></aio-nav-menu>
<aio-nav-menu *ngIf="!showTopMenu" [nodes]="topMenuNarrowNodes" [currentNode]="currentNodes.TopBarNarrow" [isWide]="dockSideNav" navLabel="primary"></aio-nav-menu>
<aio-nav-menu [nodes]="sideNavNodes" [currentNode]="currentNodes.SideNav" [isWide]="dockSideNav" navLabel="guides and docs"></aio-nav-menu>
<div class="doc-version">
<aio-nav-menu [nodes]="docVersions" [isWide]="true" [currentNode]="currentDocsVersionNode" navLabel="docs versions"></aio-nav-menu>
+1 -1
View File
@@ -90,7 +90,7 @@ export class AppComponent implements OnInit {
currentDocsVersionNode?: NavigationNode;
versionInfo: VersionInfo;
versionInfo: VersionInfo | undefined;
get isOpened() { return this.dockSideNav && this.isSideNavDoc; }
get mode() { return this.isOpened ? 'side' : 'over'; }
@@ -8,5 +8,5 @@ import { NavigationNode, VersionInfo } from 'app/navigation/navigation.service';
})
export class FooterComponent {
@Input() nodes: NavigationNode[];
@Input() versionInfo: VersionInfo;
@Input() versionInfo: VersionInfo | undefined;
}
@@ -14,5 +14,5 @@ import { VersionInfo } from 'app/navigation/navigation.service';
})
export class ModeBannerComponent {
@Input() mode: string;
@Input() version: VersionInfo;
@Input() version: VersionInfo | undefined;
}
@@ -7,7 +7,7 @@
(keydown)="handleKeydown($event)"
[attr.aria-expanded]="showOptions"
[attr.aria-activedescendant]="currentOptionIdx > -1 && showOptions ? listBoxId + '-option-' + currentOptionIdx : null"
[attr.aria-label]="label + (selected?.title ?? '')"
[attr.aria-label]="label + (selected?.title ?? '')"
[class.disabled]="disabled"
tabindex="0"
>
@@ -230,9 +230,9 @@ class HostComponent {
onChange = jasmine.createSpy('onChange');
options: Option[];
selected: Option;
label: string;
showSymbol: boolean;
disabled: boolean;
label = '';
showSymbol = false;
disabled = false;
}
function getButton(): HTMLButtonElement {
@@ -12,7 +12,7 @@ export interface Option {
export class SelectComponent implements OnInit {
static instancesCounter = 0;
@Input() selected: Option;
@Input() selected: Option | undefined;
@Input() options: Option[];
@@ -23,7 +23,7 @@ export class SelectComponent implements OnInit {
@Input() showSymbol = false;
@Input() label!: string;
@Input() label = '';
@Input() disabled: boolean;
@@ -81,7 +81,7 @@ export class SelectComponent implements OnInit {
const runOrOpenOptions = (fn: () => void): void => {
if(!this.showOptions) {
this.showOptions = true;
const indexOfSelected = (this.options ?? []).indexOf(this.selected);
const indexOfSelected = (!this.options || !this.selected) ? -1 : this.options.indexOf(this.selected);
this.currentOptionIdx = indexOfSelected > 0 ? indexOfSelected : 0;
} else {
fn();
@@ -48,6 +48,7 @@ aio-contributor {
width: calc(100% - 4px);
height: calc(100% - 4px);
clip-path: $angular-shape-polygon;
object-fit: cover;
}
.contributor-social-links {
@@ -18,6 +18,7 @@ exceptions:
- CLI
- Code
- Cosmos
- d.ts
- Docker
- ECMAScript
- Emmet
@@ -39,9 +40,11 @@ exceptions:
- NgModule
- NgModules
- Observable
- README
- REPL
- RxJS
- Schematics
- sideEffects
- Studio
- Tour of Heroes
- TypeScript
@@ -40,6 +40,7 @@ swap:
byelog: bye log
callout: call-out
callouts: call-outs
camel case: camelCase
cellular data: mobile data
cellular network: mobile network
chapter: documents|pages|sections
@@ -57,6 +58,7 @@ swap:
curated roles: predefined roles
datasource: data source
Developers Console: Google API Console|API Console
entrypoint: entry point
ephemeral IP address: ephemeral external IP address
execute: run|call
fewer data: less data
@@ -4,4 +4,4 @@ level: warning
ignorecase: true
alpha: true
tokens:
- '[\w]+'
- '[^\s]+'
@@ -23,4 +23,5 @@ preloads
prepends
profiler
rollout
routable
routable
sideEffects
+7 -1
View File
@@ -14,6 +14,7 @@ bundlers
cacheable
callout
callouts
camelcase
combinator
composability
config
@@ -73,12 +74,17 @@ polyfills
preprocess
preprocessor
preprocessors
rebase
rebased
rebasing
refactorings
reflows
reimagined
renderers
repo
repos
repurpose
resync
reusability
rollup
runtimes
@@ -132,4 +138,4 @@ untrusted
untyped
validator
validators
walkthrough
walkthrough
@@ -3,6 +3,7 @@ bazel
bing
bombasto
chiho
esbuild
heydon
homebrew
jazdzewski
@@ -21,6 +22,8 @@ savkin's
sinatra
stackblitz
tolisten
tsickle
tslib
tslint
vercel
vmware
@@ -1,5 +1,6 @@
ajax
api
apis
async
css
href
+28 -14
View File
@@ -1,15 +1,23 @@
# Update example dependencies
Follow these steps to update the examples to the latest versions of Angular (and related dependencies):
The dependencies of the example apps (including Angular, Angular Material and Angular CLI) are automatically updated using [Renovate](https://renovatebot.com/).
- In [shared/package.json](./shared/package.json), bump all the `@angular/*` and `@nguniversal/*` package versions to the version you want to update to and update their peer dependencies (such as `@angular-devkit/*`, `rxjs`, `typescript`, `zone.js`) and other dependencies (e.g. `@types/*`) to the latest compatible versions.
However, it is useful to periodically also manually update the apps to more closely match (in file layout, configs, etc.) what a new Angular CLI app would look like.
This is typically only needed once for each new major Angular version.
> NOTE:
> The [angular-cli-diff](https://github.com/cexbrayat/angular-cli-diff) repo can be a useful resource for discovering what dependency versions are used for a basic CLI app at a specific CLI version.
Since the examples are Angular CLI apps, we can take advantage of `ng update` to apply migrations.
- In the [shared/](./shared) directory, run `yarn` to update the dependencies in the [shared/node_modules/](./shared/node_modules) directory and the [shared/yarn.lock](./shared/yarn.lock) file.
Follow these steps to align the example apps with new CLI apps.
- In the [shared/](./shared) directory, run `yarn sync-deps` to update the dependency versions of the `package.json` files in each sub-folder of [shared/boilerplate/](./shared/boilerplate) to match the ones in [shared/package.json](./shared/package.json).
> **Note:**
> The following steps assume that the related Angular dependencies have already been updated in [shared/package.json](./shared/package.json) (for example, automatically by Renovate).
- Determine (for example, by examining git history) what is the last versions for which this process was performed.
These will be referred to as `<FROM_VERSION_*>`.
If you can't determine these, use arbitrary versions, such as the previous major version.
- In the [shared/](./shared) directory, run `yarn` to ensure the dependencies are installed in the [shared/node_modules/](./shared/node_modules) directory.
This command will also ensure that the dependency versions of the `package.json` files in each sub-folder of [shared/boilerplate/](./shared/boilerplate) match the ones in [shared/package.json](./shared/package.json).
- Follow the steps in the following section to update the rest of the boilerplate files.
@@ -19,26 +27,32 @@ Follow these steps to update the examples to the latest versions of Angular (and
The Angular CLI default setup is updated using `ng update`.
Any necessary changes to boilerplate files will be done automatically through migration schematics.
> NOTE:
> **Note:**
> Migrations affecting source code files will not happen automatically, because `ng update` does not know about all the examples in `aio/content/examples/`.
> You have to make these changes (if any) manually.
> Again, the [angular-cli-diff](https://github.com/cexbrayat/angular-cli-diff) repo can be a useful resource for discovering changes between versions.
> The [angular-cli-diff](https://github.com/cexbrayat/angular-cli-diff) repo can be a useful resource for discovering changes between versions.
- In the [shared/boilerplate/cli/](./shared/boilerplate/cli) directory, run the following commands to migrate the project to the current versions of Angular CLI and the Angular framework (updated in previous steps):
- In the [shared/boilerplate/cli/](./shared/boilerplate/cli) directory, run the following commands to automatically apply any available migrations to the boilerplate project:
```sh
# Ensure dependencies are installed.
yarn install
# Migrate project to new versions.
yarn ng update @angular/cli --allow-dirty --migrate-only --from=<previous-cli-version>
yarn ng update @angular/core --allow-dirty --migrate-only --from=<previous-core-version>
yarn ng update @angular/cli --allow-dirty --migrate-only --from=<FROM_VERSION_CLI>
yarn ng update @angular/core --allow-dirty --migrate-only --from=<FROM_VERSION_ANGULAR>
```
> NOTE:
> **Note:**
> In order for `ng update` to work, there must be a `node_modules/` directory with installed dependencies inside the [shared/boilerplate/cli/](./shared/boilerplate/cli) directory.
> This `node_modules/` directory is only needed during the update operation and is otherwise ignored (both by git and by the [example-boilerplate.js](./example-boilerplate.js) script) by means of the [shared/boilerplate/.gitignore](./shared/boilerplate/.gitignore) file.
- The previous command made any necessary changes to boilerplate files inside the `cli/` directory, but the same changes need to be applied to the other CLI-based boilerplate directories.
- Inspect [shared/package.json](./shared/package.json) to determine what is the current version of Angular CLI (i.e. `@angular/cli`) used in the example apps.
This will be referred to as `<TO_VERSION_CLI>`.
- Use the [angular-cli-diff](https://github.com/cexbrayat/angular-cli-diff) repository to discover more changes (which are not automatically applied via `ng update` migrations) between Angular CLI apps of different versions.
Visit https://github.com/cexbrayat/angular-cli-diff/compare/<FROM_VERSION_CLI>...<TO_VERSION_CLI>, inspect the changes between the two versions and apply the ones that make sense to the boilerplate files inside [shared/boilerplate/cli/](./shared/boilerplate/cli).
- The previous steps made any necessary changes to boilerplate files inside the `cli/` directory, but the same changes need to be applied to the other CLI-based boilerplate directories.
Inspect the changes in `cli/` and manually apply the necessary ones to other CLI-based boilerplate directories.
- Also ensure that any relevant changes in the [shared/boilerplate/cli/](./shared/boilerplate/cli) directory are copied to the [shared/example-scaffold/](./shared/example-scaffold) directory, which is used when creating new examples (via `yarn create-example ...`).
@@ -55,4 +69,4 @@ Any necessary changes to boilerplate files will be done automatically through mi
- Inspect the changes and determine whether any updates to guides are necessary.
For example, if a file is renamed or moved, any guides mentioning that file may need updating to refer to the new name/location.
- Commit all changes to the repository.
- Finally, commit all changes and [submit a pull request](../../../CONTRIBUTING.md#submit-pr).
@@ -4,9 +4,9 @@
* - A symbol could have multiple constructors
* - It is possible to disambiguate multiple different signatures from a single polymorphic constructor
* - The return type of the overridden constructor can differ (e.g. `Foo<T|null>` vs `Foo<T>`)
*
*
* This looks like the following:
*
*
* ```
* /**
* * @overriddenImplementation FooCtor
@@ -14,21 +14,21 @@
* export interface Foo {
* bar();
* }
*
*
* type FooInterface = Foo;
*
*
* export class FooImpl { ... }
*
*
* export interface FooCtor {
* new(): Foo;
* }
*
*
* export const Foo: FooCtor =
(class Foo implements FooInterface { ... }
* ```
*
*
* This processor will extend the docs for symbol `Foo` by copying all documented constructor overrides from `FooCtor`.
*
*
* In order to use this processor, annotate the exported interface with `@overriddenImplementation`. Place the desired
* documentation on the interface and constructor signatures.
*/
@@ -42,7 +42,7 @@
],
$process(docs) {
docs.forEach(doc => {
if (doc.overriddenImplementation) {
if (doc.overriddenImplementation) {
// Convert the specified name into a doc.
const ctorDocArray = getDocFromAlias(doc.overriddenImplementation);
if (ctorDocArray.length === 0) {
@@ -51,18 +51,20 @@
if (ctorDocArray.length >= 2) {
throw new Error(`@overriddenImplementation found multiple docs for ${doc.overriddenImplementation}. You may only have one documented symbol for each.`);
}
const ctorDoc = ctorDocArray[0];
// Copy the constructor overrides from the constructor doc, if any are present.
if (!ctorDoc.members || ctorDoc.members.length === 0 || !ctorDoc.members[0].name.includes('new')) {
throw new Error(`@overriddenImplementation requires that the provided constructor ${ctorDoc} have a member called "new", possibly with multiple overrides.`);
throw new Error(`@overriddenImplementation requires that the provided constructor ${ctorDoc.id} have a member called "new", possibly with multiple overrides.`);
}
doc.constructorDoc = ctorDoc.members[0];
// Mark the constructor doc internal.
if (!ctorDoc.internal) {
log.warn(`Constructor doc ${ctorDoc} was not marked '@internal'; adding this annotation.`);
if (!ctorDoc.internal && !ctorDoc.privateExport) {
log.warn(
`Constructor doc ${ctorDoc.id} was not marked as internal (either via an ` +
'\'@internal\' annotation or a \'ɵ\' prefix). Marking it as internal.');
ctorDoc.internal = true;
}
+3 -3
View File
@@ -10,7 +10,7 @@ Bazel.
## Installation
In order to ensure that everyone builds Angular in a _consistent_ way, Bazel
will be installed through NPM and therefore it's not necessary to install Bazel
will be installed through NPM. It's not necessary to install Bazel
manually.
The binaries for Bazel will be provided by the [`@bazel/bazelisk`](https://github.com/bazelbuild/bazelisk)
@@ -157,7 +157,7 @@ Of course, non-hermeticity in an action can cause problems.
At worst, you can fetch a broken artifact from the cache, making your build non-reproducible.
For this reason, we are careful to implement our Bazel rules to depend only on their inputs.
Currently we only use remote caching on CircleCI and we let Angular core developers enable remote caching to speed up their builds.
Currently, we only use remote caching on CircleCI. We let Angular core developers enable remote caching to speed up their builds.
### Remote cache in development
@@ -239,7 +239,7 @@ yarn bazel analyze-profile filename_name.profile --html --html_details --html_hi
This will generate a `filename_name.profile.html` file that you can open in your browser.
On the upper right corner that is a small table of contents with links to three areas: Tasks, Legend and Statistics.
In the upper right corner that is a small table of contents with links to three areas: Tasks, Legend and Statistics.
In the Tasks section you will find a graph of where time is spent. Legend shows what the colors in the Tasks graph mean.
Hovering over the background will show what phase that is, while hovering over bars will show more details about that specific action.
+2 -2
View File
@@ -6,7 +6,7 @@ The core packages are tested both in the browser (via Karma) and on the server (
## Debugging in Karma
It is useful to focus your debugging on one test at a time by changing that test to be
defined using the `fit(...)` function, rather than `it(...)`. Moreover it can be helpful
defined using the `fit(...)` function, rather than `it(...)`. Moreover, it can be helpful
to place a `debugger` statement in this `fit` clause to cause the debugger to stop when
it hits this test.
@@ -16,7 +16,7 @@ document.
## Debugging in Node
It is useful to focus your debugging on one test at a time by changing that test to be
defined using the `fit(...)` function, rather than `it(...)`. Moreover it can be helpful
defined using the `fit(...)` function, rather than `it(...)`. Moreover, it can be helpful
to place a `debugger` statement in this `fit` clause to cause the debugger to stop when
it hits this test.
+1 -1
View File
@@ -1,6 +1,6 @@
# Debugging the `components-repo-unit-tests` job
Currently all changes to Ivy are validated against the test suite of the
Currently, all changes to Ivy are validated against the test suite of the
`angular/components` repository. In order to debug the `components-repo-unit-tests` CI
job, the following steps can be used:
+2 -2
View File
@@ -31,7 +31,7 @@ following products on your development machine:
* [Yarn](https://yarnpkg.com) (version specified in the engines field of [`package.json`](../package.json)) which is used to install dependencies.
* Optional: [Java](https://openjdk.java.net/) version 7 or higher as required by [Closure Compiler](https://developers.google.com/closure/compiler). Most developers will not need this. Java is required for running some of the integration tests.
* Optional: [Java](https://openjdk.java.net/) version 7 or higher than required by [Closure Compiler](https://developers.google.com/closure/compiler). Most developers will not need this. Java is required for running some integration tests.
## Getting the Sources
@@ -146,7 +146,7 @@ $ yarn lint
## Publishing Snapshot Builds
When a build of any branch on the upstream fork angular/angular is green on CircleCI, it
automatically publishes build artifacts to repositories in the Angular org, eg. the `@angular/core`
automatically publishes build artifacts to repositories in the Angular org, for example, the `@angular/core`
package is published to https://github.com/angular/core-builds.
You may find that your un-merged change needs some validation from external participants.
+1 -1
View File
@@ -53,7 +53,7 @@ decision.
## What if I want to implement the feature to help the Angular team?
Often implementing the feature as an separate package is a better option. Building an external
Often implementing the feature as a separate package is a better option. Building an external
package rather than including the functionality in Angular helps with:
- Keeping the framework's runtime smaller and simpler
@@ -8,6 +8,17 @@ import * as i0 from '@angular/core';
import { ModuleWithProviders } from '@angular/core';
import { Observable } from 'rxjs';
// @public
export interface NoNewVersionDetectedEvent {
// (undocumented)
type: 'NO_NEW_VERSION_DETECTED';
// (undocumented)
version: {
hash: string;
appData?: Object;
};
}
// @public (undocumented)
export class ServiceWorkerModule {
static register(script: string, opts?: SwRegistrationOptions): ModuleWithProviders<ServiceWorkerModule>;
-2
View File
@@ -2,8 +2,6 @@ load("//integration:index.bzl", "ng_integration_test")
ng_integration_test(
name = "test",
# Pinned temporarily until the CLI is updated to support TS 4.8.
pinned_npm_packages = ["typescript"],
setup_chromium = True,
track_payload_size = "animations",
)
+1 -1
View File
@@ -42,6 +42,6 @@
"protractor": "file:../../node_modules/protractor",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"typescript": "~4.7.2"
"typescript": "file:../../node_modules/typescript"
}
}
File diff suppressed because it is too large Load Diff
@@ -2,8 +2,6 @@ load("//integration:index.bzl", "ng_integration_test")
ng_integration_test(
name = "test",
# Pinned temporarily until the CLI is updated to support TS 4.8.
pinned_npm_packages = ["typescript"],
setup_chromium = True,
track_payload_size = "cli-hello-world-ivy-compat",
)
@@ -44,6 +44,6 @@
"protractor": "file:../../node_modules/protractor",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"typescript": "~4.7.2"
"typescript": "file:../../node_modules/typescript"
}
}
File diff suppressed because it is too large Load Diff
@@ -2,8 +2,6 @@ load("//integration:index.bzl", "ng_integration_test")
ng_integration_test(
name = "test",
# Pinned temporarily until the CLI is updated to support TS 4.8.
pinned_npm_packages = ["typescript"],
setup_chromium = True,
track_payload_size = "cli-hello-world",
)
@@ -47,6 +47,6 @@
"protractor": "file:../../node_modules/protractor",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"typescript": "~4.7.2"
"typescript": "file:../../node_modules/typescript"
}
}
File diff suppressed because it is too large Load Diff
-2
View File
@@ -2,8 +2,6 @@ load("//integration:index.bzl", "ng_integration_test")
ng_integration_test(
name = "test",
# Pinned temporarily until the CLI is updated to support TS 4.8.
pinned_npm_packages = ["typescript"],
setup_chromium = True,
track_payload_size = "cli-hello-world",
)
+1 -1
View File
@@ -43,6 +43,6 @@
"protractor": "file:../../node_modules/protractor",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"typescript": "~4.7.2"
"typescript": "file:../../node_modules/typescript"
}
}
File diff suppressed because it is too large Load Diff
-2
View File
@@ -2,8 +2,6 @@ load("//integration:index.bzl", "ng_integration_test")
ng_integration_test(
name = "test",
# Pinned temporarily until the CLI is updated to support TS 4.8.
pinned_npm_packages = ["typescript"],
setup_chromium = True,
track_payload_size = "forms",
)
+1 -1
View File
@@ -43,6 +43,6 @@
"protractor": "file:../../node_modules/protractor",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"typescript": "~4.7.2"
"typescript": "file:../../node_modules/typescript"
}
}
File diff suppressed because it is too large Load Diff
-2
View File
@@ -2,7 +2,5 @@ load("//integration:index.bzl", "ng_integration_test")
ng_integration_test(
name = "test",
# Pinned temporarily until the CLI is updated to support TS 4.8.
pinned_npm_packages = ["typescript"],
setup_chromium = True,
)
+1 -1
View File
@@ -64,6 +64,6 @@
"serve": "11.2.0",
"ts-node": "8.3.0",
"tslint": "5.18.0",
"typescript": "~4.7.2"
"typescript": "file:../../node_modules/typescript"
}
}
File diff suppressed because it is too large Load Diff
-2
View File
@@ -2,7 +2,5 @@ load("//integration:index.bzl", "ng_integration_test")
ng_integration_test(
name = "test",
# Pinned temporarily until the CLI is updated to support TS 4.8.
pinned_npm_packages = ["typescript"],
setup_chromium = True,
)
+1 -1
View File
@@ -41,6 +41,6 @@
"protractor": "file:../../node_modules/protractor",
"ts-node": "8.3.0",
"tslint": "6.1.3",
"typescript": "~4.7.2"
"typescript": "file:../../node_modules/typescript"
}
}
+1 -1
View File
@@ -20,7 +20,7 @@
"@angular/upgrade": "file:../../dist/packages-dist/upgrade",
"@types/jasmine": "file:../../node_modules/@types/jasmine",
"rxjs": "file:../../node_modules/rxjs",
"typescript": "4.8.1-rc",
"typescript": "~4.8.2",
"zone.js": "file:../../dist/zone.js-dist/archive/zone.js.tgz"
},
"scripts": {
+824
View File
@@ -0,0 +1,824 @@
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.
# yarn lockfile v1
"@ampproject/remapping@^2.1.0":
version "2.2.0"
resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d"
integrity sha512-qRmjj8nj9qmLTQXXmaR1cck3UXSRMPrbsLJAasZpF+t3riI71BXed5ebIOYwQntykeZuhjsdweEc9BxH5Jc26w==
dependencies:
"@jridgewell/gen-mapping" "^0.1.0"
"@jridgewell/trace-mapping" "^0.3.9"
"@angular/animations@file:../../dist/packages-dist/animations":
version "14.2.0-next.0"
dependencies:
tslib "^2.3.0"
"@angular/common@file:../../dist/packages-dist/common":
version "14.2.0-next.0"
dependencies:
tslib "^2.3.0"
"@angular/compiler-cli@file:../../dist/packages-dist/compiler-cli":
version "14.2.0-next.0"
dependencies:
"@babel/core" "^7.17.2"
chokidar "^3.0.0"
convert-source-map "^1.5.1"
dependency-graph "^0.11.0"
magic-string "^0.26.0"
reflect-metadata "^0.1.2"
semver "^7.0.0"
sourcemap-codec "^1.4.8"
tslib "^2.3.0"
yargs "^17.2.1"
"@angular/compiler@file:../../dist/packages-dist/compiler":
version "14.2.0-next.0"
dependencies:
tslib "^2.3.0"
"@angular/core@file:../../dist/packages-dist/core":
version "14.2.0-next.0"
dependencies:
tslib "^2.3.0"
"@angular/elements@file:../../dist/packages-dist/elements":
version "14.2.0-next.0"
dependencies:
tslib "^2.3.0"
"@angular/forms@file:../../dist/packages-dist/forms":
version "14.2.0-next.0"
dependencies:
tslib "^2.3.0"
"@angular/localize@file:../../dist/packages-dist/localize":
version "14.2.0-next.0"
dependencies:
"@babel/core" "7.18.9"
glob "8.0.3"
yargs "^17.2.1"
"@angular/platform-browser-dynamic@file:../../dist/packages-dist/platform-browser-dynamic":
version "14.2.0-next.0"
dependencies:
tslib "^2.3.0"
"@angular/platform-browser@file:../../dist/packages-dist/platform-browser":
version "14.2.0-next.0"
dependencies:
tslib "^2.3.0"
"@angular/platform-server@file:../../dist/packages-dist/platform-server":
version "14.2.0-next.0"
dependencies:
domino "^2.1.2"
tslib "^2.3.0"
xhr2 "^0.2.0"
"@angular/router@file:../../dist/packages-dist/router":
version "14.2.0-next.0"
dependencies:
tslib "^2.3.0"
"@angular/service-worker@file:../../dist/packages-dist/service-worker":
version "14.2.0-next.0"
dependencies:
tslib "^2.3.0"
"@angular/upgrade@file:../../dist/packages-dist/upgrade":
version "14.2.0-next.0"
dependencies:
tslib "^2.3.0"
"@babel/code-frame@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.18.6.tgz#3b25d38c89600baa2dcc219edfa88a74eb2c427a"
integrity sha512-TDCmlK5eOvH+eH7cdAFlNXeVJqWIQ7gW9tY1GJIpUtFb6CmjVyq2VM3u71bOyR8CRihcCgMUYoDNyLXao3+70Q==
dependencies:
"@babel/highlight" "^7.18.6"
"@babel/compat-data@^7.18.8":
version "7.18.13"
resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.18.13.tgz#6aff7b350a1e8c3e40b029e46cbe78e24a913483"
integrity sha512-5yUzC5LqyTFp2HLmDoxGQelcdYgSpP9xsnMWBphAscOdFrHSAVbLNzWiy32sVNDqJRDiJK6klfDnAgu6PAGSHw==
"@babel/core@7.18.9":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.9.tgz#805461f967c77ff46c74ca0460ccf4fe933ddd59"
integrity sha512-1LIb1eL8APMy91/IMW+31ckrfBM4yCoLaVzoDhZUKSM4cu1L1nIidyxkCgzPAgrC5WEz36IPEr/eSeSF9pIn+g==
dependencies:
"@ampproject/remapping" "^2.1.0"
"@babel/code-frame" "^7.18.6"
"@babel/generator" "^7.18.9"
"@babel/helper-compilation-targets" "^7.18.9"
"@babel/helper-module-transforms" "^7.18.9"
"@babel/helpers" "^7.18.9"
"@babel/parser" "^7.18.9"
"@babel/template" "^7.18.6"
"@babel/traverse" "^7.18.9"
"@babel/types" "^7.18.9"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.2"
json5 "^2.2.1"
semver "^6.3.0"
"@babel/core@^7.17.2":
version "7.18.13"
resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.18.13.tgz#9be8c44512751b05094a4d3ab05fc53a47ce00ac"
integrity sha512-ZisbOvRRusFktksHSG6pjj1CSvkPkcZq/KHD45LAkVP/oiHJkNBZWfpvlLmX8OtHDG8IuzsFlVRWo08w7Qxn0A==
dependencies:
"@ampproject/remapping" "^2.1.0"
"@babel/code-frame" "^7.18.6"
"@babel/generator" "^7.18.13"
"@babel/helper-compilation-targets" "^7.18.9"
"@babel/helper-module-transforms" "^7.18.9"
"@babel/helpers" "^7.18.9"
"@babel/parser" "^7.18.13"
"@babel/template" "^7.18.10"
"@babel/traverse" "^7.18.13"
"@babel/types" "^7.18.13"
convert-source-map "^1.7.0"
debug "^4.1.0"
gensync "^1.0.0-beta.2"
json5 "^2.2.1"
semver "^6.3.0"
"@babel/generator@^7.18.13", "@babel/generator@^7.18.9":
version "7.18.13"
resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.18.13.tgz#59550cbb9ae79b8def15587bdfbaa388c4abf212"
integrity sha512-CkPg8ySSPuHTYPJYo7IRALdqyjM9HCbt/3uOBEFbzyGVP6Mn8bwFPB0jX6982JVNBlYzM1nnPkfjuXSOPtQeEQ==
dependencies:
"@babel/types" "^7.18.13"
"@jridgewell/gen-mapping" "^0.3.2"
jsesc "^2.5.1"
"@babel/helper-compilation-targets@^7.18.9":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.18.9.tgz#69e64f57b524cde3e5ff6cc5a9f4a387ee5563bf"
integrity sha512-tzLCyVmqUiFlcFoAPLA/gL9TeYrF61VLNtb+hvkuVaB5SUjW7jcfrglBIX1vUIoT7CLP3bBlIMeyEsIl2eFQNg==
dependencies:
"@babel/compat-data" "^7.18.8"
"@babel/helper-validator-option" "^7.18.6"
browserslist "^4.20.2"
semver "^6.3.0"
"@babel/helper-environment-visitor@^7.18.9":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.18.9.tgz#0c0cee9b35d2ca190478756865bb3528422f51be"
integrity sha512-3r/aACDJ3fhQ/EVgFy0hpj8oHyHpQc+LPtJoY9SzTThAsStm4Ptegq92vqKoE3vD706ZVFWITnMnxucw+S9Ipg==
"@babel/helper-function-name@^7.18.9":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.18.9.tgz#940e6084a55dee867d33b4e487da2676365e86b0"
integrity sha512-fJgWlZt7nxGksJS9a0XdSaI4XvpExnNIgRP+rVefWh5U7BL8pPuir6SJUmFKRfjWQ51OtWSzwOxhaH/EBWWc0A==
dependencies:
"@babel/template" "^7.18.6"
"@babel/types" "^7.18.9"
"@babel/helper-hoist-variables@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.18.6.tgz#d4d2c8fb4baeaa5c68b99cc8245c56554f926678"
integrity sha512-UlJQPkFqFULIcyW5sbzgbkxn2FKRgwWiRexcuaR8RNJRy8+LLveqPjwZV/bwrLZCN0eUHD/x8D0heK1ozuoo6Q==
dependencies:
"@babel/types" "^7.18.6"
"@babel/helper-module-imports@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.18.6.tgz#1e3ebdbbd08aad1437b428c50204db13c5a3ca6e"
integrity sha512-0NFvs3VkuSYbFi1x2Vd6tKrywq+z/cLeYC/RJNFrIX/30Bf5aiGYbtvGXolEktzJH8o5E5KJ3tT+nkxuuZFVlA==
dependencies:
"@babel/types" "^7.18.6"
"@babel/helper-module-transforms@^7.18.9":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.18.9.tgz#5a1079c005135ed627442df31a42887e80fcb712"
integrity sha512-KYNqY0ICwfv19b31XzvmI/mfcylOzbLtowkw+mfvGPAQ3kfCnMLYbED3YecL5tPd8nAYFQFAd6JHp2LxZk/J1g==
dependencies:
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-module-imports" "^7.18.6"
"@babel/helper-simple-access" "^7.18.6"
"@babel/helper-split-export-declaration" "^7.18.6"
"@babel/helper-validator-identifier" "^7.18.6"
"@babel/template" "^7.18.6"
"@babel/traverse" "^7.18.9"
"@babel/types" "^7.18.9"
"@babel/helper-simple-access@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.18.6.tgz#d6d8f51f4ac2978068df934b569f08f29788c7ea"
integrity sha512-iNpIgTgyAvDQpDj76POqg+YEt8fPxx3yaNBg3S30dxNKm2SWfYhD0TGrK/Eu9wHpUW63VQU894TsTg+GLbUa1g==
dependencies:
"@babel/types" "^7.18.6"
"@babel/helper-split-export-declaration@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.18.6.tgz#7367949bc75b20c6d5a5d4a97bba2824ae8ef075"
integrity sha512-bde1etTx6ZyTmobl9LLMMQsaizFVZrquTEHOqKeQESMKo4PlObf+8+JA25ZsIpZhT/WEd39+vOdLXAFG/nELpA==
dependencies:
"@babel/types" "^7.18.6"
"@babel/helper-string-parser@^7.18.10":
version "7.18.10"
resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.18.10.tgz#181f22d28ebe1b3857fa575f5c290b1aaf659b56"
integrity sha512-XtIfWmeNY3i4t7t4D2t02q50HvqHybPqW2ki1kosnvWCwuCMeo81Jf0gwr85jy/neUdg5XDdeFE/80DXiO+njw==
"@babel/helper-validator-identifier@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.18.6.tgz#9c97e30d31b2b8c72a1d08984f2ca9b574d7a076"
integrity sha512-MmetCkz9ej86nJQV+sFCxoGGrUbU3q02kgLciwkrt9QqEB7cP39oKEY0PakknEO0Gu20SskMRi+AYZ3b1TpN9g==
"@babel/helper-validator-option@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.18.6.tgz#bf0d2b5a509b1f336099e4ff36e1a63aa5db4db8"
integrity sha512-XO7gESt5ouv/LRJdrVjkShckw6STTaB7l9BrpBaAHDeF5YZT+01PCwmR0SJHnkW6i8OwW/EVWRShfi4j2x+KQw==
"@babel/helpers@^7.18.9":
version "7.18.9"
resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.18.9.tgz#4bef3b893f253a1eced04516824ede94dcfe7ff9"
integrity sha512-Jf5a+rbrLoR4eNdUmnFu8cN5eNJT6qdTdOg5IHIzq87WwyRw9PwguLFOWYgktN/60IP4fgDUawJvs7PjQIzELQ==
dependencies:
"@babel/template" "^7.18.6"
"@babel/traverse" "^7.18.9"
"@babel/types" "^7.18.9"
"@babel/highlight@^7.18.6":
version "7.18.6"
resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.18.6.tgz#81158601e93e2563795adcbfbdf5d64be3f2ecdf"
integrity sha512-u7stbOuYjaPezCuLj29hNW1v64M2Md2qupEKP1fHc7WdOA3DgLh37suiSrZYY7haUB7iBeQZ9P1uiRF359do3g==
dependencies:
"@babel/helper-validator-identifier" "^7.18.6"
chalk "^2.0.0"
js-tokens "^4.0.0"
"@babel/parser@^7.18.10", "@babel/parser@^7.18.13", "@babel/parser@^7.18.9":
version "7.18.13"
resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.18.13.tgz#5b2dd21cae4a2c5145f1fbd8ca103f9313d3b7e4"
integrity sha512-dgXcIfMuQ0kgzLB2b9tRZs7TTFFaGM2AbtA4fJgUUYukzGH4jwsS7hzQHEGs67jdehpm22vkgKwvbU+aEflgwg==
"@babel/template@^7.18.10", "@babel/template@^7.18.6":
version "7.18.10"
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.18.10.tgz#6f9134835970d1dbf0835c0d100c9f38de0c5e71"
integrity sha512-TI+rCtooWHr3QJ27kJxfjutghu44DLnasDMwpDqCXVTal9RLp3RSYNh4NdBrRP2cQAoG9A8juOQl6P6oZG4JxA==
dependencies:
"@babel/code-frame" "^7.18.6"
"@babel/parser" "^7.18.10"
"@babel/types" "^7.18.10"
"@babel/traverse@^7.18.13", "@babel/traverse@^7.18.9":
version "7.18.13"
resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.18.13.tgz#5ab59ef51a997b3f10c4587d648b9696b6cb1a68"
integrity sha512-N6kt9X1jRMLPxxxPYWi7tgvJRH/rtoU+dbKAPDM44RFHiMH8igdsaSBgFeskhSl/kLWLDUvIh1RXCrTmg0/zvA==
dependencies:
"@babel/code-frame" "^7.18.6"
"@babel/generator" "^7.18.13"
"@babel/helper-environment-visitor" "^7.18.9"
"@babel/helper-function-name" "^7.18.9"
"@babel/helper-hoist-variables" "^7.18.6"
"@babel/helper-split-export-declaration" "^7.18.6"
"@babel/parser" "^7.18.13"
"@babel/types" "^7.18.13"
debug "^4.1.0"
globals "^11.1.0"
"@babel/types@^7.18.10", "@babel/types@^7.18.13", "@babel/types@^7.18.6", "@babel/types@^7.18.9":
version "7.18.13"
resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.18.13.tgz#30aeb9e514f4100f7c1cb6e5ba472b30e48f519a"
integrity sha512-ePqfTihzW0W6XAU+aMw2ykilisStJfDnsejDCXRchCcMJ4O0+8DhPXf2YUbZ6wjBlsEmZwLK/sPweWtu8hcJYQ==
dependencies:
"@babel/helper-string-parser" "^7.18.10"
"@babel/helper-validator-identifier" "^7.18.6"
to-fast-properties "^2.0.0"
"@jridgewell/gen-mapping@^0.1.0":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.1.1.tgz#e5d2e450306a9491e3bd77e323e38d7aff315996"
integrity sha512-sQXCasFk+U8lWYEe66WxRDOE9PjVz4vSM51fTu3Hw+ClTpUSQb718772vH3pyS5pShp6lvQM7SxgIDXXXmOX7w==
dependencies:
"@jridgewell/set-array" "^1.0.0"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/gen-mapping@^0.3.2":
version "0.3.2"
resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.2.tgz#c1aedc61e853f2bb9f5dfe6d4442d3b565b253b9"
integrity sha512-mh65xKQAzI6iBcFzwv28KVWSmCkdRBWoOh+bYQGW3+6OZvbbN3TqMGo5hqYxQniRcH9F2VZIoJCm4pa3BPDK/A==
dependencies:
"@jridgewell/set-array" "^1.0.1"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@jridgewell/trace-mapping" "^0.3.9"
"@jridgewell/resolve-uri@^3.0.3":
version "3.1.0"
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78"
integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w==
"@jridgewell/set-array@^1.0.0", "@jridgewell/set-array@^1.0.1":
version "1.1.2"
resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72"
integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==
"@jridgewell/sourcemap-codec@^1.4.10":
version "1.4.14"
resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24"
integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw==
"@jridgewell/trace-mapping@^0.3.9":
version "0.3.15"
resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.15.tgz#aba35c48a38d3fd84b37e66c9c0423f9744f9774"
integrity sha512-oWZNOULl+UbhsgB51uuZzglikfIKSUBO/M9W2OfEjn7cmqoAiCgmv9lyACTUacZwBz0ITnJ2NqjU8Tx0DHL88g==
dependencies:
"@jridgewell/resolve-uri" "^3.0.3"
"@jridgewell/sourcemap-codec" "^1.4.10"
"@types/jasmine@file:../../node_modules/@types/jasmine":
version "4.0.3"
ansi-regex@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/ansi-regex/-/ansi-regex-5.0.1.tgz#082cb2c89c9fe8659a311a53bd6a4dc5301db304"
integrity sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==
ansi-styles@^3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-3.2.1.tgz#41fbb20243e50b12be0f04b8dedbf07520ce841d"
integrity sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==
dependencies:
color-convert "^1.9.0"
ansi-styles@^4.0.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/ansi-styles/-/ansi-styles-4.3.0.tgz#edd803628ae71c04c85ae7a0906edad34b648937"
integrity sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==
dependencies:
color-convert "^2.0.1"
anymatch@~3.1.2:
version "3.1.2"
resolved "https://registry.yarnpkg.com/anymatch/-/anymatch-3.1.2.tgz#c0557c096af32f106198f4f4e2a383537e378716"
integrity sha512-P43ePfOAIupkguHUycrc4qJ9kz8ZiuOUijaETwX7THt0Y/GNK7v0aa8rY816xWjZ7rJdA5XdMcpVFTKMq+RvWg==
dependencies:
normalize-path "^3.0.0"
picomatch "^2.0.4"
balanced-match@^1.0.0:
version "1.0.2"
resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee"
integrity sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==
binary-extensions@^2.0.0:
version "2.2.0"
resolved "https://registry.yarnpkg.com/binary-extensions/-/binary-extensions-2.2.0.tgz#75f502eeaf9ffde42fc98829645be4ea76bd9e2d"
integrity sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==
brace-expansion@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/brace-expansion/-/brace-expansion-2.0.1.tgz#1edc459e0f0c548486ecf9fc99f2221364b9a0ae"
integrity sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==
dependencies:
balanced-match "^1.0.0"
braces@~3.0.2:
version "3.0.2"
resolved "https://registry.yarnpkg.com/braces/-/braces-3.0.2.tgz#3454e1a462ee8d599e236df336cd9ea4f8afe107"
integrity sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==
dependencies:
fill-range "^7.0.1"
browserslist@^4.20.2:
version "4.21.3"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.3.tgz#5df277694eb3c48bc5c4b05af3e8b7e09c5a6d1a"
integrity sha512-898rgRXLAyRkM1GryrrBHGkqA5hlpkV5MhtZwg9QXeiyLUYs2k00Un05aX5l2/yJIOObYKOpS2JNo8nJDE7fWQ==
dependencies:
caniuse-lite "^1.0.30001370"
electron-to-chromium "^1.4.202"
node-releases "^2.0.6"
update-browserslist-db "^1.0.5"
caniuse-lite@^1.0.30001370:
version "1.0.30001383"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001383.tgz#aecf317ccd940690725ae3ae4f28293c5fb8050e"
integrity sha512-swMpEoTp5vDoGBZsYZX7L7nXHe6dsHxi9o6/LKf/f0LukVtnrxly5GVb/fWdCDTqi/yw6Km6tiJ0pmBacm0gbg==
chalk@^2.0.0:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==
dependencies:
ansi-styles "^3.2.1"
escape-string-regexp "^1.0.5"
supports-color "^5.3.0"
chokidar@^3.0.0:
version "3.5.3"
resolved "https://registry.yarnpkg.com/chokidar/-/chokidar-3.5.3.tgz#1cf37c8707b932bd1af1ae22c0432e2acd1903bd"
integrity sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==
dependencies:
anymatch "~3.1.2"
braces "~3.0.2"
glob-parent "~5.1.2"
is-binary-path "~2.1.0"
is-glob "~4.0.1"
normalize-path "~3.0.0"
readdirp "~3.6.0"
optionalDependencies:
fsevents "~2.3.2"
cliui@^7.0.2:
version "7.0.4"
resolved "https://registry.yarnpkg.com/cliui/-/cliui-7.0.4.tgz#a0265ee655476fc807aea9df3df8df7783808b4f"
integrity sha512-OcRE68cOsVMXp1Yvonl/fzkQOyjLSu/8bhPDfQt0e0/Eb283TKP20Fs2MqoPsr9SwA595rRCA+QMzYc9nBP+JQ==
dependencies:
string-width "^4.2.0"
strip-ansi "^6.0.0"
wrap-ansi "^7.0.0"
color-convert@^1.9.0:
version "1.9.3"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-1.9.3.tgz#bb71850690e1f136567de629d2d5471deda4c1e8"
integrity sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==
dependencies:
color-name "1.1.3"
color-convert@^2.0.1:
version "2.0.1"
resolved "https://registry.yarnpkg.com/color-convert/-/color-convert-2.0.1.tgz#72d3a68d598c9bdb3af2ad1e84f21d896abd4de3"
integrity sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==
dependencies:
color-name "~1.1.4"
color-name@1.1.3:
version "1.1.3"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.3.tgz#a7d0558bd89c42f795dd42328f740831ca53bc25"
integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==
color-name@~1.1.4:
version "1.1.4"
resolved "https://registry.yarnpkg.com/color-name/-/color-name-1.1.4.tgz#c2a09a87acbde69543de6f63fa3995c826c536a2"
integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==
convert-source-map@^1.5.1, convert-source-map@^1.7.0:
version "1.8.0"
resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.8.0.tgz#f3373c32d21b4d780dd8004514684fb791ca4369"
integrity sha512-+OQdjP49zViI/6i7nIJpA8rAl4sV/JdPfU9nZs3VqOwGIgizICvuN2ru6fMd+4llL0tar18UYJXfZ/TWtmhUjA==
dependencies:
safe-buffer "~5.1.1"
debug@^4.1.0:
version "4.3.4"
resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865"
integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==
dependencies:
ms "2.1.2"
dependency-graph@^0.11.0:
version "0.11.0"
resolved "https://registry.yarnpkg.com/dependency-graph/-/dependency-graph-0.11.0.tgz#ac0ce7ed68a54da22165a85e97a01d53f5eb2e27"
integrity sha512-JeMq7fEshyepOWDfcfHK06N3MhyPhz++vtqWhMT5O9A3K42rdsEDpfdVqjaqaAhsw6a+ZqeDvQVtD0hFHQWrzg==
domino@^2.1.2:
version "2.1.6"
resolved "https://registry.yarnpkg.com/domino/-/domino-2.1.6.tgz#fe4ace4310526e5e7b9d12c7de01b7f485a57ffe"
integrity sha512-3VdM/SXBZX2omc9JF9nOPCtDaYQ67BGp5CoLpIQlO2KCAPETs8TcDHacF26jXadGbvUteZzRTeos2fhID5+ucQ==
electron-to-chromium@^1.4.202:
version "1.4.230"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.230.tgz#666909fdf5765acb1348b69752ee9955dc1664b7"
integrity sha512-3pwjAK0qHSDN9+YAF4fJknsSruP7mpjdWzUSruIJD/JCH77pEh0SorEyb3xVaKkfwk2tzjOt2D8scJ0KAdfXLA==
emoji-regex@^8.0.0:
version "8.0.0"
resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37"
integrity sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==
escalade@^3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40"
integrity sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==
escape-string-regexp@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4"
integrity sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==
fill-range@^7.0.1:
version "7.0.1"
resolved "https://registry.yarnpkg.com/fill-range/-/fill-range-7.0.1.tgz#1919a6a7c75fe38b2c7c77e5198535da9acdda40"
integrity sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==
dependencies:
to-regex-range "^5.0.1"
fs.realpath@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/fs.realpath/-/fs.realpath-1.0.0.tgz#1504ad2523158caa40db4a2787cb01411994ea4f"
integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==
fsevents@~2.3.2:
version "2.3.2"
resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.2.tgz#8a526f78b8fdf4623b709e0b975c52c24c02fd1a"
integrity sha512-xiqMQR4xAeHTuB9uWm+fFRcIOgKBMiOBP+eXiyT7jsgVCq1bkVygt00oASowB7EdtpOHaaPgKt812P9ab+DDKA==
gensync@^1.0.0-beta.2:
version "1.0.0-beta.2"
resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0"
integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==
get-caller-file@^2.0.5:
version "2.0.5"
resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e"
integrity sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==
glob-parent@~5.1.2:
version "5.1.2"
resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-5.1.2.tgz#869832c58034fe68a4093c17dc15e8340d8401c4"
integrity sha512-AOIgSQCepiJYwP3ARnGx+5VnTu2HBYdzbGP45eLw1vr3zB3vZLeyed1sC9hnbcOc9/SrMyM5RPQrkGz4aS9Zow==
dependencies:
is-glob "^4.0.1"
glob@8.0.3:
version "8.0.3"
resolved "https://registry.yarnpkg.com/glob/-/glob-8.0.3.tgz#415c6eb2deed9e502c68fa44a272e6da6eeca42e"
integrity sha512-ull455NHSHI/Y1FqGaaYFaLGkNMMJbavMrEGFXG/PGrg6y7sutWHUHrz6gy6WEBH6akM1M414dWKCNs+IhKdiQ==
dependencies:
fs.realpath "^1.0.0"
inflight "^1.0.4"
inherits "2"
minimatch "^5.0.1"
once "^1.3.0"
globals@^11.1.0:
version "11.12.0"
resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e"
integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA==
has-flag@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd"
integrity sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==
inflight@^1.0.4:
version "1.0.6"
resolved "https://registry.yarnpkg.com/inflight/-/inflight-1.0.6.tgz#49bd6331d7d02d0c09bc910a1075ba8165b56df9"
integrity sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==
dependencies:
once "^1.3.0"
wrappy "1"
inherits@2:
version "2.0.4"
resolved "https://registry.yarnpkg.com/inherits/-/inherits-2.0.4.tgz#0fa2c64f932917c3433a0ded55363aae37416b7c"
integrity sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==
is-binary-path@~2.1.0:
version "2.1.0"
resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09"
integrity sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==
dependencies:
binary-extensions "^2.0.0"
is-extglob@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/is-extglob/-/is-extglob-2.1.1.tgz#a88c02535791f02ed37c76a1b9ea9773c833f8c2"
integrity sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==
is-fullwidth-code-point@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz#f116f8064fe90b3f7844a38997c0b75051269f1d"
integrity sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==
is-glob@^4.0.1, is-glob@~4.0.1:
version "4.0.3"
resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084"
integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==
dependencies:
is-extglob "^2.1.1"
is-number@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b"
integrity sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==
js-tokens@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499"
integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==
jsesc@^2.5.1:
version "2.5.2"
resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4"
integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA==
json5@^2.2.1:
version "2.2.1"
resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.1.tgz#655d50ed1e6f95ad1a3caababd2b0efda10b395c"
integrity sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==
lru-cache@^6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94"
integrity sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==
dependencies:
yallist "^4.0.0"
magic-string@^0.26.0:
version "0.26.2"
resolved "https://registry.yarnpkg.com/magic-string/-/magic-string-0.26.2.tgz#5331700e4158cd6befda738bb6b0c7b93c0d4432"
integrity sha512-NzzlXpclt5zAbmo6h6jNc8zl2gNRGHvmsZW4IvZhTC4W7k4OlLP+S5YLussa/r3ixNT66KOQfNORlXHSOy/X4A==
dependencies:
sourcemap-codec "^1.4.8"
minimatch@^5.0.1:
version "5.1.0"
resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-5.1.0.tgz#1717b464f4971b144f6aabe8f2d0b8e4511e09c7"
integrity sha512-9TPBGGak4nHfGZsPBohm9AWg6NoT7QTCehS3BIJABslyZbzxfV78QM2Y6+i741OPZIafFAaiiEMh5OyIrJPgtg==
dependencies:
brace-expansion "^2.0.1"
ms@2.1.2:
version "2.1.2"
resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009"
integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==
node-releases@^2.0.6:
version "2.0.6"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.6.tgz#8a7088c63a55e493845683ebf3c828d8c51c5503"
integrity sha512-PiVXnNuFm5+iYkLBNeq5211hvO38y63T0i2KKh2KnUs3RpzJ+JtODFjkD8yjLwnDkTYF1eKXheUwdssR+NRZdg==
normalize-path@^3.0.0, normalize-path@~3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/normalize-path/-/normalize-path-3.0.0.tgz#0dcd69ff23a1c9b11fd0978316644a0388216a65"
integrity sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==
once@^1.3.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1"
integrity sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==
dependencies:
wrappy "1"
picocolors@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c"
integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==
picomatch@^2.0.4, picomatch@^2.2.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.1.tgz#3ba3833733646d9d3e4995946c1365a67fb07a42"
integrity sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==
readdirp@~3.6.0:
version "3.6.0"
resolved "https://registry.yarnpkg.com/readdirp/-/readdirp-3.6.0.tgz#74a370bd857116e245b29cc97340cd431a02a6c7"
integrity sha512-hOS089on8RduqdbhvQ5Z37A0ESjsqz6qnRcffsMU3495FuTdqSm+7bhJ29JvIOsBDEEnan5DPu9t3To9VRlMzA==
dependencies:
picomatch "^2.2.1"
reflect-metadata@^0.1.2:
version "0.1.13"
resolved "https://registry.yarnpkg.com/reflect-metadata/-/reflect-metadata-0.1.13.tgz#67ae3ca57c972a2aa1642b10fe363fe32d49dc08"
integrity sha512-Ts1Y/anZELhSsjMcU605fU9RE4Oi3p5ORujwbIKXfWa+0Zxs510Qrmrce5/Jowq3cHSZSJqBjypxmHarc+vEWg==
require-directory@^2.1.1:
version "2.1.1"
resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42"
integrity sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==
"rxjs@file:../../node_modules/rxjs":
version "6.6.7"
dependencies:
tslib "^1.9.0"
safe-buffer@~5.1.1:
version "5.1.2"
resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.1.2.tgz#991ec69d296e0313747d59bdfd2b745c35f8828d"
integrity sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==
semver@^6.3.0:
version "6.3.0"
resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.0.tgz#ee0a64c8af5e8ceea67687b133761e1becbd1d3d"
integrity sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==
semver@^7.0.0:
version "7.3.7"
resolved "https://registry.yarnpkg.com/semver/-/semver-7.3.7.tgz#12c5b649afdbf9049707796e22a4028814ce523f"
integrity sha512-QlYTucUYOews+WeEujDoEGziz4K6c47V/Bd+LjSSYcA94p+DmINdf7ncaUinThfvZyu13lN9OY1XDxt8C0Tw0g==
dependencies:
lru-cache "^6.0.0"
sourcemap-codec@^1.4.8:
version "1.4.8"
resolved "https://registry.yarnpkg.com/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz#ea804bd94857402e6992d05a38ef1ae35a9ab4c4"
integrity sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==
string-width@^4.1.0, string-width@^4.2.0, string-width@^4.2.3:
version "4.2.3"
resolved "https://registry.yarnpkg.com/string-width/-/string-width-4.2.3.tgz#269c7117d27b05ad2e536830a8ec895ef9c6d010"
integrity sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==
dependencies:
emoji-regex "^8.0.0"
is-fullwidth-code-point "^3.0.0"
strip-ansi "^6.0.1"
strip-ansi@^6.0.0, strip-ansi@^6.0.1:
version "6.0.1"
resolved "https://registry.yarnpkg.com/strip-ansi/-/strip-ansi-6.0.1.tgz#9e26c63d30f53443e9489495b2105d37b67a85d9"
integrity sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==
dependencies:
ansi-regex "^5.0.1"
supports-color@^5.3.0:
version "5.5.0"
resolved "https://registry.yarnpkg.com/supports-color/-/supports-color-5.5.0.tgz#e2e69a44ac8772f78a1ec0b35b689df6530efc8f"
integrity sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==
dependencies:
has-flag "^3.0.0"
to-fast-properties@^2.0.0:
version "2.0.0"
resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e"
integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog==
to-regex-range@^5.0.1:
version "5.0.1"
resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4"
integrity sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==
dependencies:
is-number "^7.0.0"
tslib@^1.9.0:
version "1.14.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00"
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@^2.3.0:
version "2.4.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
typescript@~4.8.2:
version "4.8.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.8.2.tgz#e3b33d5ccfb5914e4eeab6699cf208adee3fd790"
integrity sha512-C0I1UsrrDHo2fYI5oaCGbSejwX4ch+9Y5jTQELvovfmFkK3HHSZJB8MSJcWLmCUBzQBchCrZ9rMRV6GuNrvGtw==
update-browserslist-db@^1.0.5:
version "1.0.5"
resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.5.tgz#be06a5eedd62f107b7c19eb5bcefb194411abf38"
integrity sha512-dteFFpCyvuDdr9S/ff1ISkKt/9YZxKjI9WlRR99c180GaztJtRa/fn18FdxGVKVsnPY7/a/FDN68mcvUmP4U7Q==
dependencies:
escalade "^3.1.1"
picocolors "^1.0.0"
wrap-ansi@^7.0.0:
version "7.0.0"
resolved "https://registry.yarnpkg.com/wrap-ansi/-/wrap-ansi-7.0.0.tgz#67e145cff510a6a6984bdf1152911d69d2eb9e43"
integrity sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==
dependencies:
ansi-styles "^4.0.0"
string-width "^4.1.0"
strip-ansi "^6.0.0"
wrappy@1:
version "1.0.2"
resolved "https://registry.yarnpkg.com/wrappy/-/wrappy-1.0.2.tgz#b5243d8f3ec1aa35f1364605bc0d1036e30ab69f"
integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==
xhr2@^0.2.0:
version "0.2.1"
resolved "https://registry.yarnpkg.com/xhr2/-/xhr2-0.2.1.tgz#4e73adc4f9cfec9cbd2157f73efdce3a5f108a93"
integrity sha512-sID0rrVCqkVNUn8t6xuv9+6FViXjUVXq8H5rWOH2rz9fDNQEd4g0EA2XlcEdJXRz5BMEn4O1pJFdT+z4YHhoWw==
y18n@^5.0.5:
version "5.0.8"
resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55"
integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==
yallist@^4.0.0:
version "4.0.0"
resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72"
integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==
yargs-parser@^21.0.0:
version "21.1.1"
resolved "https://registry.yarnpkg.com/yargs-parser/-/yargs-parser-21.1.1.tgz#9096bceebf990d21bb31fa9516e0ede294a77d35"
integrity sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==
yargs@^17.2.1:
version "17.5.1"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.5.1.tgz#e109900cab6fcb7fd44b1d8249166feb0b36e58e"
integrity sha512-t6YAJcxDkNX7NFYiVtKvWUz8l+PaKTLiL63mJYWR2GnHq2gjEWISzsLp9wg3aY36dY1j+gfIEL3pIF+XlJJfbA==
dependencies:
cliui "^7.0.2"
escalade "^3.1.1"
get-caller-file "^2.0.5"
require-directory "^2.1.1"
string-width "^4.2.3"
y18n "^5.0.5"
yargs-parser "^21.0.0"
"zone.js@file:../../dist/zone.js-dist/archive/zone.js.tgz":
version "0.11.7"
resolved "file:../../dist/zone.js-dist/archive/zone.js.tgz#60e9a1429019819065ae677295f73279a854a84f"
dependencies:
tslib "^2.3.0"
+9 -9
View File
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
"version": "14.2.0-next.1",
"version": "14.2.1",
"private": true,
"description": "Angular - a web framework for modern web apps",
"homepage": "https://github.com/angular/angular",
@@ -45,17 +45,17 @@
},
"// 1": "dependencies are used locally and by bazel",
"dependencies": {
"@angular-devkit/build-angular": "14.1.0-rc.3",
"@angular-devkit/build-angular": "^14.2.0",
"@angular-devkit/build-optimizer": "0.1302.0-rc.1",
"@angular-devkit/core": "14.1.0-rc.3",
"@angular-devkit/schematics": "14.1.0-rc.3",
"@angular-devkit/core": "^14.2.0",
"@angular-devkit/schematics": "^14.2.0",
"@angular/animations-12": "npm:@angular/animations@12.2.13",
"@angular/cdk": "14.1.0-rc.0",
"@angular/cli": "14.1.0-rc.3",
"@angular/cdk": "^14.2.0",
"@angular/cli": "^14.2.0",
"@angular/common-12": "npm:@angular/common@12.2.13",
"@angular/core-12": "npm:@angular/core@12.2.13",
"@angular/forms-12": "npm:@angular/forms@12.2.13",
"@angular/material": "14.1.0-rc.0",
"@angular/material": "^14.2.0",
"@angular/platform-browser-12": "npm:@angular/platform-browser@12.2.13",
"@angular/platform-browser-dynamic-12": "npm:@angular/platform-browser-dynamic@12.2.13",
"@angular/platform-server-12": "npm:@angular/platform-server@12.2.13",
@@ -80,7 +80,7 @@
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-commonjs": "^22.0.0",
"@rollup/plugin-node-resolve": "^13.0.4",
"@schematics/angular": "14.1.0-rc.3",
"@schematics/angular": "^14.2.0",
"@types/angular": "^1.6.47",
"@types/babel__core": "7.1.19",
"@types/babel__generator": "7.6.4",
@@ -172,7 +172,7 @@
"tsickle": "0.46.3",
"tslib": "^2.3.0",
"tslint": "6.1.3",
"typescript": "4.8.1-rc",
"typescript": "~4.8.2",
"webtreemap": "^2.0.1",
"xhr2": "0.2.1",
"yargs": "^17.2.1"
+1 -1
View File
@@ -6,5 +6,5 @@
* found in the LICENSE file at https://angular.io/license
*/
export function scheduleMicroTask(cb: () => any) {
Promise.resolve(null).then(cb);
Promise.resolve().then(cb);
}
+1 -1
View File
@@ -14,7 +14,7 @@ import {scheduleMicroTask} from '../src/util';
scheduleMicroTask(() => count++);
expect(count).toEqual(0);
Promise.resolve(null).then(() => {
Promise.resolve().then(() => {
expect(count).toEqual(1);
done();
});
+71 -68
View File
@@ -247,8 +247,8 @@ export class HttpClient {
}): Observable<HttpEvent<string>>;
/**
* Constructs a request which interprets the body as a JSON object and returns the full event
* stream.
* Constructs a request which interprets the body as a JavaScript object and returns the full
* event stream.
*
* @param method The HTTP method.
* @param url The endpoint URL.
@@ -269,8 +269,8 @@ export class HttpClient {
}): Observable<HttpEvent<any>>;
/**
* Constructs a request which interprets the body as a JSON object and returns the full event
* stream.
* Constructs a request which interprets the body as a JavaScript object and returns the full
* event stream.
*
* @param method The HTTP method.
* @param url The endpoint URL.
@@ -350,7 +350,7 @@ export class HttpClient {
}): Observable<HttpResponse<string>>;
/**
* Constructs a request which interprets the body as a JSON object and returns the full
* Constructs a request which interprets the body as a JavaScript object and returns the full
* `HttpResponse`.
*
* @param method The HTTP method.
@@ -372,7 +372,7 @@ export class HttpClient {
}): Observable<HttpResponse<Object>>;
/**
* Constructs a request which interprets the body as a JSON object and returns
* Constructs a request which interprets the body as a JavaScript object and returns
* the full `HttpResponse` with the response body in the requested type.
*
* @param method The HTTP method.
@@ -393,8 +393,8 @@ export class HttpClient {
}): Observable<HttpResponse<R>>;
/**
* Constructs a request which interprets the body as a JSON object and returns the full
* `HttpResponse` as a JSON object.
* Constructs a request which interprets the body as a JavaScript object and returns the full
* `HttpResponse` as a JavaScript object.
*
* @param method The HTTP method.
* @param url The endpoint URL.
@@ -415,7 +415,7 @@ export class HttpClient {
}): Observable<Object>;
/**
* Constructs a request which interprets the body as a JSON object
* Constructs a request which interprets the body as a JavaScript object
* with the response body of the requested type.
*
* @param method The HTTP method.
@@ -724,7 +724,7 @@ export class HttpClient {
}): Observable<HttpEvent<string>>;
/**
* Constructs a `DELETE` request that interprets the body as a JSON object
* Constructs a `DELETE` request that interprets the body as JSON
* and returns the full event stream.
*
* @param url The endpoint URL.
@@ -745,7 +745,7 @@ export class HttpClient {
}): Observable<HttpEvent<Object>>;
/**
* Constructs a `DELETE`request that interprets the body as a JSON object
* Constructs a `DELETE`request that interprets the body as JSON
* and returns the full event stream.
*
* @param url The endpoint URL.
@@ -823,7 +823,7 @@ export class HttpClient {
}): Observable<HttpResponse<string>>;
/**
* Constructs a `DELETE` request the interprets the body as a JSON object and returns
* Constructs a `DELETE` request the interprets the body as a JavaScript object and returns
* the full `HttpResponse`.
*
* @param url The endpoint URL.
@@ -844,7 +844,7 @@ export class HttpClient {
}): Observable<HttpResponse<Object>>;
/**
* Constructs a `DELETE` request that interprets the body as a JSON object
* Constructs a `DELETE` request that interprets the body as JSON
* and returns the full `HttpResponse`.
*
* @param url The endpoint URL.
@@ -864,8 +864,8 @@ export class HttpClient {
}): Observable<HttpResponse<T>>;
/**
* Constructs a `DELETE` request that interprets the body as a JSON object and
* returns the response body as a JSON object.
* Constructs a `DELETE` request that interprets the body as JSON and
* returns the response body as an object parsed from JSON.
*
* @param url The endpoint URL.
* @param options The HTTP options to send with the request.
@@ -885,7 +885,7 @@ export class HttpClient {
}): Observable<Object>;
/**
* Constructs a DELETE request that interprets the body as a JSON object and returns
* Constructs a DELETE request that interprets the body as JSON and returns
* the response in a given type.
*
* @param url The endpoint URL.
@@ -1042,7 +1042,7 @@ export class HttpClient {
}): Observable<HttpEvent<string>>;
/**
* Constructs a `GET` request that interprets the body as a JSON object
* Constructs a `GET` request that interprets the body as JSON
* and returns the full event stream.
*
* @param url The endpoint URL.
@@ -1061,8 +1061,8 @@ export class HttpClient {
}): Observable<HttpEvent<Object>>;
/**
* Constructs a `GET` request that interprets the body as a JSON object and returns the full event
* stream.
* Constructs a `GET` request that interprets the body as JSON and returns the full
* event stream.
*
* @param url The endpoint URL.
* @param options The HTTP options to send with the request.
@@ -1137,7 +1137,7 @@ export class HttpClient {
}): Observable<HttpResponse<string>>;
/**
* Constructs a `GET` request that interprets the body as a JSON object and
* Constructs a `GET` request that interprets the body as JSON and
* returns the full `HttpResponse`.
*
* @param url The endpoint URL.
@@ -1157,7 +1157,7 @@ export class HttpClient {
}): Observable<HttpResponse<Object>>;
/**
* Constructs a `GET` request that interprets the body as a JSON object and
* Constructs a `GET` request that interprets the body as JSON and
* returns the full `HttpResponse`.
*
* @param url The endpoint URL.
@@ -1177,14 +1177,14 @@ export class HttpClient {
}): Observable<HttpResponse<T>>;
/**
* Constructs a `GET` request that interprets the body as a JSON object and
* returns the response body as a JSON object.
* Constructs a `GET` request that interprets the body as JSON and
* returns the response body as an object parsed from JSON.
*
* @param url The endpoint URL.
* @param options The HTTP options to send with the request.
*
*
* @return An `Observable` of the response body as a JSON object.
* @return An `Observable` of the response body as a JavaScript object.
*/
get(url: string, options?: {
headers?: HttpHeaders|{[header: string]: string | string[]},
@@ -1198,7 +1198,7 @@ export class HttpClient {
}): Observable<Object>;
/**
* Constructs a `GET` request that interprets the body as a JSON object and returns
* Constructs a `GET` request that interprets the body as JSON and returns
* the response body in a given type.
*
* @param url The endpoint URL.
@@ -1352,7 +1352,7 @@ export class HttpClient {
}): Observable<HttpEvent<string>>;
/**
* Constructs a `HEAD` request that interprets the body as a JSON object
* Constructs a `HEAD` request that interprets the body as JSON
* and returns the full HTTP event stream.
*
* @param url The endpoint URL.
@@ -1372,7 +1372,7 @@ export class HttpClient {
}): Observable<HttpEvent<Object>>;
/**
* Constructs a `HEAD` request that interprets the body as a JSON object and
* Constructs a `HEAD` request that interprets the body as JSON and
* returns the full event stream.
*
* @return An `Observable` of all the `HttpEvent`s for the request,
@@ -1449,7 +1449,7 @@ export class HttpClient {
}): Observable<HttpResponse<string>>;
/**
* Constructs a `HEAD` request that interprets the body as a JSON object and
* Constructs a `HEAD` request that interprets the body as JSON and
* returns the full `HttpResponse`.
*
* @param url The endpoint URL.
@@ -1469,7 +1469,7 @@ export class HttpClient {
}): Observable<HttpResponse<Object>>;
/**
* Constructs a `HEAD` request that interprets the body as a JSON object
* Constructs a `HEAD` request that interprets the body as JSON
* and returns the full `HttpResponse`.
*
* @param url The endpoint URL.
@@ -1489,13 +1489,14 @@ export class HttpClient {
}): Observable<HttpResponse<T>>;
/**
* Constructs a `HEAD` request that interprets the body as a JSON object and
* returns the response body as a JSON object.
* Constructs a `HEAD` request that interprets the body as JSON and
* returns the response body as an object parsed from JSON.
*
* @param url The endpoint URL.
* @param options The HTTP options to send with the request.
*
* @return An `Observable` of the response, with the response body as a JSON object.
* @return An `Observable` of the response, with the response body as an object parsed from JSON.
*/
head(url: string, options?: {
headers?: HttpHeaders|{[header: string]: string | string[]},
@@ -1509,7 +1510,7 @@ export class HttpClient {
}): Observable<Object>;
/**
* Constructs a `HEAD` request that interprets the body as a JSON object and returns
* Constructs a `HEAD` request that interprets the body as JSON and returns
* the response in a given type.
*
* @param url The endpoint URL.
@@ -1714,7 +1715,7 @@ export class HttpClient {
}): Observable<HttpEvent<string>>;
/**
* Constructs an `OPTIONS` request that interprets the body as a JSON object
* Constructs an `OPTIONS` request that interprets the body as JSON
* and returns the full event stream.
*
* @param url The endpoint URL.
@@ -1734,7 +1735,7 @@ export class HttpClient {
}): Observable<HttpEvent<Object>>;
/**
* Constructs an `OPTIONS` request that interprets the body as a JSON object and
* Constructs an `OPTIONS` request that interprets the body as JSON and
* returns the full event stream.
*
* @param url The endpoint URL.
@@ -1811,7 +1812,7 @@ export class HttpClient {
}): Observable<HttpResponse<string>>;
/**
* Constructs an `OPTIONS` request that interprets the body as a JSON object
* Constructs an `OPTIONS` request that interprets the body as JSON
* and returns the full `HttpResponse`.
*
* @param url The endpoint URL.
@@ -1831,7 +1832,7 @@ export class HttpClient {
}): Observable<HttpResponse<Object>>;
/**
* Constructs an `OPTIONS` request that interprets the body as a JSON object and
* Constructs an `OPTIONS` request that interprets the body as JSON and
* returns the full `HttpResponse`.
*
* @param url The endpoint URL.
@@ -1851,13 +1852,14 @@ export class HttpClient {
}): Observable<HttpResponse<T>>;
/**
* Constructs an `OPTIONS` request that interprets the body as a JSON object and returns the
* response body as a JSON object.
* Constructs an `OPTIONS` request that interprets the body as JSON and returns the
* response body as an object parsed from JSON.
*
* @param url The endpoint URL.
* @param options HTTP options.
*
* @return An `Observable` of the response, with the response body as a JSON object.
* @return An `Observable` of the response, with the response body as an object parsed from JSON.
*/
options(url: string, options?: {
headers?: HttpHeaders|{[header: string]: string | string[]},
@@ -1871,7 +1873,7 @@ export class HttpClient {
}): Observable<Object>;
/**
* Constructs an `OPTIONS` request that interprets the body as a JSON object and returns the
* Constructs an `OPTIONS` request that interprets the body as JSON and returns the
* response in a given type.
*
* @param url The endpoint URL.
@@ -2032,7 +2034,7 @@ export class HttpClient {
}): Observable<HttpEvent<string>>;
/**
* Constructs a `PATCH` request that interprets the body as a JSON object
* Constructs a `PATCH` request that interprets the body as JSON
* and returns the full event stream.
*
* @param url The endpoint URL.
@@ -2053,7 +2055,7 @@ export class HttpClient {
}): Observable<HttpEvent<Object>>;
/**
* Constructs a `PATCH` request that interprets the body as a JSON object
* Constructs a `PATCH` request that interprets the body as JSON
* and returns the full event stream.
*
* @param url The endpoint URL.
@@ -2134,7 +2136,7 @@ export class HttpClient {
}): Observable<HttpResponse<string>>;
/**
* Constructs a `PATCH` request that interprets the body as a JSON object
* Constructs a `PATCH` request that interprets the body as JSON
* and returns the full `HttpResponse`.
*
* @param url The endpoint URL.
@@ -2155,7 +2157,7 @@ export class HttpClient {
}): Observable<HttpResponse<Object>>;
/**
* Constructs a `PATCH` request that interprets the body as a JSON object
* Constructs a `PATCH` request that interprets the body as JSON
* and returns the full `HttpResponse`.
*
* @param url The endpoint URL.
@@ -2176,14 +2178,15 @@ export class HttpClient {
}): Observable<HttpResponse<T>>;
/**
* Constructs a `PATCH` request that interprets the body as a JSON object and
* returns the response body as a JSON object.
* Constructs a `PATCH` request that interprets the body as JSON and
* returns the response body as an object parsed from JSON.
*
* @param url The endpoint URL.
* @param body The resources to edit.
* @param options HTTP options.
*
* @return An `Observable` of the response, with the response body as a JSON object.
* @return An `Observable` of the response, with the response body as an object parsed from JSON.
*/
patch(url: string, body: any|null, options?: {
headers?: HttpHeaders|{[header: string]: string | string[]},
@@ -2197,7 +2200,7 @@ export class HttpClient {
}): Observable<Object>;
/**
* Constructs a `PATCH` request that interprets the body as a JSON object
* Constructs a `PATCH` request that interprets the body as JSON
* and returns the response in a given type.
*
* @param url The endpoint URL.
@@ -2356,8 +2359,8 @@ export class HttpClient {
}): Observable<HttpEvent<string>>;
/**
* Constructs a POST request that interprets the body as a JSON object and returns the full event
* stream.
* Constructs a POST request that interprets the body as JSON and returns the full
* event stream.
*
* @param url The endpoint URL.
* @param body The content to replace with.
@@ -2377,8 +2380,8 @@ export class HttpClient {
}): Observable<HttpEvent<Object>>;
/**
* Constructs a POST request that interprets the body as a JSON object and returns the full event
* stream.
* Constructs a POST request that interprets the body as JSON and returns the full
* event stream.
*
* @param url The endpoint URL.
* @param body The content to replace with.
@@ -2458,7 +2461,7 @@ export class HttpClient {
}): Observable<HttpResponse<string>>;
/**
* Constructs a `POST` request that interprets the body as a JSON object
* Constructs a `POST` request that interprets the body as JSON
* and returns the full `HttpResponse`.
*
* @param url The endpoint URL.
@@ -2479,8 +2482,8 @@ export class HttpClient {
}): Observable<HttpResponse<Object>>;
/**
* Constructs a `POST` request that interprets the body as a JSON object and returns the full
* `HttpResponse`.
* Constructs a `POST` request that interprets the body as JSON and returns the
* full `HttpResponse`.
*
*
* @param url The endpoint URL.
@@ -2501,14 +2504,14 @@ export class HttpClient {
}): Observable<HttpResponse<T>>;
/**
* Constructs a `POST` request that interprets the body as a
* JSON object and returns the response body as a JSON object.
* Constructs a `POST` request that interprets the body as JSON
* and returns the response body as an object parsed from JSON.
*
* @param url The endpoint URL.
* @param body The content to replace with.
* @param options HTTP options
*
* @return An `Observable` of the response, with the response body as a JSON object.
* @return An `Observable` of the response, with the response body as an object parsed from JSON.
*/
post(url: string, body: any|null, options?: {
headers?: HttpHeaders|{[header: string]: string | string[]},
@@ -2522,7 +2525,7 @@ export class HttpClient {
}): Observable<Object>;
/**
* Constructs a `POST` request that interprets the body as a JSON object
* Constructs a `POST` request that interprets the body as JSON
* and returns an observable of the response.
*
* @param url The endpoint URL.
@@ -2683,8 +2686,8 @@ export class HttpClient {
}): Observable<HttpEvent<string>>;
/**
* Constructs a `PUT` request that interprets the body as a JSON object and returns the full event
* stream.
* Constructs a `PUT` request that interprets the body as JSON and returns the full
* event stream.
*
* @param url The endpoint URL.
* @param body The resources to add/update.
@@ -2704,7 +2707,7 @@ export class HttpClient {
}): Observable<HttpEvent<Object>>;
/**
* Constructs a `PUT` request that interprets the body as a JSON object and returns the
* Constructs a `PUT` request that interprets the body as JSON and returns the
* full event stream.
*
* @param url The endpoint URL.
@@ -2785,8 +2788,8 @@ export class HttpClient {
}): Observable<HttpResponse<string>>;
/**
* Constructs a `PUT` request that interprets the body as a JSON object and returns the full HTTP
* response.
* Constructs a `PUT` request that interprets the body as JSON and returns the full
* HTTP response.
*
* @param url The endpoint URL.
* @param body The resources to add/update.
@@ -2827,14 +2830,14 @@ export class HttpClient {
}): Observable<HttpResponse<T>>;
/**
* Constructs a `PUT` request that interprets the body as a JSON object
* and returns an observable of JSON object.
* Constructs a `PUT` request that interprets the body as JSON
* and returns an observable of JavaScript object.
*
* @param url The endpoint URL.
* @param body The resources to add/update.
* @param options HTTP options
*
* @return An `Observable` of the response as a JSON object.
* @return An `Observable` of the response as a JavaScript object.
*/
put(url: string, body: any|null, options?: {
headers?: HttpHeaders|{[header: string]: string | string[]},
@@ -75,7 +75,7 @@ export function createImageLoader(
buildUrlFn: (path: string, config: ImageLoaderConfig) => string, exampleUrls?: string[]) {
return function provideImageLoader(
path: string, options: {ensurePreconnect?: boolean} = {ensurePreconnect: true}) {
if (ngDevMode && !isValidPath(path)) {
if (!isValidPath(path)) {
throwInvalidPathError(path, exampleUrls || []);
}
@@ -84,7 +84,7 @@ export function createImageLoader(
path = normalizePath(path);
const loaderFn = (config: ImageLoaderConfig) => {
if (ngDevMode && isAbsoluteUrl(config.src)) {
if (isAbsoluteUrl(config.src)) {
// Image loader functions expect an image file name (e.g. `my-image.png`)
// or a relative path + a file name (e.g. `/a/b/c/my-image.png`) as an input,
// so the final absolute URL can be constructed.
@@ -106,19 +106,22 @@ export function createImageLoader(
}
function throwInvalidPathError(path: unknown, exampleUrls: string[]): never {
const exampleUrlsMsg = exampleUrls.join(' or ');
throw new RuntimeError(
RuntimeErrorCode.INVALID_LOADER_ARGUMENTS,
`Image loader has detected an invalid path (\`${path}\`). ` +
`To fix this, supply a path using one of the following formats: ${exampleUrlsMsg}`);
ngDevMode &&
`Image loader has detected an invalid path (\`${path}\`). ` +
`To fix this, supply a path using one of the following formats: ${
exampleUrls.join(' or ')}`);
}
function throwUnexpectedAbsoluteUrlError(path: string, url: string): never {
throw new RuntimeError(
RuntimeErrorCode.INVALID_LOADER_ARGUMENTS,
`Image loader has detected a \`<img>\` tag with an invalid \`rawSrc\` attribute: ${url}. ` +
`This image loader expects \`rawSrc\` to be a relative URL - ` +
`however the provided value is an absolute URL. ` +
`To fix this, provide \`rawSrc\` as a path relative to the base URL ` +
`configured for this loader (\`${path}\`).`);
ngDevMode &&
`Image loader has detected a \`<img>\` tag with an invalid \`rawSrc\` attribute: ${
url}. ` +
`This image loader expects \`rawSrc\` to be a relative URL - ` +
`however the provided value is an absolute URL. ` +
`To fix this, provide \`rawSrc\` as a path relative to the base URL ` +
`configured for this loader (\`${path}\`).`);
}
@@ -32,9 +32,9 @@ const VALID_WIDTH_DESCRIPTOR_SRCSET = /^((\s*\d+w\s*(,|$)){1,})$/;
/**
* RegExpr to determine whether a src in a srcset is using density descriptors.
* Should match something like: "1x, 2x".
* Should match something like: "1x, 2x, 50x". Also supports decimals like "1.5x, 1.50x".
*/
const VALID_DENSITY_DESCRIPTOR_SRCSET = /^((\s*\d(\.\d)?x\s*(,|$)){1,})$/;
const VALID_DENSITY_DESCRIPTOR_SRCSET = /^((\s*\d+(\.\d+)?x\s*(,|$)){1,})$/;
/**
* Srcset values with a density descriptor higher than this value will actively
@@ -110,7 +110,7 @@ const OVERSIZED_IMAGE_TOLERANCE = 1000;
*
* To use the **default loader**: no additional code changes are necessary. The URL returned by the
* generic loader will always match the value of "src". In other words, this loader applies no
* transformations to thr resource URL and the value of the `rawSrc` attribute will be used as is.
* transformations to the resource URL and the value of the `rawSrc` attribute will be used as is.
*
* To use an existing loader for a **third-party image service**: add the provider factory for your
* chosen service to the `providers` array. In the example below, the Imgix loader is used:
@@ -169,6 +169,9 @@ export class NgOptimizedImage implements OnInit, OnChanges, OnDestroy {
private imgElement: HTMLImageElement = inject(ElementRef).nativeElement;
private injector = inject(Injector);
// a LCP image observer - should be injected only in the dev mode
private lcpObserver = ngDevMode ? this.injector.get(LCPImageObserver) : null;
/**
* Calculate the rewritten `src` once and store it.
* This is needed to avoid repetitive calculations and make sure the directive cleanup in the
@@ -277,10 +280,12 @@ export class NgOptimizedImage implements OnInit, OnChanges, OnDestroy {
// Monitor whether an image is an LCP element only in case
// the `priority` attribute is missing. Otherwise, an image
// has the necessary settings and no extra checks are required.
invokeLCPImageObserverCallback(
this.injector,
(observer: LCPImageObserver) =>
observer.registerImage(this.getRewrittenSrc(), this.rawSrc));
if (this.lcpObserver !== null) {
const ngZone = this.injector.get(NgZone);
ngZone.runOutsideAngular(() => {
this.lcpObserver!.registerImage(this.getRewrittenSrc(), this.rawSrc);
});
}
}
}
this.setHostAttributes();
@@ -344,10 +349,8 @@ export class NgOptimizedImage implements OnInit, OnChanges, OnDestroy {
ngOnDestroy() {
if (ngDevMode) {
if (!this.priority && this._renderedSrc !== null) {
invokeLCPImageObserverCallback(
this.injector,
(observer: LCPImageObserver) => observer.unregisterImage(this._renderedSrc!));
if (!this.priority && this._renderedSrc !== null && this.lcpObserver !== null) {
this.lcpObserver.unregisterImage(this._renderedSrc);
}
}
}
@@ -373,24 +376,6 @@ function inputToBoolean(value: unknown): boolean {
return value != null && `${value}` !== 'false';
}
/**
* Invokes a function, passing an instance of the `LCPImageObserver` as an argument.
*
* Notes:
* - the `LCPImageObserver` is a tree-shakable provider, provided in 'root',
* thus it's a singleton within this application
* - the process of `LCPImageObserver` creation and an actual operation are invoked outside of the
* NgZone to make sure none of the calls inside the `LCPImageObserver` class trigger unnecessary
* change detection
*/
function invokeLCPImageObserverCallback(
injector: Injector, operation: (observer: LCPImageObserver) => void): void {
const ngZone = injector.get(NgZone);
return ngZone.runOutsideAngular(() => {
const observer = injector.get(LCPImageObserver);
operation(observer);
});
}
/***** Assert functions *****/
@@ -506,7 +491,7 @@ function assertUnderDensityCap(dir: NgOptimizedImage, value: string) {
`${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` +
`${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +
`greater than ${RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` +
`most use cases. Images that will be pinch-zoomed are typically the primary use case for` +
`most use cases. Images that will be pinch-zoomed are typically the primary use case for ` +
`${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);
}
}
@@ -600,19 +585,19 @@ function assertNoImageDistortion(
RuntimeErrorCode.INVALID_INPUT,
`${imgDirectiveDetails(dir.rawSrc)} the aspect ratio of the image does not match ` +
`the aspect ratio indicated by the width and height attributes. ` +
`Intrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
`(aspect-ratio: ${intrinsicAspectRatio}). Supplied width and height attributes: ` +
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
`(aspect-ratio: ${intrinsicAspectRatio}). \nSupplied width and height attributes: ` +
`${suppliedWidth}w x ${suppliedHeight}h (aspect-ratio: ${suppliedAspectRatio}). ` +
`To fix this, update the width and height attributes.`));
`\nTo fix this, update the width and height attributes.`));
} else if (stylingDistortion) {
console.warn(formatRuntimeError(
RuntimeErrorCode.INVALID_INPUT,
`${imgDirectiveDetails(dir.rawSrc)} the aspect ratio of the rendered image ` +
`does not match the image's intrinsic aspect ratio. ` +
`Intrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
`(aspect-ratio: ${intrinsicAspectRatio}). Rendered image size: ` +
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h ` +
`(aspect-ratio: ${intrinsicAspectRatio}). \nRendered image size: ` +
`${renderedWidth}w x ${renderedHeight}h (aspect-ratio: ` +
`${renderedAspectRatio}). This issue can occur if "width" and "height" ` +
`${renderedAspectRatio}). \nThis issue can occur if "width" and "height" ` +
`attributes are added to an image without updating the corresponding ` +
`image styling. To fix this, adjust image styling. In most cases, ` +
`adding "height: auto" or "width: auto" to the image styling will fix ` +
@@ -628,10 +613,11 @@ function assertNoImageDistortion(
RuntimeErrorCode.OVERSIZED_IMAGE,
`${imgDirectiveDetails(dir.rawSrc)} the intrinsic image is significantly ` +
`larger than necessary. ` +
`Rendered image size: ${renderedWidth}w x ${renderedHeight}h. ` +
`Intrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` +
`Recommended intrinsic image size: ${recommendedWidth}w x ${recommendedHeight}h. ` +
`Note: Recommended intrinsic image size is calculated assuming a maximum DPR of ` +
`\nRendered image size: ${renderedWidth}w x ${renderedHeight}h. ` +
`\nIntrinsic image size: ${intrinsicWidth}w x ${intrinsicHeight}h. ` +
`\nRecommended intrinsic image size: ${recommendedWidth}w x ${
recommendedHeight}h. ` +
`\nNote: Recommended intrinsic image size is calculated assuming a maximum DPR of ` +
`${RECOMMENDED_SRCSET_DENSITY_CAP}. To improve loading time, resize the image ` +
`or consider using the "rawSrcset" and "sizes" attributes.`));
}
@@ -49,6 +49,8 @@ export const PRECONNECT_CHECK_BLOCKLIST =
*/
@Injectable({providedIn: 'root'})
export class PreconnectLinkChecker {
private document = inject(DOCUMENT);
/**
* Set of <link rel="preconnect"> tags found on this page.
* The `null` value indicates that there was no DOM query operation performed.
@@ -66,7 +68,7 @@ export class PreconnectLinkChecker {
constructor() {
assertDevMode('preconnect link checker');
const win = inject(DOCUMENT).defaultView;
const win = this.document.defaultView;
if (typeof win !== 'undefined') {
this.window = win;
}
@@ -127,7 +129,7 @@ export class PreconnectLinkChecker {
private queryPreconnectLinks(): Set<string> {
const preconnectUrls = new Set<string>();
const selector = 'link[rel=preconnect]';
const links: HTMLLinkElement[] = Array.from(document.querySelectorAll(selector));
const links: HTMLLinkElement[] = Array.from(this.document.querySelectorAll(selector));
for (let link of links) {
const url = getUrl(link.href, this.window!);
preconnectUrls.add(url.origin);
@@ -17,19 +17,6 @@ export function isAbsoluteUrl(src: string): boolean {
return /^https?:\/\//.test(src);
}
// Assembles directive details string, useful for error messages.
export function imgDirectiveDetails(rawSrc: string, includeRawSrc = true) {
const rawSrcInfo =
includeRawSrc ? `(activated on an <img> element with the \`rawSrc="${rawSrc}"\`) ` : '';
return `The NgOptimizedImage directive ${rawSrcInfo}has detected that`;
}
// Invokes a callback for each element in the array. Also invokes a callback
// recursively for each nested array.
export function deepForEach<T>(input: (T|any[])[], fn: (value: T) => void): void {
input.forEach(value => Array.isArray(value) ? deepForEach(value, fn) : fn(value));
}
// Given a URL, extract the hostname part.
// If a URL is a relative one - the URL is returned as is.
export function extractHostname(url: string): string {
@@ -367,7 +367,36 @@ describe('Image directive', () => {
`${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +
`greater than ${
RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` +
`most use cases. Images that will be pinch-zoomed are typically the primary use case for` +
`most use cases. Images that will be pinch-zoomed are typically the primary use case for ` +
`${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);
});
it('should throw if rawSrcset exceeds the density cap with multiple digits', () => {
const imageLoader = (config: ImageLoaderConfig) => {
const width = config.width ? `-${config.width}` : ``;
return window.location.origin + `/path/${config.src}${width}.png`;
};
setupTestingModule({imageLoader});
const template = `
<img rawSrc="img" rawSrcset="1x, 200x" width="100" height="50">
`;
expect(() => {
const fixture = createTestComponent(template);
fixture.detectChanges();
})
.toThrowError(
`NG0${
RuntimeErrorCode
.INVALID_INPUT}: The NgOptimizedImage directive (activated on an <img> element with the \`rawSrc="img"\`) ` +
`has detected that the \`rawSrcset\` contains an unsupported image density:` +
`\`1x, 200x\`. NgOptimizedImage generally recommends a max image density of ` +
`${RECOMMENDED_SRCSET_DENSITY_CAP}x but supports image densities up to ` +
`${ABSOLUTE_SRCSET_DENSITY_CAP}x. The human eye cannot distinguish between image densities ` +
`greater than ${
RECOMMENDED_SRCSET_DENSITY_CAP}x - which makes them unnecessary for ` +
`most use cases. Images that will be pinch-zoomed are typically the primary use case for ` +
`${ABSOLUTE_SRCSET_DENSITY_CAP}x images. Please remove the high density descriptor and try again.`);
});
@@ -966,7 +995,7 @@ describe('Image directive', () => {
setupTestingModule({imageLoader});
const template = `
<img rawSrc="img.png" rawSrcset="1x, 2.5x, 3x" width="100" height="50">
<img rawSrc="img.png" rawSrcset="1.75x, 2.5x, 3x" width="100" height="50">
`;
const fixture = createTestComponent(template);
fixture.detectChanges();
@@ -976,7 +1005,7 @@ describe('Image directive', () => {
expect(img.src).toBe(`${IMG_BASE_URL}/img.png`);
expect(img.srcset)
.toBe(
`${IMG_BASE_URL}/img.png?w=100 1x, ` +
`${IMG_BASE_URL}/img.png?w=175 1.75x, ` +
`${IMG_BASE_URL}/img.png?w=250 2.5x, ` +
`${IMG_BASE_URL}/img.png?w=300 3x`);
});
@@ -240,5 +240,5 @@ export class MockPlatformLocation implements PlatformLocation {
}
export function scheduleMicroTask(cb: () => any) {
Promise.resolve(null).then(cb);
Promise.resolve().then(cb);
}
@@ -137,13 +137,12 @@ function decoratorToMetadata(
}
// Decorators have a type.
const properties: ts.ObjectLiteralElementLike[] = [
ts.factory.createPropertyAssignment('type', ts.getMutableClone(decorator.identifier)),
ts.factory.createPropertyAssignment('type', decorator.identifier),
];
// Sometimes they have arguments.
if (decorator.args !== null && decorator.args.length > 0) {
const args = decorator.args.map(arg => {
const expr = ts.getMutableClone(arg);
return wrapFunctionsInParens ? wrapFunctionExpressionsInParens(expr) : expr;
return wrapFunctionsInParens ? wrapFunctionExpressionsInParens(arg) : arg;
});
properties.push(
ts.factory.createPropertyAssignment('args', ts.factory.createArrayLiteralExpression(args)));
@@ -444,6 +444,7 @@ export class ComponentDecoratorHandler implements
rawImports,
resolvedImports,
schemas,
decorator: decorator?.node as ts.Decorator | null ?? null,
},
diagnostics,
};
@@ -483,6 +484,7 @@ export class ComponentDecoratorHandler implements
imports: analysis.resolvedImports,
animationTriggerNames: analysis.animationTriggerNames,
schemas: analysis.schemas,
decorator: analysis.decorator,
});
this.resourceRegistry.registerResources(analysis.resources, node);
@@ -70,6 +70,7 @@ export interface ComponentAnalysisData {
resolvedImports: Reference<ClassDeclaration>[]|null;
schemas: SchemaMetadata[]|null;
decorator: ts.Decorator|null;
}
export type ComponentResolutionData =
@@ -41,6 +41,7 @@ export interface DirectiveHandlerData {
outputs: ClassPropertyMapping;
isPoisoned: boolean;
isStructural: boolean;
decorator: ts.Decorator|null;
}
export class DirectiveDecoratorHandler implements
@@ -115,6 +116,7 @@ export class DirectiveDecoratorHandler implements
providersRequiringFactory,
isPoisoned: false,
isStructural: directiveResult.isStructural,
decorator: decorator?.node as ts.Decorator | null ?? null,
}
};
}
@@ -149,6 +151,7 @@ export class DirectiveDecoratorHandler implements
isStandalone: analysis.meta.isStandalone,
imports: null,
schemas: null,
decorator: analysis.decorator,
});
this.injectableRegistry.registerInjectable(node);
@@ -43,6 +43,7 @@ export interface NgModuleAnalysis {
providersRequiringFactory: Set<Reference<ClassDeclaration>>|null;
providers: ts.Expression|null;
remoteScopesMayRequireCycleProtection: boolean;
decorator: ts.Decorator|null;
}
export interface NgModuleResolution {
@@ -442,6 +443,7 @@ export class NgModuleDecoratorHandler implements
node, this.reflector, this.isCore, this.annotateForClosureCompiler),
factorySymbolName: node.name.text,
remoteScopesMayRequireCycleProtection,
decorator: decorator?.node as ts.Decorator | null ?? null,
},
};
}
@@ -464,6 +466,7 @@ export class NgModuleDecoratorHandler implements
rawDeclarations: analysis.rawDeclarations,
rawImports: analysis.rawImports,
rawExports: analysis.rawExports,
decorator: analysis.decorator,
});
if (this.factoryTracker !== null) {
@@ -24,6 +24,7 @@ export interface PipeHandlerData {
meta: R3PipeMetadata;
classMetadata: R3ClassMetadata|null;
pipeNameExpr: ts.Expression;
decorator: ts.Decorator|null;
}
/**
@@ -143,6 +144,7 @@ export class PipeDecoratorHandler implements
},
classMetadata: extractClassMetadata(clazz, this.reflector, this.isCore),
pipeNameExpr,
decorator: decorator?.node as ts.Decorator | null ?? null,
},
};
}
@@ -159,6 +161,7 @@ export class PipeDecoratorHandler implements
name: analysis.meta.pipeName,
nameExpr: analysis.pipeNameExpr,
isStandalone: analysis.meta.isStandalone,
decorator: analysis.decorator,
});
this.injectableRegistry.registerInjectable(node);
@@ -25,6 +25,11 @@ export interface TestOnlyOptions {
*/
_useHostForImportGeneration?: boolean;
/**
* Enable the Language Service APIs for template type-checking for tests.
*/
_enableTemplateTypeChecker?: boolean;
/**
* An option to enable ngtsc's internal performance tracing.
*

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