Commit Graph

25829 Commits

Author SHA1 Message Date
Andrew Kushnir 9226dd20e9 release: cut the v15.1.0-next.2 release 15.1.0-next.2 2022-12-07 14:04:39 -08:00
Andrew Kushnir 9e9b90cc39 docs: release notes for the v15.0.3 release 2022-12-07 13:56:33 -08:00
Konstantin Kharitonov f8ecc194e9 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:00 -08:00
Alan Agius 146d2ee246 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:25 -08:00
Angular Robot 11a24c3740 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:33 -08:00
Kristiyan Kostadinov 5f9c7ceb90 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
sr5434 02691a74bb refactor(forms): make FormBuilder classes provided in root (#48245)
refactor(forms): make FormBuilder classes provided in root

This commit updates the FormBuilder classes to provide them in root
instead of using a deprecated pattern of providing a service in a specific
module using the `providedIn` syntax.

Closes #48237.

PR Close #48245
2022-12-06 13:29:41 -08:00
Alan Agius eae182da84 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:41 -08:00
Angular Robot 7c4e9ce5c0 build: update cross-repo angular dependencies (#47882)
See associated pull request for more information.

PR Close #47882
2022-12-06 12:48:11 -08:00
Charles Lyding a403286cfa refactor(compiler): reduce complexity for legacy i18n digest string output (#48362)
When using the legacy digest algorithm for i18n messages, the output hexadecimal
string now leverages a number's `toString()` function in addition to the `padStart`
string function to generate the result. This removes the need for several helper
functions which involved a series of iteration and bitwise operations to previously
generate the same output.

PR Close #48362
2022-12-06 11:48:56 -08:00
Angular Robot 6533f424b7 build: update dependency jasmine-spec-reporter to v7 (#48367)
See associated pull request for more information.

PR Close #48367
2022-12-06 11:43:04 -08:00
Angular Robot 126573d76b build: update all non-major dependencies (#48372)
See associated pull request for more information.

PR Close #48372
2022-12-06 11:06:39 -08:00
Angular Robot 57fdc998bf build: update dependency @types/jasmine to v4 (#48365)
See associated pull request for more information.

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

PR Close #48223
2022-12-06 10:52:15 -08:00
Kristiyan Kostadinov dd42974b07 feat(core): support TypeScript 4.9 (#48005)
Updates to TypeScript 4.9 and resolves some of the errors and deprecation warnings that showed up as a result.

PR Close #48005
2022-12-06 10:45:33 -08:00
Angular Robot 8656ac0df3 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:13 -08:00
dario-piotrowicz 4c023956d8 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:58:59 -08:00
Alan Agius f443ee6af7 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:21 -08:00
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