https://github.com/angular/angular

sort by:
Revision Author Date Message Commit Date
bff48a0 release: cut the v11.1.0-next.4 release (#40330) 06 January 2021, 21:20:29 UTC
c81d5bf docs: release notes for the v11.0.6 release (#40329) 06 January 2021, 21:18:09 UTC
183fb7e fix(language-service): return all typecheck files via getExternalFiles (#40162) We need a means to preserve typecheck files when a project is reloaded, otherwise the Ivy compiler will throw an error when it's unable to find them. This commit implements `getExternalFiles()` called by the langauge server to achieve this goal. For more info see https://github.com/angular/vscode-ng-language-service/issues/1030 PR Close #40162 06 January 2021, 19:34:15 UTC
0264f76 fix(language-service): LSParseConfigHost.resolve should not concat abs paths (#40242) `ts.server.ServerHost.resolvePath()` is different from Angular's `FileSystem.resolve()` because the signature of the former is ```ts resolvePath(path: string): string; // ts.server.ServerHost ``` whereas the signature of the latter is ```ts resolve(...paths: string[]): AbsoluteFsPath; // FileSystem on compiler-cli ``` The current implementation calls `path.join()` to concatenate all the input paths and pass the result to `ts.server.ServerHost.resolvePath()`, but doing so results in filenames like ``` /foo/bar/baz/foo/bar/baz/tsconfig.json ``` if both input paths are absolute. `ts.server.ServerHost` should not be used to implement the `resolve()` method expected by Angular's `FileSystem`. We should use Node's `path.resolve()` instead, which will correctly collapse the absolute paths. Fix https://github.com/angular/vscode-ng-language-service/issues/1035 PR Close #40242 06 January 2021, 18:54:40 UTC
a62416c fix(language-service): include compilerOptions.rootDir in rootDirs (#40243) When resolving references, the Ivy compiler has a few strategies it could use. For relative path, one of strategies is [`RelativePathStrategy`]( https://github.com/angular/angular/blob/master/packages/compiler-cli/src/ ngtsc/imports/README.md#relativepathstrategy). This strategy relies on `compilerOptions.rootDir` and `compilerOptions.rootDirs` to perform the resolution, but language service only passes `rootDirs` to the compiler, and not `rootDir`. In reality, `rootDir` is very different from `rootDirs` even though they sound the same. According to the official [TS documentation][1], > `rootDir` specifies the root directory of input files. Only use to control > the output directory structure with --outDir. > `rootDirs` is a list of root folders whose combined content represent the > structure of the project at runtime. See [Module Resolution documentation]( > https://www.typescriptlang.org/docs/handbook/ > module-resolution.html#virtual-directories-with-rootdirs) > for more details. For now, we keep the behavior between compiler and language service consistent, but we will revisit the notion of `rootDir` and how it is used later. Fix angular/vscode-ng-language-service#1039 [1]: https://www.typescriptlang.org/docs/handbook/compiler-options.html PR Close #40243 06 January 2021, 18:54:11 UTC
335d6c8 fix(compiler): incorrectly encapsulating selectors with escape sequences (#40264) CSS supports escaping in selectors, e.g. writing `.foo:bar` will match an element with the `foo` class and `bar` pseudo-class, but `.foo\:bar` will match the `foo:bar` class. Our shimmed shadow DOM encapsulation always assumes that `:` means a pseudo selector which breaks a selector like `.foo\:bar`. These changes add some extra logic so that escaped characters in selectors are preserved. Fixes #31844. PR Close #40264 06 January 2021, 18:33:49 UTC
8ebac24 fix(core): ensure sanitizer works if DOMParser return null body (#40107) In some browsers, notably a mobile version of webkit on iPad, the result of calling `DOMParser.parseFromString()` returns a document whose `body` property is null until the next tick of the browser. Since this is of no use to us for sanitization, we now fall back to the "inert document" strategy for this case. Fixes #39834 PR Close #40107 06 January 2021, 18:32:24 UTC
8dbd220 fix(dev-infra): fix `yarn symbol-extractor` command (#40163) The `yarn symbol-extractor:check` and `yarn symbol-extractor:update` commands don't seem to work currently - the script is unable to calculate the list of relevant targets. Running the `bazel query ...` command used in the script fails due to the missing quotes around the query argument. This commit fixes the problem by updating the script to wrap query argument into single quotes. PR Close #40163 06 January 2021, 18:31:24 UTC
fdec650 docs(forms): typo word "property" was missing (#40323) Word "property" was missing in @returns description of minLength PR Close #40323 06 January 2021, 16:44:03 UTC
d4327d5 feat(compiler-cli): JIT compilation of component declarations (#40127) The `ɵɵngDeclareComponent` calls are designed to be translated to fully AOT compiled code during a build transform, but in cases this is not done it is still possible to compile the declaration object in the browser using the JIT compiler. This commit adds a runtime implementation of `ɵɵngDeclareComponent` which invokes the JIT compiler using the declaration object, such that a compiled component definition is made available to the Ivy runtime. PR Close #40127 06 January 2021, 16:28:03 UTC
826b77b test(core): tag `render3` test targets as ivy-only (#40127) The `render3` test targets are currently also executed for ViewEngine builds, even though the `render3` infrastructure only concerns Ivy infrastructure. This commit tags the test targets as ivy-only to disable those tests for View Engine. PR Close #40127 06 January 2021, 16:28:03 UTC
7eadf2e docs: correct some spellings (#40322) PR Close #40322 06 January 2021, 15:31:33 UTC
c130812 docs: fix `fullTemplateTypeCheck` compiler option description (#40253) PR Close #40253 06 January 2021, 15:29:51 UTC
7c16762 fix(compiler-cli): ngcc - remove outdated link (#40285) The link to the "speeding-up-ngcc-compilation" URL does not exist, it was removed shortly after it was added, but the link in the ngcc error message was not updated. Fixes #39837 PR Close #40285 06 January 2021, 15:10:39 UTC
f846c09 docs: specify fallback generic font family (#40254) https://developer.mozilla.org/en-US/docs/Web/CSS/font-family "You should always include at least one generic family name in a font-family list, since there's no guarantee that any given font is available. This lets the browser select an acceptable fallback font when necessary." PR Close #40254 06 January 2021, 15:09:27 UTC
0a317f3 docs: add Aristeidis Bampakos to contributor list (#40165) PR Close #40165 06 January 2021, 15:04:44 UTC
d5a7a26 ci: add jessicajaniuk to pullapprove groups (#40176) This adds jessicajaniuk to size-tracking, public-api, and circular-dependencies. PR Close #40176 06 January 2021, 15:04:07 UTC
9e6b3cf docs: update homepage headline (#40056) Reviving @stephenfluin's PR https://github.com/angular/angular/pull/37517 PR Close #40056 06 January 2021, 15:02:30 UTC
6abc133 fix(compiler): don't report parse error for interpolation inside string in property binding (#40267) Currently we check whether a property binding contains an interpolation using a regex so that we can throw an error. The problem is that the regex doesn't account for quotes which means that something like `[prop]="'{{ foo }}'"` will be considered an error, even though it's not actually an interpolation. These changes build on top of the logic from #39826 to account for interpolation characters inside quotes. Fixes #39601. PR Close #40267 05 January 2021, 21:57:23 UTC
6a9d7e5 refactor(core): express trusted constants with tagged template literals (#40082) The trustConstantHtml and trustConstantResourceUrl functions are only meant to be passed constant strings extracted from Angular application templates, as passing other strings or variables could introduce XSS vulnerabilities. To better protect these APIs, turn them into template tags. This makes it possible to assert that the associated template literals do not contain any interpolation, and thus must be constant. Also add tests for the change to prevent regression. PR Close #40082 05 January 2021, 21:56:57 UTC
8cdfd77 docs(core): fix typo in component overview (#40269) There is a sentence that mentions `stylesUrls` but should be changed to `styleUrls`. PR Close #40269 05 January 2021, 21:55:43 UTC
c1d7805 docs(core): Fix spelling (#40296) PR Close #40296 05 January 2021, 21:55:14 UTC
6057753 docs(router): Clarify 'parent' for params inheritance (#40304) When talking about parameter inheritance, one might think that matrix parameters can be inherited from the "parent" segment, or the segment which appears immediately to the left. In reality, when we talk about a "parent" in the `Router`, we mean the parent `Route` config. This config may contain more than one segment and matrix parameters must appear at the end or they do not "belong" to any config. PR Close #40304 05 January 2021, 21:54:41 UTC
e43f7e2 fix(router): apply redirects should match named outlets with empty path parents (#40029) There are two parts to this commit: 1. Revert the changes from #38379. This change had an incomplete view of how things worked and also diverged the implementations of `applyRedirects` and `recognize` even more. 2. Apply the fixes from the `recognize` algorithm to ensure that named outlets with empty path parents can be matched. This change also passes all the tests that were added in #38379 with the added benefit of being a more complete fix that stays in-line with the `recognize` algorithm. This was made possible by using the same approach for `split` by always creating segments for empty path matches (previously, this was only done in `applyRedirects` if there was a `redirectTo` value). At the end of the expansions, we need to squash all empty segments so that serializing the final `UrlTree` returns the same result as before. Fixes #39952 Fixes #10726 Closes #30410 PR Close #40029 05 January 2021, 20:43:47 UTC
5842467 refactor(router): Extract common functions for config matching (#40029) The `applyRedirects` and `recognize` algorithms have the same overall goal: match a `UrlTree` with the application's `Routes` config. There are a few key functions in these algorithms which can be shared rather than duplicated between the two. This also makes it easier to see how the two are similar and where they diverge. PR Close #40029 05 January 2021, 20:43:47 UTC
3966bcc fix(router): Ensure named outlets with empty path parents are recognized (#40029) This commit updates the `recognize` algorithm to work with named outlets which have empty path parents. For example, given the following config ``` const routes = [ { path: '', children: [ {path: 'a', outlet: 'aux', component: AuxComponent} ]} ]; ``` The url `/(aux:a)` should match this config. In order to do so, we need to allow the children of `UrlSegmentGroup`s to match a `Route` config for a different outlet (in this example, the `primary`) when it's an empty path. This should also *only* happen if we were unable to find a match for the outlet in the level above. That is, the matching strategy is to find the first `Route` in the list which _matches the given outlet_. If we are unable to do that, then we allow empty paths from other outlets to match and try to find some child there whose outlet matches our segment. PR Close #40029 05 January 2021, 20:43:47 UTC
a9f8deb refactor(router): make `recognize` synchronous (#40029) To make the tests suite easier to follow, `Recognize#apply` can be made into a synchronous function rather than one that return an `Observable`. Also, as a chore, remove as many `any` types as possible. PR Close #40029 05 January 2021, 20:43:47 UTC
6f1609e refactor(router): Update `recognize` to return `null` when there is no match (#40029) This commit updates the `recognize` algorithm to return `null` when a segment does not match a given config rather than throwing an error. This makes the code much easier to follow because the "no match" result has to be explicitly handled rather than catching the error in very specific places. PR Close #40029 05 January 2021, 20:43:47 UTC
77f47da refactor(router): Use for...of rather than `mapChildrenIntoArray` helper (#40029) When stepping through the `recognize` algorithm, it is much easier to follow when using a simple `for...of` rather than the helper `mapChildrenIntoArray` with the passed closure. The only special thing that `mapChildrenIntoArray` does is ensure the primary route appears first. This change will have no affect on the result because `processChildren` later calls `sortActivatedRouteSnapshots`, which does the same thing. PR Close #40029 05 January 2021, 20:43:47 UTC
b473bc2 ci: remove autolabeling from pullapprove config (#40314) Remove the autolabeling configuration from the pullapprove config as it conflicts too often with other tooling. PR Close #40314 05 January 2021, 20:30:42 UTC
a384961 fix(forms): clean up connection between FormControl/FormGroup and corresponding directive instances (#39235) Prior to this commit, removing `FormControlDirective` and `FormGroupName` directive instances didn't clear the callbacks previously registered on FromControl/FormGroup class instances. As a result, these callbacks were executed even after `FormControlDirective` and `FormGroupName` directive instances were destroyed. That was also causing memory leaks since these callbacks also retained references to DOM elements. This commit updates the cleanup logic to take care of properly detaching FormControl/FormGroup/FormArray instances from the view by removing view-specific callback at destroy time. Closes #20007, #37431, #39590. PR Close #39235 05 January 2021, 19:15:08 UTC
3735633 fix(core): take @Host into account while processing `useFactory` arguments (#40122) DI providers can be defined via `useFactory` function, which may have arguments configured via `deps` array. The `deps` array may contain DI flags represented by DI decorators (such as `@Self`, `@SkipSelf`, etc). Prior to this commit, having the `@Host` decorator in `deps` array resulted in runtime error in Ivy. The problem was that the `@Host` decorator was not taken into account while `useFactory` argument list was constructed, the `@Host` decorator was treated as a token that should be looked up. This commit updates the logic which prepares `useFactory` arguments to recognize the `@Host` decorator. PR Close #40122 05 January 2021, 18:14:25 UTC
212245f fix(localize): ensure extracted messages are serialized in a consistent order (#40192) The CLI integration can provide code files in a non-deterministic order, which led to the extracted translation files having messages in a non-consistent order between extractions. This commit fixes this by ensuring that serialized messages are ordered by their location. Fixes #39262 PR Close #40192 05 January 2021, 18:10:43 UTC
805b4f9 feat(core): Add schematic to fix invalid `Route` configs (#40067) `Route` configs with `redirectTo` as well as `canActivate` are not valid because the `canActivate` guards will never execute. Redirects are applied before activation. There is no error currently for these configs, but another commit will change this so that an error does appear in dev mode. This migration fixes the configs by removing the `canActivate` property. PR Close #40067 05 January 2021, 18:09:28 UTC
df85f37 refactor(router): Produce error message when canActivate is used with redirectTo (#40067) Redirects in the router are processed before activations. This means that a canActivate will never execute if a route has a redirect. Rather than silently ignoring the invalid config, developers should be notified so they know why it doesn't work. Closes #18605 The feature request for a function/class redirect is covered in #13373. PR Close #40067 05 January 2021, 18:09:27 UTC
d466db8 fix(language-service): Do not include $event parameter in reference results (#40158) Given the template `<div (click)="doSomething($event)"></div>` If you request references for the `$event`, the results include both `$event` and `(click)="doSomething($event)"`. This happens because in the TCB, `$event` is passed to the `subscribe`/`addEventListener` function as an argument. So when we ask typescript to give us the references, we get the result from the usage in the subscribe body as well as the one passed in as an argument. This commit adds an identifier to the `$event` parameter in the TCB so that the result returned from `getReferencesAtPosition` can be identified and filtered out. fixes #40157 PR Close #40158 05 January 2021, 18:07:20 UTC
4eac7e6 fix(router): Router should focus element after scrolling (#40241) According to the [spec](https://html.spec.whatwg.org/#scroll-to-fragid), we should attempt to set the browser focus after scrolling to a fragment. Note that this change does not exactly follow the robust steps outlined in the spec by finding a fallback target if the original is not focusable. Instead, we simply attempt to focus the element by calling `focus` on it, which will do nothing if the element is not focusable. fixes #30067 PR Close #40241 05 January 2021, 17:48:48 UTC
112dff8 test(router): update scroller tests to use real objects (#40241) The current tests in the router scroller are [change-detector tests](https://testing.googleblog.com/2015/01/testing-on-toilet-change-detector-tests.html) and do not ensure the correct behavior of the scroller. This commit updates the tests to assert actual scrolling behavior of the browser. PR Close #40241 05 January 2021, 17:48:48 UTC
a55f581 refactor(router): Remove unused property in `BrowserViewportScroller` (#40241) The `BrowserViewportScroller` injects but does not use the `ErrorHandler`. This commit removes the `ErrorHandler` from the constructor. PR Close #40241 05 January 2021, 17:48:47 UTC
9248ee2 docs: fix interchanged values (#40302) PR Close #40302 05 January 2021, 17:46:56 UTC
d7665fd build(docs-infra): upgrade cli command docs sources to 4cefc7dc1 (#40250) Updating [angular#master](https://github.com/angular/angular/tree/master) from [cli-builds#master](https://github.com/angular/cli-builds/tree/master). ## Relevant changes in [commit range](https://github.com/angular/cli-builds/compare/3e58bafd2...4cefc7dc1): **Modified** - help/build.json - help/serve.json - help/test.json PR Close #40250 23 December 2020, 21:06:47 UTC
c22d005 docs(router): fix typo (#40244) Replace the word Angualr with Angular. PR Close #40244 23 December 2020, 18:05:31 UTC
9186f1f feat(compiler-cli): JIT compilation of directive declarations (#40101) The `ɵɵngDeclareDirective` calls are designed to be translated to fully AOT compiled code during a build transform, but in cases this is not done it is still possible to compile the declaration object in the browser using the JIT compiler. This commit adds a runtime implementation of `ɵɵngDeclareDirective` which invokes the JIT compiler using the declaration object, such that a compiled directive definition is made available to the Ivy runtime. PR Close #40101 23 December 2020, 17:52:19 UTC
e54261b docs: update boolean and enumerated CLI section (#40224) With this change we change the `Boolean and enumerated options` to use kebab-case flags as the camelCase variant are deprecated. We also remove the `enumerated option description` as this is no longer correct and needed following the CLI MAN page update in #40038 PR Close #40224 23 December 2020, 17:51:29 UTC
53b64fb docs: use kebab-case for CLI commands (#40240) Kebab-case is preferred over camelCase in Angular CLI. camelCase support is deprecated and will be removed eventually. PR Close #40240 23 December 2020, 16:36:32 UTC
7dcf286 feat(compiler-cli): expose function to allow short-circuiting of linking (#40137) The linker is implemented using a Babel transform such that Babel needs to parse and walk a source file to find the declarations that need to be compiled. If it can be determined that a source file is known not to contain any declarations the parsing and walking can be skipped as a performance improvement. This commit adds an exposed function for tools that integrate the linker to use to allow short-circuiting of the linker transform. PR Close #40137 22 December 2020, 22:53:02 UTC
e4fbab9 fix(core): error if detectChanges is called at the wrong time under specific circumstances (#40206) Internally we store lifecycle hooks in the format `[index, hook, index, hook]` and when iterating over them, we check one place ahead to figure out whether we've hit found a hook or an index. The problem is that the loop is set up to iterate up to `hooks.length` which means that we may go out of bounds on the last iteration, depending on where we started. This appears to happen under a specific set of circumstances where a directive calls `detectChanges` from an input setter while it has `ngOnChanges` and `ngAfterViewInit` hooks. These changes resolve the issue by only iterating up to `length - 1` which guarantees that we can always look one place ahead. This appears to have regressed some time in version 10. Fixes #38611. PR Close #40206 22 December 2020, 22:52:12 UTC
34f083c fix(compiler-cli): handle `\r\n` line-endings correctly in source-mapping (#40187) Previously `\r\n` was being treated as a single character in source-map line start positions, which caused segment positions to become offset. Now the `\r` is ignored when splitting, leaving it at the end of the previous line, which solves the offsetting problem, and does not affect source-mappings. Fixes #40169 Fixes #39654 PR Close #40187 22 December 2020, 22:50:57 UTC
12cb39c fix(language-service): shorthand syntax with variables (#40239) This commit fixes an issue in the ivy native language service that caused the logic that finds a target node given a template position to throw away the results. This happened because the source span of a variable node in the shorthand structural directive syntax (i.e. `*ngIf=`) included the entire binding. The result was that we would add the variable node to the path and then later detect that the cursor was outside the key and value spans and throw away the whole result. In general, we do this because we do not want to show information when the cursor is between a key/value (`inputA=¦"123"`). However, when using the shorthand syntax, we run into the situation where we can match an `AttributeBinding` as well as the vaariable in `*ngIf="som¦eValue as myLocalVar"`. This commit updates the visitor to retain enough information in the visit path to throw away invalid targets but keep valid ones if there were multiple results on a `t.Element` or `t.Template`. PR Close #40239 22 December 2020, 22:50:22 UTC
382f906 refactor(compiler-cli): include linker entry-points in NPM package (#40180) The linker entry-points were not previously exposed in the NPM Bazel target so they were omitted from the bundle. This commit adds the necessary entry-points to the compiler-cli's npm_package target. PR Close #40180 22 December 2020, 19:48:11 UTC
e23fd1f refactor(compiler-cli): emit `forwardRef` invocation for forward type references (#40117) The types of directives and pipes that are used in a component's template may be emitted into the partial declaration wrapped inside a closure, which is needed when the type is declared later in the module. This poses a problem for JIT compilation of partial declarations, as this closure is indistinguishable from a class reference itself. To mark the forward reference function as such, this commit changes the partial declaration codegen to emit a `forwardRef` invocation wrapped around the closure, which ensures that the closure is properly tagged as a forward reference. This allows the forward reference to be treated as such during JIT compilation. PR Close #40117 22 December 2020, 16:39:58 UTC
fc1cd07 fix(core): Call `onDestroy` in production mode as well (#40120) PR #39876 introduced an error where the `onDestroy` of `ComponentRef` would only get called if `ngDevMode` was set to true. This was because in dev mode we would freeze `TCleanup` to verify that no more static cleanup would get added to `TCleanup` array. This ensured that `TCleanup` was always present in dev mode. In production the `TCleanup` would get created only when needed. The resulting cleanup code was incorrectly indented and would only run if `TCleanup` was present causing this issue. Fix #40105 PR Close #40120 22 December 2020, 16:02:27 UTC
5ba7bcd docs: fix `SpyDirective` in `lifecycle-hooks` docs example to use one ID per instance (#40208) Previously, the `SpyDirective` in the `lifecycle-hooks` docs example would use a different ID when logging `onInit` and when logging `onDestroy` for the same instance, making it impossible to associate the two calls. This was not helpful and came in constrast with how the directive was described in the corresponding guide and shown in the accompanying `spy-directive.gif` image. This commit fixes the logic of the `SpyDirective` class to use the same ID for all log operations of an instance. Partially addresses #40193. PR Close #40208 21 December 2020, 22:22:15 UTC
e28d460 docs: make the `spy-directive` docregion (in `lifecycle-hooks` example) easier to follow (#40208) Previously, the docregion code referenced a `nextId` variable that was not shown in the code, which was confusing for the reader. This commit makes the declaration of the `nextId` variable part of the docregion, so it is clear to the reader where it comes from and how it is initialized. This commit also removes the `logIt()` helper method, which didn't seem to add value and calls `logger.log()` directly instead. PR Close #40208 21 December 2020, 22:22:15 UTC
251b277 docs: fix the order of links in `lifecycle-hooks` docs example (#40208) This commit aligns the order of the links to the various sections of the `lifecycle-hooks` docs example with the order in which the sections appear in the template (which also coincides with the order in which they are presented/discussed in the corresponding guide). PR Close #40208 21 December 2020, 22:22:15 UTC
8d25bd1 docs: HTTP in HttpClient should not be written in uppercase (#40195) PR Close #40195 21 December 2020, 22:21:32 UTC
9057a0c build: use the latest versions of Chrome (v87) and Firefox (v84) in tests (#40150) This commit updates the versions of Chrome and Firefox used in tests - both with Bazel and without (via Puppeteer) - to the latest: - Chrome v87 - Firefox v84 PR Close #40150 21 December 2020, 22:15:31 UTC
cb05fca docs(dev-infra): add instructions for updating GeckoDriver in `browsers/README.md` (#40150) This commit adds instructions in `dev-infra/browsers/README.md` on how to update the version of GeckoDriver (the WebDriver implementation for Firefox browsers). NOTE: The gecko driver download URLs perform redirection, so the `curl` command needs to be run with the `-L/--location` option to follow redirects. I updated all `curl` commands (even those that are not used on gecko driver download URLs) for consistency. PR Close #40150 21 December 2020, 22:15:30 UTC
de2f73c build: fix instructions and process for updating Chrome version (#40150) Previously, the instructions and process for updating the version of Chrome ued in tests assumed that there was always going to be a ChromeDriver version that corresponded to a Chrome version. For example, if we wanted to use Chrome v87.0.4272.x, we assumed that there was going to be ChromeDriver v87.0.4272.x. It turns out that this is not always the case. This commit updates the instructions and process for updating the Chrome version to ensure a valid version of ChromeDriver will be used as well. PR Close #40150 21 December 2020, 22:15:30 UTC
be48ad2 docs(dev-infra): fix command and typos in `browsers/README.md` (#40150) This commit fixes the instructions in `dev-infra/browsers/README.md` to use the `shasum` executable (instead of `sha256`, which does not exist afaict). The commit also fixes a couple of typos. PR Close #40150 21 December 2020, 22:15:30 UTC
3aead9a docs(dev-infra): refactor `browsers/README.md` to use one sentence per line (#40150) This commit refactor the `dev-infra/browsers/README.md` file to have one sentence per line. This makes it consistent with other Markdown files in the repository and makes diffs for future changes more readable. This commit also uses proper Markdown numbered lists and fixes indentation. PR Close #40150 21 December 2020, 22:15:30 UTC
7413cb4 build(docs-infra): update Lighthouse to v7.0.0 (#40198) This commit updates `lighthouse` to version 7.0.0. It also adds a `width` attribute to the `code-icon.svg` image on the homepage, which was pointed out as missing in the Lighthouse report. (Explicit `width`/`height` attributes on images help reduce the [layout shift][1] of the page.) [1]: https://web.dev/cls/ PR Close #40198 21 December 2020, 18:36:02 UTC
df7ed41 docs: remove -webkit-transition-timing-function CSS property (#40153) Angular has stopped to support browser that requires that CSS property. All supported browsers support standard transition-timing-function CSS property PR Close #40153 21 December 2020, 18:23:58 UTC
eae07e1 docs: fix styles in binding guides (#40182) Fix styling issues with the visual representation of the content PR Close #40182 21 December 2020, 18:22:31 UTC
f7642ce docs: update App Shell guide to reflect its actual behavior (#40210) PR Close #40210 21 December 2020, 18:21:00 UTC
5831d2b ci: correctly rebase PRs for branches contain a slash (/) (#40184) Previously, due to a bug in `rebase-pr.js`, PRs for branches containing a slash (/) in their name would fail to be rebased ([example failure][1]). This commit ensures that such branch names are handled correctly. [1]: https://circleci.com/gh/angular/angular/884503 PR Close #40184 21 December 2020, 18:12:03 UTC
10a468a build(docs-infra): upgrade cli command docs sources to 3e58bafd2 (#40213) Updating [angular#master](https://github.com/angular/angular/tree/master) from [cli-builds#master](https://github.com/angular/cli-builds/tree/master). ## Relevant changes in [commit range](https://github.com/angular/cli-builds/compare/f6f0cde41...3e58bafd2): **Modified** - help/lint.json PR Close #40213 21 December 2020, 18:10:53 UTC
362f45c docs: use an explicit product id in the getting started example (#34934) Simplyfing the example by prodiving an id for each product instead of relying on their index in the array. Closes #34738 PR Close #34934 17 December 2020, 20:02:10 UTC
475468c refactor(core): remove custom globalThis (#40123) This is provided by TypeScript since version 3.4 PR Close #40123 17 December 2020, 19:43:28 UTC
effc079 build: use "outFiles" in .vscode/launch.json to speed up debugging sessions (#39848) This commit adds the "outFiles" config options into the .vscode/recommended-launch.json, which helps speed up the startup time of a debugging session by limiting the number of files that should be loaded. PR Close #39848 17 December 2020, 19:23:13 UTC
356a256 refactor(docs-infra): enable tslint rules for the angular.io app (#39307) Signed-off-by: Tasos Alexiou <tasos@arrikto.com> PR Close #39307 17 December 2020, 18:02:38 UTC
c53bae8 ci: fail CI jobs when rebasing on master fails (#40161) As part of the `setup` CI job (which is a prerequisite for all other CI jobs), we rebase the current code on master to make sure the PR changes are compatible with the latest code from master, even if the PR has not been rebased recently. When it is not possible to automatically rebase (i.e. when there are conflicts that need to be resolved manually), the job and subsequently the entire workflow should fail. This behavior has been accidentally broken in #39592, so that the job would succeed even if the rebase operation failed. This commit fixes it by ensuring the `exec()` helper used in `rebase-pr.js` will throw an error if the underlying command execution fails. Previously, the function would always return stdout output as a string and attach a `code` property indicating the exit code of the command. Since the exit code isn't necessary in the `rebase-pr.js` script, this commit simplifies the `exec()` helper by making it return the stdout output as a plain string (without extra properties) and re-throw any errors (unless the `ignoreError` argument is set to `true`). (Initially reported [here][1] by @JoostK.) [1]: https://angular-team.slack.com/archives/C042EU9T5/p1608070403128900 PR Close #40161 17 December 2020, 17:43:48 UTC
ee6b8a7 Revert "build: update bazel rules_nodejs to version 2.3.1 (#39636)" (#40174) This reverts commit 68cf012f7a29aecd807759552e1697a5231099b3. PR Close #40174 17 December 2020, 17:29:42 UTC
0fc8466 release: cut the v11.1.0-next.3 release (#40166) PR Close #40166 16 December 2020, 23:39:10 UTC
70b4816 fix(core): set `ngDevMode` to `false` when calling `enableProdMode()` (#40124) The `ngDevMode` description also mentions that calling `enableProdMode` will set this the value to `false`. https://github.com/angular/angular/blob/4610093c87975b6355f31a9c849351129908783a/packages/core/src/util/ng_dev_mode.ts#L22 which is currently not the case. PR Close #40124 16 December 2020, 21:20:58 UTC
47d9b6d fix(core): fix possible XSS attack in development through SSR. (#40136) Escape the content of the strings so that it can be safely inserted into a comment node. The issue is that HTML does not specify any way to escape comment end text inside the comment. `<!-- The way you close a comment is with "-->". -->`. Above the `"-->"` is meant to be text not an end to the comment. This can be created programmatically through DOM APIs. ``` div.innerHTML = div.innerHTML ``` One would expect that the above code would be safe to do, but it turns out that because comment text is not escaped, the comment may contain text which will prematurely close the comment opening up the application for XSS attack. (In SSR we programmatically create comment nodes which may contain such text and expect them to be safe.) This function escapes the comment text by looking for the closing char sequence `-->` and replace it with `-_-_>` where the `_` is a zero width space `\u200B`. The result is that if a comment contains `-->` text it will render normally but it will not cause the HTML parser to close the comment. PR Close #40136 16 December 2020, 17:38:08 UTC
2e7727c docs(docs-infra): link to angular-pro screencasit (#39472) PR Close #39472 15 December 2020, 22:37:56 UTC
caa4666 fix(compiler): avoid duplicate i18n blocks for i18n attrs on elements with structural directives (#40077) Currently when `ɵɵtemplate` and `ɵɵelement` instructions are generated by compiler, all static attributes are duplicated for both instructions. As a part of this duplication, i18n translation blocks for static i18n attributes are generated twice as well, causing duplicate entries in extracted translation files (when Ivy extraction mechanisms are used). This commit fixes this issue by introducing a cache for i18n translation blocks (for static attributes only). Also this commit further aligns `ɵɵtemplate` and `ɵɵelement` instruction attributes, which should help implement more effective attributes deduplication logic. Closes #39942. PR Close #40077 15 December 2020, 21:40:09 UTC
245dccc build: update config flags for snapshot builds (#40095) Update the config flags used for snapshot builds and release builds. PR Close #40095 15 December 2020, 21:36:56 UTC
c44baa4 feat(dev-infra): support --mode flag for building environment stamp (#40095) When building the environment stamp, support two modes: release and snapshot The release mode will always stamp using the current version of in the root package.json and in snapshot mode will use a version stamp expressing a version based on the tag and the number of commits from the tag. PR Close #40095 15 December 2020, 21:36:56 UTC
dcb3d17 docs: update optimization and source map section (#40037) With this change we split the optimization and source map configuration section section into two, improve it overall by adding theoptions a table and add the new options (`inlineCritical` and `minify`) that have been introduced in CLI version 11.1 PR Close #40037 15 December 2020, 21:32:28 UTC
db97453 refactor(compiler-cli): move template parse errors to TemplateData (#40026) Durring analysis we find template parse errors. This commit changes where the type checking context stores the parse errors. Previously, we stored them on the AnalysisOutput this commit changes the errors to be stored on the TemplateData (which is a property on the shim). That way, the template parse errors can be grouped by template. Previously, if a template had a parse error, we poisoned the module and would not procede to find typecheck errors. This change does not poison modules whose template have typecheck errors, so that ngtsc can emit typecheck errors for templates with parse errors. Additionally, all template diagnostics are produced in the same place. This allows requesting just the template template diagnostics or just other types of errors. PR Close #40026 15 December 2020, 21:30:52 UTC
9dedb62 test(compiler-cli): fix i18n error tests (#40026) Refactors the i18n error tests to be unit tests in ngtsc_spec.ts. There is two reasons for doing this. First is that the tests in compliace_old expected an expection to be be thrown but did not fail the test if no exception was thrown. That means that this test could miss catching a bug. It is also a big hacky to call compile directly and expect an exception to be thrown for diagnostics. Also, this can easily be unit tested and an end-to-end test is not necessary since we are not making use of the goldfiles for these tests. It is easier to maintain and less hacky to validate that we get helpful error messages when nesting i18n sections by calling getDiagnostics directly. PR Close #40026 15 December 2020, 21:30:52 UTC
973bb40 fix(compiler-cli): remove classes in .d.ts files from provider checks (#40118) This commit temporarily excludes classes declared in .d.ts files from checks regarding whether providers are actually injectable. Such classes used to be ignored (on accident) because the `TypeScriptReflectionHost.getConstructorParameters()` method did not return constructor parameters from d.ts files, mostly as an oversight. This was recently fixed, but caused more providers to be exposed to this check, which created a breakage in g3. This commit temporarily fixes the breakage by continuing to exclude such providers from the check, until g3 can be patched. PR Close #40118 15 December 2020, 00:14:25 UTC
2a74431 feat(language-service): completions for structural directives (#40032) This comit adds support for autocompletion of attributes that create structural directives. Such completions differ from those of normal attributes, as the structural directive syntax creates a synthetic <ng-template> node which has different attributes from the main element. PR Close #40032 14 December 2020, 20:08:41 UTC
c55bf4a refactor(compiler-cli): identify structural directives (#40032) This commit introduces an `isStructural` flag on directive metadata, which is `true` if the directive injects `TemplateRef` (and thus is at least theoretically usable as a structural directive). The flag is not used for anything currently, but will be utilized by the Language Service to offer better autocompletion results for structural directives. PR Close #40032 14 December 2020, 20:08:41 UTC
cbb6eae feat(language-service): autocomplete pipe binding expressions (#40032) This commit adds autocompletion for pipe expressions, built on existing APIs for checking which pipes are in scope. PR Close #40032 14 December 2020, 20:08:41 UTC
66378ed feat(language-service): complete attributes on elements (#40032) This commit adds attribute completion to the Language Service. It completes from 3 sources: 1. inputs/outputs of directives currently present on the element 2. inputs/outputs/attributes of directives in scope for the element, that would become present if the input/output/attribute was added 3. DOM properties and attributes We distinguish between completion of a property binding (`[foo|]`) and a completion in an attribute context (`foo|`). For the latter, bindings to the attribute are offered, as well as a property binding which adds the square bracket notation. To determine hypothetical matches (directives which would become present if a binding is added), directives in scope are scanned and matched against a hypothetical version of the element which has the attribute. PR Close #40032 14 December 2020, 20:08:41 UTC
c0ab43f refactor(compiler-cli): introduce APIs to support directive autocompletion (#40032) This commit adds two new APIs to the `TemplateTypeChecker`: `getPotentialDomBindings` and `getDirectiveMetadata`. Together, these will support the Language Service in performing autocompletion of directive inputs/outputs. PR Close #40032 14 December 2020, 20:08:41 UTC
a543e69 refactor(compiler-cli): make `TypeCheckingScopeRegistry` a general utility (#40032) The `annotations` package in the compiler previously contained a registry which tracks NgModule scopes for template type-checking, including unifying all type-checking metadata across class inheritance lines. This commit generalizes this utility and prepares it for use in the `TemplateTypeChecker` as well, to back APIs used by the language service. PR Close #40032 14 December 2020, 20:08:41 UTC
e42250f feat(language-service): autocompletion of element tags (#40032) This commit expands the autocompletion capabilities of the language service to include element tag names. It presents both DOM elements from the Angular DOM schema as well as any components (or directives with element selectors) that are in scope within the template as options for completion. PR Close #40032 14 December 2020, 20:08:40 UTC
ccaf48d refactor(language-service): add context to template target system (#40032) This commit extends the template targeting system, which determines the node being referenced given a template position, to return additional context if needed about the particular aspect of the node to which the position refers. For example, a position pointing to an element node may be pointing either to its tag name or to somewhere in the node body. This is the difference between `<div|>` and `<div foo | bar>`. PR Close #40032 14 December 2020, 20:08:40 UTC
524d581 docs: fix typo (#40106) PR Close #40106 14 December 2020, 19:51:25 UTC
19d43af fix(dev-infra): add vim .swp files to gitignore (#40094) The vim editor produces temporarily files that can end in both .swo and .swp. This commits add .swp to the .gitignore so we don't accidentaly commit temporary files. PR Close #40094 14 December 2020, 19:39:41 UTC
c18a9d5 ci: reduce flakiness of docs-infra `deploy-to-firebase.js` tests (#40088) The `deploy-to-firebase.js` tests rely on git info retrieved from the `angular/angular` repository (via `git ls-remote ...`). Previously, different calls to `git ls-remote ...` could return different values if a new commit was pushed or a new branch was created during test execution, resulting in errors ([example CI failure][1]). This commit makes the tests more stable by memoizing the result of `git ls-remote ...` and returning the same result for subsequent calls with the same arguments (even if meanwhile the remote has been updated). [1]: https://circleci.com/gh/angular/angular/877626 PR Close #40088 14 December 2020, 19:38:32 UTC
4f4f318 docs: remove prefixed animation related CSS properties (#40084) Angular has stopped to support browser that requires these CSS properties. All supported browsers support standard CSS properties: * @keyframes rule * animation PR Close #40084 14 December 2020, 19:36:48 UTC
1e05109 docs: remove unused CSS rule (#40080) Removed rule don't affect their component views. The reason - the templates don't contain elements to which that rule is applied. See https://angular.io/guide/view-encapsulation for more details PR Close #40080 14 December 2020, 19:35:36 UTC
c977e1b test(compiler): use `yarn bazel` instead of `bazel` in error message (#40078) This commit replaces `bazel` with `yarn bazel` in the error message (that instructs to regenerate golden file) thrown while executing compliance tests. We use `yarn bazel` in other places (so we use the local version of bazel, not the global one). PR Close #40078 14 December 2020, 19:34:41 UTC
044cd52 docs: update CLI MAN page format (#40038) With this change we update the CLI docs template to seperate the following the default and value types from the argument field. This should make it clearer and more understandable PR Close #40038 14 December 2020, 19:31:07 UTC
3b02e4e docs: Rename Main concepts to Understanding Angular, Built-in Features to Developer Guides (#39930) PR Close #39930 14 December 2020, 19:30:21 UTC
back to top