https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
7aa92fa release: cut the v17.2.0-rc.1 release 09 February 2024, 10:54:07 UTC
4b96f37 fix(core): expose model signal subcribe for type checking purposes (#54357) The `@internal` in the comment above `ModelSignal.subscribe` ended up marking the method as internal even though it wasn't meant to be. PR Close #54357 09 February 2024, 09:58:56 UTC
9e2c140 refactor(devtools): show tooltip for hydration icon on directive forest (#54326) The MatTooltip was missing after migrating to standalone PR Close #54326 08 February 2024, 19:18:37 UTC
9f05732 refactor: migrate router to prettier formatting (#54318) Migrate formatting to prettier for router from clang-format PR Close #54318 08 February 2024, 19:17:14 UTC
ed41bfc release: cut the v17.2.0-rc.0 release 08 February 2024, 18:38:52 UTC
c47bf63 docs: release notes for the v17.1.3 release 08 February 2024, 18:20:12 UTC
8dea3b5 test: tidy up signal signal input/query/model signature tests (#54334) This updates some tests to use the public imports from `@angular/core` now that they are available, and cleans up useless imports and inaccurate names. PR Close #54334 08 February 2024, 16:49:15 UTC
898a532 fix(core): Fix possible infinite loop with `markForCheck` by partially reverting #54074 (#54329) In some situations, calling `markForCheck` can result in an infinite loop in seemingly valid scenarios. When a transplanted view is inserted before its declaration, it gets refreshed in the retry loop of `detectChanges`. At this point, the `Dirty` flag has been cleared from all parents. Calling `markForCheck` marks the insertion tree up to the root `Dirty`. If the declaration is checked again as a result (i.e. because it has default change detection) and is reachable because its parent was marked `Dirty`, this can cause an infinite loop. The declaration is refreshed again, so the insertion is marked for refresh (again). We enter an infinite loop if the insertion tree always calls `markForCheck` for some reason (i.e. `{{createReplayObservable() | async}}`). While the case above does fall into an infinite loop, it also truly is a problem in the application. While it's not an infinite synchronous loop, the declaration and insertion are infinitely dirty and will be refreshed on every change detection round. Usually `markForCheck` does not have this problem because the `Dirty` flag is not cleared until the very end of change detection. However, if the view did not already have the `Dirty` flag set, it is never cleared because we never entered view refresh. One solution to this problem could be to clear the `Dirty` flag even after skipping view refresh but traversing to children. PR Close #54329 08 February 2024, 16:45:20 UTC
adfc3f0 refactor(core): temporarily mark subscribe methods as deprecated (#54342) The `subscribe` methods on `ModelSignal` and `OutputEmitter` were marked as `@internal` which will break when the TCB needs to reference them. These changes make them `@deprecated` temporarily so we can address the properly later. PR Close #54342 08 February 2024, 16:33:41 UTC
38b01a3 fix(compiler-cli): interpolatedSignalNotInvoked diagnostic for model signals (#54338) The new `model()` signal introduces a `ModelSignal` type that needs to be handled by the interpolatedSignalNotInvoked diagnostic to catch issues like: ``` <div>{{ myModel }}</div> ``` PR Close #54338 08 February 2024, 16:28:20 UTC
03c3b3e feat(common): add Netlify image loader (#54311) Add an image loader for Netlify Image CDN. It is slightly different in implementation from existing loaders, because it allows absolute URLs Fixes #54303 PR Close #54311 08 February 2024, 16:17:57 UTC
9c2bad9 refactor(compiler-cli): avoid naming conflict with built-in global variable (#54333) The import of `module` can conflict with the native global variable called `module` and can break some internal tests. These switch to only importing the function we need. PR Close #54333 08 February 2024, 14:59:54 UTC
44f65f2 refactor(compiler-cli): work around internal test failure (#54327) Fixes an internal test failure due to `FatalDiagnosticError` extending the native `Error`. PR Close #54327 08 February 2024, 14:59:24 UTC
ca239e8 refactor(core): share refresh logic for cd and signal queries (#54322) Introducing a tiny utility method to remove some code duplication between the change change detection and signal based queries. PR Close #54322 07 February 2024, 22:22:06 UTC
a3e51d9 docs: enable version picker (#54161) PR Close #54161 07 February 2024, 22:21:05 UTC
38c0084 test: verify signal-based queries in CLI integration test (#54314) Adds usages of signal-based queries into the signal integration test to verify queries can be used in production, and testing environments as expected (i.e. the transform works as expected). PR Close #54314 07 February 2024, 18:56:04 UTC
a08863e refactor(compiler-cli): ensure `FatalDiagnosticError` extends `Error` (#54309) This helps with the Angular CLI currently swallowing fatal diagnostic errors in ways that are extremely difficult to debug due to workers executing Angular compiler logic. The worker logic, via piscina, is currently not forwarding such Angular errors because those don't extend `Error.` https://github.com/piscinajs/piscina/blob/a7042ea27d129f3cad75c422f5aa92f0663854ee/src/worker.ts#L175 Even with access to these errors by manually forwarding errors, via patching of the Angular CLI, there is no stack trace due to us not using `Error` as base class for fatal diagnostic errors. This commit improves this for future debugging and also better reporting of such errors to our users- if we would accidentally leak one. PR Close #54309 07 February 2024, 16:39:21 UTC
8e237a0 fix(compiler-cli): properly catch fatal diagnostics in type checking (#54309) An identical addition to: 760b1f3d0b857288980f2d9929147f331d657f7d. This commit expands the `try/catch`-es: - to properly NOT throw and just convert the diagnostic. - to be in place for all top-level instances. Notably, this logic cannot reside in the template type checker directly as otherwise we would risk multiple duplicate diagnostics. PR Close #54309 07 February 2024, 16:39:20 UTC
e921e10 refactor(core): correctly distinguish getter functions from writable signals (#54252) Fixes that `ɵunwrapWritableSignal` inferring getter functions as not matching the interface of `WritableSignal` instead of preserving them. PR Close #54252 07 February 2024, 16:36:15 UTC
a4a76c3 refactor(core): throw if required model is changed via update too early (#54252) Adds an assertion that will throw if `ModelSignal.update` is accessed before an initial value is set. PR Close #54252 07 February 2024, 16:36:14 UTC
ac9c544 refactor(core): assert writable signal in two-way property instruction (#54252) Asserts that the value is a `WritableSignal`, rather than a `Signal`, in the `twoWayProperty` instruction. PR Close #54252 07 February 2024, 16:36:14 UTC
243b94c refactor(compiler-cli): fix regression in two-way bindings to inputs with different getter/setter types (#54252) In a previous commit the TCB was changed to cast the assignment to an input in order to widen its type to allow `WritableSignal`. This ended up breaking existing inputs whose setter has a wider type than its getter. These changes switch to unwrapping the value on the binding side. PR Close #54252 07 February 2024, 16:36:13 UTC
551c579 refactor(core): address PR feedback (#54252) Addresses the feedback from #54252. PR Close #54252 07 February 2024, 16:36:12 UTC
a17f6cb refactor(compiler-cli): rework TCB for two-way bindings (#54252) Reworks the TCB for two-way bindings to make them simpler and to avoid regressions for two-way bindings to generic inputs. The new TCB looks as follows: ``` var _t1: Dir; var _t2 = _t1.input; (_t1 as typeof _t2 | WritableSignal<typeof _t2>) = expression; ``` PR Close #54252 07 February 2024, 16:36:11 UTC
372e1ff refactor(compiler-cli): account for model inputs in language service (#54252) Updates the code that resolves a node from the TCB to an input in order to fix the language service. PR Close #54252 07 February 2024, 16:36:10 UTC
702ab28 feat(core): add support for model inputs (#54252) Adds support for model inputs in the framework. `model()` returns a writable signal that implicitly defines a input/output pair that can be used either in two-way bindings to keep two values in sync or by binding individually to the input and output. When the value of the `model` changes, it will emit an event with the current value. Furthermore, these changes expand two-way bindings to accept `WritableSignal`. This will make it easier to transition existing code to signals in a backwards-compatible way. Example: ```ts @Directive({ selector: 'counter', standalone: true, host: { '(click)': 'increment()', } }) export class Counter { value = model(0); increment(): void { this.value.update(current => current + 1); } } @Component({ template: `<counter [(value)]="count"/> The current count is: {{count()}}`, }) class App { count = signal(0); } ``` PR Close #54252 07 February 2024, 16:36:09 UTC
d006aa3 refactor(compiler-cli): add tests for model inputs (#54252) Adds tests in the compiler to verify the compiled output and template type checking behavior of model inputs. PR Close #54252 07 February 2024, 16:36:08 UTC
67b977e refactor(compiler-cli): allow writable signals in two-way bindings (#54252) Updates the TCB generation logic to allow for `WritableSignal` to be assigned in two-way bindings. PR Close #54252 07 February 2024, 16:36:07 UTC
8aac3c4 test(core): add runtime acceptance tests for model inputs (#54252) Sets up the runtime tests for model inputs. PR Close #54252 07 February 2024, 16:36:06 UTC
0ea4d70 refactor(compiler-cli): recognize model fields (#54252) Adds the logic that recognizes fields initialized to model as an input/output pair. PR Close #54252 07 February 2024, 16:36:05 UTC
3faf3e2 refactor(core): implement two-way instructions (#54252) Adds the implementations of the `twoWayProperty` and `twoWayListener` instructions. PR Close #54252 07 February 2024, 16:36:04 UTC
06fa029 refactor(compiler-cli): add jit transform for model inputs (#54252) Adds a JIT transform that marks `model` fields as `@Input` and `@Output`. PR Close #54252 07 February 2024, 16:36:03 UTC
ab0c0cb refactor(compiler-cli): add function to identify model fields (#54252) Adds a function to the compiler to help us identify fields initialized to a `model`. PR Close #54252 07 February 2024, 16:36:02 UTC
3e0a20d refactor(core): add model implementation (#54252) Adds the implementation of the `model` primitive that represents a two-way binding signal-based binding. PR Close #54252 07 February 2024, 16:36:01 UTC
c023e8d refactor(core): improve IDE completion of `read` option for signal queries (#54280) This commit improves IDE completion of the `read` option for signal-based queries. Currently, TS only matches the first overload when starting out with defining a query. TS doesn't build up the combination of possible options from the second overload- so in practice users will only see IDE completions for the `descendants` option. This is not a problem for view queries as the only option is `read`, so TS will always match the overload with the `read` option. ``` class X { query = contentChild('', {^^ <-- here we should completion for `read` an `descendants` } ``` PR Close #54280 07 February 2024, 16:35:14 UTC
1fb0da2 build: simplify husky setup (#54315) husky v9 simplified its setup, see `How to migrate` in https://github.com/typicode/husky/releases/tag/v9.0.1 PR Close #54315 07 February 2024, 16:34:13 UTC
0dfbde9 Revert "fix(router): Clear internal transition when navigation finalizes (#54261)" (#54317) This reverts commit 6681292823277c8b9df002b6658224287b90e954. PR Close #54317 07 February 2024, 15:46:38 UTC
f39cb06 fix(compiler-cli): show specific error for unresolved @Directive.exportAs in local compilation mode (#54230) Currently the error is a generic error "exportAs must be a string ...". This commit makes the error more specific to local compilation and adds some action items. PR Close #54230 06 February 2024, 21:33:29 UTC
f3851b5 fix(compiler-cli): show specific error for unresolved @HostBinding's argument in local compilation mode (#54230) Currently the error is a generic error "selector must be a string ...". This commit makes the error more specific to local compilation and adds some action items. PR Close #54230 06 February 2024, 21:33:29 UTC
39ddd88 fix(compiler-cli): show specific error for unresolved @HostListener's event name in local compilation mode (#54230) Currently the error is a generic error "selector must be a string ...". This commit makes the error more specific to local compilation and adds some action items. PR Close #54230 06 February 2024, 21:33:29 UTC
5d63324 fix(compiler-cli): show the correct message for the error LOCAL_COMPILATION_UNRESOLVED_CONST when an unresolved symbol used for @Component.styles (#54230) Currently the correct error message is shown only if @Component.styles is an array with some unresolved element. This change supports the new case of string type for the @Component.styles field. PR Close #54230 06 February 2024, 21:33:29 UTC
6c8b094 fix(compiler-cli): highlight the unresolved element in the @Component.styles array for the error LOCAL_COMPILATION_UNRESOLVED_CONST (#54230) Currently the whole array is highlighted. PR Close #54230 06 February 2024, 21:33:29 UTC
acc98a1 refactor(compiler-cli): add a helper to generate error `LOCAL_COMPILATION_UNRESOLVED_CONST` in common scenarios (#54230) A helper `validateLocalCompilationUnresolvedConst` is added to encapsulate a common pattern which leads to the error `LOCAL_COMPILATION_UNRESOLVED_CONST`. PR Close #54230 06 February 2024, 21:33:29 UTC
a3de5ba refactor(compiler-cli): remove the trailing error message for LOCAL_COMPILATION_UNRESOLVED_CONST (#54230) The trailing error message comes from tracing the chain of DymaicValue which leads to a mostly useless error that highlights the same symbol as the original message and emits the error message "Unknown reference". This error message is removed in the favour of the original message which suffices. PR Close #54230 06 February 2024, 21:33:29 UTC
df74ed9 refactor(compiler-cli): upgrade error codes and messages for unresolved symbol errors in local compilation mode (#54230) A single error code is created to unify the common error pattern in local compilation mode where an imported const cannot be resolved, but needs to be resolved. This mainly happens for Angular decorator fields such as @Component.template. The error messages are also upgraded to be more centered around this unifying theme. PR Close #54230 06 February 2024, 21:33:29 UTC
b5368eb build: update dependency marked to v12 (#54296) See associated pull request for more information. PR Close #54296 06 February 2024, 21:13:49 UTC
b96c2fe build: update dependency jsdom to v24 (#54291) See associated pull request for more information. PR Close #54291 06 February 2024, 21:10:29 UTC
8efa7cd docs: remove v17 banner from adev (#54287) PR Close #54287 06 February 2024, 21:06:24 UTC
faf3b45 docs: add alejandrocuba.jpg file to images/bios/ (#53842) PR Close #53842 06 February 2024, 20:34:01 UTC
f189dbe docs: add alejandrocuba to GDE resources (#53842) PR Close #53842 06 February 2024, 20:34:01 UTC
6681292 fix(router): Clear internal transition when navigation finalizes (#54261) This commit fixes a small memory issue in the router where a destroyed component instance would be retained. fixes #54241 PR Close #54261 06 February 2024, 20:32:34 UTC
c8a973e build: update dependency husky to v9 (#54289) See associated pull request for more information. PR Close #54289 06 February 2024, 19:34:46 UTC
43de097 test(core): enable signal queries tests with authoring (#54283) Use signal queries tests with the authoring functions and without decorators. PR Close #54283 06 February 2024, 19:31:58 UTC
e95ef2c feat(core): expose queries as signals (#54283) This commit exposes authoring functions for queries as signals thus making those generally available. PR Close #54283 06 February 2024, 19:31:58 UTC
0d4e983 build: update dependency @types/jasmine to v5 (#54288) See associated pull request for more information. PR Close #54288 06 February 2024, 19:30:33 UTC
297e73c build: update dependency jasmine-core to v5 (#54290) See associated pull request for more information. PR Close #54290 06 February 2024, 19:30:07 UTC
4d29174 refactor: address prototype polution concern with better typing (#54286) Update typing to show that a number is being used as index rather than any random string PR Close #54286 06 February 2024, 18:38:47 UTC
4287ca8 build: update dependency @octokit/graphql to v7 (#53554) See associated pull request for more information. PR Close #53554 06 February 2024, 18:24:04 UTC
eeafdb6 build: update dependency firebase-tools to v13 (#54234) See associated pull request for more information. PR Close #54234 06 February 2024, 18:11:41 UTC
e9eba6b build: update dependency eslint-plugin-jsdoc to v48 (#54202) See associated pull request for more information. PR Close #54202 06 February 2024, 18:11:12 UTC
c512987 build: update babel dependencies (#53222) See associated pull request for more information. PR Close #53222 06 February 2024, 18:10:40 UTC
e949422 build: update all non-major dependencies (#53220) See associated pull request for more information. PR Close #53220 06 February 2024, 18:10:11 UTC
2d3fc31 docs: update Angular CLI help [main] (#54276) Updated Angular CLI help contents. PR Close #54276 06 February 2024, 18:09:46 UTC
0763fba build: update to latest @angular/docs (#54282) Update to the latest version of angular docs from dev-infra PR Close #54282 06 February 2024, 17:54:43 UTC
6ef60c0 docs: replace event word with property for binding properties link (#54281) Replace the "event" word with the correct one "property" at the helpful text on event binding section PR Close #54281 06 February 2024, 17:45:11 UTC
bfbb306 fix(compiler-cli): do not error due to multiple components named equally (#54273) Currently, when two components are named `TestComponent`, and both would use e.g. control flow. Templates would be generated by the compiler and those would conflict at runtime because the names for the template functions are not ensured to be unique. This seems like a more general problem that could be tackled in the future in the template pipeline by always using the `ConstantPool`, but for now, we should be good already, given us ensuring the `baseName`'s are always unique. PR Close #54273 06 February 2024, 17:33:23 UTC
19fae76 fix(zone.js): patch `fs.realpath.native` as macrotask (#54208) This commit updates the implementation of the zone.js `fs` patch to restore the implementation of `realpath.native` and patches it as a macrotask, along with other functions of the `fs` package. This is the only nested function that must be patched. Closes: #45546 PR Close #54208 06 February 2024, 16:04:40 UTC
f8c02b6 refactor(compiler-cli): restrict `read` option values for signal-based queries (#54257) The `read` option for queries can rely on lexical variables inside the class. These constructs are fine from a technical perspective in TypeScript, but in practice, when the component/directive definition is being created, the read value is extracted into the definition, **outside** of the class. This breaks `this` references. To fix this, we are restricting the `read` option to literal values. Similar to `descendants`. Literal references are in practice constructs like: - `read: bla.X` - `read: X` where `bla` or `X` is never a `ThisKeywoord`- hence fixing the issue and also simplifying the patterns for easier single file compilation. PR Close #54257 06 February 2024, 16:04:10 UTC
902481b refactor(compiler-cli): add JIT transform for signal-based queries (#54257) This commit adds a JIT transform for signal-based queries, so that queries are working as expected in JIT environments like `ng test` where decorator metadata is needed as a prerequisite for the component definition creation. This is similar to the JIT transforms for signal inputs etc. PR Close #54257 06 February 2024, 16:04:10 UTC
3514268 refactor(compiler-cli): extract common JIT transform helper into transform API (#54257) Extracts common JIT transform helper into the transform API, so that those helpers can be re-used for output, model, queries and inputs. PR Close #54257 06 February 2024, 16:04:10 UTC
1d077fc refactor(compiler-cli): expose query function detection logic for JIT transform (#54257) This commit exposes the query function detection logic so that it can be used in the JIT transform later on. PR Close #54257 06 February 2024, 16:04:10 UTC
4851453 ci: add debug information for failing firebase deploy (#54275) Adding debug information for failing firebase deploy, hoping to yield information about the missing resource. The next multi-site seems to be failing, but is available. PR Close #54275 06 February 2024, 15:23:13 UTC
99bfbab refactor(core): break circular dependencies in preparation for queries as signals (#54103) Break circular dependencies by using type imports and code moves. PR Close #54103 06 February 2024, 15:04:36 UTC
84d1fa7 refactor(core): pull compileNgModuleFactory out of application_ref (#54103) The compileNgModuleFactory dont need to be in the application_ref file (in fact the whole logic has little to do with ApplicationRef and it is not even called from the application_ref). Performing this move to avoid circular dependencies when the new query as signals authoring functions are exported. PR Close #54103 06 February 2024, 15:04:36 UTC
3a2ce9e refactor(core): add error code for required query results (#54103) This commit introduces a dedicated error code for queries that require results but none are available. PR Close #54103 06 February 2024, 15:04:36 UTC
20008a6 refactor(core): rework runtime implementation to simplify and fix issues (#54103) This commit changes the approach to the reactive node representing query results: instead of creating a custom node type we can use a computed - the main change to get there is representing dirty change notification as a signal (a counter updated every time a query changes its dirty status). This change is dictated by simplification (we can avoid creation of a custom signal type) as well as fixes to the multiple issues not covered by the initial implementation: - assuring referential stability of results (ex.: the same array instance returned from child queries until results change); - per-view results collection to avoid a situation where accessing query results during view creation would return partial / inconsistent results; - proper refresh of query results for both live and non-connected consumers. All the above cases are covered by the additional tests in this commit. PR Close #54103 06 February 2024, 15:04:36 UTC
1aa63c1 refactor(core): enable content query as signal tests (#54103) This commit adds tests for content queries and fixes the arguments order in the contentQuerySignal instruction, thus fixing a bug discovered while adding tests. PR Close #54103 06 February 2024, 15:04:36 UTC
26b11b5 test(core): convert query-as-signals test to the compiled ones (#54103) This commits converts the hand-written tests into their usual, compiled form. We can perform this change now since the compiler bits of the queries-as-signal story landed. PR Close #54103 06 February 2024, 15:04:36 UTC
e46c081 Revert "fix(compiler-cli): consider the case of duplicate Angular decorators in local compilation diagnostics (#54139)" (#54264) This reverts commit 4b1d948b36285ec6d80dbe93e0b92133f9d4be94. PR Close #54264 05 February 2024, 18:18:47 UTC
bd43aa3 Revert "fix(compiler-cli): allow custom/duplicate decorators for @Injectable classes in local compilation mode (#54139)" (#54264) This reverts commit a592904c691844d2c1aed00bd914edabef49f9b1. PR Close #54264 05 February 2024, 18:18:47 UTC
a2af706 Revert "fix(compiler-cli): forbid custom/duplicate decorator when option `forbidOrphanComponents` is set (#54139)" (#54264) This reverts commit 96bcf4fb1208d1f073784a2cde4a03553e905807. PR Close #54264 05 February 2024, 18:18:47 UTC
d339941 docs: add Jason Warner to GDE resources (#54237) PR Close #54237 05 February 2024, 16:40:57 UTC
1090570 refactor(core): avoid reusing argument name as a local const (#54239) This refactoring renames a local variable to make sure we do not reuse an argument name, which can lead to confusion and bugs. PR Close #54239 05 February 2024, 15:15:17 UTC
90fb623 refactor(core): create pending task while defer block loading is in progress (#54239) This commit updates the logic of defer blocks to create an internal pending task to indicate that an application is not yet stable. This change would be helpful for zoneless applications. PR Close #54239 05 February 2024, 15:15:17 UTC
f5e5543 docs: remove an outdated comment. (#54243) Note: We still expect `ngOnChanges` to not be supported in future signal components. PR Close #54243 05 February 2024, 15:09:40 UTC
8ac4f7d refactor: support multiple acceptance spec files with JIT transforms (#54253) Updates the acceptance authoring test compiler targets to support multiple spec files. This will be useful for output, model, inputs and queries. PR Close #54253 05 February 2024, 15:09:00 UTC
6cb47a7 test: verify `output()` in signals integration test (#54217) Adds `output()` to the signal inputs integration test to verify full integration with the Angular CLI. In the future we may consider renaming the test to something less specific to signal inputs, but for now this serves the purpose and `output()` is a closely related part to signal-based inputs. it doesn't warrant creating another new integration test, as those are quite expensive to maintain and run. PR Close #54217 05 February 2024, 15:08:35 UTC
efcec0a refactor(core): improve type safety for `listener` instruction (#54217) The `listener` instruction currently always assumes RxJS subscribables, and verifies this via `isSubscribable`. The type narrowing is not ignored and the type remains `any` given the `ngDevMode` check. This commit improves type safety, and actually switches to a dedicated interface for "output subscribable" values. This is needed because `Subscribable` from `RxJS` is typed to expect an observer in object literal form- which is not correct and doesn't apply to `EventEmitter` and matches the form of `.subscribe` we are using in the `listener` instruction. PR Close #54217 05 February 2024, 15:08:35 UTC
02fdd8d test: add tests to verify language-service supports `output()` function (#54217) Adds unit tests to verify that the language service supports the `output()` function with completions, and definition jumping. PR Close #54217 05 February 2024, 15:08:35 UTC
ee635f9 test: add language-service test for type definition of signal inputs (#54217) Adds an extra unit test for the language-service to verify that type definitions for signal-based inputs can be resolved. PR Close #54217 05 February 2024, 15:08:35 UTC
b285b14 refactor(compiler-cli): introduce JIT transform for new `output()` initializer API (#54217) Similar to `input()`, initializer-based `output()`'s need to be transformed in JIT to be annotated with an `@Output()` decorator. This is necessary so that Angular can statically collect all defined outputs without instantiating the class (which would not be possible upon directive definition computation). This commit introduces a transform next to the input transform that automatically runs with the Angular CLI and `ng test`. PR Close #54217 05 February 2024, 15:08:35 UTC
55040fb test: add type check diagnostic tests for `output()` API (#54217) Adds type check diagnostic tests for the `output()` API. This is necessary because we are maintaining a separate emitter for `output()` as with the current design (still discussed - but this is a starting foundation). Note: `OutputEmitter` currently does not publicly expose `.subscribe`, while the testing infrastructure exposes it for now. That is because we are still discussing this before making changes in the TCB to account for the case where `.subscribe` might be `@internal` ultimately. PR Close #54217 05 February 2024, 15:08:35 UTC
0e9e401 test: generalize type check scenario testing helpers (#54217) Generalizes the type check table scenario testing infrastructure so that it can also be used for testing outputs in a table-scheme without a lot of TS code repetition. PR Close #54217 05 February 2024, 15:08:34 UTC
aa4157c test: add ngtsc compiler test for `output()` (#54217) Adds an ngtsc diagnostic and compilation output test for `output()`. The test will verify certain recognition restrictions and ensures that diagnostics are raised, in addition to proper full compilation output being generated (aside from the compliance tests verifying output more closely). PR Close #54217 05 February 2024, 15:08:34 UTC
65de61b test: add compliance output tests for `output()` (#54217) Adds compliance output tests for `output()` to verify that we are emitting proper full compilation output, as well as proper partial compilation output that can be linked to match the full output. PR Close #54217 05 February 2024, 15:08:34 UTC
c05e104 refactor(core): introduce `output()` signature and runtime code (#54217) This commit introduces the `output()` function and corresponding runtime code. In practice, `output()` will defer to `EventEmitter` as outlined in the RFC, but we are considering limiting the type to a minimal version that is not coupled with RxJS, less complex, and also has better type safety around emitting of values. E.g. currently `EventEmitter.emit` can always be called without any value, even though the output may be typed to always pass around values of type `T`. This could cause subtle and confusing bugs. PR Close #54217 05 February 2024, 15:08:34 UTC
f7da77b refactor(compiler-cli): detect `output()` function (#54217) As we are introducing the new `output()` function as an inituive alternative to `@Output()` that matches with signal-based inputs, this commit prepares the compiler to detect such initializer-based outputs. PR Close #54217 05 February 2024, 15:08:34 UTC
96bcf4f fix(compiler-cli): forbid custom/duplicate decorator when option `forbidOrphanComponents` is set (#54139) The deps tracker which is responsible to track orphan components does not work for classes mutated by custom decorator. Some work needed to make this happen (tracked in b/320536434). As a result, with option `forbidOrphanComponents` being true the deps tracker will falsely report any component as orphan if it or its NgModule have custom/duplicate decorators. So it is unsafe to use this option in the presence of custom/duplicate decorator and we disable it until it is made compatible. Note that applying custom/duplicate decorators to `@Injectable` classes is ok since these classes never make it into the deps tracker. So we excempt them. PR Close #54139 05 February 2024, 15:07:40 UTC
a592904 fix(compiler-cli): allow custom/duplicate decorators for @Injectable classes in local compilation mode (#54139) Custom/duplicate decorators break the deps tracker in local mode. But deps tracker only deals with non-injectable classes. So applying custom/duplicate decorators to `@Injectable` only classes does not disturb deps tracker and local compilation in general. There are also ~ 100 such cases in g3 which cannot be cleaned up. PR Close #54139 05 February 2024, 15:07:40 UTC
4b1d948 fix(compiler-cli): consider the case of duplicate Angular decorators in local compilation diagnostics (#54139) For cases like this: ``` @Component({...}) @Component({...}) export class SomeComp { } ``` The `DecoratorHandler.detect` apparantly matches only one of the `@Component` decorator, leaving the other undetected which will be transformed by TS decorator helper and that breaks local compilation runtimes. But the error message only mentioned "custom" decorator, while in this case it is a "duplicate Angular" decorator. The respective error message is updated thus. PR Close #54139 05 February 2024, 15:07:40 UTC
back to top