https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
0461bff release: cut the v18.0.0-next.1 release 20 March 2024, 22:01:08 UTC
a9f5a33 docs: release notes for the v17.3.1 release (#54971) PR Close #54971 20 March 2024, 21:32:24 UTC
7b070c3 ci: temporarily disable failing test (#54970) this test is failing after #54711 PR Close #54970 20 March 2024, 20:31:23 UTC
6aff144 fix(compiler-cli): symbol feature detection for the compiler (#54711) Use the actual symbol presence in the .d.ts to detect whether two-way binding to writable signals should be template type-checked. PR Close #54711 20 March 2024, 19:14:41 UTC
b3d045b fix(zone.js): Add 'declare' to each interface to prevent renaming (#54966) This commit adds `declare` to each interface in the `zone-impl` to prevent renaming of any interface properties by compiler optimizations. This would otherwise cause issues if multiple applications depend on ZoneJS and compile the interface properties to different names. PR Close #54966 20 March 2024, 16:16:07 UTC
2dced3a build: update eslint dependencies (#54934) See associated pull request for more information. PR Close #54934 19 March 2024, 19:34:52 UTC
353eae5 build: update babel dependencies to v7.24.1 (#54933) See associated pull request for more information. PR Close #54933 19 March 2024, 17:01:29 UTC
e7d54ab build: update dependency google-closure-compiler to v20240317 (#54931) See associated pull request for more information. PR Close #54931 19 March 2024, 17:00:45 UTC
1c0814f build: update github/codeql-action action to v3.24.8 (#54932) See associated pull request for more information. PR Close #54932 19 March 2024, 16:59:48 UTC
456aefe refactor(docs-infra): don't rely on aio_npm in adev (#54928) Use @npm// instead of @aio_npm// in adev BUILD files PR Close #54928 19 March 2024, 16:55:44 UTC
18a7c92 refactor(router): optimize single character check by replacing startsWith with direct access `[0]` (#54940) This commit refactors the router module to enhance performance by substituting the startsWith method with direct access `[0]` when verifying the value of a single character. This optimization improves efficiency, as direct access retrieves the character's value stored at a specific index in the string, resulting in slightly faster execution. PR Close #54940 19 March 2024, 16:55:00 UTC
d099d65 build: lock file maintenance (#54920) See associated pull request for more information. PR Close #54920 19 March 2024, 16:51:45 UTC
314112d fix(core): Prevent `markForCheck` during change detection from causing infinite loops (#54900) This change updates the approach to the loop in `ApplicationRef.tick` for allowing state updates in `afterRender` hooks. It is valid to update state in render hooks and we need to ensure we refresh views that may be marked for check in these hooks (this can happen simply as a result of focusing an element). This change ensures that the behavior of `markForCheck` with respect to this loop does not change while we are actively running change detection on a view tree. This approach also has the benefit of preventing a regression for #18917, where updating state in animation listeners can cause `ExpressionChanged...Error` This should be allowed - there is nothing wrong with respect to unidirectional data flow in this case. There may be other cases in the future where it is valid to update state. Rather than wrapping the render hooks and the animation flushing in something which flips a global state flag, the idea here is that `markForCheck` is safe and valid in all cases whenever change detection is not actively running. PR Close #54900 18 March 2024, 23:54:01 UTC
eb20c1a refactor(platform-browser-dynamic): unused `RESOURCE_CACHE_PROVIDER` API has been removed (#54875) BREAKING CHANGE: No longer used `RESOURCE_CACHE_PROVIDER` APIs have been removed. PR Close #54875 18 March 2024, 23:53:27 UTC
55c3932 refactor(core): Add hydration missmatch on the component rather than the node. (#54671) In some cases the hydration mismatch is nested within a component. As the devTool only reports issues on the component level, we need to mark the component node rather than the actual mismatched node. PR Close #54671 18 March 2024, 23:52:19 UTC
89eca1d refactor(core): allow passing an environment injector while creating a view (#54903) This commit updates the name of an internal function argument that represents an embedded view injector. Also it introduces a new config option that allows passing an environment injector to be used in the underlying LView. There are no changes to the behavior, just some initial cleanup for upcoming changes. PR Close #54903 18 March 2024, 23:37:35 UTC
e0b60ad test: update platform-server API golden (#54874) This is following a number of cleanups. PR Close #54874 18 March 2024, 23:37:07 UTC
2357d35 refactor(platform-server): remove legacy URL handling logic (#54874) BREAKING CHANGE: Legacy handling or Node.js URL parsing has been removed from `ServerPlatformLocation`. The main differences are; - `pathname` is always suffixed with a `/`. - `port` is empty when `http:` protocol and port in url is `80` - `port` is empty when `https:` protocol and port in url is `443` PR Close #54874 18 March 2024, 23:37:07 UTC
3b1967c refactor(platform-server): remove deprecated `useAbsoluteUrl` and `baseUrl` from `PlatformConfig` (#54874) BREAKING CHANGE: deprecated `useAbsoluteUrl` and `baseUrl` been removed from `PlatformConfig`. Provide and absolute `url` instead. PR Close #54874 18 March 2024, 23:37:07 UTC
07ac017 refactor(platform-server): remove deprecated `platformDynamicServer` API (#54874) BREAKING CHANGE: deprecated `platformDynamicServer` has been removed. Add an `import @angular/compiler` and replace the usage with `platformServer` PR Close #54874 18 March 2024, 23:37:06 UTC
e8b588d refactor(platform-server): remove deprecated `ServerTransferStateModule` API (#54874) BREAKING CHANGE: deprecated `ServerTransferStateModule` has been removed. `TransferState` can be use without providing this module. PR Close #54874 18 March 2024, 23:37:06 UTC
0be64c1 ci: move saucelabs to regular CI job (#54926) Move the saucelabs job to regular CI instead of the priviledged CI to prevent cache poisoning/overload PR Close #54926 18 March 2024, 18:02:37 UTC
f50afb1 build: update to latest angular/dev-infra/github-actions/create-pr-for-changes (#54904) Update to latest to correct node verison issue PR Close #54904 17 March 2024, 00:41:30 UTC
5328be6 refactor(zone.js): formatting recently changed files (#53443) For some reason CI started complaining about lack of formatting here. PR Close #53443 16 March 2024, 01:11:34 UTC
cc1b0f4 refactor(zone.js): update imports for Zone setup to invoke patches (#53443) I initially tried switching to use public entry points under `zone.js/plugins/*`, however this file is both manually compiled for Saucelabs and also built with Bazel for a number of tests. The Bazel integration doesn't work well with depending on real NPM packages, so importing `zone.js/plugins/*` in that context doesn't really work. Instead we need to depend on the internals and manually call the `patch*` functions. PR Close #53443 16 March 2024, 01:11:34 UTC
635227b refactor(zone.js): package `Zone` `*.d.ts` files (#53443) This was a bit complicated, but the typings test (`packages/zone.js/test/typings/...`) was failing due to an unresolved import on `./zone-impl`. The main cause is that `//packages/zone.js:zone_js_d_ts` was generating the output `zone.d.ts` file by _concatenating_ `zone.d.ts` with `zone.api.extensions.d.ts` and `zone.configurations.api.d.ts`. Now that `zone.d.ts` imports `zone-impl.d.ts`, concatenation is no longer a viable means of bundling this content. To fix this, I created a new `packages/zone.js/zone.ts` entry point and imported the underlying `zone.ts` file as well as the two extensions. I added `extract_types` to pull the `*.d.ts` files out of the target (because all the JS is bundled separately) and used those files in the final NPM package. This is sufficient to pass the typings test and should be equivalent to what exists today. PR Close #53443 16 March 2024, 01:11:34 UTC
1081c51 refactor(zone.js): only treat the `electron` package (not paths with `electron`) as external (#53443) The `rxjs|electron` regex was causing `import { /* ... */ } from './electron';` to be treated as external and not bundled, which is an issue for the Electron entry point which just happens to be named `electron.ts`. Now only the actual `electron` package should be treated as external, while internal files of any name should not. I actually tried updating to `^rxjs` as well, however this appears to break some tests and isn't necessary to fix the failing Electron test, so I'm leaving it alone. PR Close #53443 16 March 2024, 01:11:34 UTC
79308d1 refactor(zone.js): fix Node `fs` tests (#53443) Not sure why this becomes a problem now. These errors appear to be preexisting. Most likely the file wasn't loaded previously and now it is. PR Close #53443 16 March 2024, 01:11:34 UTC
cb0379c refactor(zone.js): fix Node error disable/lazy policy tests (#53443) The lazy policy tests call the same error policy entry point, so this fixes both at the same time. PR Close #53443 16 March 2024, 01:11:34 UTC
e8e1178 refactor(zone.js): fix Bluebird test by updating the entry point and calling patches appropriately (#53443) This executes the patches in the top-level scope of the Bluebird test. PR Close #53443 16 March 2024, 01:11:34 UTC
54a1fe0 refactor(zone.js): fix fake async test by reading `parentUnresolved` symbol lazily (#53443) As this was, `__symbol__` was being called as a static field initializer, which runs during module evaluation, meaning it happened at import time. However for tests, the Zone prefix is overridden which changes the result of `__symbol__`. This change happens too late to be picked up by `__symbol__` at top-level execution, so instead we defer it until `symbolParentUnresolved` is actually read. PR Close #53443 16 March 2024, 01:11:34 UTC
b334e29 refactor(zone.js): read patched timers after they are patched (#53443) This moves timer patching from a top-level side effect into the `patchFakeAsyncTest` function. Top-level statements are evaluated before the Node patches run and have a chance to patch them with the Zone versions of these timers, meaning `FakeAsyncTestZoneSpec` was repatching the native versions between tests. The fix here is to grab the patched versions of these timers during the `patchFakeAsyncTest` function where we can be confident Node patches have already run. PR Close #53443 16 March 2024, 01:11:34 UTC
6ca1911 refactor(zone.js): export `fake-async-test.ts` functions (#53443) This moves the internals of `fake-async-test.ts` outside `patchFakeAsyncTest` and exports them. This way they can be imported without depending on the top-level side effects of loading Zone. PR Close #53443 16 March 2024, 01:11:34 UTC
8af7d3a refactor(zone.js): update Node test entry point to call patch functions (#53443) This executes the patches in the top-level scope of Node tests. PR Close #53443 16 March 2024, 01:11:34 UTC
33c08e5 refactor(zone.js): switch `async-test.ts` to use `__symbol__` from an import (#53443) This removes a dependency on the top-level side effect of `Zone` global initialization. PR Close #53443 16 March 2024, 01:11:34 UTC
181121d refactor(zone.js): rename `__global` variable (#53443) For some reason the `_global` name appears to conflict with another `_global` name. Not entirely sure how or why, but the easiest fix seems to be to just give the variable a unique name. PR Close #53443 16 March 2024, 01:11:34 UTC
5e45bb7 refactor(zone.js): delay reading `__Zone_symbol_prefix` until needed (#53443) While reading this is not a top-level side effect, it does _depend_ on a top-level side effect. Specifically, `node-env-setup.ts` set this value. Now that its side effect is moved into a function, we can't read it as the top-level of `zone-impl.ts` and need to wait until `__symbol__` is actually called outside of top-level scope. PR Close #53443 16 March 2024, 01:11:34 UTC
417cd71 refactor(zone.js): updates fake polyfill to remove top-level side effect (#53443) This shifts the side effect from `test_Fake_polyfill.ts` into `browser-env-setup.ts` instead. PR Close #53443 16 March 2024, 01:11:34 UTC
73969ae refactor(zone.js): extracts `TaskTrackingZoneSpec` and exports it (#53443) While `TaskTrackingZoneSpec` was implicitly global previously, it does not need to be exposed in a `declare global {}` block. This is because classic scripts in TypeScript are only implicitly global within the same compilation. `TaskTrackingZoneSpec` was not exposed in the existing `.d.ts` files shipped with the `zone.js` package. Within google3, this is also a separate compilation and was not accessible. As a result, `TaskTrackingZoneSpec` was always private and we do not need a global to maintain compatibility. PR Close #53443 16 March 2024, 01:11:34 UTC
cf61126 refactor(zone.js): extracts `ProxyZoneSpec` and exports it (#53443) While `ProxyZoneSpec` was implicitly global previously, it does not need to be exposed in a `declare global {}` block. This is because classic scripts in TypeScript are only implicitly global within the same compilation. `ProxyZoneSpec` was not exposed in the existing `.d.ts` files shipped with the `zone.js` package. Within google3, this is also a separate compilation and was not accessible. As a result, `ProxyZoneSpec` was always private and we do not need a global to maintain compatibility. PR Close #53443 16 March 2024, 01:11:34 UTC
d2e5f23 refactor(zone.js): update `utils.ts` to import `__symbol__` (#53443) This removes a dependency on a top-level side effect of global Zone initialization. PR Close #53443 16 March 2024, 01:11:33 UTC
1b9c807 refactor(zone.js): update Zone bundles to call `patch*` functions (#53443) Since each patch no longer contains top-level side effects, each bundled entry point needs to import and call its associated patch. For the most part this just means that each entry point imports the associated patch and invokes it at the top-level scope. Note that many of these entry points did not actually have a dependency on `Zone` and had no guarantee that it was loaded prior to execution. To maintain consistency, the missing dependencies on `Zone` are left as-is. They will use the global instance of `Zone` and if users fail to load it prior to importing a specific patch, then the patch will fail just as it did previously. PR Close #53443 16 March 2024, 01:11:33 UTC
829a109 refactor(zone.js): wrap Zone.js global initialization in a `loadZone` function (#53443) This drop the top-level side effects in `zone.ts` and allows the initialization to be reused across the various entry points in the package. PR Close #53443 16 March 2024, 01:11:33 UTC
a75d9de refactor(zone.js): wrap `browser-legacy.ts` in a `patchBrowserLegacy` function. (#53443) This particular is slightly different from the others because it does not have a hard dependency on `Zone`. It doesn't actually use `Zone` directly during the patch because the patch just sets a `legacyPatch` global. To maintain consistency, this continues to use global `Zone` and does _not_ accept `Zone` as a parameter. While it's using a global in an inconvenient way, this isn't a problem right now because it doesn't cause or require a dependency on a top-level side effect. PR Close #53443 16 March 2024, 01:11:33 UTC
7c19910 refactor(zone.js): wrap `Zone.__load_patch` calls in exported functions (#53443) This removes top-level side effects from each of these files and drops the dependency on global `Zone`, instead allowing it to be provided to each patch as a parameter. Most of these are pure mechanical transformations. A couple notable files which were somewhat unique: * `async-test.ts`, `fake-async-test.ts`, and `wtf.ts` had unique IIFE usage and patch `Zone` itself. This removes the IIFE and exports the function instead. * `jest.ts` and `jasmine.ts` have a unique `jest` global usage which needs to be declared. PR Close #53443 16 March 2024, 01:11:33 UTC
52d672d refactor(zone.js): move `Error` type into `declare global` block in `zone.ts` (#53443) This helps consolidate globals into a single declaration in a single file. PR Close #53443 16 March 2024, 01:11:33 UTC
d8db402 refactor(zone.js): move duplicate Zone check into `zone.ts` file (#53443) `zone.ts` contains the global variable definition and is the appropriate place for an error side effect when Zone is initialized twice. PR Close #53443 16 March 2024, 01:11:33 UTC
c5cdd89 refactor(zone.js): export remaining Zone types as globals (#53443) These are all the symbols originally under `declare global {}` with the same names. Unfortunatley TypeScript treats a `declare global {}` scope as the parent scope, so we need to import with a different name than the global, meaning everything gets an `_` prefix. PR Close #53443 16 March 2024, 01:11:33 UTC
4876ed9 refactor(zone.js): rename types to drop the `_` prefix convention (#53443) Now that we have real ES modules, there's no need for the prefix convention. PR Close #53443 16 March 2024, 01:11:33 UTC
d90b684 refactor(zone.js): move `Zone` global declaration and assignment to `zone.ts` (#53443) Global state is to be managed in `zone.ts` rather than `zone-impl.ts`. PR Close #53443 16 March 2024, 01:11:33 UTC
1a4d783 refactor(zone.js): clear `zone.ts` file (#53443) All its content has been copied to `zone-impl.ts`, so this file will become a wrapper for those symbols. PR Close #53443 16 March 2024, 01:11:33 UTC
6c7e1e6 refactor(zone.js): export Zone initialization function instead of invoking it as an IIFE (#53443) This removes the top-level side effects from this file. Indenting is left as-is to minimize changes. PR Close #53443 16 March 2024, 01:11:33 UTC
17c59eb refactor(zone.js): rename `Zone` class to `ZoneImpl` (#53443) This removes a name collision on `Zone` with the interface. Otherwise putting the `interface Zone {}` and `class Zone {}` in the same scope when the IIFE is removed will cause a conflict. PR Close #53443 16 March 2024, 01:11:33 UTC
4823356 refactor(zone.js): moves `global` constant outside IIFE (#53443) The IIFE will be removed shortly to support exporting symbols inside it. PR Close #53443 16 March 2024, 01:11:33 UTC
4feec72 refactor(zone.js): export previously global types from `zone-impl.ts`. (#53443) This allows the types to be directly imported when used. PR Close #53443 16 March 2024, 01:11:33 UTC
76d8c73 refactor(zone.js): remove `declare global` from `zone-impl.ts` (#53443) This drops global declarations from this file (as they will be limited to `zone.ts`. It also deletes the `/** @internal */` annotation on `AmbientZone` which is no longer necessary since it isn't in the `declare global` and deletes the global Zone declaration which is also unnecessary. PR Close #53443 16 March 2024, 01:11:32 UTC
a760470 refactor(zone.js): copy `zone.ts` to `zone-impl.ts` (#53443) This is just a straight copy, no code is altered. The new `zone-impl.ts` file will contain the actual definitions exported directly without any global declarations or top-level side effects. The existing `zone.ts` will remain as an entry point with those globals and side-effects. PR Close #53443 16 March 2024, 01:11:32 UTC
5a63a47 test(compiler-cli): add unit tests for `output()` JIT transform (#54841) We are already testing the JIT transforms via integration tests, but this commit adds dedicated unit tests for the transform behavior for proper test coverage (planned follow-up). PR Close #54841 15 March 2024, 22:14:32 UTC
c3da797 docs(docs-infra): bump xterm to 5.4.0 to fix a layout issue on Firefox. (#54897) With 5.4.0 `xterm` has migrated to scoped packages. We're now using `@xterm/xterm`. Fixes #54894 PR Close #54897 15 March 2024, 22:13:39 UTC
879bd80 fix(compiler): capture data bindings for content projection purposes in blocks (#54876) Fixes a regression in the template pipeline where data bindings weren't being captured for content projection purposes. Fixes #54872. PR Close #54876 15 March 2024, 22:11:19 UTC
b961075 refactor(compiler-cli): move DelegatingPerfRecorder initialization into constructor (#54834) Move the initialization of class field `DelegatingPerfRecorder` into the constructor. This fixes the error : `TypeError: Cannot read properties of undefined (reading 'eventCount')` This is blocking the roll-out of public class. PR Close #54834 15 March 2024, 22:10:46 UTC
d01576b refactor(compiler-cli): properly preserve file overview comments (#54819) This commit updates the logic for preserving file overview comments to be more reliable and less dependent on previous transforms. Previously, with the old import manager, we had a utility called `addImport` that always separated import statements and non-import statements. This meant that the non-emitted statement from Tsickle for the synthetic file-overview comments no longer lived at the beginning of the file. `addImports` tried to overcome this by adding another new non-emitted statement *before* all imports. This then was later used by the transform (or was assumed!) to attach the synthetic file overview comments if the original tsickle AST Node is no longer at the top. This logic can be improved, because the import manager shouldn't need to bother about this fileoverview non-emitted statement, and the logic for re-attaching the fileoverview comment should be local. This commit fixes this and makes it a local transform. PR Close #54819 15 March 2024, 22:09:41 UTC
de75fe0 test(compiler-cli): add tests to verify import generation in TCB files/blocks (#54819) This commit adds some unit tests verifying the import generation in TCB files and inline blocks. We don't seem to have any unit tests for these in general. This commit adds some, verifying some characteristics we would like to guarantee. PR Close #54819 15 March 2024, 22:09:41 UTC
0e9c075 refactor(compiler-cli): rename `ImportManagerV2` to `ImportManager` (#54819) To ease review and to allow for both instances to co-exist, `ImportManagerV2` was introduced. This commit renames it to `ImportManager` now that we deleted the older one. PR Close #54819 15 March 2024, 22:09:41 UTC
922f950 refactor(compiler-cli): delete old unused `ImportManager` (#54819) This commit deletes the older and now unused `ImportManager`. PR Close #54819 15 March 2024, 22:09:40 UTC
bec0179 test(compiler-cli): enable incremental re-use type checking with signal inputs (#54819) Enables the incremental type-checking test that we never enabled when we landed signal inputs. Now that we fixed incremental re-use by re-using the existing user imports for inline type check blocks, the test is passing and can be enabled. PR Close #54819 15 March 2024, 22:09:40 UTC
94bc3af refactor(compiler-cli): switch jit transforms to use new import manager (#54819) Switches the JIT transforms to use the new import manager. PR Close #54819 15 March 2024, 22:09:40 UTC
dc80046 refactor(compiler-cli): update type check generation code to use new import manager (#54819) Updates the type-check block generation code (also for inline type check blocks) to use the new import manager. This is now a requirement because the translator utilities from the reference emit environment expect an import manager that follows the new contract established via `ImportGenerator<TFile, TExpression>`. For type check files, we can simply print new imports as we don't expect existing imports to be updated. That is because type check files do not have any _original_ source files (or in practice— those are empty). For type check blocks inline, or constructors, imports _may_ be re-used. This is great as it helps fixing some incrementality bugs that we were seeing in the type check code. That is, sometimes the type check block code may generate imports conditionally for e.g. `TemplateRef`, or animations. Those then **prevent** incremental re-use if TCB code switches between those continously. We tried to account for that with signal inputs by always pre-generating such imports. This fixed the issue for type-check files, but for inline type check blocks this is different as we would introduce new imports in user code that would then be changed back in subsequential edit iterations. See: https://github.com/angular/angular/pull/53521#pullrequestreview-1778130879. In practice, the assumption was that we would be fine since user code is most likely containing imports to `@angular/core` already. That is a true assumption, but unfortunately it doesn't help with incremental re-use because TypeScript's structural change detection does not dedupe and expects 1:1 exact imports from their old source files. https://github.com/microsoft/TypeScript/pull/56845 To improve incremental re-use for the type check integration, we should re-use original source file imports when possible. This commit enables this. To update imports and execute inline operations, we are now uisng `magic-string` (which is then bundled) as it simplifies the string manipulatuons. PR Close #54819 15 March 2024, 22:09:40 UTC
6288f1c refactor(compiler-cli): use new import manager for ngtsc transforms (#54819) This commit switches ngtsc's JS and DTS transform to use the new import manager. This is a drop-in replacement as we've updated the translator helpers in the previous commit to align with the new API suggested by the `ImportManagerV2` (to be renamed then). PR Close #54819 15 March 2024, 22:09:40 UTC
0482b6b refactor(compiler-cli): update `ImportGenerator` abstraction for new manager (#54819) `ImportGenerator` is the abstraction used by the translator functions to insert imports for `ExternalExpr` in an AST-agnostic way. This was built specifically for the linker which does not use any of the complex import managers- but rather re-uses `ngImport` or uses `ngImport.Bla`. This commit also switches the linker AST-agnostic generator to follow the new signatures. This was rather trivial. PR Close #54819 15 March 2024, 22:09:40 UTC
9a56bd5 refactor(compiler-cli): introduce new implementation of `ImportManager` (#54819) This commit introduces a new implementation of `ImportManager` that has numerous benefits: - It allows efficient re-use of original source file imports. * either fully re-using original imports if matching * updating existing import declarations to include new symbols. - It allows efficient re-use of previous generated imports. - The manager can be used for schematics and migrations. The implementation is a rework of the import manager that we originally built for schematics in Angular Material, but this commit improved it to be more flexible, more readable, and "correct". In follow-ups we can use this for schematics/migrations. PR Close #54819 15 March 2024, 22:09:40 UTC
5901b0c Revert "fix(router): Routed components never inherit `RouterOutlet` `EnvironmentInjector` (#54265)" (#54895) This reverts commit da906fdafcbb302fa280a162d1c1f04369be2efa. This change causes some test failures in google3. PR Close #54895 15 March 2024, 22:08:45 UTC
3691570 build: update dependency google-closure-compiler to v20231112 (#54893) See associated pull request for more information. PR Close #54893 15 March 2024, 18:31:22 UTC
406448a build: update dependency archiver to v7 (#54892) See associated pull request for more information. PR Close #54892 15 March 2024, 18:18:34 UTC
9574eda build: lock file maintenance (#54890) See associated pull request for more information. PR Close #54890 15 March 2024, 18:01:45 UTC
e56c86f build: update actions/cache digest to ab5e6d0 (#54886) See associated pull request for more information. PR Close #54886 15 March 2024, 17:28:14 UTC
d3309d7 build: update dependency @octokit/graphql to v8 (#54888) See associated pull request for more information. PR Close #54888 15 March 2024, 17:24:51 UTC
dbe2e38 build: update dependency lighthouse to v11 (#54292) See associated pull request for more information. PR Close #54292 15 March 2024, 17:22:55 UTC
8cee78d build: update all non-major dependencies (#54616) See associated pull request for more information. PR Close #54616 15 March 2024, 17:21:28 UTC
97da5f7 build: update io_bazel_rules_sass digest to 79bd239 (#54887) See associated pull request for more information. PR Close #54887 15 March 2024, 17:16:23 UTC
0472a92 build: update cross-repo angular dependencies (#54883) See associated pull request for more information. PR Close #54883 15 March 2024, 17:06:43 UTC
e473b70 docs: update events (#54749) Generated `events.json` with the latest events retrieved from the Firebase DB. PR Close #54749 15 March 2024, 16:38:14 UTC
70e2431 build: update dependency puppeteer-core to v22 (#54298) See associated pull request for more information. PR Close #54298 15 March 2024, 16:31:25 UTC
17199b9 build: update peter-evans/create-or-update-comment action to v4 (#54299) See associated pull request for more information. PR Close #54299 15 March 2024, 16:30:51 UTC
1f8a30d build: update eslint dependencies (#50993) See associated pull request for more information. PR Close #50993 15 March 2024, 16:30:11 UTC
da906fd fix(router): Routed components never inherit `RouterOutlet` `EnvironmentInjector` (#54265) This commit ensures components in the route config predictably always get their providers from the hierarchy available to routes rather than sometimes being dependent on where they are inserted. fixes #53369 BREAKING CHANGE: Providers available to the routed components always come from the injector heirarchy of the routes and never inherit from the `RouterOutlet`. This means that providers available only to the component that defines the `RouterOutlet` will no longer be available to route components in any circumstances. This was already the case whenever routes defined providers, either through lazy loading an `NgModule` or through explicit `providers` on the route config. PR Close #54265 14 March 2024, 19:33:13 UTC
2b80258 feat(router): Allow Route.redirectTo to be a function which returns a string or UrlTree (#52606) This commit updates the logic around `Route.redirectTo` to enable using a function to create the redirect. This function can return a string, ands acts the same as previous string redirects, or a `UrlTree`, which will act as an absolute redirect. To be useful, the redirect function needs access to the params and data. Today, developers can access these in their redirect strings, for example `{path: ':id', redirectTo: '/user/:id'}`. Unfortunately, developers only have access to params and data on the _current route_ today in the redirect strings. The params and data in the `RedirectFn` give developers access to anything from the matched parent routes as well. This is done as the same way as param and data aggregation later on (https://github.com/angular/angular/blob/897f014785578d87bc655ea6ae9e113653960f50/packages/router/src/router_state.ts#L236-L278). In order to accomplish this, we inherit params and data while matching, after the `ActivatedRouteSnapshot` is created for the matched route rather than waiting until the end. The `RedirectFunction` does not return the full `ActivatedRouteSnapshot` interface. Some things are not accurately known at the route matching phase. For example, resolvers are not run until later, so any resolved title would not be populated. The same goes for lazy loaded components. The is also true for all the snapshots up to the root, so properties that include parents (root, parent, pathFromRoot) are also excluded. And naturally, the full route matching hasn't yet happened so firstChild and children are not available either. fixes #13373 resolves #28661 (though not for the redirect string - you would return a `UrlTree` from the function) BREAKING CHANGE: This change allows `Route.redirectTo` to be a function in addition to the previous string. Code which expects `redirectTo` to only be a string on `Route` objects will need to be adjusted. PR Close #52606 14 March 2024, 18:19:01 UTC
b71a323 docs: update Angular CLI help [main] (#54861) Updated Angular CLI help contents. PR Close #54861 14 March 2024, 15:55:42 UTC
77a397b release: cut the v18.0.0-next.0 release 14 March 2024, 15:44:29 UTC
700c052 fix(core): Update ApplicationRef.tick loop to only throw in dev mode (#54848) This commit updates the loop in ApplicationRef.tick to only throw in dev mode. In addition, it reduces the reruns to 10 from 100 in order to reduce the impact on production applications that encounter this error. That is, the loop will bail out much earlier and prevent prolonged unresponsiveness. PR Close #54848 13 March 2024, 22:35:34 UTC
1b19d2d docs: release notes for the v17.3.0 release 13 March 2024, 21:09:11 UTC
2d47329 build: update symbol goldens (#54843) fix goldens after recent commit PR Close #54843 13 March 2024, 18:36:06 UTC
0dd441d refactor(core): Remove cancelation funtion from scheduler return value (#54578) Canceling a scheduled callback is not used. PR Close #54578 13 March 2024, 18:09:56 UTC
10c5cdb fix(core): ensure change detection runs in a reasonable timeframe with zone coalescing (#54578) Zone event and run coalescing now races `requestAnimationFrame` and `setTimeout`. There are tradeoffs to both functions and racing the two gives us the benefits of both. This is explained in more detail in the jsdoc comment. This change also aligns the timing of zone coalescing with what will be used for zoneless. BREAKING CHANGE: The exact timing of change detection execution when using event or run coalescing with `NgZone` is now the first of either `setTimeout` or `requestAnimationFrame`. Code which relies on this timing (usually by accident) will need to be adjusted. If a callback needs to execute after change detection, we recommend `afterNextRender` instead of something like `setTimeout`. fixes #54544 fixes #44314 fixes #39854 (unverified but seems likely) PR Close #54578 13 March 2024, 18:09:55 UTC
8cad4e8 fix(core): `ComponentFixture` `autoDetect` respects `OnPush` flag of host view (#54824) This is a follow-up to #53718 that applies the same logic to the `autoDetect` feature of the fixture's host view. This now unifies the logic between `ApplicationRef` and `ComponentFixture` autodetect. BREAKING CHANGE: The `ComponentFixture` `autoDetect` feature will no longer refresh the component's host view when the component is `OnPush` and not marked dirty. This exposes existing issues in components which claim to be `OnPush` but do not correctly call `markForCheck` when they need to be refreshed. If this change causes test failures, the easiest fix is to change the component to `ChangeDetectionStrategy.Default`. PR Close #54824 13 March 2024, 15:32:03 UTC
edc1740 refactor(core): restructure logic in `isCssClassMatching` function (#54800) The logic in `isCssClassMatching` is only interested in two areas in the attributes: implicit attributes and the `AttributeMarker.Classes` area, with the first area only of interest for projection matching, not directive matching. This commit splits these two searches to make this more apparent. PR Close #54800 12 March 2024, 21:05:16 UTC
e6ee6d2 fix(core): exclude class attribute intended for projection matching from directive matching (#54800) This commit resolves a regression that was introduced when the compiler switched from `TemplateDefinitionBuilder` (TDB) to the template pipeline (TP) compiler. The TP compiler has changed the output of ```html if (false) { <div class="test"></div> } ``` from ```ts defineComponent({ consts: [['class', 'test'], [AttributeMarker.Classes, 'test']], template: function(rf) { if (rf & 1) { ɵɵtemplate(0, App_Conditional_0_Template, 2, 0, "div", 0) } } }); ``` to ```ts defineComponent({ consts: [[AttributeMarker.Classes, 'test']], template: function(rf) { if (rf & 1) { ɵɵtemplate(0, App_Conditional_0_Template, 2, 0, "div", 0) } } }); ``` The last argument to the `ɵɵtemplate` instruction (0 in both compilation outputs) corresponds with the index in `consts` of the element's attribute's, and we observe how TP has allocated only a single attribute array for the `div`, where there used to be two `consts` entries with TDB. Consequently, the `ɵɵtemplate` instruction is now effectively referencing a different attributes array, where the distinction between the `"class"` attribute vs. the `AttributeMarker.Classes` distinction affects the behavior: TP's emit causes the runtime to incorrectly match a directive with `selector: '.foo'` to be instantiated on the `ɵɵtemplate` instruction as if it corresponds with a structural directive! Instead of changing TP to align with TDB's emit, this commit updates the runtime instead. This uncovered an inconsistency in selector matching for class names, where there used to be two paths dealing with class matching: 1. The first check was commented to be a special-case for class matching, implemented in `isCssClassMatching`. 2. The second path was part of the main selector matching algorithm, where `findAttrIndexInNode` was being used to find the start position in `tNode.attrs` to match the selector's value against. The second path only considers `AttributeMarker.Classes` values if matching for content projection, OR of the `TNode` is not an inline template. The special-case in path 1 however does not make that distinction, so it would consider the `AttributeMarker.Classes` binding as a selector match, incorrectly causing a directive to match on the `ɵɵtemplate` itself. The second path was also buggy for class bindings, as the return value of `classIndexOf` was incorrectly negated: it considered a matching class attribute as non-matching and vice-versa. This bug was not observable because of another issue, where the class-handling in part 2 was never relevant because of the special-case in part 1. This commit separates path 1 entirely from path 2 and removes the buggy class-matching logic in part 2, as that is entirely handled by path 1 anyway. `isCssClassMatching` is updated to exclude class bindings from being matched for inline templates. Fixes #54798 PR Close #54800 12 March 2024, 21:05:16 UTC
0f7bbd0 docs: fix missing security guide in navigation (#54830) The paths for the security guide were flipped in the original PR. As a result, it looked for a markdown file in the best-practices directory when it should have looked for it in the guide directory instead. PR Close #54830 12 March 2024, 20:12:58 UTC
456f18b refactor(core): add internal API to enable i18n hydration (#54784) Add an internal API to enable and use i18n hydration for testing and development. This helps ensure that we don't accidentally break the current behavior until we are completely ready to roll out i18n support. PR Close #54784 12 March 2024, 18:38:59 UTC
db2f9a9 refactor(compiler-cli): cleanup unused code (#54775) The initializer api no longer needs to take care of `ɵoutput`. PR Close #54775 12 March 2024, 18:31:39 UTC
back to top