This project is mirrored from https://github.com/angular/angular.git.
Pull mirroring updated .
- Jul 09, 2020
-
-
Alex Rickabaugh authored
-
Paul Gschwendtner authored
Often changelogs are generated from the patch branch and then cherry-picked into the `CHANGELOG.md` file in `master` for better access and readability. This is problematic though as `conventional-changelog` (the tool we use for generating the changelog), will duplicate commits when a future changelog is generated from `master` then (i.e. for a new minor release). This happens because conventional-changelog always generates the changelog from the latest tag in a given branch to `HEAD`. The tag in the patch branch does not correspond to any SHA in `master` so the intersection of commits is not automatically omitted. We work around this naively (until we have a better tool provided by dev-infra), by deduping commits that are already part of the changelog. This has proven to work as expected in the components repo. PR Close #37956
-
- Jul 08, 2020
-
-
George Kalpakas authored
This commit includes a couple of minor fixes to docs related to updating to v10: - Fix markdown link in "Updating to Angular version 10" guide. - Correctly display numbered list in "Solution-style `tsconfig.json` migration" guide. PR Close #37897
-
Paul Gschwendtner authored
feat(dev-infra): merge script should link to original commit when cherry-picking with API strategy (#37889) The merge script uses `git cherry-pick` for both the API merge strategy and the autosquash strategy. It uses cherry-pick to push commits to different target branches (e.g. into the `10.0.x` branch). Those commits never point to the commits that landed in the primary Github branch though. For the autosquash strategy the pull request number is always included, so there is a way to go back to the source. On the other hand though, for commits cherry-picked in the API merge strategy, the pull request number might not always be included (due to Github's implementation of the rebase merge method). e.g. https://github.com/angular/components/commit/27f52711c0618a9ae4eab4c888c8ab3245638e77 For those cases we'd want to link the cherry-picked commits to the original commits so that the corresponding PR is easier to track down. This is not needed for the autosquash strategy (as outlined before), but it would have been good for consistency. Unfortunately though this would rather complicate the strategy as the autosquash strategy cherry-picks directly from the PR head, so the SHAs that are used in the primary branch are not known. PR Close #37889
-
- Jul 07, 2020
-
-
George Kalpakas authored
As part of angular.io's responsive layout, the menu shown in the top-bar is collapsed into the sidenav on narrow screens at the point where the search-bar (on the right side of the top-bar) would overlap with the menu's nav-items. Previously, the value used as break-point would work on marketing pages, where the hamburger button is not shown on wide screens. However, on docs pages (where the hamburger button is always shown, pushing the menu further to the right), the search-bar would still overlap the menu nav-items on some resolutions. This commit fixes it by raising the screen width threshold at a value that ensures there is no overlap even on pages where the hamburger button is visible alongside the top-bar menu. Fixes #37937 PR Close #37938
-
George Kalpakas authored
As part of angular.io's responsive layout, the following rules are applied: - On wide screens, a menu is shown in the top-bar and the sidenav is shown side-by-side with the docs content. - On narrow screens, the top-menu is moved from the top-bar to the sidenav and the sidenav is closed by default and floats over the content when manually opened. Previously, the break-points at which the top-menu was shown in the top-bar and the sidenav was shown side-by-side with the content were the same (using a single variable). This commit decouples the two break-points to make it possible to use different values in the future. PR Close #37938
-
George Kalpakas authored
Use a Sass variable for the screen width break-point at which the top-bar hamburger button is hidden/shown. This allows more easily updating the break-point. PR Close #37938
-
George Kalpakas authored
In `aio/`, we have a mechanism to apply patches in a `postinstall` hook. See `aio/tools/cli-patches/README.md` for more info. Previously, we had to update `aio/tools/cli-patches/patch.js` to list each `.patch` file separately. While working on #37688, I found it helpful for the script to automatically pick up `.patch` files. This commit updates the script to automatically pick up and apply `.patch` files from the `aio/tools/cli-patches/` directory. If one wants to keep a `.patch` file but not apply it, they can change the file's extension or move it to a sub-directory (without having to update the script). PR Close #37896
-
Andrew Kushnir authored
Currently when the `plural` or `select` keywords in an ICU contain trailing spaces (e.g. `{count, select , ...}`), these spaces are also included into the key names in ICU vars (e.g. "VAR_SELECT "). These trailing spaces are not desirable, since they will later be converted into `_` symbols while normalizing placeholder names, thus causing mismatches at runtime (i.e. placeholder will not be replaced with the correct value). This commit updates the code to trim these spaces while generating an object with placeholders, to make sure the runtime logic can replace these placeholders with the right values. PR Close #37866
-
Andrew Kushnir authored
The logic to exclude certain types of commits (specifically 'docs' ones) was implemented in https://github.com/angular/angular/commit/c5b125b7db50914840849a8d86cbb3304d2f4e68. The ng-dev config was updated in the followup commit https://github.com/angular/angular/commit/acf3cff9eedbcfbc4476e0597d0a3c7a883bd05f, but there was a typo that prevented the new logic from being activated. This commit updates the name of the config option in the ng-dev config to the right one (minBodyLengthTypeExcludes). PR Close #37862
-
Omar Hasan authored
As mention in https://angular.io/guide/deprecations for this API, it may be important mention for this to make developers migrate or avoid using it PR Close #37815
-
- Jul 01, 2020
-
-
Judy Bogart authored
Add introductions to usage examples and edit descriptions to be more complete and consistent with current API reference styles PR Close #37053
-
Alan Agius authored
The current code is missing a single quote at the end of the import. (cherry picked from commit e13171ea2960dd0fa0666cb964b53799d2883e3a) PR Close #37854
-
Andrew Kushnir authored
-
Sonu Kapoor authored
After 6 months of continuous contributions, Sonu Kapoor did finally make it into the collaborator list. PR Close #37777
-
Alan Agius authored
With this change we change the redirect for `/config/app-package-json` from `https://webpack.js.org/configuration/optimization/#optimizationsideeffects` to `https://angular.io/guide/strict-mode#non-local-side-effects-in-applications` The latter page has more details. PR Close #37774
-
- Jun 30, 2020
-
-
Alex Rickabaugh authored
Incremental compilation allows for the output state of one compilation to be reused as input to the next compilation. This involves retaining references to instances from prior compilations, which must be done carefully to avoid memory leaks. This commit fixes such a leak with a complicated retention chain: * `TrackedIncrementalBuildStrategy` unnecessarily hangs on to the previous `IncrementalDriver` (state of the previous compilation) once the current compilation completes. In general this is unnecessary, but should be safe as long as the chain only goes back one level - if the `IncrementalDriver` doesn't retain any previous `TrackedIncrementalBuildStrategy` instances. However, this does happen: * `NgCompiler` indirectly causes retention of previous `NgCompiler` instances (and thus previous `TrackedIncrementalBuildStrategy` instances) through accidental capture of the `this` context in a closure created in its constructor. This closure is wrapped in a `ts.ModuleResolutionCache` used to create a `ModuleResolver` class, which is passed to the program's `TraitCompiler` on construction. * The `IncrementalDriver` retains a reference to the `TraitCompiler` of the previous compilation, completing the reference chain. The final retention chain thus looks like: * `TrackedIncrementalBuildStrategy` of current program * `.previous`: `IncrementalDriver` of previous program * `.lastGood.traitCompiler`: `TraitCompiler` * `.handlers[..].moduleResolver.moduleResolutionCache`: cache * (via `getCanonicalFileName` closure): `NgCompiler` * `.incrementalStrategy`: `TrackedIncrementalBuildStrategy` of previous program. The closure link is the "real" leak here. `NgCompiler` is creating a closure for `getCanonicalFileName`, delegating to its `this.adapter.getCanonicalFileName`, for the purposes of creating a `ts.ModuleResolutionCache`. The fact that the closure references `NgCompiler` thus eventually causes previous `NgCompiler` iterations to be retained. This is also potentially problematic due to the shared nature of `ts.ModuleResolutionCache`, which is potentially retained across multiple compilations intentionally. This commit fixes the first two links in the retention chain: the build strategy is patched to not retain a `previous` pointer, and the `NgCompiler` is patched to not create a closure in the first place, but instead pass a bound function. This ensures that the `NgCompiler` does not retain previous instances of itself in the first place, even if the build strategy does end up retaining the previous incremental state unnecessarily. The third link (`IncrementalDriver` unnecessarily retaining the whole `TraitCompiler`) is not addressed in this commit as it's a more architectural problem that will require some refactoring. However, the leak potential of this retention is eliminated thanks to fixing the first two issues. PR Close #37835
-
Pete Bacon Darwin authored
This update of dgeni-packages to 0.28.4 fixes the rendering of type initializers for classes and interfaces. Closes #37694 PR Close #37793
-
Jaskaran Singh authored
This commit fixes a spelling error in the word error in the observables.md guide. It is currently spelled errror and the mistake is not intentional. PR Close #36437
-
Santosh Yadav authored
change in the definition of providedIn:any any instance creates a singleton instance for each lazy loaded module and one instance for eager loaded module PR Close #35292
-
Judy Bogart authored
The major sections Angular Libraries, Schematics, and CLI Builders appear twice, in their old location under Techniques, and in the new correct location under Extending Angular. PR Close #37833
-
JiaLiPassion authored
PR https://github.com/angular/angular/pull/37523 failed when trying to use `rxjs delay` operator inside `fakeAsync`, and the reasons are: 1. we need to import `rxjs-fake-async` patch to make the integration work. 2. since in `angular` repo, the bazel target `/tools/testing:node` not using `zone-testing` bundle, instead it load `zone-spec` packages seperately, so it causes one issue which is the `zone.js/testing/fake-async` package is not loaded, we do have a fallback logic under `packages/core/testing` calles `fake_async_fallback`, but the logic is out of date with `fake-async` under `zone.js` package. So this PR, I updated the content of `fake_async_fallback` to make it consistent with `fake-async`. And I will make another PR to try to remove the `fallback` logic. PR Close #37680
-
JoostK authored
When ngcc creates an entry-point program, the `allowJs` option is enabled in order to operate on the JavaScript source files of the entry-point. A side-effect of this approach is that external modules that don't ship declaration files will also have their JavaScript source files loaded into the program, as the `allowJs` flag allows for them to be imported. This may pose an issue in certain edge cases, where ngcc would inadvertently operate on these external modules. This can introduce all sorts of undesirable behavior and incompatibilities, e.g. the reflection host that is selected for the entry-point's format could be incompatible with that of the external module's JavaScript bundles. To avoid these kinds of issues, module resolution that would resolve to a JavaScript file located outside of the package will instead be rejected, as if the file would not exist. This would have been the behavior when `allowJs` is set to false, which is the case in typical Angular compilations. Fixes #37508 PR Close #37596
-
JoostK authored
Changes `isWithinPackage` to take an `AbsoluteFsPath` instead of `ts.SourceFile`, to allow for an upcoming change to use it when no `ts.SourceFile` is available, but just a path. PR Close #37596
-
nobobo1234 authored
Changing the typo of Stacblitz into Stackblitz in the tour of hereos tutorial docs page since that is the actual name of the service PR Close #37794
-
Maksymilian Sielicki authored
This commit removes two instances of the first person in the Dependency injection providers documentation. PR Close #37768
-
Amadou Sall authored
This commit adds Amadou Sall to the Angular GDE page along with a biography, his role at Air France, and a photograph. PR Close #36509
-
George Kalpakas authored
Previously, event listeners for component output events attached on an Angular custom element before inserting it into the DOM (i.e. before instantiating the underlying component) didn't fire for events emitted during initialization lifecycle hooks, such as `ngAfterContentInit`, `ngAfterViewInit`, `ngOnChanges` (initial call) and `ngOnInit`. The reason was that `NgElementImpl` [subscribed to events][1] _after_ calling [ngElementStrategy#connect()][2], which is where the [initial change detection][3] takes place (running the initialization lifecycle hooks). This commit fixes this by: 1. Ensuring `ComponentNgElementStrategy#events` is defined and available for subscribing to, even before instantiating the component. 2. Changing `NgElementImpl` to subscribe to `NgElementStrategy#events` (if available) before calling `NgElementStrategy#connect()` (which initializes the component instance) if available. 3. Falling back to the old behavior (subscribing to `events` after calling `connect()` for strategies that do not initialize `events` before their `connect()` is run). NOTE: By falling back to the old behavior when `NgElementStrategy#events` is not initialized before calling `NgElementStrategy#connect()`, we avoid breaking existing custom `NgElementStrategy` implementations (with @remackgeek's [ElementZoneStrategy][4] being a commonly used example). Jira issue: [FW-2010](https://angular-team.atlassian.net/browse/FW-2010) [1]: https://github.com/angular/angular/blob/c0143cb2abdd172de1b95fd1d2c4cfc738640e28/packages/elements/src/create-custom-element.ts#L167-L170 [2]: https://github.com/angular/angular/blob/c0143cb2abdd172de1b95fd1d2c4cfc738640e28/packages/elements/src/create-custom-element.ts#L164 [3]: https://github.com/angular/angular/blob/c0143cb2abdd172de1b95fd1d2c4cfc738640e28/packages/elements/src/component-factory-strategy.ts#L158 [4]: https://github.com/remackgeek/elements-zone-strategy/blob/f1b6699495a8c0909dbbfbdca12770ecca843e15/projects/elements-zone-strategy/src/lib/element-zone-strategy.ts Fixes #36141 PR Close #37570
-
Pete Bacon Darwin authored
Previously an error thrown in the `analyzeFn` would cause the ngcc process to exit immediately without removing the lockfile, and potentially before the unlocker process had been successfully spawned resulting in the lockfile being orphaned and left behind. Now we catch these errors and remove the lockfile as needed. PR Close #37739
-
Harri Lehtola authored
Invoking a callback registered through `ViewRef.onDestroy` throws an error, because we weren't registering it correctly in the internal data structure. These changes also remove the `storeCleanupFn` function, because it was mostly identical to `storeCleanupWithContext` and was only used in one place. Fixes #36213. PR Close #37543 PR Close #37783
-
Harri Lehtola authored
Verify that HTML parsing is supported in addition to DOMParser existence. This maybe wasn't as important before when DOMParser was used just as a fallback on Firefox, but now that DOMParser is the default choice, we need to be more accurate. PR Close #37783
-
Harri Lehtola authored
The `inertDocument` member is only needed when using the InertDocument strategy. By separating the DOMParser and InertDocument strategies into separate classes, we can easily avoid creating the inert document unnecessarily when using DOMParser. PR Close #37783
-
Harri Lehtola authored
If [innerHTML] is used in a component and a Content-Security-Policy is set that does not allow inline styles then Firefox and Chrome show the following message: > Content Security Policy: The page’s settings observed the loading of a resource at self (“default-src”). A CSP report is being sent. This message is caused because Angular is creating an inline style tag to test for a browser bug that we use to decide what sanitization strategy to use, which causes CSP violation errors if inline CSS is prohibited. This test is no longer necessary, since the `DOMParser` is now safe to use and the `style` based check is redundant. In this fix, we default to using `DOMParser` if it is available and fall back to `createHTMLDocument()` if needed. This is the approach used by DOMPurify too. The related unit tests in `html_sanitizer_spec.ts`, "should not allow JavaScript execution when creating inert document" and "should not allow JavaScript hidden in badly formed HTML to get through sanitization (Firefox bug)", are left untouched to assert that the behavior hasn't changed in those scenarios. Fixes #25214. PR Close #37783
-
- Jun 27, 2020
-
-
Andrew Kushnir authored
This commit updates the golden file that contains the set of symbols used in the test TODO app. The `storeCleanupFn` function was replaced by `storeCleanupWithContext` in https://github.com/angular/angular/commit/75b119eafc8a9c3d02bbdc06835fc3e46b495882 and this commit updates the golden file to reflect that. PR Close #37785
-
crisbeto authored
Invoking a callback registered through `ViewRef.onDestroy` throws an error, because we weren't registering it correctly in the internal data structure. These changes also remove the `storeCleanupFn` function, because it was mostly identical to `storeCleanupWithContext` and was only used in one place. Fixes #36213. PR Close #37543
-
crisbeto authored
Special DI tokens like `ChangeDetectorRef` and `ElementRef` can provide a factory via `NG_ELEMENT_ID`. The problem is that we were reading it off the token as `token[NG_ELEMENT_ID]` which will go up the prototype chain if it couldn't be found on the current token, resulting in the private `ViewRef` API being exposed, because it extends `ChangeDetectorRef`. These changes fix the issue by guarding the property access with `hasOwnProperty`. Fixes #36235. PR Close #37574
-
Keen Yee Liau authored
This commit fixes a bug whereby the language service would incorrectly return HTML elements if autocomplete is requested for an unknown symbol. This is because we walk through every possible scenario, and fallback to element autocomplete if none of the scenarios match. The fix here is to return results from interpolation if we know for sure we are in a bound text. This means we will now return an empty results if there is no suggestions. This commit also refactors the code a little to make it easier to understand. PR Close #37518
-
Andrew Kushnir authored
-
Igor Minar authored
docs commits are sometimes trivial (e.g. an obvious typo fix) and in such cases its very akward to to write up 100 chars worth of text about why this typo fix is the best thing in the world and why it is so important and crucial that we must know why we are fixing the typo at all. After all most typos are not just typos. Or are they? We'll shall see... PR Close #37764
-
Igor Minar authored
This feature will allow us to exclude certain commits from the 100 chars minBodyLength requirement for commit messages which is hard to satisfy for commits that make trivial changes (e.g. fixing typos in docs or comments). PR Close #37764
-