9888 Commits

Author SHA1 Message Date
Andrew Kushnir c1016d4e57 fix(core): add additional component metadata to component ID generation (#50340)
This commit add `exportAs`, `signals`, `inputs` and `outputs` into account when generating a component ID.

Co-authored-by: alan-agius4 <17563226+alan-agius4@users.noreply.github.com>

PR Close #50340
2023-05-17 09:28:49 -07:00
Matthieu Riegler 5bf1abffea refactor(core): Add a warning when ApplicationRef.isStable doesn't emit true (#50295)
Hydration requires a stable App to run some logic.
With this warning developers will be informed about potential issues encountered when running an unstable app.

Fixes #50285

PR Close #50295
2023-05-17 08:45:27 -07:00
Naaajii 656c9537f0 docs: remove plnkr link from markForCheck example (#50328)
PR Close #50328
2023-05-17 08:13:55 -07:00
Naaajii e56b5f5fa5 docs: update live demo for change detector (#50328)
fixes #44553

PR Close #50328
2023-05-17 08:13:55 -07:00
Sumit Parakh 27b707a33e docs: added wiki link for domain model (#50180)
Closes #49570

PR Close #50180
2023-05-17 08:12:22 -07:00
Andrew Kushnir 3eafb4b470 Revert "fix(core): add additional component metadata to component ID generation (#50203)" (#50335)
This reverts commit 52c74d3b4a.

The reason for revert: this change is breaking some targets in g3.

PR Close #50335
2023-05-16 13:37:32 -07:00
Andrew Kushnir 4c5c0542e9 Revert "refactor(core): avoid using def.signal during component id computation (#50238)" (#50335)
This reverts commit c9657bdb88.

The reason for revert: this change is breaking some targets in g3.

PR Close #50335
2023-05-16 13:37:32 -07:00
gdarnell f3e67749b7 refactor(forms): remove unnecessary Array.from (#50314)
The Array.from isn't necessary since we're just iterating over the map keys.

PR Close #50314
2023-05-16 09:25:27 -07:00
Matthieu Riegler e68a774e9f refactor(core): Improve ExpressionChangedAfterItHasBeenCheckedError (#50286)
Related to #50272 and #18970, this improves the error message of NG100 by including the class name of the component where the error was triggered.

PR Close #50286
2023-05-16 09:24:51 -07:00
Matthieu Riegler cc964f8789 refactor(common): Reduce the precision to 2 digits in the ngOptimizedImage distortion warning message (#50276)
Using toFixed().

fixes #50273

PR Close #50276
2023-05-16 09:23:16 -07:00
markostanimirovic 7d679bdb59 fix(core): allow passing value of any type to isSignal function (#50035)
Unlike the current signature where the input argument must a function, this change allows an input of any type to be passed to the `isSignal` function.

PR Close #50035
2023-05-16 09:22:06 -07:00
Kristiyan Kostadinov fa2ef506e5 refactor(core): remove legacy way of preventing default actions (#50257)
Setting `returnValue = false` to prevent the default action of events hasn't been necessary since IE9.

PR Close #50257
2023-05-15 09:22:34 -07:00
Greg Magolan 15b5a7baab build: share Saucelabs browsers between karma test targets using background Saucelabs daemon and custom karma launcher (#49200)
This upgrades the Saucelabs Bazel step on CI to use the more efficient Saucelabs daemon

PR Close #49200
2023-05-15 09:21:47 -07:00
Angular Robot 14c59d41b4 build: update dependency @rollup/plugin-commonjs to v25 (#50264)
See associated pull request for more information.

PR Close #50264
2023-05-12 10:15:12 -07:00
Angular Robot 4a7ebf4037 build: lock file maintenance (#49879)
See associated pull request for more information.

PR Close #49879
2023-05-11 14:27:02 -07:00
Tyler Vorpahl 41fdfa5fb7 build: bump in-memory-web-api dependency versions (#50246)
This commit updates in-memory-web-api package versions from v15 -> v16.

PR Close #50246
2023-05-11 14:26:02 -07:00
gdarnell cc41758b59 fix(core): allow onDestroy unregistration while destroying (#50237)
Ensure that all onDestroy callbacks are called by allowing unregistering of onDestroy hooks while destroying.

Fixes #50221

PR Close #50237
2023-05-11 10:17:07 -07:00
Matthieu Riegler eef9244596 refactor(elements): remove unnecessary polyfill deps (#50115)
`webcomponents/custom-elements` and `document-register-element` are unnecessary now that we support only evergreen browsers.

PR Close #50115
2023-05-10 14:32:37 -07:00
Matthieu Riegler 1f4bc47fae docs: replace absolute links to aio with relative links. (#50213)
This change follows the introduction of the warning message from a transform processor to prevent absolute links to angular.io.

PR Close #50213
2023-05-10 14:29:51 -07:00
Alan Agius 9005717b7e build: lock file maintenance (#50227)
See associated pull request for more information.

(cherry picked from commit d5f92bdd64)

PR Close #50227
2023-05-10 11:32:44 -07:00
Alan Agius eea11d5e5f refactor(core): simplify state transfer escaping (#50201)
This commit removes unnecessary transfer state escaping and updates this process to be done by the means of a `replacer` and `reviver` method as this removes the need to export the escaping and unescaping methods.

The only thing that we need to escape is `<script` and `</script` which are done by the browsers, but not Node.js.

PR Close #50201
2023-05-10 11:31:35 -07:00
Andrew Kushnir c9657bdb88 refactor(core): avoid using def.signal during component id computation (#50238)
This commit updates the code in 16.0.x branch to avoid using the `def.signals` field on a component, while calculating component id. The `signal` field was introduced later and will be available in 16.1.0.

PR Close #50238
2023-05-10 10:45:36 -07:00
Andrew Kushnir 2abcb74d4b refactor(core): drop next prefix from hydration guide link (#50214)
This commit updates the content of the console log to drop the `next.` prefix from hydration guide link.

PR Close #50214
2023-05-09 14:48:28 -07:00
Alan Agius 52c74d3b4a fix(core): add additional component metadata to component ID generation (#50203)
This commit add `exportAs`, `signals`, `inputs` and `outputs` into account when generating a component ID.

See: https://github.com/angular/angular/issues/50158#issuecomment-1537061939

PR Close #50203
2023-05-09 14:46:42 -07:00
Andrew Kushnir f751ce6445 fix(core): handle projection of hydrated containters into components that skip hydration (#50199)
This commit updates hydration logic to support a scenario where a view container that was hydrated and later on projected to a component that skips hydration. Currently, such projected content is extracted from the DOM (since a component that skips hydration needs to be re-created), but never added back, since the current logic treats such content as "already inserted".

Closes #50175.

PR Close #50199
2023-05-09 14:46:03 -07:00
Matthieu Riegler bb8fb10194 refactor(router): remove private export of withPreloading (#50194)
`withPreloading` is part of the public API.

PR Close #50194
2023-05-09 14:45:30 -07:00
Andrew Kushnir d68796782f fix(core): handle hydration of root components with injected ViewContainerRef (#50136)
This commit fixes an issue where a root component with an injected ViewContainerRef (for ex. `inject(ViewContainerRef)`) was triggering a certain code path during hydration which didn't handle this case correctly.

Resolves #50133.

PR Close #50136
2023-05-09 14:43:45 -07:00
Kristiyan Kostadinov 25756e8b77 refactor(compiler): introduce internal transplanted type (#50104)
Adds a new AST for a `TransplantedType` in the compiler which will be used for some upcoming work. A transplanted type is a type node that is defined in one place in the app, but needs to be copied to a different one (e.g. the generated .d.ts). These changes also include updates to the type translator that will rewrite any type references within the type to point to the new context file.

PR Close #50104
2023-05-09 14:41:16 -07:00
Matthieu Riegler bc65112375 refactor(common): cleanup platformLocation (#50054)
* Drop the usage of @Inject()
* Drop `supportsState` as its supported by evergreen browsers.

PR Close #50054
2023-05-09 14:39:22 -07:00
JiaLiPassion 258de81305 test(zone.js): update zone.js test for jasmine upgrade (#49914)
Update test cases to pass jasmine 6.x update.

PR Close #49914
2023-05-09 14:38:48 -07:00
Angular Robot 5c593d58a1 build: lock file maintenance (#49914)
See associated pull request for more information.

PR Close #49914
2023-05-09 14:38:47 -07:00
Matthieu Riegler 62c8b3cdbf refactor(compiler): Remove unused TransformVisitor & NullVisitor (#48646)
NullVisitor & TransformVisitor are unused and unexported outside the compiler package, we can remove them.

PR Close #48646
2023-05-09 14:38:10 -07:00
Alan Agius 346ab73dd9 fix(core): only try to retrieve transferred state on the browser (#50144)
Prior to this commit we tried to retrieve transferred state on both browser and server. Doing this on the server was redundant and could causes issues as `document` might be undefined.

Closes #50138

PR Close #50144
2023-05-08 14:36:13 -07:00
Matthieu Riegler 1686c25955 refactor(core): Throw an error when the document is not initialized. (#50143)
In case the document is accessed but not available we should throw ASAP an error to prevent non explicit errors.

PR Close #50143
2023-05-08 14:35:39 -07:00
Samir fe31c9c1a7 docs(forms): warn the user about getting old values and show how to avoid (#50123)
PR Close #50123
2023-05-08 14:34:55 -07:00
Samir 25b6ec67f1 docs(forms): warn the user about getting old values and show how to avoid (#50123)
Co-authored-by: Andrew Kushnir <43554145+AndrewKushnir@users.noreply.github.com>
PR Close #50123
2023-05-08 14:34:55 -07:00
Samir e7d626a44a docs(forms): warn the user about getting old values and show how to avoid (#50123)
PR Close #50123
2023-05-08 14:34:55 -07:00
Kristiyan Kostadinov 048b6b1e0d fix(core): bootstrapApplication call not rejected when error is thrown in importProvidersFrom module (#50120)
Fixes that the promise returned by `bootstrapApplication` wasn't being rejected when a module imported using `importProvidersFrom` throws an error. The problem was that the function that resolves the providers happens very early as the injector is being constructed.

Fixes #49923.

PR Close #50120
2023-05-08 14:33:45 -07:00
Andrew Kushnir d686d15c4e refactor(platform-server): import xhr2 dynamically in the ServerXhr class (#50095)
This commit updates the `@angular/common/http` and `@angular/platform-server` packages to allow dynamic import of the `xhr2` dependency. The `xhr2` dependency has side-effects that rely on a global scope and as a result in some environments those side-effectful calls fail. With the changes from this PR, the import is delayed until it's actually needed, which gives a chance for the underlying platform to setup global scope (via shims) as needed.

Co-authored-by: alan-agius4 <17563226+alan-agius4@users.noreply.github.com>

PR Close #50095
2023-05-08 14:32:43 -07:00
Matthieu Riegler a9c6015557 refactor(core): remove webworker related checks on assertDomNode (#50061)
Since the drop of the webworker platform the node can't be a `WebWorkerRenderNode`.

PR Close #50061
2023-05-08 14:30:40 -07:00
Alex Rickabaugh da7ff37dc9 Revert "docs(docs-infra): Remove unused annotation template (#50114)" (#50206)
This reverts commit a1ca162fd6.

This commit causes failures in g3, because `@Annotation` is load-bearing for
tsickle's decorator downleveling transformation.

PR Close #50206
2023-05-08 09:45:36 -07:00
Matthieu Riegler 2f03eefd5c refactor(platform-browser): Throw tree-shakable errors. (#49341)
In a effort to have more tree-shakable errors, this commit transforms every `Error` into a tree-shakable `RuntimeError`

PR Close #49341
2023-05-04 12:21:20 +02:00
Matthieu Riegler 9f332b5c87 docs: remove mentions of the WebWorker platform (#50059)
The webworker platform was dropped in v11.

PR Close #50059
2023-05-04 09:06:55 +02:00
Matthieu Riegler 834fe5c45f refactor(animations): remove circular deps (#50049)
`AnimationDriver` was not used in shared.ts.

PR Close #50049
2023-05-04 08:58:25 +02:00
Kristiyan Kostadinov 97d56f85a3 refactor(compiler): reflect arrow function definition (#50084)
Adds some logic to reflect an arrow function to `ReflectionHost.getDefinitionOfFunction`. This will be useful for some upcoming work.

PR Close #50084
2023-05-04 08:56:24 +02:00
Andrew Kushnir 431b922bd8 refactor(core): minor updates to TestBed error messages (#50072)
This commit updates TestBed error messages to avoid using `R3TestBed` reference and just use `TestBed` instead.

PR Close #50072
2023-05-04 08:53:05 +02:00
Matthieu Riegler b381ad7d8a docs(docs-infra): Remove unused annotation template (#50114)
This page is unused since v7.

PR Close #50114
2023-05-03 10:39:50 +02:00
Matthieu Riegler 8080bf0076 docs: Make links out of @see tags (#50098)
This commit is part of the work for #50097 to improve the linking on the online documentation.

PR Close #50098
2023-05-02 13:14:27 +02:00
Matthieu Riegler d80a6fce3d docs: Add rxjs-interop and reactivity primitives APIs (#50066)
This commit add the APIs of rxjs-interop and reactivity primitives to the online documentation.

PR Close #50066
2023-05-01 07:53:47 -07:00
Alan Agius 5ea624f313 fix(platform-server): remove dependency on @angular/platform-browser-dynamic (#50064)
Using `@angular/platform-browser-dynamic` is no longer required for JIT scenarios with Ivy. Instead `@angular/compiler` should be imported instead.

This change is part of the effort to reduce the server bundles sizes, which is needed to support cloud workers.

BREAKING CHANGE:
Users that are using SSR with JIT mode will now need to add  `import to @angular/compiler` before bootstrapping the application.

**NOTE:** this does not effect users using the Angular CLI.

PR Close #50064
2023-05-01 07:50:04 -07:00