Commit graph

29561 commits

Author SHA1 Message Date
Daniel Ostrovsky
f8e78e3f9b 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:43 -07:00
Giovanni Alberto Rivas
5dd72b7610 docs(http): replace http method return description (#47322)
PR Close #47322
2022-09-01 19:14:56 -07:00
angular-robot[bot]
9a623c03b2
build: update SECURITY.md to match the content of angular/.github 2022-08-30 18:14:11 +00:00
Joey Perrott
37c2f3c2ea docs: update security guide (#47296)
Update the security guide to our new vulnerability intake process.

PR Close #47296
2022-08-30 18:03:43 +00:00
angular-robot[bot]
0bb3aff01f
build: update CODE_OF_CONDUCT.md to match the content of angular/.github 2022-08-30 16:56:50 +00:00
Kristiyan Kostadinov
7d3df4724d build: update to TypeScript 4.8 final (#47270)
Bumps up to the final version of TS 4.8 and removes some workarounds.

PR Close #47270
2022-08-26 09:46:07 -07:00
Kara Erickson
32e3081b5d docs(common): fix code examples in image directive guide (#47269)
PR Close #47269
2022-08-26 09:20:58 -07:00
Alex Rickabaugh
46f5021381 release: cut the v15.0.0-next.0 release 2022-08-25 17:41:06 -07:00
Alex Rickabaugh
9dcfeb2dff release: bump the next branch to v15.0.0-next.0 (#47267)
PR Close #47267
2022-08-25 17:34:03 -07:00
Alex Rickabaugh
d03742301b docs: release notes for the v14.2.0 release 2022-08-25 14:33:39 -07:00
Joey Perrott
3d7deabca6 build: update ng-dev version (#47258)
update to the latest ng-dev version

PR Close #47258
2022-08-25 13:55:04 -07:00
Kara Erickson
0afb895f41 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
a946ca99c6 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
353a8ea589 docs: add image directive guide (#47155)
PR Close #47155
2022-08-24 12:16:48 -07:00
Paul Gschwendtner
7ee1927c76 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:18 -07:00
Pawel Kozlowski
4fdbd85d26 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
d34ae8472a docs: add Angular & JavaScript Master Podcast to resources list (#47227)
PR Close #47227
2022-08-23 16:20:43 -07:00
Angular Robot
8340da92bb build: update io_bazel_rules_sass digest to 6802532 (#47104)
See associated pull request for more information.

PR Close #47104
2022-08-23 09:24:56 -07:00
Paul Gschwendtner
4780f1bf26 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:41 -07:00
Jessica Janiuk
c5b3f1c17a 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:18 -07:00
Kalbarczyk
b34320128d docs: add Angular Master website to resources list (#47129)
PR Close #47129
2022-08-22 16:02:18 -07:00
Kristiyan Kostadinov
54ceed53e2 refactor(compiler): add support for host directives (#46868)
This is the compile-time implementation of the `hostDirectives` feature plus a little bit of runtime code to illustrate how the newly-generated code will plug into the runtime. It works by creating a call to the new `ɵɵHostDirectivesFeature` feature whenever a directive has a `hostDirectives` field. Afterwards `ɵɵHostDirectivesFeature` will patch a new function onto the directive definition that will be invoked during directive matching.

For example, if we take the following definition:

```ts
@Directive({
  hostDirectives: [HostA, {directive: HostB, inputs: ['input: alias']}]
})
class MyDir {}
```

Will compile to:

```js
MyDir.ɵdir = ɵɵdefineComponent({
  features: [ɵɵHostDirectivesFeature([HostA, {
    directive: HostB,
    inputs: {
      input: "alias"
    }
  }])]
});
```

The template type checking is implemented during directive matching by adding the host directives applied on the host to the array of matched directives whenever the host is matched in a template.

Relates to #8785.

PR Close #46868
2022-08-22 16:00:35 -07:00
Alex Rickabaugh
b6fbbeacf2 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:20 -07:00
Alan Agius
a44b4bfebc build(docs-infra): update all angular packages to use ^ instead of ~ (#47092)
This forces the usage of the latest packages.

PR Close #47092
2022-08-22 12:11:42 -07:00
Alan Agius
a7dff5cd83 ci: update renovate config to not update examples (#47092)
This commits addresses an issue where AIO examples would always be updated to use the `next` version.

PR Close #47092
2022-08-22 12:11:42 -07:00
Alan Agius
da9d9970c7 build(docs-infra): use stable packages in examples (#47092)
With this change we replace AIO examples to use stable Angular packages.

The main reasons for this is that prereleases might contain bugs that
are not in the stable version especially in the Angular CLI were it's
not validated in G3.

PR Close #47092
2022-08-22 12:11:42 -07:00
Dylan Hunn
edf7f670f0 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:48 -07:00
Angular Robot
7884837a44 build: update cross-repo angular dependencies (#47187)
See associated pull request for more information.

PR Close #47187
2022-08-22 10:56:33 -07:00
vyom
2095a08781 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:56 -07:00
dario-piotrowicz
05f5e8ad86 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:28 -07:00
George Kalpakas
876ba77bcd 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
14f505abd4 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
35171a8681 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
Kara Erickson
b3879dbf14 fix(common): support density descriptors with 2+ decimals (#47197)
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
2022-08-22 10:49:46 -07:00
Pawel Kozlowski
634e6c7f1a refactor(common): post-review image directive cleanup (#47170)
Minor cleanups based on the review comments that were
not addressed after the initial review.

PR Close #47170
2022-08-22 10:46:59 -07:00
Kara Erickson
8abf1c844c fix(common): fix formatting on oversized image error (#47188)
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
2022-08-22 10:46:34 -07:00
Andrew Scott
5163e3d876 feat(router): Add UrlTree constructor to public API (#47186)
The `UrlTree` is a fundamental concept in the router's API design.
Generally speaking, a `UrlTree` would be constructed via things like
`Router.createUrlTree` or `UrlSerializer#parse`. The second example here
is the core reason to make the constructor public, regardless of how
develpers generally create a `UrlTree` in an application.

Applications can provide their own `UrlSerializer` and may want to implement their
own `parse` method. This means they would also need to create a
`UrlTree` but would not be able to do so effectively because the
constructor is marked `@internal`.

In addition, the `UrlTree` constructor only has 3 parameters, all of
which are already public. There's nothing "special" about it other than
the potential desire to push developers to use other methods for
constructing a `UrlTree` (i.e. `Router.createUrlTree`).

Also see http://b/234604699#comment9 for additional context.

PR Close #47186
2022-08-22 10:44:52 -07:00
Dylan Hunn
daac13783b 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:21 -07:00
Kristiyan Kostadinov
ddb95c5184 refactor(compiler): replace most usages of getMutableClone (#47167)
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
2022-08-22 10:40:50 -07:00
Dylan Hunn
fc97a41f07 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:42 -07:00
Angular Robot
c467eb78d9 build: update all non-major dependencies (#47162)
See associated pull request for more information.

PR Close #47162
2022-08-22 10:29:21 -07:00
Bob Watson
d7c0039433 docs: Add Bob Watson as a member of the Angular team (#47217)
PR Close #47217
2022-08-22 10:28:04 -07:00
George Kalpakas
b13c991ce7 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
a360309f31 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:43 -07:00
Jan Kuehle
ce76103e8f refactor(compiler): /a/.exec() returns RegExpExecArray (#47169)
Fix compilation issue with TypeScript nightly. TypeScript added a field
`0` to `RegExpMatchArray` in
3b80ddca21.
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:44 -07:00
Pawel Kozlowski
b2972f9e72 docs: update CHANGELOG after the 14.2.0-rc.0 release (#47177)
Fixing changelog merge issues.

PR Close #47177
2022-08-18 12:14:15 -07:00
FatalMerlin
a9c21c3f51 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:10 -07:00
FatalMerlin
76a1b04305 refactor(service-worker): formatting of index.ts (#47044)
Fixed formatting of index.ts.

PR Close #47044
2022-08-18 12:09:10 -07:00
Merlin
46fa1a7a13 fix(service-worker): export NoNewVersionDetectedEvent (#47044)
NoNewVersionDetectedEvent is marked as @publicApi but not exported.
PR Close #47044
2022-08-18 12:09:10 -07:00
Joey Perrott
19d7fb08a3 build: ignore type only imports/exports for circular dependency checks (#47017)
Ignore the type only imports and exports to ease the process of refactoring

PR Close #47017
2022-08-18 12:06:09 -07:00