Commit graph

29561 commits

Author SHA1 Message Date
Willy Schott
b8f1f82fe2 docs: clarify meaning of ellipsis in bazel command (#43890)
PR Close #43890
2021-10-20 20:14:48 +00:00
Renovate Bot
4c9f35b2fb build: update dependency tsec to v0.1.10 (#43899)
PR Close #43899
2021-10-20 20:11:45 +00:00
Andrew Kushnir
e3d72646e0
docs: release notes for the v13.0.0-rc.1 release (#43912) 2021-10-20 10:05:21 -07:00
Andrew Kushnir
25c536d082
docs: release notes for the v12.2.11 release (#43910) 2021-10-20 09:53:56 -07:00
JoostK
007b96eb2e test(compiler-cli): run i18n extraction tests using Ivy compiler (#43893)
This commit re-enables the `extract_i18n` test target and updates the
test to run with the Ivy compiler.

PR Close #43893
2021-10-19 16:26:21 -07:00
JoostK
52a6785a82 test(compiler-cli): run watch mode tests using Ivy compiler (#43893)
This commit re-enables the `perform_watch` test target and updates the
test to run with the Ivy compiler.

Additionally, this target was switched over to use Angular v12 packages
as input to the test, to allow the ViewEngine tests to continue working
with v13 packages which are Ivy-only. This commit reverts those changes
now that View Engine tests are disabled, as it's desirable to test
against local artifacts that are build within the monorepo instead of
depending on NPM packages.

PR Close #43893
2021-10-19 16:26:21 -07:00
Alan Agius
222c5a845c docs: add docs about build cache (#43843)
With this change we add docs about persistant disk cache with was enabled by default in the CLI via https://github.com/angular/angular-cli/pull/21827

PR Close #43843
2021-10-19 10:45:30 -07:00
Joey Perrott
fbd2e4f0cd ci: mark core/schematics/test:test and compiler-cli/test:perform_watch test as view engine only (#43862)
Both test targets fail because, at test time, they use the view engine compiler, even when bazel sets the
configuration to use ivy.

PR Close #43862
2021-10-19 10:06:55 -07:00
Doug Parker
737f71e3aa refactor(compiler-cli): throw an error when compiling with View Engine. (#43862)
The View Engine compiler now throws when constructed and will be removed shortly. Direct users should switch to `NgtscProgram` to build with [Ivy](https://angular.io/guide/ivy). The View Engine compiler is being removed, so this makes it throw an error to ensure no one accidentally depends on code being removed.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott
9236e7d2da ci: correct comment related to building view engine npm packages (#43862)
Removing the comment related about building the npm packages using view engine as it was actually done via
ivy, now that ivy is used for all builds there is no need for expressing the aspect of the build.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott
cbe7b60d6c ci: remove view engine test job (#43862)
Remove the view engine test job as view engine is no longer being tested on CI.  Additionally, update size
tracking to rely on test job instead of test_ivy_aot.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott
5c1d4ab7f1 ci: remove windows view engine test job (#43862)
Remove the windows view engine test job as view engine is no longer being tested on CI.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott
af1f8f8429 ci: remove saucelabs view engine tests (#43862)
Remove the view engine specific saucelabs test job and associated tags/tooling as view engine is no longer being tested
on CI.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott
78e52b4799 build: remove ivy-aot bazel tag (#43862)
Remove the ivy-aot bazel tag from usage as it served a duplicate purpose as ivy-only which is now removed as both are
unneeded with Ivy as the default compiler used.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott
f9b203bf22 build: remove fixme-ivy-aot tag filter (#43862)
Remove the fixme-ivy-aot tag filter from usage as no targets are tagged with fixme-ivy-aot as ivy is now the
compiler used by default.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott
aef63e7ae5 build: remove "ivy-only" bazel tag (#43862)
Because all actions are assumed to be running on Ivy, things which only work on Ivy should not be marked as
Ivy only.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott
a365a1f0ff build: rename "no-ivy-aot" tag to "view-engine-only" (#43862)
Using the tag "view-engine-only" better describes the expected usage of bazel targets with the test. They can
only be run with view engine.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott
6212a60dcb build: remove test-ivy-aot yarn script (#43862)
Since building with ViewEngine is not longer desired on CI, removing the ivy vs non-ivy testing yarn scripts
is done, informing developers to instead use `yarn test` as all tests should be run using the Ivy complier.

PR Close #43862
2021-10-19 10:06:55 -07:00
Joey Perrott
00d801122c build: Use Ivy compiler for bazel builds by default (#43862)
Setting the angular_ivy_enabled environment variable to True will default Bazel builds to use the Ivy
compiler rather than defaulting to ViewEngine.

PR Close #43862
2021-10-19 10:06:54 -07:00
kamikopi
0aa64aa490 fix(devtools): Support Electron (rangle/angular-devtools#849)
Following suggestion from the issue thread, created an empty polyfills
to the chrome.browserAction calls, which are not available in the electron.
2021-10-18 16:26:18 -07:00
mgechev
a5c26b6910 refactor(devtools): use local declaration of the change detection strategy enum 2021-10-18 16:24:42 -07:00
mgechev
b85d48c7d2 refactor(devtools): use safe operation to update the overlay 2021-10-18 16:24:42 -07:00
mgechev
a93cfdca81 feat(devtools): support trusted types for script injection 2021-10-18 16:24:42 -07:00
Joey Perrott
9f40d2a0ea ci: remove browserstack configuration (#43881)
Remove browserstack configuration from the repo as it is not used for our CI.

PR Close #43881
2021-10-18 15:00:22 -07:00
Pete Bacon Darwin
ec8a565655 fix(ngcc): support alternate wrapper function layout for UMD (#43879)
Recently rollup, used by ng-packagr, changed the position of parentheses
around its generated UMD wrapper functions.

This commit ensures that ngcc can handle both.

Fixes #43870

PR Close #43879
2021-10-18 14:56:59 -07:00
Andrew Kushnir
60f3b33b4b Revert "fix(compiler): support i18n interpolated only attribute bindings (#43815)" (#43882)
This reverts commit bba0a87055.

The reason for rollback: this change is breaking some targets in Google's codebase when there is no attribute value is displayed (attr.aria-label) when translated.

PR Close #43882
2021-10-18 13:15:57 -07:00
Kristiyan Kostadinov
c944fee11b fix(compiler): do not error if $any is used inside a listener (#43866)
Fixes that `$any` casts weren't being converted to statements inside listeners which resulted in a compiler error.

Fixes #43841.

PR Close #43866
2021-10-18 10:43:03 -07:00
George Kalpakas
83f857c4fb docs: fix a couple of random typos (#43878)
PR Close #43878
2021-10-18 10:41:31 -07:00
Andrew Scott
32f368af2d fix(router): Do not clear currentNavigation if already set to next one (#43852)
Experimentation with the Router URL management exposed a situation where
the `currentNavigation` was being cleared in the `finalize` after the
`currentNavigation` was already set to the next one.

This change ensures that the `currentNavigation` is only cleared if the
id of the finalized transition matches the one on the
`currentNavigation` object.

PR Close #43852
2021-10-18 10:30:50 -07:00
Andrew Scott
a3ee474897 refactor(router): Remove use of browserUrlTree in scheduleNavigation (#43632)
There are no added tests here because the change is generally equivalent
to what was there before. The goal of that piece of code is to prevent
duplicate navigations due to the location synchronization code between
AngularJS and Angular. That is, the Angular router listens to the
`popstate` event and triggers navigations, but so does the AngularJS
router and triggers navigations through `router.navigateByUrl`. The
`setTimeout` in the Angular Router's `setUpLocationChangeListener` is
there to make this bit of code work: the 'popstate'/'hashchange'
navigation will necessarily come after the imperative nav triggered by
AngularJS's location sync.

Anyhow, in the long run, I would like to get rid of this bit of code
altogether. We should not have special handling for these cases. The
AngularJS/Angular location sync should either:

1. Not trigger a duplicate navigation in the first place
or
2. Be tolerant to processing the duplicate navigation.

In the short term, this change benefits the router while we investigate
removing this logic completely because now browserUrlTree has a single
responsiblity: to support `onSameUrlNavigation==='reload'`. This means
that we can work towards removing the `browserUrlTree` tracking from the
Router code at some point as well and have the `onSameUrlNavigation`
logic be part of a pre-navigation hook that can be handled outside the
`Router`. This may or may not be possible, but the change here opens up
that change for investigation.

PR Close #43632
2021-10-18 10:29:22 -07:00
David Shevitz
25b9c8cc5a docs: update getting started links to provide a more consistent user experience (#43872)
PR Close #43872
2021-10-18 09:25:33 -07:00
Pete Bacon Darwin
bba0a87055 fix(compiler): support i18n interpolated only attribute bindings (#43815)
While fully dynamic bound properties (and attributes) cannot be marked for localization, properties that only contain interpolation can.

This commit ensure that attribute bindings that only contain interpolation can also be marked for localization.

Closes #43260

PR Close #43815
2021-10-18 09:24:39 -07:00
Pete Bacon Darwin
c85bcb0c63 feat(compiler): reference ICU message IDs from their placeholders (#43534)
When extracting i18n messages from templates, ICU messages are split out from the
message that contains them. This can make it difficult in the translation files to match up
the two messages, especially if the ICU is reused in multiple placeholders.

This commit builds on top of the previous one to expose the message ID of ICU messages
from the ICU placeholders as additional metadata in the `$localize` tagged strings.
Now the metablock following any placeholder can also contain the associated ID
delimited from the placeholder name by `@@`.

Fixes #17506

PR Close #43534
2021-10-18 09:23:59 -07:00
Pete Bacon Darwin
d3cf222a81 feat(localize): support "associated message ids" for placeholders (#43534)
When extracting i18n messages, the Angular compiler needs to split ICU expressions
into their own message.  Currently there is no guaranteed way to re-associate
the ICU message with the original message where the ICU was found.

This change adds support in the localize tooling so that associated ids can be
stored as metadata in the `$localize` tagged strings. These ids can then be
used in generated translation files to provide a link between the two messages.

The XLIFF 1.2 and 2.0 formats have been updated to render these relationships,
via the `xid` and `subFlows` attributes respectively.

PR Close #43534
2021-10-18 09:23:59 -07:00
dario-piotrowicz
efeb5adf95 fix(docs-infra): add paddings to docs-card titles (#43859)
improve the aio docs-card title by adding some padding
so that it doesn't get too close to the card's edges

PR Close #43859
2021-10-18 09:23:15 -07:00
dario-piotrowicz
67a7c48683 fix(docs-infra): move security anchors outside callout elements (#43865)
two callout elements in the security guide have anchors
as their first child element instead of the callout's header
causing ugly/unwanted spacing, move the anchors above the
callout elements to fix such issue

PR Close #43865
2021-10-18 09:22:35 -07:00
Pete Bacon Darwin
9a6bd264ab build(docs-infra): add a box around CLI command line reference syntax (#43850)
This commit helps to make the section that describes an overview of the syntax of a CLI command stand out from the surrounding text.

Closes #26574

PR Close #43850
2021-10-15 11:35:44 -07:00
Andrew Scott
e79e3cafec fix(router): fix Router's public API for canceledNavigationResolution (#43842)
The commit which made the `canceledNavigationResolution` property on the `Router`
public did not add the corresponding configuration in the `ExtraOptions`.
3c6b653089
This was a mistake and is being corrected in this commit. We should not
encourage changing the properties post-setup (i.e.
`inject(Router).canceledNavigationResolution = 'computed'`). This manner
of configuration makes the options non-tree shakeable because we have to
keep both implementations in case the value changes at runtime.

PR Close #43842
2021-10-15 11:35:01 -07:00
Younes Jaaidi
e78c7cc239 docs: add younes jaaidi to GDE resources (#43721)
PR Close #43721
2021-10-15 10:49:22 -07:00
Paul Gschwendtner
6783977d21 build: update bazel integration test to rules_nodejs v4.4.1 (#43838)
Updates the Bazel integration test to `rules_nodejs` v4.4.1. Renovate
could not complete this update automatically because it is unable
to update the `package.json` and `lock` file due to there being
relative `file:` references.

PR Close #43838
2021-10-15 10:45:02 -07:00
Renovate Bot
ba4e18b096 build: update all non-major dependencies (#43838)
PR Close #43838
2021-10-15 10:45:02 -07:00
Doug Parker
b2b597279e fix(compiler-cli): updates ngc to pass the build when only warnings are emitted (#43673)
Refs #42966.

Previously, a build when emitted one warning and no errors would fail with a non-zero exit code. This is not what users would expect, but had not been an issue before since the compiler did not actually emit any warnings. With upcoming extended template diagnostics and other warnings, this is now a case that needs to be supported. Warnings are printed to `stderr` as before, but `ngc` now exits with code `0` and the build is considered successful.

Implemented this by adding a new `expectedExitCode` parameter to `driveDiagnostics()` which asserts against the real exit code. Most importantly, it does not **require** the the build to pass since any exit code can be given, so it is up to the test to assert this as well as many messages printed to make sure they are acceptable. This is useful for testing warnings and ensuring the build still passes.

PR Close #43673
2021-10-15 10:17:39 -07:00
JoostK
5b9b740c20 docs: include WrappedValue as removed API on deprecation page (#43685)
A rebase of #43507 seems to have inadvertently dropped the note about
the removed `WrappedValue` API from the deprecations page, so this
commit reintroduces the text.

PR Close #43685
2021-10-15 10:16:03 -07:00
dario-piotrowicz
17c9f67e21 fix(docs-infra): apply minor style fixes to aio contributor cards (#43844)
improve the aio contributors card by aligning centrally the
contributor's name and adding some padding so that it doesn't
get too close to the card's edges

Note: the name's aligning was already present by wrongly removed in
PR #43355

PR Close #43844
2021-10-15 10:12:55 -07:00
Joe Martin (Crowdstaffing)
bd0d7c15c1 docs: internationalization topics (#43819)
Update links and code-examples.  Remove redundant comments.

PR Close #43819
2021-10-14 15:53:24 -07:00
Andrew Scott
892158f769 Revert "refactor(router): clean up internal hooks (#43804)" (#43845)
This reverts commit 5cc51880db.

PR Close #43845
2021-10-14 14:43:41 -07:00
Renovate Bot
c0a439927b build: update dependency @typescript-eslint/parser to v5 (#43807)
PR Close #43807
2021-10-14 10:14:49 -07:00
Andrew Scott
5cc51880db refactor(router): clean up internal hooks (#43804)
* beforePreactivation hook is unused
* The only place that uses afterPreactivation does not use the arguments

Not to say we won't want to provide hooks similar to this in the future,
but the current state is over-engineered for what it's being used for.

PR Close #43804
2021-10-14 10:04:01 -07:00
Alan Agius
41cf9e9768 docs: add missing value types to optimization configuration (#43839)
It appears that when the tables were changed from HTML to markdown some value types were lost. With this change we add the missing types and remove the commented out HTML content.

PR Close #43839
2021-10-14 10:01:54 -07:00
Alan Agius
c5dc79dc56 docs: remove no longer relevant sections in build page (#43837)
`Backward compatibility with Lighthouse` and `Backward compatibility with CSS grid` sections are no longer relevant since Internet Explorer is no longer supported.

PR Close #43837
2021-10-14 10:01:20 -07:00