https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
51d53fc release: cut the v17.1.0 release 17 January 2024, 22:45:22 UTC
be882c3 Revert "refactor(core): improve forwardRef typings (#53880)" This reverts commit af6f6e6448edffcd644b0bb6ce155c3ca4270971. 17 January 2024, 21:57:11 UTC
18fa6d7 refactor(compiler-cli): interpolatedSignalNotInvoked diagnostic for input signals (#53883) This updates the extended diagnotic to handle input signals as well. PR Close #53883 17 January 2024, 19:36:43 UTC
bb8a5a4 refactor(router): Use Nullish coalescing assignment when possible. (#53930) Inspired by #53923, lets simplify code when possible. PR Close #53930 17 January 2024, 19:36:13 UTC
9c00506 ci: use ng-dev-previews project for previews (#53958) Rather than use the actual adev site, we should be using the ng-dev-preview site PR Close #53958 17 January 2024, 19:19:29 UTC
79e8539 refactor(compiler): extra diagnostics for `@defer` in local compilation mode (#53899) This commit adds extra logic to produce a diagnostic in case `@Component.deferredImports` contain types from imports that also bring eager symbols. This would result in retaining a regular import and generating a dynamic import, which would not allow to defer-load dependencies. PR Close #53899 17 January 2024, 18:46:15 UTC
6f79507 fix(core): Change defer block fixture default behavior to playthrough (#53956) This inverts the default behavior of test bed to use playthrough for defer blocks instead of manual. fixes: #53686 PR Close #53956 17 January 2024, 18:45:42 UTC
6616019 refactor: migrate modules to prettier formatting (#53954) Migrate formatting to prettier for modules directory from clang-format PR Close #53954 17 January 2024, 17:42:01 UTC
4d4858f docs: add `platform-browser/animations/async` entry to AIO (#53914) fixes #53912 PR Close #53914 17 January 2024, 17:14:44 UTC
538fe47 ci: use the config from adev for adev previews (#53955) Properly use the adev firebase config. PR Close #53955 17 January 2024, 17:13:44 UTC
b07c549 refactor(compiler): enable `register` and `resolve` phases for local compilation (#53901) This commit update the logic to enable `register` and `resolve` phases for local compilation. Those phases will be useful for local compilation in certain cases (will be used in followup PRs). PR Close #53901 17 January 2024, 17:03:57 UTC
6f6ad02 ci: set up previews of adev (#53941) Set up preview actions to allow for a preview of the adev site to be deployed for a PR with the `adev: preview` label. PR Close #53941 17 January 2024, 03:18:33 UTC
d08f91f ci: run adev tests on CI (#53941) Run tests in adev for CI PR Close #53941 17 January 2024, 03:18:32 UTC
28aa7b3 refactor: migrate tools to prettier formatting (#53947) Migrate formatting to prettier for tools directory from clang-format PR Close #53947 17 January 2024, 03:17:51 UTC
6ac0a68 docs(devtools): update development docs (#53948) These docs are out of date with how we currently build devtools in dev mode and as a browser extension. This commit brings these docs up to date. PR Close #53948 17 January 2024, 03:17:20 UTC
ea19bff docs(devtools): remove devtools/CONTRIBUTING.md (#53948) This is an artifact left over form the repo merge. There is already an existing CONTRIBUTING.md for this repo PR Close #53948 17 January 2024, 03:17:20 UTC
1112e91 refactor(core): re-organize queries code (#53922) This commit splits the query implementation and instructions into a separate files. This is a pattern frequently used by other functional areas of the framework and is a preparation for introducing queries-as-signals where we are going to see more instructions delegating to the same core functionality. PR Close #53922 17 January 2024, 00:00:36 UTC
0d8a5c4 docs: fix-build-path-in-http-server-command (#53226) PR Close #53226 16 January 2024, 17:37:12 UTC
76ceeba fix(compiler-cli): do not throw fatal error if extended type check fails (#53896) Currently when the extended type check fails due to an import reference that cannot be generated, the fatal diagnostic is not caught and not properly exposed as a `ts.Diagnostic` that can be gracefully handled. This is inconsistent to non-extended type checking diagnostics. This is problematic because Angular CLI applications currently fail in obscure ways because: - the CLI does not expect `getDiagnosticsForFile` to actually throw runtime errors. - the CLI does not seem to properly print these errors given the parallel workers and build excection, and those errors are especially hard to debug because there is no `stack` for `FatalDiagnosticError`'s. Example: `MyDir` is not exported and the type check block cannot reference it. PR Close #53896 16 January 2024, 17:36:36 UTC
99c2d76 build(docs-infra): enable prerendering for adev (#53871) Enable the prerender option for adev's angular.json file. PR Close #53871 16 January 2024, 17:35:46 UTC
246cb9c docs: remove repeated sentence (#53853) PR Close #53853 12 January 2024, 18:26:33 UTC
d7c75c6 refactor(core): improve forwardRef typings (#53880) This commit improves the forwardRef typings for better type safety and inference. PR Close #53880 12 January 2024, 18:26:02 UTC
0daca45 fix(core): TestBed should still use the microtask queue to schedule effects (#53843) Prior to this commit, `TestBed` would require tests call `flushEffects` or `fixture.detectChanges` in order to execute effects. In general, we want to discourage authoring tests like this because it makes the timing of change detection and effects differ from what happens in the application. Instead, developers should perform actions and `await` (or `flush`/`tick` when using `fakeAsync`) some `Promise` so that Angular can react to the changes in the same way that it does in the application. Note that this still _allows_ developers to flush effects synchronously with `flushEffects` and `detectChanges` but also enables the <action>, `await` pattern described above. PR Close #53843 11 January 2024, 20:05:58 UTC
12f9ed0 refactor(compiler-cli): add tests for defer blocks and local compilation (#53591) This commit adds tests to cover local compilation support for `@defer` blocks. PR Close #53591 10 January 2024, 23:29:00 UTC
6971341 refactor(compiler): update TemplateDefinitionBuilder to support local compilation (#53591) This commit updates the logic of the `TemplateDefinitionBuilder` to support local compilation and generate a single dependency function for all explicitly deferred deps within a component. PR Close #53591 10 January 2024, 23:28:59 UTC
43d6816 refactor(compiler-cli): add checks to prevent same deps in `imports` and `deferredImports` (#53591) This commit updates the typechecker logic to prevent same deps in `imports` and `deferredImports`. PR Close #53591 10 January 2024, 23:28:59 UTC
4c4fea1 refactor(compiler): add support for internal `deferredImports` field (#53591) This commit updates the logic to add support for internal `deferredImports` field in compiler. PR Close #53591 10 January 2024, 23:28:59 UTC
c6df89c refactor(compiler-cli): update DeferredSymbolTracker to use explicit deps config (#53591) This commit updates the `DeferredSymbolTracker` class to take info account the `onlyExplicitDeferDependencyImports` flag. The `DeferredSymbolTracker` class also exposes a new API to register import declarations as explicitly deferred, which will be used in followup commits. PR Close #53591 10 January 2024, 23:28:59 UTC
9cae9b4 refactor(compiler-cli): add an internal config to enforce explicit deps in `@defer` for local compilation mode (#53591) This commit adds an internal config option to enforce explicit deps in `@defer` for local compilation mode. PR Close #53591 10 January 2024, 23:28:59 UTC
29b959c refactor(compiler): add an internal API to check is an element is inside a defer block (#53591) This commit updates the logic to expose an internal API on the `R3BoundTarget` to check if an element belongs to any defer block. PR Close #53591 10 January 2024, 23:28:59 UTC
a24b24e refactor(compiler-cli): store full Pipe metadata in typechecking code (#53591) This commit updates typechecker to store full Pipe metadata in internal data strctures, so that this information is available to more places in the code, which will be updated in a followup commit. PR Close #53591 10 January 2024, 23:28:59 UTC
f51c008 refactor(compiler-cli): extract various logic into separate functions (#53591) This commit updates a few places to extract the logic into a separate functions which will be reused in a few places in followup commits. PR Close #53591 10 January 2024, 23:28:59 UTC
3dedd6a build: set up adev testing (#53854) Set up testing for the adev directory PR Close #53854 10 January 2024, 23:22:37 UTC
881376e release: cut the v17.1.0-rc.0 release 10 January 2024, 22:25:36 UTC
3877635 docs: release notes for the v17.0.9 release 10 January 2024, 22:13:54 UTC
863be4b feat(core): expose new `input` API for signal-based inputs (#53872) Enables signal inputs for existing Zone based components. This is a next step we are taking to bring signal inputs earlier to the Angular community. The goal is to enable early access for the ecosystem to signal inputs, while we are continuing development of full signal components as outlined in the RFC. This will allow the ecosystem to start integrating signals more deeply, prepare for future migrations, and improves code quality and DX for existing components (especially for OnPush). Based on our work on full signal components, we've gathered more information and learned new things. We've improved the API by introducing a way to intuitively declare required inputs, as well as improved the API around initial values. We even support non-primitive initial values as the first argument to the `input` function now. ```ts @Directive({..}) export class MyDir { firstName = input<string>(); // string|undefined lastName = input.required<string>(); // string age = input(0); // number ``` PR Close #53872 10 January 2024, 20:33:31 UTC
b2066d4 refactor(compiler-cli): detect input functions without partial evaluation (#53872) This allows us to ensure signal inputs and a potential JIT transform remain single file compilation compatible. The consequences are that options need to be statically analyzable more strictly, compared to loosened restrictions with static interpretation where e.g. `alias` can be defined through a shared variable. PR Close #53872 10 January 2024, 20:33:31 UTC
f6a32c0 docs: fix & update apf links to pkg examples (#53866) PR Close #53866 10 January 2024, 18:43:54 UTC
7862686 test(core): add acceptance unit tests for signal inputs (#53808) Adds AOT and JIT unit tests for signal inputs that verify integration of signal inputs for our users. PR Close #53808 10 January 2024, 12:21:06 UTC
74099a3 test: add infrastructure to run signal acceptance tests with JIT and AOT (#53808) Adds infrastructure to run signal input tests with JIT (using the transform) and AOT. Acceptance tests for signal inputs will run with both variants. In the future we can consider expanding this infrastructure for all of our acceptance tests, but that's a different story. PR Close #53808 10 January 2024, 12:21:06 UTC
39ea8b3 refactor(compiler-cli): drop dependency on external modules for input recognition (#53808) Improves the recognition of the `input`/`input.required` functions to not depend on external module resolution. This is useful for local compilation and for transforms operating on a single file/ isolated module. PR Close #53808 10 January 2024, 12:21:06 UTC
e934f3a refactor(compiler-cli): add diagnostic for inputs declared on static members (#53808) Currently when someone declares a signal or non-signal input on a static class member, the compiler will not yield any diagnostic. We can detect these mistakes and report a diagnostic to help our users. PR Close #53808 10 January 2024, 12:21:06 UTC
40b0467 refactor(compiler-cli): diagnostics ensuring signal inputs are declared properly (#53808) This commit addds two diagnostics for two scenarios where signal inputs are declared incorrectly: - a signal input is also annotated with `@Input` in the TypeScript sources. - a signal input is also declared in the `inputs` option of `@Directive/`@Component`. PR Close #53808 10 January 2024, 12:21:05 UTC
4906ba7 test: add completion tests for language service with signal inputs (#53808) Given that the TCB output changes with signal inputs, and one of our important considerations was auto-completion, we need some unit tests that verify and guarantee proper completion with signal inputs being bound in templates. This commit adds these. PR Close #53808 10 January 2024, 12:21:05 UTC
81379ef refactor(compiler-cli): follow-up typo fixes for typecheck utilities (#53808) Follow-up for the inital signal inputs PR, fixing a typo that was made. PR Close #53808 10 January 2024, 12:21:05 UTC
eba017f refactor(compiler-cli): add transform to support signal input in JIT (#53808) This commit adds a transform for supporting input signals in JIT environments. The transform will be wired up for Angular CLI applications automatically. An integration test verifies that this fixes unit testing with signal inputs. The transform basically will take the signal input metadata and transform it into `@Input` decorators that can provide static information to the Angular JIT runtime when the directive/component definition is compiled. PR Close #53808 10 January 2024, 12:21:05 UTC
b51f386 refactor(compiler-cli): expose import manager import insertion helper (#53808) This commit does two things: - exposes `addImports` so that it can be used by transforms that we are adding to the compiler. e.g. the signal input to `@Input` transform. - `updates `addImports` to support/use the transform context factory. This will allow us to write proper transforms using `addImports`. Also leverages this in the Ivy JS/DTS transforms. PR Close #53808 10 January 2024, 12:21:05 UTC
4c53668 refactor(compiler-cli): expose helper for parsing signal input class members (#53808) Moves the signal input class member extraction logic into the dedicated input function file. This makes the code for signal inputs more self-contained. This commit then re-exposes the function as part of `ngtsc/annotations` so that it can be used later for a transform that will take the signal input metadata and translate it into a `@Input` decorator. This allows us to remove code duplication and guarantees consistency/correctness PR Close #53808 10 January 2024, 12:21:05 UTC
82a1ce0 test(compiler-cli): add additional diagnostic test for generic inline constructors (#53808) We recently landed a commit to introduce support for generic type checking of signal inputs. For that we had to implement logic that will generate imports for inline type constructors. This required changes to the context logic and `TypeCtorOp` file-level op. This commit ensures that everything is working as expected, specifically in cases where an inline type ctor is generated and imports would be needed to unwrap the class members for `InputSignal`. PR Close #53808 10 January 2024, 12:21:05 UTC
55b202f test(core): add test playground for zone signal inputs (#53808) This commit creates a small http server Angular application playground for playing with signal inputs. This is useful for development and also validates some of the common input patterns. PR Close #53808 10 January 2024, 12:21:05 UTC
977884a test(core): add runtime tests for input signal (#53808) This commit adds some runtime unit tests to ensure that input signal is behaving properly at runtime. PR Close #53808 10 January 2024, 12:21:05 UTC
1df95cd refactor(core): improve error message and add guide for required inputs (#53808) Whenever a required input is accessed too early in a directive/component, the signal input will throw an error. This is necessary so that we can support required inputs with intuitive typings that do not include `undefined` for the short period of time where Angular is creating the component and then assigning inputs later (Angular currently has no way of setting inputs as part of the class creation when `new Dir()` happens) PR Close #53808 10 January 2024, 12:21:05 UTC
7f5ae52 test: add integration test for signal inputs in CLI (#53808) This commit introduces a new integration test to ensure signal inputs work as expected for end uses in Angular CLI applications. PR Close #53808 10 January 2024, 12:21:05 UTC
4a01688 test: add signal input compliance tests for linking, partial output and full compilations (#53808) Adds signal input compliance tests, ensuring linking works as expected, partial output is generated properly, types are inferred properly, and that the full, or linked output matches our expected runtime structure. PR Close #53808 10 January 2024, 12:21:05 UTC
4b49410 refactor(compiler-cli): support linking/parsing new partial output for signal inputs (#53808) As we introduced the new partial output for signal inputs, we also need to update the linker code to be able to parse this. This commit adds this functionality. In the follow-up commit, compliance tests for linking, partial output, and full compilations are added. PR Close #53808 10 January 2024, 12:21:05 UTC
d714750 refactor(core): properly emit input flags using bitwise or (#53808) As part of testing we did accidentally use `bitwiseAnd` for the input flags, given we started without an extra flag for `HasTransform`. This commit teaches the compiler to support emitting bitwise OR and uses it when combining input flags, fully re-enabling transforms for signal components after the new flag mechanism was introduced in previous commits. PR Close #53808 10 January 2024, 12:21:04 UTC
cfab5a5 refactor(core): detect signal input transforms independently of flag (#53808) This commit changes the `HasTransform` flag to be only concerned with decorator inputs. This allows us to automatically detect signal input transforms without reliance on the flag, resulting in less complexity in the compiler (as outlined in the design doc) and various other places, while it also allows us to simplify JIT support for signal inputs because there would be no need to capture the "hasTransform" state in the decorator so that JIT can generate the according input flags. `isSignal` will still persist as an input flag to allow for monomorphic and highly efficient distinguishing at runtime, whether an input is signal based or not. JIT transform will also need to propagate this information to the runtime somehow. PR Close #53808 10 January 2024, 12:21:04 UTC
eee0af0 refactor(core): add internal signal input support for `@Input` decorator (#53808) We are adding internal support for declaring signal inputs via the `@Input` decorator. This is needed for JIT unit testing, or JIT applications. In JIT, Angular is not able to recognize signal inputs due to the lack of static reflection metadata. Decorators attach their information on the class- without it needing to be instantiated. This allows Angular to know inputs when preparing/generating the directive definition. With signal inputs this is not possible- so we need a way to tell Angular about inputs for JIT applications. We've decided that this is not something users should have to deal with, so a transform will be added in a follow-up that will automatically derive/and add the decorators for signal inputs when requested in JIT environments. PR Close #53808 10 January 2024, 12:21:04 UTC
6fcfe2b build: fix partial output generation errors swallowed (#53808) In some cases, the input files for a partial output generation compliance tests may be invalid and lead to compilation errors. The golden partial would be silently generated with the remaining test cases. Instead of hiding errors, we will now print these and cause the script to fail properly. Note that the error logging is pretty minimalistic, but it's sufficient. PR Close #53808 10 January 2024, 12:21:04 UTC
05ed60a refactor(compiler-cli): improve type safety of linker AST (#53808) The linker AST is abstracted to be agnostic of the underlying implementation AST. i.e. TS AST or Babel AST. This abstraction also intends to provide some type-safety-ness to parsing of various partial declarations. This commit improves type safety further by fixing that `AstValue'`s were not checked for assignability of `T`- potentially hiding issues/unaccounted values. Additionally, we fix that `getObject()` does not properly narrow union types to actual object literals. This happend because e.g. arrays are of type `object`. We can improve type safety here. Using `Record` did not help as an array would still assign to that. PR Close #53808 10 January 2024, 12:21:04 UTC
5978b3d refactor(core): Move change detection scheduler implementation to core (#53579) This commit moves the implementation of the change detection scheduler used for testing to angular/core along with a (private export) provider function. Note: Naming of the provider function is absolutely not final (and not public API). I would prefer one that did not mention "zones" but the easiest thing for now is to have a "Zone" and "Zoneless" naming scheme. PR Close #53579 10 January 2024, 00:05:32 UTC
60dfcc2 test(core): Add scheduler in tests to tie into `ApplicationRef.isStable` (#53579) This commit updates the test scheduler implementation to contribute to ApplicationRef stableness. PR Close #53579 10 January 2024, 00:05:31 UTC
c2dd703 refactor(core): Remove internal-only testability features (#53767) This commit removes the testability features that are internal only. This simplifies the implementation of testability which will need updates to support zoneless. Those updates will be easier to manage if the Testability implementation is simpler. While protractor is indeed officially EOL, we will still need to do some updates to support teams migrating to zoneless that have protractor tests. As far as protractor's own use of `whenStable`, it does not read the internal only methods either: https://github.com/angular/protractor/blob/master/lib/clientsidescripts.js Anything else depending on these values are not following the defined public API contract. PR Close #53767 09 January 2024, 22:46:46 UTC
5996d3f Revert "refactor(router): Update integration tests to cover navigation and history API (#53799)" (#53860) This reverts commit eb2e879a008adebe11d63f42799570ba4f053c52. PR Close #53860 09 January 2024, 22:30:50 UTC
acf1793 refactor(zone.js): delete zone.js externs (#53445) Externs were used for Closure Compiler. Users have moved on to other bundlers like Webpack, esbuild, etc. Externs are no longer needed. PR Close #53445 09 January 2024, 21:20:51 UTC
0dad149 refactor(zone.js): change from scripts to modules (#53445) Make Zone.js compatible with moduleDetection:force by turning files that are currently incompatible from scripts into modules using an empty export statement. PR Close #53445 09 January 2024, 21:20:50 UTC
eb2e879 refactor(router): Update integration tests to cover navigation and history API (#53799) This commit updates the router integration tests to cover both the classic History and the new Navigation API. There is more work to be done here, but this commit works to prove the efficacy of the `FakeNavigation` implementation. PR Close #53799 09 January 2024, 20:56:47 UTC
2dedc4a fix(compiler): generate less code for advance instructions (#53845) We generate `advance` instructions before most update instructions and the majority of `advance` calls are advancing by one. We can save some bytes for the most common case by omitting the parameter for `advance(1)` altogether. PR Close #53845 09 January 2024, 20:27:58 UTC
09baed0 refactor(core): remove signal mutate implementation (#52348) It's not used anymore. PR Close #52348 09 January 2024, 20:23:07 UTC
2d7d4e2 refactor(core): type-safe global ng (#53439) This PR provides strict type definition for the window.ng object used for both console debugging and devtools. `GlobalDevModeUtils` now gathers all type information about all methods exposed on window.ng. PR Close #53439 09 January 2024, 20:17:48 UTC
e733056 ci: add adev to ci (#53833) Add adev job to CI to ensure it continues to build as expected PR Close #53833 09 January 2024, 20:15:59 UTC
7ff44f9 docs(docs-infra): wrong URL for Unicode CLDR fixed (#53785) fixes wrong URLs for Unicodde CLDR Fixes #53734 PR Close #53785 09 January 2024, 20:13:11 UTC
d0b95d5 fix(migrations): Fix empty switch case offset bug in cf migration (#53839) This addresses the offset issue caused when a switch case was empty with no spaces or children being affected by the markers that were added, but not accounted for in offset. The markers are not needed for empty content and can be safely removed in this case. fixes: #53779 PR Close #53839 09 January 2024, 20:09:38 UTC
a468a5e release: cut the zone.js-0.14.3 release (#53630) PR Close #53630 09 January 2024, 17:10:02 UTC
e2b5988 refactor(core): node removal should notify the scheduler (#53812) This commit ensures that change detection runs when an `LView` is removed. Change detection is required because DOM nodes aren't actually removed until the animation engine flushes and this doesn't happen until the end of `detectChangesInternal` (`rendererFactory.end`). PR Close #53812 09 January 2024, 16:51:30 UTC
1be6b0a fix(common): remove unused parameters from the ngClass constructor (#53831) Remove unused parameters which were only being kept because of a downstream usage in flex layout which is deprecated and end of life PR Close #53831 08 January 2024, 22:38:50 UTC
f7c02e1 fix(docs-infra): include the homepage playground content (#53832) Include the homepage playground content in the homepage PR Close #53832 08 January 2024, 19:33:17 UTC
4a87a8a build: update cross-repo angular dependencies (#53836) See associated pull request for more information. PR Close #53836 08 January 2024, 19:31:57 UTC
dfcf0d5 fix(core): `afterRender` hooks now only run on `ApplicationRef.tick` (#52455) The `afterRender` hooks currently run after `ApplicationRef.tick` but also run after any call to `ChangeDetectorRef.detectChanges`. This is problematic because code which uses `afterRender` cannot expect the component it's registered from to be rendered when the callback executes. If there is a call to `ChangeDetectorRef.detectChanges` before the global change detection, that will cause the hooks to run earlier than expected. This behavior is somewhat of a blocker for the zoneless project. There is plenty of application code that do things like `setTimeout(() => doSomethingThatExpectsComponentToBeRendered())`, `NgZone.onStable(() => ...)` or `ApplicationRef.onStable...`. `ApplicationRef.onStable` is a should likely work similarly, but all of these are really wanting an API that is `afterRender` with the requirement that the hook runs after the global render, not an individual CDRef instance. This change updates the `afterRender` hooks to only run when `ApplicationRef.tick` happens. fixes #52429 fixes #53232 PR Close #52455 08 January 2024, 19:30:27 UTC
a5a9b40 feat(router): Add transient info to RouterLink input (#53784) This is a follow up to https://github.com/angular/angular/commit/5c1d4410298e20cb03d7a1ddf7931538b6a181b4 which added the `info` property to navigation requests. `RouterLink` now supports passing that transient navigation info to the navigation request. This info object can be anything and doesn't have to be serializable. One use-case might be for passing the element that was clicked. This might be useful for something like view transitions. In the "animating with javascript" example from the blog (https://stackblitz.com/edit/stackblitz-starters-cklnkm) those links could have done this instead of needing to create a separate directive that tracks clicks. PR Close #53784 05 January 2024, 19:28:31 UTC
91f250d build: configure cross-pkg resolution for api extraction (#52499) This commit adds path mapping and source dependencies necessary to fully resolve types during api doc extraction. PR Close #52499 05 January 2024, 19:27:34 UTC
5e84d9c refactor(router): replace `last` helper with native `Array.at(-1)` (#53749) We now have a native method to return the last item of an array PR Close #53749 04 January 2024, 21:58:17 UTC
b7a717e refactor(router): replace `Object.keys` with `Object.entries` where useful. (#53745) `Object.entries` wasn't supported when those lines were written. PR Close #53745 04 January 2024, 21:57:22 UTC
a27da86 docs: remove state of js 2023 banner (#53798) PR Close #53798 04 January 2024, 21:56:20 UTC
f4bd5a3 fix(platform-server): Do not delete global Event (#53659) This commit removes a hack that deletes `Event` from the global context when using domino. Instead, it sets the global event to domino's implementation of `Event`. PR Close #53659 04 January 2024, 20:51:22 UTC
36318db refactor(compiler-cli): reference `InputFlags` enum directly for full compiler output (#53571) Instead of computing the bit input flags at compile-time and inling the final bit flag number, we will use the `InputFlags` enum directly. This is a little more code in the compiler side, but will allow us to have better debuggable development code, and also prevents problems where runtime flag bitmasks differ from the compiler flag bitmasks. This is in practice a noop for optimized applications as the enum values would be inlined anyway. This matches existing compiler emit for e.g. change detection strategy, or view encapsulation enums. PR Close #53571 04 January 2024, 20:07:13 UTC
56ff046 build: re-enable linker compliance tests (#53571) The linker compliance tests were disabled with a Babel update and nobody realized for quite a while, via https://github.com/angular/angular/pull/49914. As we've came across this lost coverage, which also is quite impactful as all libraries depend on linked output- I've took initiative to debug the root cause as there was no follow-up. https://github.com/angular/angular/issues/51647. It turned out to be a highly complex issue that is non-trivial to fix, but at least we should try to resurrect the significant portion of test coverage by still running the linker tests- avoiding regressions, or unexpected issues (like with defer being developed). We can work on re-enabling and fixing source-maps separately. Tracked via https://github.com/angular/angular/issues/51647. PR Close #53571 04 January 2024, 20:07:13 UTC
56ce8da test: fix linker compliance tests after not running for a while (#53571) The linker compliance tests did not run for a while. There were a couple of new tests that were not passing as this wasn't flagged on CI. This commit fixes this. Fortunately there was no problematic code that did indicate issues with linking. In the follow-up commit, we fix the compliance test infrastructure to re-enable linker testing.. One clear issue is still that the defer blocks are not handled properly in linked output- hence making defer not actually "lazy" for compiled libraries. This needs to be handled separately by the framework team. PR Close #53571 04 January 2024, 20:07:13 UTC
659b921 test(compiler-cli): add ngtsc test for new signal input API (#53571) This commit adds a final test for input signals, integrating all major parts: * type-checking * compiler detection * compiler emit * API signature tests PR Close #53571 04 January 2024, 20:07:13 UTC
4e2f0b7 test(core): add type signature test for signal input API (#53571) Adds tests that allow us to ensure that the `input` API works as expected and that resulting return types match our expectations- without silently regressing in the future, or missing potential edge-cases. Testing signatures is hard because of covariance and contravariance, especially when it comes to the different semantics of `ReadT` and `WriteT` of input signals. We enable reliable testing by validating the `d.ts` of the "fake directive class". This ensures clear results, compared to relying on e.g. type assertions that might accidentally/silently pass due to covariance/contravariance or biavariance in the type system. PR Close #53571 04 January 2024, 20:07:13 UTC
c948128 refactor(core): type `EMPTY_OBJ` as `never` for improved type safety (#53571) Consider a snippet like: ``` const x = directiveDef.inputs || EMPTY_OBJ ``` this currently results in `x` being inferred as just `{}`- ending up turning of potential future assignment checks. This surfaced in the `DirectiveDefinition` -> `DirectiveDef` conversion. Note: This has the effect that assigning `EMPTY_OBJ` to a field of anything would _always_ pass. It's questionable if this rather impacts type-safety in a more negative way. There seem to be trade-offs in both ways... Maybe worth considering just using `{}` directly as fallbacks in some places, and treating this as an unique symbol?! https://www.typescriptlang.org/play?#code/MYewdgzgLgBAHgLhmApgNxQJxgXhgbwF8YBDCZdLAbgCgbRJYAHJfGmDmAGxC6SkwBXFABoahAD6CwAExQAzAJaoZuZIK5dS5EmACeteuGgxBapjAkT4VIA PR Close #53571 04 January 2024, 20:07:13 UTC
1d95a83 refactor(core): detect signal inputs at runtime using input flags (#53571) This commit introduces a new enum for capturing additional metadata about inputs. Called `InputFlags`. These will be built up at compile time and then propagated into the runtime logic, in a way that does not require additional lookup dictionaries data structures, or additional memory allocations for "common inputs" that do not have any flags. The flags will incorporate information on whether an input is signal based. This can then be used to avoid megamorphic accesses when such input is set- as we'd not need to check the input field value. This also avoids cases where an input signal may be used as initial value for an input (as we'd not incorrectly detect the input as a signal input then). The new metadata emit will be useful for incorporating additional metadata for inputs, such as whether they are required etc (although required inputs are a build-time only construct right now- but this is a good illustration of why input flags can be useful). An alternative could have been to have an additional boolean entry for signal inputs, but allocating a number with more flexible input flags seems more future proof and more reasonable andreadable. More information on the megamorphic access when updating an input signal https://docs.google.com/document/d/1FpnFruviKb6BFTQfMAP2AMEqEB0FI7z-3mT_qm7lzX8/edit. PR Close #53571 04 January 2024, 20:07:13 UTC
32f908a fix(core): do not accidentally inherit input transforms when overridden (#53571) Currently when a base class defines an input with a transform, derived classes re-defining the input via `@Input`, or `inputs: [<..>]`, end up inherting the transform due to a bug in the inherit definitions feature. This commit fixes this. We verified in the Google codebase that this is an unlikely occurrence and it's trivial to fix on user side by removing the re-declaration/override, or explictly adding the necessary transform. Conceptually, the behavior was quite inconsistent as everything else of inputs was overridden as expected. i.e. alias, required state etc. The exception were input transforms. This commit fixes this. PR Close #53571 04 January 2024, 20:07:13 UTC
560ae24 refactor(core): initial test code for `setInput` to work with input signals (#53571) At this point, we have the following pieces in place: * the input signature is implemented * the compiler properly parses and recognizes signal inputs * the compiler supports type-checking of signal inputs * input signal metadata is passed to partial output This commit adds a naive runtime solution to distinguishing between signal inputs and decorator inputs when the `property` instruction invokes. This is not ideal and non-performant as we introduce additional megamorphic reads for every property instruction invocation, or if we'd use `instanceof`, introducing a hard dependency on `InputSignal` and risking potentially slower detection. This code exists purely for testing, to enable playing with input signals in the playground. In a future commit, we will pass around the input signal metadata at runtime and can perform highly optimized checks to distinguish between signal or non-signal inputs- when assigning values. More information: https://docs.google.com/document/d/1FpnFruviKb6BFTQfMAP2AMEqEB0FI7z-3mT_qm7lzX8/edit#heading=h.oloxympe902x PR Close #53571 04 January 2024, 20:07:13 UTC
7fb4a37 refactor(core): introduce runtime `InputSignal` implementation (#53571) This commit introduces the runtime `InputSignal` implementation. Input initializers using `input` or `input.required` will result in an instance of `InputSignal` to be created. An input signal extends the signal primtive, with a couple of small differences: - it's a readonly signal. There is no public `set` or `update`. - equality is non-configurable. As per CD semantics, the value is guaranteed to be different when the `property` instruction attempts to update an input signal. - we support a `transform` function, that allows transforming input values. The transform is called whenever the input is set. An alternative could have been to follow computed-semantics and call the transform upon accessing, if dirty. In the future, we might change this to extend the computed reactive node, so that we can support computed inputs that do not rely on continious bound value assignments. See signal based components RFC. PR Close #53571 04 January 2024, 20:07:13 UTC
caf3eec refactor(core): expose `SIGNAL_NODE` to allow for advanced extensions of signals (#53571) For the implementation of input signals, we want to extend the signal primitive. The basic methods exposed here are not suitable as we'd like to store additional metadata on the reactive node, and also have a custom getter (for required inputs and throwing). To enable this, one small piece was missing. This commit exposes it and also improves type safety, now that `SignalNode` is typed properly after the previous commit. PR Close #53571 04 January 2024, 20:07:12 UTC
69b384c fix(core): `SignalNode` reactive node incorrectly exposing unset field (#53571) The `SignalNode` interface, describing the reactive node for a `Signal`, seemingly exposes the `SIGNAL` symbol as a class member. This is not true as the `SIGNAL` reactive node only exists on the getter function, as a way to retrieve the signal underlying reactive node. This commit fixes this, enabling improved type-safety later, in a follow-up commit where `SIGNAL_NODE` can now be typed to match the `SignalNode` interface (unlike now where it's typed as just `object`). PR Close #53571 04 January 2024, 20:07:12 UTC
3eaa006 test(compiler-cli): additional type-check transform tests for signal inputs (#53571) This commit adds additional type-check transform tests for signal inputs. These tests verify some of the problems with covariance, contravariance and bivariance that we were suspecting to be problematic if we would assign `InputSignal`'s directly to the type constructors. PR Close #53571 04 January 2024, 20:07:12 UTC
1c63edd refactor(router): remouve unused (#53750) minor optimisation, removing unused paramters. PR Close #53750 03 January 2024, 21:29:05 UTC
58f2b74 refactor(core): Remove `LContainerFlags.HasChildViewsToRefresh` (#53715) This flag is not actually read anywhere. It doesn't even have any effect on the traversal algorithm because embedded views are always refreshed in `Global` traversal mode during the refresh of their parent views. PR Close #53715 03 January 2024, 21:01:35 UTC
back to top