forked from angular/angular
-
Notifications
You must be signed in to change notification settings - Fork 0
Create a new pull request by comparing changes across two branches #517
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
Merged
Conversation
This file contains hidden or 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
With this change we update the CLI generate commands to be in bash style. PR Close #38421
In the part "5. Add In-app Navigation" of the tutorial it was already removed PR Close #38306
We recently updated the benchpress package to have a more loose Angular core peer dependency, and less other unused dependencies. We should make sure to use that in the dev-infra package so that peer dependencies can be satisified in consumer projects, and so that less unused dependencies are brought into projects. PR Close #38440
…ssage linting (#38430) Previously commit message types were provided as part of the ng-dev config in the repository using the ng-dev toolset. This change removes this configuration expectation and instead predefines the valid types for commit messages. Additionally, with this new unified set of types requirements around providing a scope have been put in place. Scopes are either required, optional or forbidden for a given commit type. PR Close #38430
Previously we added a browser target for `firefox` into the dev-infra package. It looks like as part of this change, we accidentally switched the local web testing target to `firefox`. Web tests are not commonly run locally as we use Domino and NodeJS tests for primary development. Sometimes though we intend to run tests in a browser. This would currently work with Firefox but not on Windows (as Firefox is a noop there in Bazel). This commit switches the primary browser back to `chromium`. Also Firefox has been added as a second browser to web testing targets. This allows us to reduce browsers in the legacy Saucelabs job. i.e. not running Chrome and Firefox there. This should increase stability and speed up the legacy job (+ reduced rate limit for Saucelabs). PR Close #38435
…8448) The `@HostListener` functions and lifecycle hooks aren't intended to be public API but do need to appear in the `.d.ts` files or type checking will break. Adding the nodoc annotation will correctly hide this function on the docs site. Again, note that `@internal` cannot be used because the result would be that the functions then do not appear in the `.d.ts` files. This would break lifecycle hooks because the class would be seen as not implementing the interface correctly. This would also break `HostListener` because the compiled templates would attempt to call the `onClick` functions, but those would also not appear in the `d.ts` and would produce errors like "Property 'onClick' does not exist on type 'RouterLinkWithHref'". PR Close #38448
We should define ngDevMode to false in Closure, but --define only works in the global scope. With ngDevMode not being set to false, this size tracking test provides little value but a lot of headache to continue updating the size. PR Close #38449
This commit replaces the old and slow `ReflectiveInjector` that was deprecated in v5 with the new `Injector`. Note: This change was only done in the spec files inside the `aio` folder. While changing this, it was not possible to directly use `Injector.get` to get the correct typing for the mocked classes. For example: ```typescript locationService = injector.get<TestLocationService>(LocationService); ``` Fails with: > Argument of type 'typeof LocationService' is not assignable to parameter of type 'Type<TestLocationService> | InjectionToken<TestLocationService> | AbstractType<TestLocationService>'. Type 'typeof LocationService' is not assignable to type 'Type<TestLocationService>'. Property 'searchResult' is missing in type 'LocationService' but required in type 'TestLocationService'. Therefore, it was necessary to first convert to `unknown` and then to `TestLocationService`. ```typescript locationService = injector.get(LocationService) as unknown as TestLocationService; ``` PR Close #38408
…elements (#38418) The template type-checker would generate a statement with a call expression for all DOM elements in a template of the form: ``` const _t1 = document.createElement("div"); ``` Profiling has shown that this is a particularly expensive call to perform type inference on, as TypeScript needs to perform signature selection of `Document.createElement` and resolve the exact type from the `HTMLElementTagNameMap`. However, it can be observed that the statement by itself does not contribute anything to the type-checking result if `_t1` is not actually used anywhere, which is only rarely the case---it requires that the element is referenced by its name from somewhere else in the template. Consequently, the type-checker can skip generating this statement altogether for most DOM elements. The effect of this optimization is significant in several phases: 1. Less type-check code to generate 2. Less type-check code to emit and parse again 3. No expensive type inference to perform for the call expression The effect on phase 3 is the most significant here, as type-checking is not currently incremental in the sense that only phases 1 and 2 can be reused from a prior compilation. The actual type-checking of all templates in phase 3 needs to be repeated on each incremental compilation, so any performance gains we achieve here are very beneficial. PR Close #38418
…38418) The template type-checker would always generate a directive declaration even if its type was never used. For example, directives without any input nor output bindings nor exportAs references don't need the directive to be declared, as its type would never be used. This commit makes the `TcbOp`s that are responsible for declaring a directive as optional, such that they are only executed when requested from another operation. PR Close #38418
…pty (#38418) For a template that contains for example `<span *ngIf="first"></span>` there's no need to render the `NgIf` guard expression, as the child scope does not have any type-checking statements, so any narrowing effect of the guard is not applicable. This seems like a minor improvement, however it reduces the number of flow-node antecedents that TypeScript needs to keep into account for such cases, resulting in an overall reduction of type-checking time. PR Close #38418
Remove unused constant allDiagnostics PR Close #38441
…38317) When removal of one view causes removal of another one from the same ViewContainerRef it triggers an error with views length calculation. This commit fixes this bug by removing a view from the list of available views before invoking actual view removal (which might be recursive and relies on the length of the list of available views). Fixes #38201. PR Close #38317
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