Commit graph

29561 commits

Author SHA1 Message Date
Alan Agius
8189b64d7d refactor(core): remove old AJD workaround for G3 (#48363)
This workaround does not seem to be needed any longer.

PR Close #48363
2022-12-06 09:14:23 -08:00
Angular Robot
c2183f188a build: update dependency ts-node to v10 (#48370)
See associated pull request for more information.

PR Close #48370
2022-12-06 09:12:26 -08:00
Angular Robot
a675b06e20 build: update dependency karma-jasmine to v5 (#48368)
See associated pull request for more information.

PR Close #48368
2022-12-06 09:11:47 -08:00
Angular Robot
281c614113 build: update dependency jasmine-core to v4 (#48366)
See associated pull request for more information.

PR Close #48366
2022-12-05 15:56:40 -08:00
Paul Gschwendtner
ecddcbc269 build: switch new AIO preview action to use aio: preview label (#48345)
The new AIO preview deployment should take over the existing `aio:
preview` label- now after it being tested- and working as expected.

PR Close #48345
2022-12-05 14:52:37 -08:00
Paul Gschwendtner
6b16df1954 build: remove docker-based AIO preview deploy setup (#48345)
The docker-based AIO preview deploy setup is replaced with
significantly simpler setup using GitHub actions provided by
dev-infra (also something dev-infra can maintain better then).

The actions under the hood leverage Firebase preview channels.

PR Close #48345
2022-12-05 14:52:37 -08:00
Bob Watson
65d8803f11 docs: add example app for new landing page (#48360)
PR Close #48360
2022-12-05 14:37:46 -08:00
Alan Agius
cf51690341 refactor(core): remove several private utils and APIs (#48357)
These APIs are no longer used.

PR Close #48357
2022-12-05 14:35:08 -08:00
Alan Agius
e7feaa1412 refactor(compiler): remove unused projection const (#48357)
`projection` const is unused in `serializePlaceholderValue`.

PR Close #48357
2022-12-05 14:35:08 -08:00
Alan Agius
ffbc9679e4 refactor(common): remove unused setDOM (#48357)
Remove unused `setDOM` method is unused.

PR Close #48357
2022-12-05 14:35:08 -08:00
Alex Castle
8e52ca2714 fix(common): Don't generate srcsets with very large sources (#47997)
Fix an issue where users could inadvertently generate very large source images in ngOptimizedImage

PR Close #47997
2022-12-05 12:12:13 -08:00
Joey Perrott
408aed7a75 build: enable the ng-dev auth service (#48361)
Enable the auth service for merging into the repository

PR Close #48361
2022-12-05 12:09:08 -08:00
Paul Gschwendtner
0beeee4304 build: add more debug information for occasional windows flakiness (#48351)
Ocassionally the NodeJS version is not correct after NVM on Windows.
This adds some debug information that should help improve stability
here. A recent attempt to update the `$PATH` did not seem to help.

PR Close #48351
2022-12-05 12:04:05 -08:00
piyush132000
e44b2b3fe0 docs: removed empty methods (#48343)
Removed empty methods and import from files

PR Close #48343
2022-12-05 12:03:33 -08:00
Derek Cormier
c0ddaf878a build(bazel): mark an AIO sjs e2e test as flakey (#48331)
Like a couple of the the other systemjs e2e tests, this one occasionally fails CI.

PR Close #48331
2022-12-05 12:02:29 -08:00
Derek Cormier
d2dcf95467 build(bazel): set ci steps that build aio to 2xlarge+ (#48342)
These steps builds AIO which is memory intensive. Running out of memory
may be the cause of some ci flakiness. Change the executor size to test
this theory.

For context: The CLI process is randomly getting `Killed`, likely by the
linux OOM killer. The Angular CLI builds happen on the host machine- no RBE.

Without the Bazel migration they were previously already at ~63% peak RAM.
With Bazel's overhead and e.g. remote caching, it seems to hit 100%
(can be seen in CircleCI machine insights). OOM killer may then choose the
highest consuming task. i.e. the Angular CLI and kill it.

Angular CLI build ram consumption is proportional to the size of the app. AIO is not small

https://app.circleci.com/pipelines/github/angular/angular/53992/workflows/ec47e3d8-2e7d-45b8-a802-7ec8ec4026c4/jobs/1265666/parallel-runs/0/steps/0-106

https://angular-team.slack.com/archives/C02PARQNMC1/p1670067910332809i

PR Close #48342
2022-12-05 11:40:56 +00:00
Paul Gschwendtner
192df7194b build: set target firebase project when setting deploy target (#48352)
We now set the Firebase deploy target for AIO preview deployment
via GitHub actions. It looks like configuring the deploy target
also requires authentication / or a project.

PR Close #48352
2022-12-04 20:26:10 +00:00
Paul Gschwendtner
0d6b33c40f build: check out project before setting AIO preview targets (#48347)
Checks out the Firebase project before setting the AIO preview targets.
Surprisingly Firebase requires a project when setting resource
identifiers for the targets. This is already done by the Firebase
deploy action from @FirebaseExtended, but we need to do it earlier.

PR Close #48347
2022-12-04 16:14:11 +00:00
Paul Gschwendtner
43e8f4798f build: use npx for setting firebase deploy targets in AIO preview (#48346)
For the deploy job we still need to use the Firebase CLI to configure
the proper hosting deploy targets. See:
011ef66a04.

We don't have node modules installed in this job, and it would
also be overkill to install them for just using firebase here.

Since the action uses `npx firebase-tools` down the line anyway,
we can use it without any speed downsides.

PR Close #48346
2022-12-04 13:18:40 +00:00
Paul Gschwendtner
011ef66a04 build: set firebase deploy target when deploying AIO preview (#48338)
The AIO firebase project specifies `aio` as deploy target. This means
that we need to configure this target before being able to deploy AIO
previews.

We use the default project target as target since the preview Firebase
project does not use multi site targets. See:
https://firebase.google.com/docs/hosting/multisites

PR Close #48338
2022-12-04 11:11:40 +00:00
Angular Robot
09fe75d0e9 build: update actions/checkout action to v3 (#48337)
See associated pull request for more information.

PR Close #48337
2022-12-03 16:09:10 +00:00
Angular Robot
d1a501e65b build: update actions/checkout digest (#48336)
See associated pull request for more information.

PR Close #48336
2022-12-03 10:45:39 +00:00
Paul Gschwendtner
c3136d6723 build: setup github actions for preview deployment of AIO (#48302)
Sets up two new actions for supporting preview deployments
of AIO by applying a label. i.e. `AIO preview`.

PR Close #48302
2022-12-03 10:13:26 +00:00
Paul Gschwendtner
c1ff81075b build: introduce common action for installing dependencies w/ cache in actions (#48302)
Instead of repeating the node module installation step in future GitHub
actions, a single place should contain the cache key etc.

PR Close #48302
2022-12-03 10:13:26 +00:00
Paul Gschwendtner
2352c2f143 build: attempt to avoid nodejs version flakiness in test_win job (#48326)
The `test_win` job is occasionally failing where a super old NodeJS
version is used even though we installed a proper one with `nvm`.

It's unclear how the CircleCI windows VMs differ here, it's coming
up rarely and is hard to reproduce when SSH-ing into VMs. Our best
guess is that the existing NodeJS version from the container/image is
super old and somehow takes precedence over the NVM-managed NodeJS
version. This could happen due to bad ordering in the `$PATH`
environment variable, or NVM not properly being wired up there.

We attempt to fix this by always setting `$PATH` to the NVM symlink
directory manually- with highest priority.

PR Close #48326
2022-12-02 14:55:55 -08:00
Andrew Kushnir
7b7d5e1199 docs: added missingNgForOfLet extended diagnostics details page (#48320)
Closes #48288.

PR Close #48320
2022-12-02 14:54:09 -08:00
Andrew Kushnir
4bff346240 docs: added missingControlFlowDirective extended diagnostics details page (#48319)
Closes #48287.

PR Close #48319
2022-12-02 11:46:53 -08:00
Alan Agius
4f7456c71d refactor(platform-browser): simplify flattenStyles method (#48293)
With this change we simplify the `flattenStyles` logic using modern JavaScript.

PR Close #48293
2022-12-02 11:36:13 -08:00
Paul Gschwendtner
ccff7dcb28 build: fix unnecessary large runfiles in AIO when composing boilerplate (#48329)
The `example-boilerplate` NodeJS binary always depends on all files from
the individual examples. This is not needed as for composition w/ the
boilerplate, only the target example content + boilerplate is needed
in the runfiles. This reduces the runfiles and therefore speeds up
boilerplate creation (which can happen for all examples concurrently).

PR Close #48329
2022-12-02 09:47:43 -08:00
Paul Gschwendtner
0125677cfe build: always ensure node_modules folders are not picked up in AIO (#48329)
AIO has two risk places where `node_modules` folders may exist and may
be accidentally picked up by Bazel- even though they are already added
as part of `.bazelignore` and made visible through `.gitignore`. It
doesn't hurt instructing Bazel to always ignore `node_modules` as part
of the `glob` instruction.

Co-authored-by: Joey Perrott <josephperrott@gmail.com>

PR Close #48329
2022-12-02 09:47:43 -08:00
Paul Gschwendtner
eb43ed25eb build: do not use --config=release when building AIO for development (#48329)
When building AIO using `yarn build` the `--config=release` is added.
This was done as part of the Bazel migration to make sure the footer
shows a Git revision via Bazel stamping.

This does not provide enough benefits, compared to the downside of
reduced caching. Bazel will discard the analysis cache when the stamp
configuration changes.

This may happen easily when you work in framework where
`--config=release` is not used. Then when starting work in AIO: the
config changes and the cache is discarded. This may even mean that
existing framework package build artifacts may be discarded when an
AIO local build is started.

Co-authored-by: Joey Perrott <josephperrott@gmail.com>

PR Close #48329
2022-12-02 09:47:42 -08:00
Paul Gschwendtner
ef5b8a208f build: cleanup bazelignore file (#48329)
These folders are no longer used in the source tree, and only exist
in the Bazel sandbox. We can rmeove them. Node modules are kept because
people may create them when editing the integration `package.json`
files.

PR Close #48329
2022-12-02 09:47:42 -08:00
Paul Gschwendtner
72f01b7a42 build: avoid common node_modules/ bazel slowness pitfall (#48329)
It's very easy to have some random `node_modules/` folder floating
around in the repository. Especially coming from the old AIO
example boilerplate setup (which heavily relied on nested node modules).

These `node_modules/` folders can contain millions of files and might
be accidentally picked up by Bazel `glob`'s (if they are authored
in way that selects all nested files).

This could surface in `aio/tools/examples/shared` or individual content
examples, causing the Bazel analysis phase or runfile forest creation
to take forever given more than 1.5 files being dealt with.

Note that we keep the `examples/shared` node modules folder gitignored
as otherwise Renovate may have problems when updating the folder.

PR Close #48329
2022-12-02 09:47:42 -08:00
Andrew Scott
21952bbd0f docs: Add page for 'suffixNotSupported' diagnostic (#48315)
Adds documentation page for `suffixNotSupported` extended diagnostic.

fixes #48290

PR Close #48315
2022-12-02 08:59:00 -08:00
Pawel Kozlowski
6706fab017 perf(docs-infra): remove usage of the NgClass directive (#48312)
NgClass has non-negligable performance cost, especially if a
different object is provided as NgClass input (which was the case
for the NavItemComponent). The perfornace problem was noticed
in the scope of the INP score investigations while profiling the
https://angular.io/resources page. On this particular page replacing
NgClass usage with alternatives results in 20x (!) runtime perf
improvement. Such big improvement is possible since we avoid unneeded
CSS classes removal / adding in the DOM.

Part of #25518

PR Close #48312
2022-12-02 08:58:19 -08:00
Paul Gschwendtner
b53e1ed4ef build: enable progress messages for Bazel in CircleCI (#48316)
Bazel otherwise may almost look as being stuck when it performs
many slow e2e tests. We should show what is running, even it results
in a little more output in the logs.

PR Close #48316
2022-12-02 08:57:44 -08:00
Paul Gschwendtner
50a3046e4b build: patch rules_nodejs to ensure nodejs_binary targets can be used as tools in RBE (#48316)
See full explanation in: https://github.com/bazelbuild/rules_nodejs/pull/3605

PR Close #48316
2022-12-02 08:57:43 -08:00
Paul Gschwendtner
f72401091c build: fix AIO jobs not running with RBE and CircleCI Bazel settings (#48316)
The `.bazelrc` workspace file attempted to imported the `.bazelrc.user`
file. This user file is set on CI to include the CI specific Bazel
settings.

Apparently this user rc import does not work, and fails silently given
the `try-import`. It fails because for AIO Bazel commands we change
the working directory using `yarn --cwd aio` and the `try-import`
is relative to the working directory..

PR Close #48316
2022-12-02 08:57:43 -08:00
Charles Lyding
7f36221101 refactor(compiler): use TypedArrays and DataViews to calculate i18n message IDs (#48256)
The native UTF-8 encoder (`TextEncoder`) provides its output as a `Uint8Array`
which is a specialized `TypedArray` for storing byte values. To remove the need
to copy and transform this data multiple times, a `DataView` is used to allow
for low-level access to the data in a variety of bit-widths and endianness.
The `DataView` class is natively available and supported by all browsers and
Node.js versions support by the framework (https://caniuse.com/mdn-javascript_builtins_dataview).

PR Close #48256
2022-12-01 14:38:09 -08:00
Charles Lyding
0827091d49 refactor(compiler): use native UTF-8 text encoding when calculating i18n IDs (#48256)
Instead of relying on a custom implementation of a UTF-8 text encoder that needs to
be maintained by the Angular team, the i18n message digesting process now uses the
native `TextEncoder` class. This class is available for use in all browsers and Node.js
versions supported by the Angular framework (https://caniuse.com/textencoder). The
custom encoder is still used by the compiler's source map generator and cannot yet be
fully removed.

PR Close #48256
2022-12-01 14:38:08 -08:00
Andrew Scott
27eaded62d fix(compiler-cli): Produce diagnostic rather than crash when using invalid hostDirective (#48314)
Because the language service uses the compiler, we try to produce as
much useful information as possible rather than throwing hard errors.
Hard errors cause the compiler to crash. While this can be acceptable
when compiling a program as part of a regular build, this is undesirable
for the language service.

PR Close #48314
2022-12-01 13:43:30 -08:00
Matthieu Riegler
38421578a2 feat(core): Make the isStandalone() function available in public API (#48114)
This commit updates an internal `isStandalone` function and exposes it as a public API,
so that it can be used in applications code.

fixes #47919

PR Close #48114
2022-12-01 13:21:21 -08:00
piyush132000
b4ab710990 docs: removed empty method (#48236)
I removed empty methods from a file and unnecessary import and added export keyword for exportng module

PR Close #48236
2022-12-01 09:39:09 -08:00
Andrew Scott
80297348e8 refactor(router): Remove assignExtraOptionsToRouter helper function (#48215)
This commit removes the unnecessary `assignExtraOptionsToRouter` helper
function. This helper is not necessary because the options can be
retrieved from DI and assigned during the construction on the Router.

PR Close #48215
2022-12-01 09:38:26 -08:00
Andrew Scott
a0551ee761 refactor(router): Eliminate constructor parameters in Router class (#48215)
The Router constructor and `setupRouter` factory mainly exist as a
legacy configuration. Since the Router's creation, the style in Angular
has evolved quite a bit. This commit eliminates and cleans up some
unnecessary comlicated code paths related to the router
constructor/factory.

Note that there are edits to the `setupTestingRouter` that could be seen
as breaking. However, it is not for several reasons:

1. The function is documented as a factory function. If used as
   documented, the parameters should match what's available in DI
2. The function is totally unused by the Router itself and is not used
   in g3 either. I believe it was made publicApi by an error when
   updating documentation annotations long ago.

PR Close #48215
2022-12-01 09:38:26 -08:00
Andrew Scott
4d398a0bab release: cut the v15.1.0-next.1 release 2022-11-30 12:37:21 -08:00
Andrew Scott
33fcb0f171 docs: release notes for the v15.0.2 release 2022-11-30 12:22:52 -08:00
Angular Robot
b935255ef9 build: update all non-major dependencies (#48271)
See associated pull request for more information.

PR Close #48271
2022-11-30 09:29:26 -08:00
Pawel Kozlowski
da7318e2fa refactor(core): remove debug data structures (#48281)
This commit removes several debug data structures from
the framework runtime. The data structures in question
were introduced in the framework in the past with the
idea of having debugging aid in the form of the human-redable
data structures. It turned out that in practice those
data structures were not used (most of the fwk developers
didn't even know about their existence!), yet we kept
paying the price of maintaining those duplicated (prod
and debug) version of the data structures.

PR Close #48281
2022-11-30 09:27:59 -08:00
Angular Robot
e777588b05 build: update dependency @types/uuid to v9 (#48285)
See associated pull request for more information.

PR Close #48285
2022-11-30 09:27:04 -08:00