Commit graph

29561 commits

Author SHA1 Message Date
Ben Hong
65f7686769 docs: migrate reactive-forms to standalone (#51707)
PR Close #51707
2023-09-12 12:23:19 -07:00
Ben Hong
4e0a575262 docs: migrate forms-overview to standalone (#51699)
PR Close #51699
2023-09-12 12:22:46 -07:00
Ben Hong
7b0bfc1dd8 docs: migrate testing to standalone (#51684)
PR Close #51684
2023-09-12 12:22:14 -07:00
Ward Bell
b08323747e docs: Migrate 2nd set of template guide pages and code to Standalone (#51632)
Supplements PR 51364 Template Migration with overlooked pages and examples

Code migrated: `inputs-outputs`, `interpolation`, `property-binding`
Guide pages affected:
* `binding-overview.md`
* `event-binding.md` (already migrated; updated with link to explain passive events)
* `inputs-outputs.md`
* `interpolation.md`
* `property-binding-best-practices.md`
* `property-binding.md`
* `understanding-template-expr-overview.md` (archived)

E2E tests passed locally.

PR Close #51632
2023-09-12 12:21:32 -07:00
Ward Bell
f6ccb163aa docs: Migrate i18n guide pages and code to Standalone (#51589)
E2E tests passed locally

**Added `readme.md` to the example code**

This explains how to build and run the example for both English and French.

**Archived `i18n-optional-manual-runtime-locale.md`**

I was asked to cut out a substantial swath of this page by reviewer "zip-fa". All that remained was a brief paragraph.  I removed the page from the navigation after copying the remaining text to `i18n-optional-import-global-variants.md`. The page is still reachable by 3rd party links.

PR Close #51589
2023-09-12 12:20:45 -07:00
Ward Bell
44c7469495 docs: Migrate Universal guide and code to Standalone (#51564)
Heavily reworked with advice from Alan Agius.

FWIW
* `ng test` fails because there are no unit tests
* `yarn e2e` builds but fails - `Unable to start a WebDriver session.`

**Added `readme.md` to sample code**

Makes it easier for the casual downloader to try the example.

**Added `universal-ngmodule`**

The existing ngModule-based doc has a lot of guidance for developers who are still building with NgModule. Given that we are preserving the existing NgModule guidance (with modifications), it seems prudent to preserve the NgModule form of the Universal guidance. So I copied the existing guide and code to `universal-ngmodule` and added it to the left-side navigation under the "NgModules" sub-tree.

Warning: it retains all of the faults of the original guide ... faults that were addressed in the current revision.

PR Close #51564
2023-09-12 12:20:10 -07:00
Kristiyan Kostadinov
52cc7f839b build: align with internal tsconfig options (#51728)
Currently internally Angular has some customized tsconfig files, because we don't align with the tsconfig of the rest of g3. These changes enable `noImplicitReturns` and `noPropertyAccessFromIndexSignature` to align better with the internal config.

PR Close #51728
2023-09-12 11:39:42 -07:00
Alan Agius
caaabd8efe release: cut the zone.js-0.13.3 release (#51742)
PR Close #51742
2023-09-12 11:16:20 -07:00
Alex Rickabaugh
38c9f08c8d refactor(core): decouple effects from change detection (#51049)
Previously effects were queued as they became dirty, and this queue was
flushed at various checkpoints during the change detection cycle. The result
was that change detection _was_ the effect runner, and without executing CD,
effects would not execute. This leads a particular tradeoff:

* effects are subject to unidirectional data flow (bad for dx)
* effects don't cause a new round of CD (good/bad depending on use case)
* effects can be used to implement control flow efficiently (desirable)

This commit changes the scheduling mechanism. Effects are now scheduled via
the microtask queue. This changes the tradeoffs:

* effects are no longer limited by unidirectional data flow (easy dx)
* effects registered in the Angular zone will trigger CD after they run
  (same as `Promise.resolve` really)
* the public `effect()` type of effect probably isn't a good building block
  for our built-in control flow, and we'll need a new internal abstraction.

As `effect()` is in developer preview, changing the execution timing is not
considered breaking even though it may impact current users.

PR Close #51049
2023-09-12 08:12:56 -07:00
Alan Agius
e86d6dba27 fix(zone.js): temporary allow deep imports (#51737)
`jest-preset-angular` imports `zone.js` using deep imports. This commit temporary allow this until the correct entry-points are used upstream.

See: https://github.com/thymikee/jest-preset-angular/issues/2162

PR Close #51737
2023-09-12 08:07:58 -07:00
Alan Agius
74755c4b5e fix(zone.js): rename typings conditional export to types (#51737)
`typings` is not valid for TypeScript. See: https://www.typescriptlang.org/docs/handbook/esm-node.html for more information.

PR Close #51737
2023-09-12 08:07:57 -07:00
Andrew Scott
73e4bf2ed2 feat(router): Add feature to support the View Transitions API (#51314)
The View Transitions API enables easy animations when transitioning between different DOM states. This commit adds an opt-in feature to the Router which runs the component activation and deactivation logic in the document.startViewTransition callback. If the browser does not support this API, route activation and deactivation will happen synchronously.

resolves #49401

PR Close #51314
2023-09-11 10:36:10 -07:00
JiaLiPassion
ac56efa410 release: cut the zone.js-0.13.2 release (#51689)
PR Close #51689
2023-09-11 09:22:12 -07:00
Andrew Scott
2d5b6fad4e fix(docs-infra): Ensure experimental tag shows up on docs (#51712)
The experimental tag is part of the stability tags along with "deprecated". This commit updates some code to pick up experimental as well.

PR Close #51712
2023-09-11 09:20:52 -07:00
Paul Gschwendtner
05762b9fff refactor(localize): ignore code duplication error with compiler package (#51500) (#51558)
The localize package intentionally duplicates some logic from the
compiler to avoid adding a dependency. This is now an error in the
packaging rule to prevent common pitfalls/code duplication. Here it's
an explicit decision though so we mark it as such and ask for the check
to be ignored for the particular import.

PR Close #51500

PR Close #51558
2023-09-08 14:49:07 -07:00
Mark Thompson
0d9fd6ddd5 docs: update dependency injection example to standalone (#51587)
PR Close #51587
2023-09-08 10:34:10 -07:00
Gerald Monaco
5277cb408b refactor(core): delegate afterRender errors to an ErrorHandler (#51662)
Improves the error handling story for after*Render by delegating errors to an ErrorHandler, so that one failure does not break every callback.

PR Close #51662
2023-09-08 10:29:33 -07:00
Alan Agius
e866d85e95 docs: typo in what is angular (#51703)
Fix typo in word

PR Close #51703
2023-09-08 09:30:42 -07:00
Angular Robot
00bf05251b docs: update Angular CLI help [main] (#51704)
Updated Angular CLI help contents.

PR Close #51704
2023-09-08 09:28:41 -07:00
Kristiyan Kostadinov
b3edcda9e6 build: attempt to deflake windows tests (#51701)
Adds some logic to try and deflake the tests on Windows.

PR Close #51701
2023-09-08 09:28:02 -07:00
JoostK
eb0137de8a build: migrate project_id option to use bes_instance_name (#51696)
This commit update the RBE configuration to use `bes_instance_name` instead
of `project_id`, which got renamed [in Bazel 5.1][1]. Doing so avoids several warnings
in the CI output.

[1]: 2b48c6b9a4

PR Close #51696
2023-09-07 13:49:07 -07:00
Lars Gyrup Brink Nielsen
26af16c593 docs: merge versions with identical version ranges in pre-v9 compatibility version table (#51645)
PR Close #51645
2023-09-07 12:56:16 -07:00
Lars Gyrup Brink Nielsen
314be83a30 docs: correct pre-v9 TypeScript version ranges in version compatibiliy table (#51645)
For versions 5.x through 8.x, this is based on the `package.json` file of `@angular/compiler-cli`.

For versions 2.x through 4.x, this is based on Angular's changelog.

PR Close #51645
2023-09-07 12:56:16 -07:00
Lars Gyrup Brink Nielsen
1dda2a244e docs: normalize Angular version ranges in pre-v9 version compatibility table (#51645)
PR Close #51645
2023-09-07 12:56:16 -07:00
Lars Gyrup Brink Nielsen
6d86ac8663 docs: format version compatibility tables (#51645)
PR Close #51645
2023-09-07 12:56:16 -07:00
Mark Thompson
429b76eacf docs: convert dependency-injection-in-action (#51602)
* removes unused modules
* converts all components to standalone

PR Close #51602
2023-09-07 12:55:08 -07:00
Charles Lyding
0f10d75228 refactor(compiler): use native BigInt when calculating i18n digests (#48321)
To further modernize and improve the performance of the i18n digest generation,
The 64-bit aspects of the process now use the native `BigInt` instead of a
custom JavaScript implementation. This removes the need for the big_integer
helper code and associated tests as the code was not used anywhere else in the
framework. Only the `BigInt` constructor, `BigInt.asUintN` function, and
`.toString` function are currently used. `BigInt` literals can unfortunately
not yet be used due to the bazel test devmode setup which compiles the TypeScript
code at an EcmaScript level that does not yet support the literals.

Browser support information:
- BigInt constructor: https://caniuse.com/mdn-javascript_builtins_bigint_bigint
- BigInt asUintN: https://caniuse.com/mdn-javascript_builtins_bigint_asuintn
- BigInt toString: https://caniuse.com/mdn-javascript_builtins_bigint_tostring

PR Close #48321
2023-09-07 10:07:47 -07:00
Ben Hong
d14560fa06 docs: migrate dynamic-form guide and code to standalone (#51540)
PR Close #51540
2023-09-07 10:07:03 -07:00
Ben Hong
763314f300 docs: migrate errors code example and guide to standalone (#51536)
PR Close #51536
2023-09-07 10:04:39 -07:00
Matthieu Riegler
3e0e6ed60f docs: update Dynamic Component loader docs to rely on ngComponentOutlet (#49915)
With #51148, the `ngComponentOutlet` directive now supports inputs.
This allows a less verbose and simpler API to instantiate components dynamicaly.

Fixes #49875

PR Close #49915
2023-09-07 10:03:22 -07:00
Ben Hong
3f2d783f65 docs: migrate toh-pt3 to standalone (#51581)
PR Close #51581
2023-09-07 10:02:40 -07:00
Jessica Janiuk
8cd9663a92 release: cut the v17.0.0-next.3 release 2023-09-06 11:25:44 -07:00
Jessica Janiuk
53b082dbda docs: release notes for the v16.2.4 release 2023-09-06 11:00:43 -07:00
Ben Hong
52ff8a56d9 docs: migrate toh-pt2 to standalone (#51580)
PR Close #51580
2023-09-06 17:10:16 +00:00
Alan Agius
cfe2f1d600 ci: force new yarn-lock file to invalidate cache (#51652)
This commit update the lock file to force a new `node_modules` cache as this causes the patch to fail due to GitHub caching and at present, there is also no way to provide a key to invalidate the cache.

PR Close #51652
2023-09-06 16:37:26 +00:00
Alan Agius
4798ec4166 fix(zone.js): add conditional exports to zone.js package (#51652)
This is needed to better support native ESM modules and avoid the otherwise necessary deep imports like `zone.js/fesm2015/zone-node.js` due to disallowed directory imports.

PR Close #51652
2023-09-06 16:37:26 +00:00
Andrew Scott
fe0b793fdc refactor(router): Share more code in the route matching utilities (#51543)
For redirects, most of the logic between wildcard and regular redirects
is identical. Combine what can be combined there. Once that was done,
the first part of the matching for redirects looks almost identical to the regular
matching. Create helpers and combine simplify code where possible there
as well.

PR Close #51543
2023-09-06 15:33:06 +00:00
Andrew Scott
c73a3d6711 refactor(router): Accurately update return types in matching functions (#51543)
This commit updates the return types of the matching functions to only
return an array when more than one return value is actually possible.

PR Close #51543
2023-09-06 15:33:06 +00:00
Andrew Scott
89c6a77c17 refactor(router): Remove unused imports/variables (#51543)
This commit removes some unused imports and variables.

PR Close #51543
2023-09-06 15:33:06 +00:00
Kristiyan Kostadinov
88a0af64fd perf(core): generate arrow functions for pure function calls (#51668)
Reworks the pure functions to use arrow functions with an implicit return instead of function expressions. This allows us to shave off some bytes for each pure function, because we can avoid some of the syntax.

PR Close #51668
2023-09-06 15:32:02 +00:00
Matthieu Riegler
8ad21ccfb8 docs: Add info about hydration caching. (#51648)
The docs was missing an important information about caching. Only GET/HEAD requests are cached until `isStable`

PR Close #51648
2023-09-06 15:31:36 +00:00
Andrew Kushnir
970d68fe76 refactor(core): add prefetch on idle support for defer blocks (#51629)
This commit updates the logic to add `prefetch on idle` support for defer blocks. Previously, the `on idle` logic was already implemented for the main loading and rendering. This commit reuses the same logic to bring it to the prefetching mechanism.

PR Close #51629
2023-09-05 20:49:56 +00:00
Joey Perrott
f61f892070 Revert "ci: disable all of the angular-robot settings (#51663)" (#51666)
This reverts commit df54b1ce1a.

PR Close #51666
2023-09-05 20:48:25 +00:00
SrinathSree
b6844a9056 docs: Added missing explanation of implements OnInit (#51634)
PR Close #51634
2023-09-05 20:08:56 +00:00
Angular Robot
ca1dac2ada docs: update Angular CLI help [main] (#51661)
Updated Angular CLI help contents.

PR Close #51661
2023-09-05 20:07:50 +00:00
Joey Perrott
df54b1ce1a ci: disable all of the angular-robot settings (#51663)
Disable angular robot as it is no longer used for primary workflows and is looking to be turned down.

PR Close #51663
2023-09-05 18:18:15 +00:00
Kristiyan Kostadinov
7c068861b7 refactor(compiler): output arrow functions for deferred dependencies functions (#51650)
Reworks the compiler to generate arrow functions for the deferred dependencies which reduces the number of bytes we generate.

PR Close #51650
2023-09-05 18:16:59 +00:00
AleksanderBodurri
4b54947c97 fix(devtools): use the __ignore_ng_zone__ flag in devtools message bus' to prevent CD loop (#51339)
Updates ChromeMessageBus, SamePageMessageBus and IframeMessageBus to use this new flag in their emit methods.

PR Close #51339
2023-09-05 18:16:32 +00:00
AleksanderBodurri
04bffaa41c refactor(core): implement __ignore_ng_zone__ flag (#51339)
This flag allows message event listeners to prevent callbacks from executing within the NgZone if they contain a special `__ignore_ng_zone__` flag.

This functionality is built with Angular DevTools in mind, where it prevents an infinite change detection loop in inspecting applications that have message event listeners:

CD -> Inspected app emits componentTreeDirty event to DevTools -> DevTools emits event to get new component Tree from Inspected app -> Inspected app message event listener fires -> CD

PR Close #51339
2023-09-05 18:16:32 +00:00
Joey Perrott
2d96dc27b7 ci: remove test job from circleci in favor of GHA (#51660)
Remove the `test` job from circleci

PR Close #51660
2023-09-05 18:06:49 +00:00