https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
c6a1491 docs: reduce confusion on tutorial intro and reorder how resources are introduced 26 March 2024, 17:31:43 UTC
d15dca0 fix(devtools): issue where backendReady race condition causes Angular not detected error (#54805) Previously, a race condition could cause DevTools to enter a state where it can't detect an application on reload. This was caused by a sequencing issue between the content script connection, the devtools panel connection and an event "backendReady" that lets DevTools know when a particular frame is ready to be inspected. This commit replaces the previously stored backendReady boolean with a promise, so that the devtools panel can eventually run a callback to connect to a content script when that content script emits it's backendReady message. PR Close #54805 26 March 2024, 16:19:06 UTC
a3e6703 Revert "Revert "refactor(devtools): implement multiframe support in devtools page (#53934)" (#54629)" (#54805) This reverts commit 133319eba0008cb556f587bfc873c3eb55e1d2a5. PR Close #54805 26 March 2024, 16:19:06 UTC
15b54ce Revert "Revert "refactor(devtools): implement iframe support for Angular DevTools' browser code (#53934)" (#54629)" (#54805) This reverts commit dd9f9d7d4490907b148e27abfd7622d31f55c15f. PR Close #54805 26 March 2024, 16:19:05 UTC
2fc11ea fix(core): account for re-projected ng-content elements with fallback content (#54854) Passes the attributes of the `ng-content` element to the container that is created for the fallback content so that it can be re-projected into the same slot. PR Close #54854 26 March 2024, 16:18:00 UTC
08b3163 refactor(core): move template declaration logic into reusable function (#54854) Moves the logic that declares a template out into a separate function so that it can be reused in other places like control flow and defer, without having to call directly into the `template` instruction. PR Close #54854 26 March 2024, 16:17:59 UTC
a600a39 feat(core): add support for fallback content in ng-content (#54854) Adds the ability to specify content that Angular should fall back to if nothing is projected into an `ng-content` slot. For example, if we have the following setup ``` @Component({ selector: 'my-comp', template: ` <ng-content select="header">Default header</ng-content> <ng-content select="footer">Default footer</ng-content> ` }) class MyComp {} @Component({ template: ` <my-comp> <footer>New footer</footer> </my-comp> ` }) class MyApp {} ``` The instance of `my-comp` in the app will have the default header and the new footer. **Note:** Angular's content projection happens during creation time. This means that dynamically changing the contents of the slot will not cause the default content to show up, e.g. if a `if` block goes from `true` to `false`. Fixes #12530. PR Close #54854 26 March 2024, 16:17:59 UTC
cf8fb33 refactor(compiler-cli): integrate fallback content for ng-content into template type checker (#54854) Adds logic to ingest the content of an `ng-content` element in the template type checker. We treat `ng-content` as a `ScopedNode`, because its content is inserted conditionally. PR Close #54854 26 March 2024, 16:17:58 UTC
8997837 refactor(compiler): pass default content to projection instruction (#54854) Updates the code that generates the `projection` instruction to pass the template function containing the default content into it. PR Close #54854 26 March 2024, 16:17:58 UTC
c734808 refactor(compiler-cli): capture ng-content children in AST (#54854) Updates the template AST to capture the content of `ng-content` elements instead of throwing an error. PR Close #54854 26 March 2024, 16:17:58 UTC
e53e36b refactor(compiler-cli): support ignoring specific doc entries during extraction (#54925) This commit adds support for ignoring specific doc entries when extracting doc entries. This allows us to drop e.g. `InputFunction` from the API docs, given that the `input` API entry holds all the relevant information. `InputFunction` only exists for type purposes in the `.d.ts`. PR Close #54925 26 March 2024, 16:17:21 UTC
0b38172 refactor(core): improve API documentation for query initializer APIs (#54925) Similar to `input`, `model`, `output`, the query initializer APIs are also explicitly denoted as such. This allows angular.dev to display them more readable and compactly. PR Close #54925 26 March 2024, 16:17:21 UTC
318c5b0 refactor(core): improve API documentation for `output` (#54925) This improves the API documentatino for `output` in angular.dev, similar to how we improved the API for `input`. Angular.dev can now show these documentation entries more readable if annotated explicitly as initializer API. Note: output API is short enough that we want to include the types in the code snippet previews. PR Close #54925 26 March 2024, 16:17:21 UTC
c91159a refactor(core): improve API documentation for `model` (#54925) Improves the API documentation for `model`, similarly to how we updated the `input` function. PR Close #54925 26 March 2024, 16:17:20 UTC
72adf0d refactor(core): improve API documentation for `input` after angular.dev support (#54925) This commit improves the API documentation for `input` after we added support for initializer APIs in angular.dev docs generation. Changes: - Rename `ReadT` to `T`. This conceptually makes it easy to talk about inputs of type `T` if there is no transform involved. The common case. - Rename `WriteT` to `TransformT`. This makes it clear that this is the type that the "transform" needs to handle. - Improves the "overall" description of the input function so that it can be shown as a general overview for the API site. - Improves usage notes to be a little more helpful, yielding more useful content in the API docs usage notes section. - Add short JSDoc description for each individual overload. PR Close #54925 26 March 2024, 16:17:20 UTC
2419f2c refactor(docs-infra): support initializer API functions (#54925) This commit ensures that extracted initializer API functions are showing up in angular.dev and can be filtered. PR Close #54925 26 March 2024, 16:17:20 UTC
5672c64 refactor(compiler-cli): support extracting initializer API functions (#54925) This commit adds support for extracting initializer API functions. Initialixer API functions are functions conceptually that can are intended to be used as class member initializers. Angular started introducing a few of these for the new signal APIs, like `input`, `model` or signal-based queries. These APIs are currently confusingly represented in the API docs because the API extraction: - does not properly account for call signatures of interfaces - does not expose information about sub-property objects and call signatures (e.g. `input.required`) - the docs rendering syntax highlighting is too bloated and confusing with all types being included. This commit adds support for initializer API functions, namely two variants: - interface-based initializer APIs. e.g. `export const input: InputFunction`- which is a pattern for `input` and `input.required`. - function-based simpler initializer APIs with overloads. e.g. `contentChildren` has many signatures but doesn't need to be an interface as there are no sub-property call signatures. PR Close #54925 26 March 2024, 16:17:20 UTC
6ea5e21 Revert "fix(http): exclude caching for authenticated HTTP requests (#54746)" (#55033) This reverts commit 2258ac7a32bf83dc3e33a7ff9526b501ea95e33d. Closes: #55031 PR Close #55033 26 March 2024, 16:16:28 UTC
6d1b82d fix(language-service): allow external projects to use provided compiler options (#55035) When creating the Angular Language Service instance, attempts to read configuration files are now only attempted if the project is considered a `Configured` project. Such a project has been analyzed by TypeScript and one or more configuration files (tsconfig/jsconfig) files have been found for the project. PR Close #55035 26 March 2024, 16:15:43 UTC
e1650e3 fix(compiler): throw error if item name and context variables conflict (#55045) Based on some internal feedback, these changes add validations to prevent cases where the `@for` loop variable name is the same as one of the built-in context variables, or when one of the context variables is aliased to the same name as the item. PR Close #55045 26 March 2024, 16:10:06 UTC
ee3bb81 refactor(common): request low quality placeholder images (#54899) For every built-in load, this commit adds a parameter to load low quality placeholder images. Using 20/100 as base value. PR Close #54899 25 March 2024, 18:17:33 UTC
13554f9 fix(http): manage different body types for caching POST requests (#54980) This update enhances the encoding handling of request bodies to generate the necessary cache key for transfer cache functionality. Closes #54956 PR Close #54980 25 March 2024, 18:17:02 UTC
b2ba945 docs: unescape html entities (#55016) adev supports regular characters in place of entity. Let's use them to make the ease the work for the editors. PR Close #55016 25 March 2024, 18:16:35 UTC
9dabef0 test(zone.js): fix zone.js test listener removal (#55017) The test was checking the wrong set of listeners because of a typo. PR Close #55017 25 March 2024, 18:16:06 UTC
5bd188a feat(compiler-cli): add partial compilation support for deferred blocks (#54908) Builds on top of the previous changes to add support for deferred blocks during partial compilation. To do this, the following changes had to be made: * The metadata passed into `ɵɵngDeclareComponent` has an additional field called `deferBlockDependencies` which has an array of the dependency loading functions for each defer block in the template. During linking, the dependency functions are loaded by matching their template index to the index in the `deferBlockDependencies` array. * There's a new `ɵɵngDeclareClassMetadataAsync` function that is created for components that have deferred dependencies. It gets transpiled to `setClassMetadataAsync` and works in the same way by capturing a dependency loading function and setting the metadata after the dependencies are resolved. It also has some extra fields for capturing the version which are standard in linker-generated code. * Deferred import statements are now stripped in partial compilation mode, similar to full compilation. PR Close #54908 22 March 2024, 05:15:32 UTC
84410f5 refactor(core): introduce API for declaring asynchronous partial metadata (#54908) Adds the `ɵɵngDeclareClassMetadataAsync` function that will be produced during partial compilation for component classes that have deferred dependencies. At runtime the dependencies will be resolved before setting the metadata. PR Close #54908 22 March 2024, 05:15:31 UTC
ffa217e refactor(compiler-cli): add method for extracting function parameters (#54908) Updates the linker's AST host to add the ability to extract a function's parameters. This will be required for the next commits. PR Close #54908 22 March 2024, 05:15:30 UTC
102688b refactor(compiler): widen type of resolver function (#54908) Updates the type of the resolver function to be any `Expression` since JIT may receive a function reference rather than a `ArrowFunctionExpr`. PR Close #54908 22 March 2024, 05:15:30 UTC
36de5c3 refactor(compiler): ensure defer blocks maintain the template order in the binder (#54908) Switches to tracking the deferred blocks in a flat array in the binder to ensure that their template order is maintained. This will be relevant in the next commits where we'll match deferred blocks by their index. Note that the current map we have technically guarantees the insertion order in the spec, but the array is a bit more explicit. PR Close #54908 22 March 2024, 05:15:30 UTC
fc13144 refactor(compiler-cli): exit early when checking content projection (#54921) Updates the logic that detects if a node should be checked for control flow content projection to exit as soon as it detects a second root node, instead of counting the total and then checking if it's more than one. PR Close #54921 22 March 2024, 05:14:17 UTC
a369f43 fix(compiler): capture switch block cases for content projection (#54921) Captures the individual cases in `switch` blocks for content projection purposes. PR Close #54921 22 March 2024, 05:14:17 UTC
7fc7f3f fix(compiler): capture all control flow branches for content projection in if blocks (#54921) Previously only the first branch of an `if` block was captured for content projection. This was done because of some planned refactors in the future. Since we've decided not to apply those refactors to conditionals, these changes update the compiler to capture each branch individually for content projection purposes. PR Close #54921 22 March 2024, 05:14:16 UTC
1c0ec56 fix(core): correctly project single-root content inside control flow (#54921) This commit changes the way we use containers to insert conditional content. Previously if and switch conditional would always use the first content as the insertion container. This strategy interfered with content projection that projects entire containers - as the consequence content for _all_ cases would end up in slot matched by the first container. This could be very surprising as desicribed in https://github.com/angular/angular/issues/54840 After the change each conditional content is projected into its own container. This means that content projection can match more than one container and result in correct display. Fixes #54840 PR Close #54921 22 March 2024, 05:14:16 UTC
b80434a refactor(http): use nullish coalescing operator in HttpRequest.clone() (#54939) Refactor how boolean options are handled in HttpRequest.clone() method by using nullish coalescing operator PR Close #54939 22 March 2024, 05:13:43 UTC
cf73983 fix(http): include transferCache when cloning HttpRequest (#54939) Fixes a bug where HttpRequest.clone() does not include the transferCache property. Fixes #54924. PR Close #54939 22 March 2024, 05:13:42 UTC
eb625d3 fix(compiler): declare for loop aliases in addition to new name (#54942) Currently when aliasing a `for` loop variable with `let`, we replace the variable's old name with the new one. Since users have found this to be confusing, these changes switch to a model where the variable is available both under the original name and the new one. Fixes #52528. PR Close #54942 22 March 2024, 05:13:14 UTC
76b921e ci: change label set by renovate to be merge ready immediately (#54947) Since the PR is always expected to be ready to merge as renovate won't make changes in response to any sort of comment, it should already be marked as merge ready PR Close #54947 22 March 2024, 05:11:09 UTC
bfd0bd5 fix(compiler): invoke method-based tracking function with context (#54960) Previously we assumed that if a `for` loop tracking function is in the form of `someMethod($index, $item)`, it will be pure so we didn't pass the parameter to bind the context to it. This appears to be risky, because we don't know if the method is trying to access `this`. These changes play it safe by always binding method-based tracking functions. Fixes #53628. PR Close #54960 22 March 2024, 05:08:40 UTC
b02b31a feat(compiler-cli): drop support for TypeScript older than 5.4 (#54961) Drops support for TypeScript versions older than 5.4. BREAKING CHANGE: * Angular no longer supports TypeScript versions older than 5.4. PR Close #54961 22 March 2024, 05:07:45 UTC
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
back to top