Commit Graph

24573 Commits

Author SHA1 Message Date
Andrew Scott 763c5f8991 release: cut the v14.0.0-rc.3 release (#46205) 14.0.0-rc.3 2022-05-31 16:46:22 -07:00
Alex Rickabaugh 0111f6c75e docs: update release and update guides for v14 (#46200)
This commit adds content related to Angular v14 to the `releases.md` and
`update-to-latest-version.md` guides on AIO.

PR Close #46200
2022-05-31 15:17:22 -07:00
Andrew Kushnir c90193475f docs: add the Standalone guide link to API docs of component/directive/pipe decorators (#46184)
This commit adds the Standalone guide link to the `@Component`, `@Directive` and `@Pipe` decorator properties related to standalone functionality to improve discoverability of the guide as well as providing extra context in API docs.

PR Close #46184
2022-05-31 13:56:58 -07:00
Andrew Kushnir 51baa0b448 docs(core): improve inject function docs (#46168)
This commit updates the `inject` function docs by:
- rephrasing a description to include more usage cases
- adding usage examples
- making a function itself a public API (vs its alias const that was used previously)

PR Close #46168
2022-05-31 13:55:15 -07:00
Andrew Kushnir 19db22e911 test: drop no longer needed postinstall step from integration test apps (#46182)
This commit removed no longer needed postinstall step (to run ngcc) from integration test apps, to avoid extra processing.

PR Close #46182
2022-05-31 12:06:17 -07:00
Billy Lando fa358feef0 docs: replace broken <br/> from service worker (#46193)
PR Close #46193
2022-05-31 12:02:37 -07:00
Paul Gschwendtner 1dd58b5e2a ci: github robot should consider closure-locale.ts file as g3-synced file (#46177)
A recent PR to the Angular common closure-locale file generation
highlighted that the GitHub robot does currently not consider the
`closure-locale.ts` file as relevant for g3. The file is synced into
g3 and the robot should reflect that.

Note: The exclude/include patterns currently will include some of the
legacy/backwards-compatibility locale files, but these will never change
and can be removed in v15. For now it is acceptable to not overly
complicate the exclude/include lists for few files that never change.

PR Close #46177
2022-05-31 12:00:16 -07:00
Rune Andersen Hartvig 0a68506d77 docs: fix template example (#46170)
Fix a typo that prevents an example to show.
PR Close #46170
2022-05-31 11:59:49 -07:00
Matt Shaffer b8c15eb257 docs: rename stage to staging (#46164)
PR Close #46164
2022-05-31 11:59:20 -07:00
Matt Shaffer 416d535d1e docs: update example file name (#46164)
PR Close #46164
2022-05-31 11:59:20 -07:00
Andrew Kushnir ba9f30c9a6 fix(core): include component name into unknown element/property error message (#46160)
This commit adds the component name into unknown element/property error message, so that it's easier to find a location of a template where the problem happened.

Closes #46080.

PR Close #46160
2022-05-27 11:45:49 -07:00
Pawel Kozlowski 5dee53b352 docs: create a dedicated page for the NG0203 error (#46166)
Adds a dedicated error page for NG0203 (injection context).

PR Close #46166
2022-05-27 10:15:56 -07:00
Pawel Kozlowski 35653ce337 fix(core): add more details to the MISSING_INJECTION_CONTEXT error (#46166)
The MISSING_INJECTION_CONTEXT runtime error can be thrown when the
inject function is used outside of the class creation context.
Before this change we've only used a vague terms of the
'injection context'. This commit extends the error message to
indicate that we really talk about the class construction context.

PR Close #46166
2022-05-27 10:15:56 -07:00
George Kalpakas 12938577ef build(docs-infra): upgrade cli command docs sources to ecde3a2ae (#46158)
Updating [angular#14.0.x](https://github.com/angular/angular/tree/14.0.x) from
[cli-builds#14.0.x](https://github.com/angular/cli-builds/tree/14.0.x).

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

**Modified**
- help/completion.json

PR Close #46158
2022-05-27 10:13:34 -07:00
Andrew Kushnir 560188bf12 fix(core): update unknown property error to account for standalone components in AOT (#46159)
This commit updates the error message to use correct info depending on whether a component is standalone or not. Previously we were always referring to @NgModules as a place to fix the issue, but not we also mention @Component when needed (for standalone components).

PR Close #46159
2022-05-27 10:12:27 -07:00
dario-piotrowicz d7c358139e docs: change wrong alert to callout (#46145)
change the alert present in the lifecycicle-hook docs to a callout so
that its header can be properly rendered (since alters don't support have headers)

PR Close #46145
2022-05-27 09:30:24 -07:00
Ian Gregory 568269f124 docs: close lightbox div to fix page display (#46155)
PR Close #46155
2022-05-26 17:42:54 -07:00
mgechev 136358f1a0 docs: fix incorrect title in the roadmap (#46140)
Ensure we're using h3 titles for consistency.

PR Close #46140
2022-05-26 17:42:26 -07:00
Alex Rickabaugh 724e88e042 fix(compiler-cli): preserve forwardRef for component scopes (#46139)
Angular generally supports cycles between components in the same NgModule.
We have a mechanism of moving the component scope declaration into the
NgModule file in this case. This ensures that Angular never itself
introduces an import which creates a cycle.

What happens if the cycle already exists in the user's program, though, is a
bit different. In these cases, the "correct" emit for Angular is to generate
the component scope (whether direct or remote) inside of a closure, to
prevent evaluating the scope's references until module evaluation is
complete and all cyclic imports have been resolved. We don't want to do this
for *all* scopes because the code size cost of emitting a function wrapper
is non-zero.

In this fix, we take the presence of a `forwardRef` in a component's
`imports` or in an NgModule `declarations` or `imports` as a sign that
component scopes emitted into those files need to be protected against
cyclic references. In a future commit, we may introduce a warning or error
if cyclic imports are not protected behind `forwardRef` in these cases, but
this will take some time to implement.

PR Close #46139
2022-05-26 17:42:02 -07:00
George Kalpakas 1798ce99b6 build(docs-infra): be able to resolve root-relative image URLs in getImageDimensions() (#46138)
Previously, `getImageDimensions()` would try to resolve image URLs
relative to the base path using `path.resolve()`. This resulted in
root-relative URLs (i.e. URLs starting with `/`) being treated as
absolute filesystem paths and thus resolving incorrectly
([example failure][1]).

This commit fixes it by using `.join()` instead, which is more
appropriate in this case. (Originally discussed [here][2].)

[1]: https://circleci.com/gh/angular/angular/1173150
[2]: https://github.com/angular/angular/pull/46134#issuecomment-1137191996

PR Close #46138
2022-05-26 11:25:10 -07:00
Andrew Kushnir 0bc77f4cab fix(core): better error message when unknown property is present (#46147)
Prior to this commit, the error message that was produced for the unknown property situation, din't contain extra info on how the problem can be fixed. This commit adds more info to the error message and makes it similar to the one we use during the AOT compilation.

PR Close #46147
2022-05-26 11:24:47 -07:00
Alex Rickabaugh 542d4c7805 release: cut the v14.0.0-rc.2 release (#46143)
PR Close #46143
14.0.0-rc.2
2022-05-25 13:53:23 -07:00
Alex Rickabaugh ff172d2818 docs: release notes for the v13.3.10 release (#46142)
PR Close #46142
2022-05-25 13:43:01 -07:00
dario-piotrowicz ddce357d1d fix(core): improve TestBed declarations standalone error message (#45999)
improve the error message developers get when adding a standalone
component in the TestBed.configureTestingModule's declarations array,
by making more clear the fact that this error originated from the
TestBed call

resolves #45923

PR Close #45999
2022-05-25 12:20:52 -07:00
Renovate Bot ce66cfc765 build: update angular (#46120)
PR Close #46120
2022-05-25 12:18:05 -07:00
Kristiyan Kostadinov ab90d8dcc2 build: update to TypeScript 4.7 final (#46132)
Bumps up the repo to the final version of TypeScript 4.7. Also updates AIO to 4.7.

PR Close #46132
2022-05-25 11:37:12 -07:00
dario-piotrowicz af21c5f008 docs: fix &hellip; presented in aio code docs (#46123)
the symbol `&hellip;` displays correctly in code-example blocks and in
plain html text, it does however not work correctly for code espressed
using backticks, fix such occurrences by replacing `&hellip;` with `...`

PR Close #46123
2022-05-25 11:30:31 -07:00
mgechev 2360708cc0 docs: update the Angular roadmap as of May 2022 (#46117)
* Update project completion status
* Update project description based on state
* Add new projects to the future section

PR Close #46117
2022-05-25 11:23:56 -07:00
dario-piotrowicz 05fd839eb1 refactor(compiler-cli): fix "for to" typo in code comment (#46113)
fix the typo/extra for in a code comment saying
"this is used for to determine" so that it only says
"this is used to determine"

PR Close #46113
2022-05-24 10:52:20 -07:00
dario-piotrowicz 4204936b49 docs: replace wrong hyphen with # in aio cheatsheet (#46125)
replace the hyphen symbol wrongly used in the aio cheatsheet
doc to create a template variable with the proper # symbol

PR Close #46125
2022-05-24 10:49:55 -07:00
Roopesh Chinnakampalli 60a9910f05 docs: corrected the misspelled word (#46126)
innovation -> invocation
PR Close #46126
2022-05-24 10:47:48 -07:00
David Schmidt 97fe33866e docs: fix FormRecord example (#46124)
PR Close #46124
2022-05-24 10:47:07 -07:00
Aristeidis Bampakos c578aeec74 docs: align lightbox elements together (#46107)
Align lightbox `div` elements so that the image appears inside the lightbox correctly.

PR Close #46107
2022-05-24 10:45:55 -07:00
Jan Kuehle 21a04ef5be perf(bazel): use allowedInputs to avoid fs.stat (#46069)
Call tsc_wrapped's fileExists function instead of TypeScript's.

tsc_wrapped (used internally by ngc-wrapped) has an optimization under
bazel to avoid file system calls where possible. It takes advantage
bazelOpts.allowedInputs, which contains a list of all files available
for compilation.

File system calls can be quite slow depending on the file system. In
google3 I saw a 38 seconds compilation, which spent 6 seconds just doing
fs.stat calls during module resolution. Those fs.stat calls are entirely
gone after with this change.

PR Close #46069
2022-05-24 10:39:17 -07:00
dario-piotrowicz e03eb282cb docs: move all bazel testing info to a single location (#46084)
instead of presenting the same (or similar information) in both the
DEVELOPER.md and the BAZEL.md files, more all the information in the
BAZEL file and refer to that section in the DEVELOPER file

PR Close #46084
2022-05-23 13:59:08 -07:00
dario-piotrowicz d7912ca7d6 docs: update directives info to include standalone (#46078)
update the directives api doc to inform developers that
directives can also be declared as standalone

PR Close #46078
2022-05-23 13:54:11 -07:00
A. J. Javier 8cccc830d2 docs: fix angularfire2 hyperlink (#46046)
PR Close #46046
2022-05-23 13:52:14 -07:00
JoostK 21f1d5979d refactor(compiler-cli): report better error when a ModuleWithProviders call occurs within Component.imports (#46009)
This commit improves the reported error when importing e.g. `RouterModule.forRoot()`
from within `Component.imports`. Such import is not supported, as standalone components
can only refer to other standalone entities or NgModules in their `imports` array;
`ModuleWithProviders` are not supported as `Component.imports` is meant to be used
for the compilation scope of the component, _not_ for configuring DI.

Closes #46003

PR Close #46009
2022-05-23 13:50:06 -07:00
JoostK 61bfb7afba refactor(compiler-cli): extract ModuleWithProviders analysis out of NgModule handler (#46009)
This commit moves the foreign function resolver logic for detecting a
`ModuleWithProviders` in a return type position of a function call, as the logic can
then be reused for standalone components in a subsequent commit.

PR Close #46009
2022-05-23 13:50:06 -07:00
dario-piotrowicz bf340479ca feat(docs-infra): add group role and label for aio-notification (#45770)
add a role and an aria-label to the aio-notification component so that
it can be handled better by assistive technologies

resolves #44345

PR Close #45770
2022-05-23 13:48:31 -07:00
dario-piotrowicz 3654d7ab1a docs: make structural directives guide generic (#44895)
tweak the current structural directives guide (currently mainly targeted
at the creation of custom structural directives) so that is more generic
and a point of reference for structural directives in general

this also includes the re-addition of the one-per-element section
removed in PR #40015

resolves #44786

PR Close #44895
2022-05-23 13:44:43 -07:00
Aristeidis Bampakos b5ecae307e docs: remove broken code from TOH tutorial (#46105)
At the end of Part 2 of the Tour or Heroes tutorial, there is a code sample that is broken. It looks like it was added by mistake because it is not related to the summary.
PR Close #46105
2022-05-23 13:31:26 -07:00
Paul Gschwendtner c7683e1cbd ci: fix formatting for babel_ast_host.ts file after recent changes (#46082)
The formatting of the `babel_ast_host.ts` file is invalid due to a
recently-merged PR. The PR had a passing `lint` state but this seemed
to just appear like this because the Git comparison range on upstream
branches can become invalid (due to a known bug in CircleCI -- reported)

PR Close #46082
2022-05-23 13:30:39 -07:00
dario-piotrowicz 933f1945ed docs: add standalone details to NG8001 (#46079)
improve the degubbing section of the NG8001 error by including details
about standalone components

PR Close #46079
2022-05-23 13:28:49 -07:00
Tom Raithel 8ea4e1e6eb docs: fix division by zero in progress events example (#46077)
If the `event.total` is undefined, this line would have generated a `NaN` due to division by zero. I suppose, that a `0` would be more suitable for this case.

PR Close #46077
2022-05-23 13:27:48 -07:00
Paul Gschwendtner 3dec816276 build: fix unbound variable error in build artifact script (#46076)
We recently had a couple of issues with the shallowing of snapshot
git repositories. In an attempt to fix this, parts of the publish
script of the COMP repo have been used, but variables have not been
updated properly.

This commit fixes an unbound variable, avoiding errors when snapshots
are published for a new branch (e.g. when we branch-off).

PR Close #46076
2022-05-23 13:26:35 -07:00
Nathan Nontell 060d36f67a docs(docs-infra): update createComponent description to fix incorrect method name and invalid use of html escaping (#46074)
PR Close #46074
2022-05-23 13:21:48 -07:00
George Kalpakas 82399133cb build(docs-infra): update Angular Material to v14.0.0-rc.0 in AIO (#45997)
Update angular.io to the latest prerelease version of Angular Material
(v14.0.0-rc.0).

PR Close #45997
2022-05-23 13:20:11 -07:00
George Kalpakas c92b242f22 build(docs-infra): update Angular CLI/framework to v14.0.0-rc.0 in AIO (#45997)
Update angular.io to the latest prerelease versions of Angular CLI and
framework (v14.0.0-rc.0).

Also update angular.io to more closely align with new CLI apps. See also
the [diff][1] between a basic v13.0.0-next.9 CLI app and a v14.0.0-rc.0
one.

[1]: https://github.com/cexbrayat/angular-cli-diff/compare/13.0.0-next.9...14.0.0-rc.0

PR Close #45997
2022-05-23 13:20:11 -07:00
George Kalpakas 9d1f489542 build(docs-infra): update AIO payload sizes (#45997)
Update the AIO payload sizes to better see the impact in size of changes
in subsequent commits.

PR Close #45997
2022-05-23 13:20:11 -07:00