Commit graph

23980 commits

Author SHA1 Message Date
Paul Gschwendtner
f4fd488d4d build: update tooling to use new entry-point for dev-infra exports (#45206)
Previously, dev-infra only bundled the CLI with all its dependencies, while
we still also kept all bundled dependencies in the `dependencies`. This basically
meant that the CLI bundling did not provide any value at all.

We fixed this upstream and now dependencies are still bundled, but no longer
also declared as `dependencies`. We also stopped shipping deep JS files, only
shipping the bundles now.

As part of this deep file removal, we introduced a runtime entry-point for
exports/types. This one will also benefit from the bundling and it will be
predictable what symbols dev-infra consumer projects rely on (allowing us to
also have an API guard or something in the future).

PR Close #45206
2022-02-28 17:38:26 +00:00
Renovate Bot
064cbed0cb build: update angular (#45206)
PR Close #45206
2022-02-28 17:38:26 +00:00
Dylan Hunn
4c80ca3700 refactor(forms): Clean up the find function. (#45199)
Move `find` into the `AbstractControl` hierarchy, and clean up a longstanding implementation todo.

PR Close #45199
2022-02-28 17:26:31 +00:00
Guillaume Bonnet
cbbf13f100 docs(docs-infra): fix the stackblitz on page i18n-example (#45097)
The previous configuration didn't allow to serve in any language.

Fixes #45066

PR Close #45097
2022-02-28 17:25:40 +00:00
Paul Gschwendtner
78a0ac02a7 ci: instruct renovate to not update/override merge ready PRs (#45204)
Sometimes Renovate proposes an update and we need to add some
manual fixups, like updating a size golden. For this we push to
same upstream branch.

Renovate will update the PR though when another new revision/version
becomes available, overriding the fixup and discarding it.

This happened quite often now and causes significantly more
work required by the dev-infra time..

PR Close #45204
2022-02-25 22:10:55 +00:00
Paul Gschwendtner
e56472d3c2 ci: fix stamping for builds performed in CI (#45147)
Fixes the stamping for snapshot builds and the artifact deployment job.
Currently the stamped versions will have the `.with-local-changes` version
suffix given that we add a file to the Git repo that is just
needed for the CircleCI cache key computation.

PR Close #45147
2022-02-25 19:14:05 +00:00
Renovate Bot
e01820c45f build: update dependency @types/chrome to ^0.0.179 (#45201)
PR Close #45201
2022-02-25 19:07:27 +00:00
Paul Gschwendtner
63e9cc7cba ci: update aio payload size golden to reflect Angular update (#45117)
Updates the AIO payload size golden to reflect the Angular
update as proposed by Renovate (see previous commit).

The main bundle got reduced and exceeded the threshold, so we needed
to update the golden. As part of this, all other bundle metrics are
updated even though not exceeding the threshold yet.

PR Close #45117
2022-02-25 19:03:16 +00:00
Paul Gschwendtner
2f7fc3d87c build: switch to karma web test rule from shared dev-infra (#45117)
Switches the Karma web test rule from `@bazel/concatjs` to our
wrapped/extended variant from the shared dev-infra code.

One benefit is that we now get a `_debug` target for web tests where
no browser is being launched and the action is kept alive. Allowing
developers to conveniently connect a browser manually for debugging.
Also works with iBazel for the manually connected browser.

PR Close #45117
2022-02-25 19:03:16 +00:00
Renovate Bot
1f4c92dbc7 build: update angular (#45117)
PR Close #45117
2022-02-25 19:03:16 +00:00
Renovate Bot
aae07c338f build: lock file maintenance (#45071)
PR Close #45071
2022-02-24 23:56:13 +00:00
Kristiyan Kostadinov
88f1168506 perf(core): only track LViews that are referenced in __ngContext__ (#45172)
Follow-up to #45051 where every `LView` that was being created was tracked in the `TRACKED_LVIEWS` map. This isn't necessary, because we only need to track the view that have been referenced by an `__ngContext__`.

PR Close #45172
2022-02-24 23:51:38 +00:00
Andrew Scott
0920104372 refactor(router): Refactor errors in applyRedirects to use common throwError function (#45170)
The implementation of `throwError` in `rxjs` is identical to what is
done manually in the Router code.

PR Close #45170
2022-02-24 23:50:00 +00:00
Andrew Scott
d8428ca598 refactor(router): Update match result to be more explicit (#45170)
The `lastChild` property in the match result is only used to compute the
remaining segments (i.e. the ones which were not consumed). The updated
type here makes it easier to use and more clear.

PR Close #45170
2022-02-24 23:50:00 +00:00
dario-piotrowicz
24e39a71c2 docs: fix style guide example app included as routing (#45148)
in the aio example apps page the style guide for documentation
contributions is included in the Routing section instead of being
in its own section, add a documentation section and include the example
in that one

PR Close #45148
2022-02-24 22:57:53 +00:00
Renovate Bot
0465451e00 build: update all non-major dependencies (#45189)
PR Close #45189
2022-02-24 22:55:12 +00:00
JoostK
0debf84045 ci: allow Babel to be updated by Renovate (#44931)
Automatic updating of Babel was disabled because there were build failures
when using the latest version of Babel, but these have been resolved in
#44931. This commit removes Babel packages from Renovate's ignored list
to allow automatic updates again.

PR Close #44931
2022-02-24 21:42:54 +00:00
JoostK
7bbddb5873 refactor(localize): update version of Babel (#44931)
The `@angular/localize` package depends on a version of Babel that is two years
old, so this commit updates to the latest version.

Some changes were made to the linker and compliance tests to account for slight
changes in source maps, along with a few code updates because of changes to
the typings of Babel.

PR Close #44931
2022-02-24 21:42:54 +00:00
Charles Lyding
8d634ac84d ci: add permissions to current github action workflows (#45177)
The currently recommended best practice for Github action workflows is to set top-level permissions to read only. And if the job uses the automatic `GITHUB_TOKEN`, fine-grained permissions for each job based on the job's requirements should also be added.
All existing workflows in the repository now have top-level read only permission blocks.
Only the `scorecard` workflow currently requires additional job level permissions and the minimum set of permissions were already present for the job.

PR Close #45177
2022-02-24 21:39:38 +00:00
Jessica Janiuk
451bc27b96 test(animations): Fix flaky animations e2e test (#45196)
This adds a 300ms wait to the animations tests to ensure they are fully done animating before asserting.

PR Close #45196
2022-02-24 13:15:31 -08:00
Andrew Scott
7fd416d060 fix(router): Fix type of Route.pathMatch to be more accurate (#45176)
Route.pathMatch only allows `'full'|'prefix'` in reality. This commit
adjusts the type to be more strict and also adds a migration to adjust
existing code.

resolves #37469

BREAKING CHANGE:
The type of `Route.pathMatch` is now more strict. 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`.

PR Close #45176
2022-02-24 18:44:07 +00:00
dario-piotrowicz
66f3551a64 test(animations): add route animation delay to pages tests (#45144)
PR #44550 introduced an animation for pages/tabs transitions in the
animations example application, after such change intermittent e2e
failures started to occur (see for example: #45083), add a delay to
account for such animation to all the animations pages/tabs e2e tests so
to fix the flakyness caused by the animation

PR Close #45144
2022-02-24 18:41:55 +00:00
Martin Sikora
909b21aa29 refactor(http): change <script>'s ownerDocument in jsonp teardown (#36807)
handler

Cancel pending json handler by adopting its <script> element into
another document
(https://html.spec.whatwg.org/multipage/scripting.html#execute-the-script-block)
This way the browser will prevent the script from being parsed and executed.

Fixes #34818

PR Close #36807
2022-02-24 17:24:33 +00:00
Martin Sikora
7671a1e40d fix(common): canceled JSONP requests won't throw console error with missing callback function (#36807)
This commit fixes a use-case where unsubscribing from a JSONP request will result in "Uncaught ReferenceError: ng_jsonp_callback_xy is not defined"
thrown into console. Unsubscribing won't remove its associated callback function because the requested script will finish
loading anyway and will try to call the handler.

PR Close #34818

PR Close #36807
2022-02-24 17:24:33 +00:00
JoostK
ca5603b09b fix(localize): avoid imports into compiler-cli package (#45180)
The compiler-cli's declaration files are not necessarily compatible with web
environments that use `@angular/localize`, and would inadvertently include
`typescript` declaration files in any compilation unit that uses
`@angular/localize` (which increases parsing time and memory usage during
builds) using a default import that only type-checks when
`allowSyntheticDefaultImports` is enabled.

Fixes #45179

PR Close #45180
2022-02-24 17:12:10 +00:00
Renovate Bot
8eb82884bb build: update github/codeql-action action to v1.1.3 (#45188)
PR Close #45188
2022-02-24 17:11:16 +00:00
dario-piotrowicz
bad509688b docs: remove activatedRouteData backward accesses in aio guides (#45140)
developers should not access the router-outlet directive in their
template before defining a template variable for it, such
implementation is present in a couple of aio guides, fix such guides
so that they show the more correct way of accessing the outlet's data

resolves #36173

PR Close #45140
2022-02-24 00:55:18 +00:00
Charles Lyding
2e7e46f1b6 ci: use renovate Github Action tag version pinning (#45178)
Renovate supports using hashed version pinning for individual Github actions while still following SemVer-based tags.
All workflow actions external to the Angular organization now leverage this support to ensure both that stable versions of the actions are used and that the actions are pinned to a hashed version of the tag.

PR Close #45178
2022-02-23 13:02:47 -08:00
Andrew Scott
ded96ca6cb
release: cut the v14.0.0-next.4 release (#45184) 2022-02-23 12:50:34 -08:00
Andrew Scott
0c26c93d1e
docs: release notes for the v13.2.4 release (#45183) 2022-02-23 12:49:04 -08:00
arturovt
f58ad88504 test(common): remove initial navigation since it may redirect to debug.html (#45171)
The `should unregister a URL change listener` may fail in Firefox randomly because of
the `initialNavigation` being set to `true`. This may navigate to `/debug.html` and the
router throws an error `Cannot match any routes: 'debug.html'`.

PR Close #45171
2022-02-23 09:42:44 -08:00
Alan Cohen
75f20d8a88 docs: fix test description to match code example (#45101)
PR Close #45101
2022-02-23 08:58:40 -08:00
dario-piotrowicz
f8dc660605 fix(animations): allow animations with unsupported CSS properties (#44729)
currently animations with unsupported CSS properties cause a hard error
and the crash of the animation itself, instead of this behaviour just
ignore such properties and provide a warning for the developer in
the console (only in dev mode)

this change also introduces a general way to present warnings
in the animations code

resolves #23195

PR Close #44729
2022-02-23 08:57:57 -08:00
JiaLiPassion
d65706a3b2 feat(zone.js): update electron patch to support electron/remote 14 (#45073)
Close #43346

From electron 14, the `CallbacksRegistry` is moved to `@electron/remote` package,
so all `remote` call between `main` process and `renderer` process is
not being patched since the new version of electron released.
Also `CallbacksRegistry` is not exported outside, so this commit make a
`hack` patch to load `CallbacksRegistry` from
`@electron/remote/dist/src/renderer/callbacks-registry` for patching.

PR Close #45073
2022-02-23 08:57:12 -08:00
Daniele Maltese
4fa530757b fix(docs-infra): removed duplicated style in aio examples (#45157)
Removed duplicated style in aio example scss files.

PR Close #45157
2022-02-22 15:35:16 -08:00
JoostK
59559fdbac refactor(animations): make AnimationDriver.getParentElement required (#45114)
This change is a follow up to #45057 to make `AnimationDriver.getParentElement`
a required method, which allows removing the slow path for the animation
namespace insertion logic.

BREAKING CHANGE:

The `AnimationDriver.getParentElement` method has become required, so any
implementors of this interface are now required to provide an implementation
for this method. This breakage is unlikely to affect application developers,
as `AnimationDriver` is not expected to be implemented in user code.

PR Close #45114
2022-02-22 14:05:17 -08:00
Renovate Bot
bd168fc0c3 build: update ossf/scorecard-action commit hash to 3662744 (#45162)
PR Close #45162
2022-02-22 12:48:11 -08:00
Kristiyan Kostadinov
ff6be32c1a refactor(compiler): remove usages of deprecated AST creation functions (#45134)
Proactively replaces our usages of the deprecated `ts.create*` methods in favor of using `ts.factory.create*` so that we're not surprised when the TS removes them in the future. Also accounts for some cases where the signature had changed.

PR Close #45134
2022-02-22 10:22:47 -08:00
ivanwonder
c0778b4dfc fix(compiler-cli): Support resolve animation name from the DTS (#45107)
Before this, the compiler resolves the value in the DTS as dynamic.
If the `trigger` is imported from `@angular/animations`, this PR will
use FFR to simulate the actual implementation in JS and extracts the
animation name.

PR Close #45107
2022-02-22 10:21:39 -08:00
Paul Gschwendtner
f80c59e4ab ci: update SHA for components-repo-unit-tests job to fix flakiness (#45166)
This commit attemps to fix the flakiness that shows up sometimes
in the `components-repo-unit-tests` job. See:

https://app.circleci.com/pipelines/github/angular/angular/43024/workflows/fa9bc546-179a-4215-a7f1-db123efa0fa4/jobs/1126909

We updated Firefox/Chromium in dev-infra, hoping to fix this non-reproducable
flakiness (also checked memory/CPU consumption in the test). So far it looks like
the update helped in the COMP repo so we should try it here as well.

PR Close #45166
2022-02-22 10:20:32 -08:00
Renovate Bot
5957ff4163 build: update scorecard action dependencies to 040feef (#45135)
PR Close #45135
2022-02-18 13:57:03 -08:00
manuelkroiss
f28276c952 docs: replace deprecated SwUpdate#available/activated with new API (#44858)
Since `SwUpdate#available` and `SwUpdate#activated` are deprecated, the new way should be included in the docs instead of the deprecated one.

docs: added missing imports

added imports for VersionReadyEvent, filter, and map

docs: updated service-worker-communications.md

rewrite of SwUpdate service to describe the new versionUpdates property

docs: Apply suggestions from code review

Co-authored-by: George Kalpakas <kalpakas.g@gmail.com>

docs: added events

added VERSION_DETECTED and VERSION_INSTALLATION_FAILED

docs: Apply suggestions from code review

Co-authored-by: George Kalpakas <kalpakas.g@gmail.com>

PR Close #44858
2022-02-18 13:40:34 -08:00
Andrew Kushnir
1e60fe0a3e perf(core): make LOCALE_ID and other tokens from ApplicationModule tree-shakable (#45102)
The `ApplicationModule` module has a number of tokens declared as non-tree-shakable providers. This commit updates them to make tree-shakable.

PR Close #45102
2022-02-18 13:40:02 -08:00
Andrew Kushnir
a96c4827c4 perf(core): make Compiler, ApplicationRef and ApplicationInitStatus tree-shakable (#45102)
The `Compiler`, `ApplicationRef` and `ApplicationInitStatus` classes are registered as non-tree-shakable providers in the `ApplicationModule`. This commit converts them to the tree-shakable providers instead.

PR Close #45102
2022-02-18 13:40:02 -08:00
Andrew Kushnir
fcd047335d refactor(core): drop unused SCHEDULER provider (#45102)
The `SCHEDULER` provider was used previously when both ViewEngine and Ivy code was present. After some prior refactoring, all references to the `SCHEDULER` token were removed, but the token itself remains present in the `ApplicationModule`, which makes it non-tree-shakable.

This commit removes the `SCHEDULER` token as unused.

PR Close #45102
2022-02-18 13:40:02 -08:00
dario-piotrowicz
702e196037 fix(docs-infra): make hamburger menu non focusable when not visible (#45067)
the header hamburger menu gets removed from the page by moving it
outside the screen, it can however still be accessed via keyboard
navigation, add a visibility hidden to the element to prevent such
behavior

PR Close #45067
2022-02-18 13:36:11 -08:00
dario-piotrowicz
be50401090 docs(animations): remove query call in animations example (#45126)
the query call used for the transition between the Home and About tabs
doesn't work as intented since it doesn't find any matching element,
remove such quering since it is not needed

PR Close #45126
2022-02-18 13:35:22 -08:00
David Wolf
4ba95ea93a docs(forms): remove type duplicate from button in reactive-forms example (#45124)
PR Close #45124
2022-02-18 13:34:59 -08:00
Renovate Bot
561bd750b5 build: update dependency io_bazel_rules_sass to v1.49.8 (#45128)
PR Close #45128
2022-02-18 13:34:14 -08:00
AlirezaEbrahimkhani
32f83ab848 docs: solve the problem with Dynamic Component guide example (#45123)
solve ExpressionChangedAfterItHasBeenChecked error by changing the angular lifecycle hook ngAfterViewInit to ngOnInit

resolves angular#44925

PR Close #45123
2022-02-18 13:33:15 -08:00