25791 Commits

Author SHA1 Message Date
Andrew Kushnir 5d5b51599d release: cut the v15.0.3 release 15.0.3 2022-12-07 13:54:02 -08:00
Konstantin Kharitonov bf44dc234a fix(common): Update Location to support base href containing origin (#48327)
In case `APP_BASE_HREF` is set including `origin` the further usage of it might cause failure

e.g.
If an app is placed on `https://example.com` and bundles are on `https://cdn-example.com` you have to set `APP_BASE_HREF` up as `https://example.com/` and build the app with `--base-href` as `https://cdn-example.com/` but it does not work because of the bug

Fixes #48175

PR Close #48327
2022-12-07 09:18:01 -08:00
Angular Robot 7df1989940 build: update cross-repo angular dependencies (#47882) (#48384)
See associated pull request for more information.

PR Close #47882

(cherry picked from commit 7c4e9ce5c0)

PR Close #48384
2022-12-07 09:09:30 -08:00
Angular Robot 6b6bf6332b build: update all non-major dependencies (#48372) (#48384)
See associated pull request for more information.

PR Close #48372

(cherry picked from commit 126573d76b)

PR Close #48384
2022-12-07 09:09:30 -08:00
Alan Agius cb7365a7bd refactor(compiler): replace flatten and map with flatMap. (#48378)
Replace custom `flatten` and `map` with native `flatMap` usage.

Benchmark:
| Test case name 	| Result                                                 	|
|----------------	|--------------------------------------------------------	|
| flatten & map  	| flatten & map x 1,182 ops/sec ±2.18% (63 runs sampled) 	|
| flatMap        	| flatMap x 6,011 ops/sec ±0.91% (35 runs sampled)       	|

The fact that `flatMap` is faster is also highlighted in https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/flatMap

PR Close #48378
2022-12-07 09:08:26 -08:00
Angular Robot a51e625239 build: update github/codeql-action action to v2.1.35 (#48371)
See associated pull request for more information.

PR Close #48371
2022-12-07 09:07:34 -08:00
Kristiyan Kostadinov e4dcaa513e fix(core): unable to inject ChangeDetectorRef inside host directives (#48355)
When injecting the `ChangeDetectorRef` into a node that matches a component, we create a new ref using the component's LView. This breaks down for host directives, because they run before the component's LView has been created.

These changes resolve the issue by creating the LView before creating the node injector for the directives.

Fixes #48249.

PR Close #48355
2022-12-07 09:06:46 -08:00
Alan Agius c0d04175ff refactor(core): simplify array flatten logic (#48358)
We can now use modern Javascript to get the same result.

PR Close #48358
2022-12-06 12:48:42 -08:00
Angular Robot 5e2cd07a0b build: update dependency jasmine-spec-reporter to v7 (#48367)
See associated pull request for more information.

PR Close #48367
2022-12-06 11:43:05 -08:00
Angular Robot 4c76f94ce0 build: update dependency @types/jasmine to v4 (#48365)
See associated pull request for more information.

PR Close #48365
2022-12-06 10:57:04 -08:00
Angular Robot 0e539eb56d build: update eslint dependencies to v5.45.1 (#48223)
See associated pull request for more information.

PR Close #48223
2022-12-06 10:52:16 -08:00
Angular Robot 39b6cbcf4b build: update dependency karma-jasmine-html-reporter to v2 (#48369)
See associated pull request for more information.

PR Close #48369
2022-12-06 10:09:14 -08:00
dario-piotrowicz 9a5d84249a fix(compiler): make sure selectors inside container queries are correctly scoped (#48353)
improve the emulated shadowDom implementation so that it can correctly
scope selectors present inside the @container at-rule (recently added
to the css specs)

resolves #48264

PR Close #48353
2022-12-06 09:59:00 -08:00
Alan Agius 1e58a8c05d docs: wrap json property in double quotes (#48375)
Previously, the `budgets` was not wrapped in quotes which caused the JSON to be invalid.

PR Close #48375
2022-12-06 09:58:22 -08:00
Alan Agius 40d6a06615 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:24 -08:00
Angular Robot fc872b12aa build: update dependency ts-node to v10 (#48370)
See associated pull request for more information.

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

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

PR Close #48366
2022-12-05 15:56:41 -08:00
Paul Gschwendtner 45cc5f49e4 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:38 -08:00
Paul Gschwendtner 3f9cfae8a4 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:38 -08:00
Bob Watson dcab0f48d6 docs: add example app for new landing page (#48360)
PR Close #48360
2022-12-05 14:37:47 -08:00
Alan Agius 0b04da1fd7 refactor(core): remove several private utils and APIs (#48357)
These APIs are no longer used.

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

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

PR Close #48357
2022-12-05 14:35:09 -08:00
Alex Castle 50b1c2bf52 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:14 -08:00
Joey Perrott 9214e58d44 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 0b388a00da 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 dc5f436769 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 7f31e55961 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
Andrew Scott 06c34cd99a refactor(router): Remove assignExtraOptionsToRouter helper function (#48313)
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 #48313
2022-12-05 12:01:57 -08:00
Andrew Scott 58e55495f2 refactor(router): Eliminate constructor parameters in Router class (#48313)
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 #48313
2022-12-05 12:01:57 -08:00
Derek Cormier 1b373067e1 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 226441fc3a 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 38701ce07b 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 09388eb9ab 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 95886d8aa9 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 6f79c2b7fd 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 59f2d46a16 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 30226f08f3 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 7bc6c2d314 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 dd4fd1f4f4 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 49af83e5e3 docs: added missingNgForOfLet extended diagnostics details page (#48320)
Closes #48288.

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

PR Close #48319
2022-12-02 11:46:54 -08:00
Alan Agius 2af638818a 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 2eccfd412e 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:44 -08:00
Paul Gschwendtner f1cb455c1e 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:44 -08:00
Paul Gschwendtner 520946d2e7 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:44 -08:00
Paul Gschwendtner cd526c1db6 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:43 -08:00
Paul Gschwendtner ff07194e92 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:43 -08:00
Andrew Scott c0fe82049f docs: Add page for 'suffixNotSupported' diagnostic (#48315)
Adds documentation page for `suffixNotSupported` extended diagnostic.

fixes #48290

PR Close #48315
2022-12-02 08:59:01 -08:00