forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create a new pull request by comparing changes across two branches #140
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Fixes that `@defer` blocks didn't account for type-only imports which could cause the import to be considered as not deferrable. PR Close #52343
PR Close #52339
The test is actually observing that OnPush results in a view not being checked when checkNoChanges runs. PR Close #52337
This updates offset to handle pre and post offset properly for nested situations, rather than relying on solely nestCount. This should properly apply offset calculations at the right time to handle any nested situation. PR Close #52332
This commit updates the code to report errors via `ErrorHandler` instance. For dependency loading problems, errors are reported only when `@error` block is not provided. PR Close #52320
) add a note on automated preconnect generation to the NgOptimizedImage docs' preconnect section, and add a related FAQ entry. PR Close #52248
…rm-server` and `@angular/platform-server/init` (#52342) Previously, the cross entry-point dependency was created to share the `setDomTypes` function. This however, causes extra transformations "linking" during the application build since other Angular code in `@angular/platform-server` is pulled in. With this commit we remove the cross dependency and thus remove the need for extra transformations in the server polyfill bundle with the result of having a slightly faster build. See: angular/angular-cli#26113 PR Close #52342
Some tests are already passing, but were not enabled at the time they were previously fixed. PR Close #52289
We currently allow elements to be collapsed around pipe creation instructions. TemplateDefinitionBuilder disallows this, but only sometimes. Collapsing in this case is actually less generated code, and it's OK to allow it. PR Close #52289
) Previously, the template pipeline did not handle "empty" reads gracefully: it would emit syntactically invalid reads of empty properties. Now we read `$implicit`. This allows us to enable a test that relies on `$implicit`. However, we also have to create another golden, because our variable inlining is more aggressive. PR Close #52289
…d of saving it (#52289) Previously, inside an event listener, template pipeline would always save the context from restoring a view, e.g. ``` const restored_ctx = r0.ɵɵrestoreView(s); ``` This is usually correct! However, consider the case of a listener in the template's root view. The appropriate context will already be available via closure capture, and we can just use it (as `ctx`). Now, the context resolution phase understands that we don't need to use the restored view's saved context if we would have access to it by closure. Note: we also create a new golden, because the const array is in a harmlessly different order. PR Close #52289
…et assignment order (#52289) Many instructions consume variable slots, which are used to persist data between update runs. For top-level instructions, the offset into the variable data array is implicitly advanced, because those instructions always run. However, instructions in non-top-level expressions cannot be assumed to run every time, because they might be conditionally executed. Therefore, they cannot implicitly advance the offset into the variable data, and must be given an explicitly assigned variable offset. TemplateDefinitionBuilder assigned offsets top-to-bottom for all instructions *except* pure functions. Pure functions would be assigned offsets lazily, on a second pass. Template Pipeline can now imitate this behavior, when in compatibility mode: pure functions are assigned offsets on a second pass. This also makes the "variadic var offsets" phase unnecessary -- the new approach is more general and correct. PR Close #52289
Previously, we ran the ordering phase near the end of the compilation. However, this meant that phases like slot assignment and variable offset assignment would happen first, and then the nice, monotonically-increasing orders would be scrambled by the reordering. It's much more intelligible to order first, and then perform these assignments. However, to make this happen, some modifications to the ordering phase are required. In particular, we can no longer rely on `advance` instructions to break up orderable groups. PR Close #52289
The correct order of attributes and properties is: 1. Interpolated properties 2. Interpolated attributes 3. Non-interpolated properties 4. Non-interpolated attributes This includes an additional nuance: singleton attribute interpolations, such as `[attr.foo]="{{bar}}"`, will be "collaped" into a simple `attribute` instruction. However, this is *not* the case for singleton property interpolations! The ordering phase must take this nuance into account to match the TemplateDefinitionBuilder order. After the project lands, it might be nice to also collapse singleton property interpolations. PR Close #52289
…#52289) We were incorrectly emiting a extracted constant pool index for the final argument of the projection instruction. It actually takes an array literal. (N.B.: This means we re-create the array every time! We should probably modify the runtime to use a const index for this.) Additionally, we alter the projection op to not extend the element op base type. PR Close #52289
…der (#52289) We roughly attempt to match TemplateDefinitionBuilder's pipe creation order, by placing pipe creation instructions after their target elements. However, we cannot fully emulate the "inside-out" ordering TemplateDefinitionBuilder uses when multiple pipes apply to one element, because TemplateDefinitionBuilder creates the pipes as expressions are visited, from the leaves up. Our order is perfectly adequate though. We also add a non-compatibility-mode ordering, which just appends them to the end of the create block. This is better because it allows for more chaining opportunities. PR Close #52289
The `projection` op should map onto the entire corresponding `ng-content`. PR Close #52289
Previously, we would emit *two* pipe creation instructions for each pipe in a switch case. This is because we were visiting both the transformed and raw versions of the pipe bindings. Now, we clear the raw case expressions array after generating the transformed test expression. Also, we introduce some new goldens, because our pipe creation order is harmlessly different. PR Close #52289
See associated pull request for more information. PR Close #52353
This commit reduces the property size in the http transfer cache to reduce the page payload. Before ```html <script id="ng-state" type="application/json"> { "4155228514": { "body": "....", "headers": {}, "status": 200, "statusText": "OK", "url": "http://foo.com/assets/media.json", "responseType": "json" }, } </script> ``` Now ```html <script id="ng-state" type="application/json"> { "4155228514": { "b": "....", "h": {}, "s": 200, "st": "OK", "u": "http://foo.com/assets/media.json", "rt": "json" }, } </script> ``` PR Close #52347
) Fixes that the control flow migration was only processing top-level classes. Nested classes could come up during unit tests. PR Close #52309
GulajavaMinistudio
merged commit Oct 25, 2023
6832d3c
into
angular-indonesia:main
7 of 14 checks passed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
PR Checklist
Please check if your PR fulfills the following requirements:
PR Type
What kind of change does this PR introduce?
What is the current behavior?
Issue Number: N/A
What is the new behavior?
Does this PR introduce a breaking change?
Other information