This project is mirrored from https://github.com/angular/angular.git.
Pull mirroring updated .
- Sep 24, 2020
-
-
Alex Rickabaugh authored
-
Alex Rickabaugh authored
-
- Sep 23, 2020
-
-
Wagner Maciel authored
* Make url and params optional in runBenchmark * Make url optional in openBrowser * Remove unused code from runBenchmark PR Close #38941
-
Joey Perrott authored
Remove usages of blacklist around UNPATCHED_EVENTS configuration PR Close #38930
-
Andrew Scott authored
Though we currently have the knowledge of where the `key` for an attribute binding appears during parsing, we do not propagate this information to the output AST. This means that once we produce the template AST, we have no way of mapping a template position to the key span alone. The best we can currently do is map back to the `sourceSpan`. This presents problems downstream, specifically for the language service, where we cannot provide correct information about a position in a template because the AST is not granular enough. PR Close #38898
-
Adrian Rutkowski authored
There is an inconsistency in overrideProvider behaviour. Testing documentation says (https://angular.io/guide/testing-components-basics#createcomponent) that all override... methods throw error if TestBed is already instantiated. However overrideProvider doesn't throw any error, but (same as other override... methods) doesn't replace providers if TestBed is instantiated. Add TestBed instantiation check to overrideProvider method to make it consistent. BREAKING CHANGE: If you call `TestBed.overrideProvider` after TestBed initialization, provider overrides are not applied. This behavior is consistent with other override methods (such as `TestBed.overrideDirective`, etc) but they throw an error to indicate that, when the check was missing in the `TestBed.overrideProvider` function. Now calling `TestBed.overrideProvider` after TestBed initialization also triggers an error, thus there is a chance that some tests (where `TestBed.overrideProvider` is called after TestBed initialization) will start to fail and require updates to move `TestBed.overrideProvider` calls before TestBed initialization is completed. Issue mentioned here: https://github.com/angular/angular/issues/13460#issuecomment-636005966 Documentation: https://angular.io/guide/testing-components-basics#createcomponent PR Close #38717
-
klemenoslaj authored
This commit introduces a new option for the service worker, called `navigationRequestStrategy`, which adds the possibility to force the service worker to always create a network request for navigation requests. This enables the server redirects while retaining the offline behavior. Fixes #38194 PR Close #38565
-
- Sep 22, 2020
-
-
David Shevitz authored
The topics for our getting started tutorial are inconsistent. This change makes the titles consistent and easier to read. PR Close #38887
-
Pete Bacon Darwin authored
The tests were assuming that newlines were `\n` characters but this is not the case on Windows. PR Close #38925
-
Pete Bacon Darwin authored
This commit refactors the `ExpressionTranslatorVisitor` so that it is not tied directly to the TypeScript AST. Instead it uses generic `TExpression` and `TStatement` types that are then converted to concrete types by the `TypeScriptAstFactory`. This paves the way for a `BabelAstFactory` that can be used to generate Babel AST nodes instead of TypeScript, which will be part of the new linker tool. PR Close #38775
-
Pete Bacon Darwin authored
Previously each identifier was being imported individually, which made for a very long import statement, but also obscurred, in the code, which identifiers came from the compiler. PR Close #38775
-
Pete Bacon Darwin authored
This file contains a number of classes making it long and hard to work with. This commit splits the `ImportManager`, `Context` and `TypeTranslatorVisitor` classes, along with associated functions and types into their own files. PR Close #38775
-
Pete Bacon Darwin authored
When the target of the compiler is ES2015 or newer then we should be generating `let` and `const` variable declarations rather than `var`. PR Close #38775
-
Pete Bacon Darwin authored
Using an interface makes the code cleaner and more readable. This change also adds the `range` property to the type to be used for source-mapping. PR Close #38775
-
Pete Bacon Darwin authored
These imports are not used and so are just bloating the code unnecessarily PR Close #38775
-
Pete Bacon Darwin authored
The cast to `ts.Identifier` was a hack that "just happened to work". The new approach is more robust and doesn't have to undermine the type checker. PR Close #38775
-
Ayaz Hafiz authored
Let's say we have a code like ```html <div<span>123</span> ``` Currently this gets parsed into a tree with the element tag `div<span`. This has at least two downsides: - An incorrect diagnostic that `</span>` doesn't close an element is emitted. - A consumer of the parse tree using it for editor services is unable to provide correct completions for the opening `<span>` tag. This patch attempts to fix both issues by instead parsing the code into the same tree that would be parsed for `<div></div><span>123</span>`. In particular, we do this by optimistically scanning an open tag as usual, but if we do not notice a terminating '>', we mark the tag as "incomplete". A parser then emits an error for the incomplete tag and adds a synthetic (recovered) element node to the tree with the incomplete open tag's name. What's the downside of this? For one, a breaking change. <ol> <li> The first breaking change is that `<` symbols that are ambiguously text or opening tags will be parsed as opening tags instead of text in element bodies. Take the code ```html <p>a<b</p> ``` Clearly we cannot have the best of both worlds, and this patch chooses to swap the parsing strategy to support the new feature. Of course, `<` can still be inserted as text via the `<` entity. </li> </ol> Part of #38596 PR Close #38681
-
JoostK authored
This commit re-enables some tests that were temporarily disabled on Windows, as they failed on native Windows CI. The Windows filesystem emulation has been corrected in an earlier commit, such that the original failure would now also occur during emulation on Linux CI. PR Close #37782
-
JoostK authored
In native windows, the drive letter is a capital letter, while our Windows filesystem emulation would use lowercase drive letters. This difference may introduce tests to behave differently in native Windows versus emulated Windows, potentially causing unexpected CI failures on Windows CI after a PR has been merged. Resolves FW-2267 PR Close #37782
-
Ingo Bürk authored
NG_VALUE_ACCESSOR is a multi injection token, users can and should expect more than one ControlValueAccessor to be available (and this is how it is used in @angular/forms). This is now reflected in the definition of the injection token by typing it as an array of ControlValueAccessor. The motivating reason is that using the programmatic Injector api will now type Injector#get correspondingly. fixes #29351 BREAKING CHANGES NG_VALUE_ACCESSOR is now typed as a readonly array rather than a mutable scalar. It is used as a multi injection token and as such it should always be expected that more than one accessor may be returned. PR Close #29723
-
Ajit Singh authored
In bootstrapping.md the default AppModule has some extra imports which are not generated by default in ng new removed those extra imports and add them at appropriate place. PR Close #38549
-
Prashant Tholia authored
Add ISO 8601 week-numbering year formats ('r', 'rr', 'rrr', 'rrrr') support for formatDate function. Issue:https://github.com/angular/angular/issues/38739 PR Close #38828
-
Andrew Scott authored
The logic for computing identifiers, specifically for bound attributes can be simplified by using the value span of the binding rather than the source span. PR Close #38899
-
Kapunahele Wong authored
This commit removes the scrollbar styles so that the default styles in the browser render. This widens the webkit scroll bar. This makes it easier to grab the scrollbar using assistive technology and devices, and provides a wider target for those who have dexterity issues. By removing these styles, We will no longer have to maintain custom scrollbars specific to WebKit and they will be accessible by default. PR Close #38852
-
Sonu Kapoor authored
This commit replaces the old and slow ReflectiveInjector that was deprecated in v5 with the new Injector. PR Close #38897
-
Marley Powell authored
revert: feat(router): better warning message when a router outlet has not been instantiated (#38920) This reverts commit [16098157]. The warning that was added created more confusion than it solved and also warned for valid use-cases. PR Close #38920
-
- Sep 19, 2020
-
-
Andrew Scott authored
The current tests print out the span numbers, which are really difficult to verify since it requires manually going to the template string and looking at what characters appear within those indexes. The better humanization would be to use the toString method of the spans, which prints the span text itself PR Close #38902
-
Andrew authored
Changed several period into colons to be consistent throughout the doc. Changed "If don't add the interface..." to "If _you_ don't add the interface..." PR Close #38900
-
Andrew Kushnir authored
This commit updates ngbot config to avoid requesting google3 presubmit for the changes in the `packages/zone.js/dist` folder (which is not synced into google3). PR Close #38901
-
Joey Perrott authored
Update the vendored version of yarn to the latest version. PR Close #38869
-
William Koza authored
Currently, when we call jsonp method without importing HttpClientJsonpModule, an error message appears saying 'Attempted to construct Jsonp request without JsonpClientModule installed.' instance of 'Attempted to construct Jsonp request without HttpClientJsonpModule installed.' PR Close #38756
-
Andrew Kushnir authored
This commit adds a logic to ouput the number of new and fixed cycles after running circular dependency checker. This information is useful to better understand an impact of changes in case the number of new/fixed cycles is relatively big. PR Close #38805
-
Andrew Kushnir authored
This commit updates several import statements in the core package to decrease the number of cycles detected by the dependency checker tool. PR Close #38805
-
JiaLiPassion authored
Close #38795 in the XMLHttpRequest patch, when get `readystatechange` event, zone.js try to invoke `load` event listener first, then call `invokeTask` to finish the `XMLHttpRequest::send` macroTask, but if the request failed because the server can not be reached, the `load` event listener will not be invoked, so the `invokeTask` of the `XMLHttpRequest::send` will not be triggered either, so we will have a non finished macroTask there which will make the Zone not stable, also memory leak. So in this PR, if the `XMLHttpRequest.status = 0` when we get the `readystatechange` event, that means something wents wrong before we reached the server, we need to invoke the task to finish the macroTask. PR Close #38836
-
Joey Perrott authored
During the merge process, all validations have already been completed so git commit hooks can be safely skipped. This additionally, prevents errors from occuring which would be caused the commit hooks executing, such as when yarn updates and then yarn commands are unable to run within the same process. PR Close #38888
-
- Sep 18, 2020
-
-
Sonu Kapoor authored
This commit removes some unused imports from the spec files. PR Close #38818
-
JoostK authored
In #38666 we changed how ngcc deals with type expressions, where it would now always emit the original type expression into the generated code as a "local" type value reference instead of synthesizing new imports using an "imported" type value reference. This was done as a fix to properly deal with renamed symbols, however it turns out that the compiler has special handling for certain imported symbols, e.g. `ChangeDetectorRef` from `@angular/core`. The "local" type value reference prevented this special logic from being hit, resulting in incorrect compilation of pipe factories. This commit fixes the issue by manually inspecting the import of the type expression, in order to return an "imported" type value reference. By manually inspecting the import we continue to handle renamed symbols. Fixes #38883 PR Close #38892
-
Pete Bacon Darwin authored
Common AST formats such as TS and Babel do not use a separate node for comments, but instead attach comments to other AST nodes. Previously this was worked around in TS by creating a `NotEmittedStatement` AST node to attach the comment to. But Babel does not have this facility, so it will not be a viable approach for the linker. This commit refactors the output AST, to remove the `CommentStmt` and `JSDocCommentStmt` nodes. Instead statements have a collection of `leadingComments` that are rendered/attached to the final AST nodes when being translated or printed. PR Close #38811
-
Maksymilian Sielicki authored
PR Close #38802
-
Minko Gechev authored
Co-authored-by:
George Kalpakas <kalpakas.g@gmail.com> PR Close #38874
-