Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: angular/angular
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 6.1.4
Choose a base ref
...
head repository: angular/angular
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 6.1.6
Choose a head ref
  • 16 commits
  • 20 files changed
  • 8 contributors

Commits on Aug 23, 2018

  1. build(bazel): remove workaround no longer needed for module names for…

    … ngfactory & ngsummary files (#25604)
    
    Workaround was added in #25335. It was necessary for .ngfactory & .ngsummary files to have proper AMD module names starting with @angular when building angular downstream from source using Bazel. The underlying issue has been resolved in the compiler and these files now get proper AMD module names without the need for this workaround. The workaround had an unexpected consequence angular/angular-cli#11835 which is fixed by its removal.
    
    PR Close #25604
    gregmagolan authored and matsko committed Aug 23, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    82f26fe View commit details
  2. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    cc0d0a9 View commit details
  3. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    51d5b43 View commit details
  4. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    4e82a76 View commit details

Commits on Aug 24, 2018

  1. build(bazel): esm5_outputs_aspect to work with targets such as ts_pro…

    …to_library with no replay_params attribute (#25648)
    
    PR Close #25648
    gregmagolan authored and matsko committed Aug 24, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    72ed2e9 View commit details

Commits on Aug 27, 2018

  1. build(bazel): use value of /// <amd-module name=“”> directive to conv…

    …ert fileNameToModuleName in ngc-wrapped (#25650)
    
    PR Close #25650
    gregmagolan authored and matsko committed Aug 27, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    59cfc8a View commit details
  2. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    b560189 View commit details
  3. build(docs-infra): render all overloads if they are abstract (#25670)

    In an overloaded method, the overload with the function body is the
    actual method doc, and this doc is not included in the list of "additional"
    overloads.
    
    Moreover, the logic (all in dgeni-packages) is that if none of the items
    has a body then we use the first overload as the actual method doc.
    
    In the case of abstract methods, none of the methods have a body. So we
    have a situation where the overloads collection does not contain the first
    abstract method, even though it is not the "implementation" of the method.
    Therefore we need to still render it.
    
    Closes #25610
    
    PR Close #25670
    petebacondarwin authored and matsko committed Aug 27, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    e40519c View commit details
  4. build: update Bazel to 0.16 (#25646)

    PR Close #25646
    alexeagle authored and matsko committed Aug 27, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    8a35290 View commit details

Commits on Aug 28, 2018

  1. ci: remove vicb from pullapprove.yml (#25702)

    PR Close #25702
    mhevery committed Aug 28, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    2194b5a View commit details

Commits on Aug 29, 2018

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    7aff364 View commit details
  2. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    c6d502f View commit details
  3. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    7f8d6c1 View commit details
  4. fix(bazel): Cache fileNameToModuleName lookups (#25731)

    This saves expensive re-parsing of the file when not run as a Bazel worker
    
    PR Close #25731
    alexeagle authored and matsko committed Aug 29, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    3e690e0 View commit details
  5. build: fix bad merge onto patch branch (#25729)

    PR Close #25729
    alexeagle authored and matsko committed Aug 29, 2018

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    0a3dd87 View commit details
  6. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    hi-ogawa Hiroshi Ogawa
    Copy the full SHA
    4a8d56a View commit details
4 changes: 2 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
@@ -12,8 +12,8 @@
## IMPORTANT
# If you change the `docker_image` version, also change the `cache_key` suffix and the version of
# `com_github_bazelbuild_buildtools` in the `/WORKSPACE` file.
var_1: &docker_image angular/ngcontainer:0.3.3
var_2: &cache_key v2-angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.3.3
var_1: &docker_image angular/ngcontainer:0.4.0
var_2: &cache_key v2-angular-{{ .Branch }}-{{ checksum "yarn.lock" }}-0.4.0

# Define common ENV vars
var_3: &define_env_vars
18 changes: 3 additions & 15 deletions .pullapprove.yml
Original file line number Diff line number Diff line change
@@ -24,7 +24,6 @@
# petebacondarwin - Pete Bacon Darwin
# pkozlowski-opensource - Pawel Kozlowski
# robwormald - Rob Wormald
# vicb - Victor Berchet
# vikerman - Vikram Subramanian


@@ -125,7 +124,6 @@ groups:
users:
- alexeagle
- mhevery
- vicb
- IgorMinar #fallback

core:
@@ -197,7 +195,6 @@ groups:
- mhevery #primary
- jasonaden
- kara
- vicb
- IgorMinar
- jenniferfell #docs only

@@ -222,8 +219,7 @@ groups:
- "aio/content/guide/i18n.md"
- "aio/content/examples/i18n/*"
users:
- vicb #primary
- alxhub
- alxhub #primary
- IgorMinar #fallback
- mhevery #fallback
- jenniferfell #docs only
@@ -235,7 +231,6 @@ groups:
- "aio/content/guide/aot-compiler.md"
users:
- alxhub #primary
- vicb
- mhevery
- IgorMinar #fallback
- jenniferfell #docs only
@@ -260,7 +255,6 @@ groups:
users:
- alexeagle
- alxhub
- vicb
- IgorMinar #fallback
- mhevery #fallback

@@ -273,7 +267,6 @@ groups:
- "packages/common/http/*"
users:
- pkozlowski-opensource #primary
- vicb
- IgorMinar #fallback
- mhevery #fallback

@@ -322,7 +315,6 @@ groups:
users:
- kyliau #primary
# needs secondary
- vicb
- IgorMinar #fallback
- mhevery #fallback
- jenniferfell #docs only
@@ -336,7 +328,6 @@ groups:
- "aio/content/images/guide/router/*"
users:
- jasonaden #primary
- vicb
- IgorMinar #fallback
- mhevery #fallback
- jenniferfell #docs only
@@ -379,10 +370,9 @@ groups:
files:
- "packages/platform-browser/*"
users:
- vicb #primary
- mhevery #primary
# needs secondary
- IgorMinar #fallback
- mhevery #fallback

platform-server:
conditions:
@@ -393,7 +383,6 @@ groups:
users:
- vikerman #primary
- alxhub #secondary
- vicb
- IgorMinar #fallback
- mhevery #fallback
- jenniferfell #docs only
@@ -403,10 +392,9 @@ groups:
files:
- "packages/platform-webworker/*"
users:
- vicb #primary
- mhevery #primary
# needs secondary
- IgorMinar #fallback
- mhevery #fallback

service-worker:
conditions:
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
<a name="6.1.6"></a>
## [6.1.6](https://github.com/angular/angular/compare/6.1.5...6.1.6) (2018-08-29)


### Bug Fixes

* **bazel:** Cache fileNameToModuleName lookups ([#25731](https://github.com/angular/angular/issues/25731)) ([3e690e0](https://github.com/angular/angular/commit/3e690e0))
* **bazel:** only lookup amd module-name tags in .d.ts files ([#25710](https://github.com/angular/angular/issues/25710)) ([7aff364](https://github.com/angular/angular/commit/7aff364))


Note: the 1.6.5 release on npm accidentally glitched-out midway, so we cut 6.1.6 instead. sorry! :-)

<a name="6.1.4"></a>
## [6.1.4](https://github.com/angular/angular/compare/6.1.3...6.1.4) (2018-08-22)

13 changes: 8 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -3,12 +3,11 @@ workspace(name = "angular")
#
# Download Bazel toolchain dependencies as needed by build actions
#

http_archive(
name = "build_bazel_rules_nodejs",
urls = ["https://github.com/bazelbuild/rules_nodejs/archive/0.11.4.zip"],
strip_prefix = "rules_nodejs-0.11.4",
sha256 = "c31c4ead696944a50fad2b3ee9dfbbeffe31a8dcca0b21b9bf5b3e6c6b069801",
urls = ["https://github.com/bazelbuild/rules_nodejs/archive/0.12.0.zip"],
strip_prefix = "rules_nodejs-0.12.0",
sha256 = "2977cdbc8ae0eed7d4186385af56a50a3321a549e2136a959998bba89d2edb6e",
)

http_archive(
@@ -100,7 +99,11 @@ local_repository(

load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories", "yarn_install")

check_bazel_version("0.15.0")
check_bazel_version("0.16.0", """
If you are on a Mac and using Homebrew, there is a breaking change to the installation in Bazel 0.16
See https://blog.bazel.build/2018/08/22/bazel-homebrew.html
""")
node_repositories(
package_json = ["//:package.json"],
preserve_symlinks = True,
3 changes: 1 addition & 2 deletions aio/content/tutorial/toh-pt5.md
Original file line number Diff line number Diff line change
@@ -213,8 +213,7 @@ The _class_ is similar to the `HeroesComponent` class.
* The constructor expects Angular to inject the `HeroService` into a private `heroService` property.
* The `ngOnInit()` lifecycle hook calls `getHeroes`.

This `getHeroes` reduces the number of heroes displayed to four
(2nd, 3rd, 4th, and 5th).
This `getHeroes` returns the sliced list of heroes at positions 1 and 5, returning only four of the Top Heroes (2nd, 3rd, 4th, and 5th).

<code-example path="toh-pt5/src/app/dashboard/dashboard.component.ts" region="getHeroes">
</code-example>
3 changes: 2 additions & 1 deletion aio/package.json
Original file line number Diff line number Diff line change
@@ -57,11 +57,12 @@
"generate-zips": "node ./tools/example-zipper/generateZips",
"sw-manifest": "ngu-sw-manifest --dist dist --in ngsw-manifest.json --out dist/ngsw-manifest.json",
"sw-copy": "cp node_modules/@angular/service-worker/bundles/worker-basic.min.js dist/",
"build-404-page": "node scripts/build-404-page",
"build-ie-polyfills": "yarn webpack-cli src/ie-polyfills.js -o src/generated/ie-polyfills.min.js --mode production",
"update-webdriver": "webdriver-manager update --standalone false --gecko false $CHROMEDRIVER_VERSION_ARG",
"~~check-env": "node scripts/check-environment",
"~~build": "ng build",
"post~~build": "yarn sw-manifest && yarn sw-copy"
"post~~build": "yarn build-404-page && yarn sw-manifest && yarn sw-copy"
},
"engines": {
"node": ">=8.9.1 <9.0.0",
31 changes: 31 additions & 0 deletions aio/scripts/build-404-page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#!/usr/bin/env node

// Imports
const {readFileSync, writeFileSync} = require('fs');
const {join, resolve} = require('path');

// Constants
const SRC_DIR = resolve(__dirname, '../src');
const DIST_DIR = resolve(__dirname, '../dist');

// Run
_main(process.argv.slice(2));

// Functions - Definitions
function _main() {
const srcIndexPath = join(DIST_DIR, 'index.html');
const src404BodyPath = join(SRC_DIR, '404-body.html');
const dst404PagePath = join(DIST_DIR, '404.html');

const srcIndexContent = readFileSync(srcIndexPath, 'utf8');
const src404BodyContent = readFileSync(src404BodyPath, 'utf8');
const dst404PageContent = srcIndexContent.replace(/<body>[\s\S]+<\/body>/, src404BodyContent);

if (dst404PageContent === srcIndexContent) {
throw new Error(
'Failed to generate \'404.html\'. ' +
'The content of \'index.html\' does not match the expected pattern.');
}

writeFileSync(dst404PagePath, dst404PageContent);
}
52 changes: 52 additions & 0 deletions aio/src/404-body.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
<!--
This content replaces the `<body>` content of `index.html` to generate our custom `404.html` page.
The content must visually and structurally resemble the resulting HTML of the main app for not
found pages (e.g. https://angular.io/not/existing).
-->

<style>
.mat-toolbar-row{display:flex;box-sizing:border-box;padding:0 16px;width:100%;flex-direction:row;align-items:center;white-space:nowrap}
.mat-toolbar-row{height:64px}
@media (max-width:600px){.mat-toolbar-row{height:56px}}
.nav-link.home{margin-left:24px}
</style>

<aio-shell class="mode-stable page-file-not-found folder-file-not-found view- aio-notification-hide">

<mat-toolbar class="app-toolbar no-print mat-toolbar mat-primary">
<mat-toolbar-row class="mat-toolbar-row">
<a class="nav-link home" href="/">
<img alt="Home" height="40" src="assets/images/logos/angular/logo-nav@2x.png" title="Home" width="150">
</a>
</mat-toolbar-row>
</mat-toolbar>

<mat-sidenav-container class="sidenav-container mat-drawer-container mat-sidenav-container" role="main">
<mat-sidenav-content class="mat-drawer-content mat-sidenav-content">
<section class="sidenav-content" role="content">
<aio-doc-viewer>
<div class="content">
<div class="nf-container l-flex-wrap flex-center">
<img src="assets/images/support/angular-404.svg" width="300" height="300" />
<div class="nf-response l-flex-wrap">
<h1 class="no-toc" id="page-not-found">Resource Not Found</h1>
<p>We're sorry. The resource you are looking for cannot be found.</p>
</div>
</div>
</div>
</aio-doc-viewer>
</section>
</mat-sidenav-content>
</mat-sidenav-container>

<footer class="no-print">
<aio-footer>
<p>
Powered by Google ©2010-2018.
Code licensed under an <a href="license" title="License text">MIT-style License</a>.
Documentation licensed under <a href="http://creativecommons.org/licenses/by/4.0/">CC BY 4.0</a>.
</p>
</aio-footer>
</footer>

</aio-shell>
38 changes: 37 additions & 1 deletion aio/tests/deployment/e2e/redirection.e2e-spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { browser } from 'protractor';
import { browser, by, element } from 'protractor';
import { SitePage } from './site.po';

describe(browser.baseUrl, () => {
@@ -34,4 +34,40 @@ describe(browser.baseUrl, () => {
});
});
});

describe('(with unknown URLs)', () => {
const unknownPageUrl = '/unknown/page';
const unknownResourceUrl = '/unknown/resource.ext';

it('should serve `index.html` for unknown pages', async () => {
const aioShell = element(by.css('aio-shell'));
const heading = aioShell.element(by.css('h1'));
await page.goTo(unknownPageUrl);

expect(aioShell.isPresent()).toBe(true);
expect(heading.getText()).toMatch(/page not found/i);
});

it('should serve a custom 404 page for unknown resources', async () => {
const aioShell = element(by.css('aio-shell'));
const heading = aioShell.element(by.css('h1'));
await page.goTo(unknownResourceUrl);

expect(aioShell.isPresent()).toBe(true);
expect(heading.getText()).toMatch(/resource not found/i);
});

it('should include a link to the home page in custom 404 page', async () => {
const homeNavLink = element(by.css('.nav-link.home'));
await page.goTo(unknownResourceUrl);

expect(homeNavLink.isPresent()).toBe(true);

await homeNavLink.click();
const expectedUrl = browser.baseUrl;
const actualUrl = await browser.getCurrentUrl();

expect(actualUrl).toBe(expectedUrl);
});
});
});
2 changes: 0 additions & 2 deletions aio/tools/transforms/templates/api/class.template.html
Original file line number Diff line number Diff line change
@@ -18,6 +18,4 @@ <h2>Constructor</h2>
{$ memberHelpers.renderProperties(doc.properties, 'instance-properties', 'instance-property', 'Properties') $}

{$ memberHelpers.renderMethodDetails(versionInfo, doc.methods, 'instance-methods', 'instance-method', 'Methods') $}

{% block annotations %}{% include "includes/annotations.html" %}{% endblock %}
{% endblock %}
18 changes: 17 additions & 1 deletion aio/tools/transforms/templates/api/lib/memberHelpers.html
Original file line number Diff line number Diff line change
@@ -47,6 +47,11 @@

<code-example language="ts" hideCopy="true" linenums="false" class="no-box api-heading">{$ renderMemberSyntax(overload) $}</code-example>

{% if overload.deprecated !== undefined %}
<div class="deprecated">
{$ ('**Deprecated** ' + overload.deprecated) | marked $}
</div>{% endif %}

<h4 class="no-anchor">Parameters</h4>
{$ params.renderParameters(overload.parameterDocs, cssClass + '-parameters', cssClass + '-parameter') $}

@@ -97,6 +102,13 @@ <h3>
</td>
</tr>
{% elseif method.overloads.length < 3 -%}
{% if method.isAbstract %}
<tr>
<td>
{$ renderOverloadInfo(method, cssClass + '-overload', method) $}
</td>
</tr>
{% endif %}
{% for overload in method.overloads -%}
<tr>
<td>
@@ -110,7 +122,11 @@ <h3>
<details class="overloads">
<summary><h4 class="no-anchor">{$ method.overloads.length $} overloads...</h4></summary>
<div class="detail-contents">
{% for overload in method.overloads %}
{% if method.isAbstract %}
{$ renderOverloadInfo(method, cssClass + '-overload', method) $}
<hr class="hr-margin fullwidth">
{% endif %}
{% for overload in method.overloads %}
{$ renderOverloadInfo(overload, cssClass + '-overload', method) $}
{% if not loop.last %}<hr class="hr-margin fullwidth">{% endif %}
{% endfor %}
2 changes: 1 addition & 1 deletion integration/bazel/WORKSPACE
Original file line number Diff line number Diff line change
@@ -65,7 +65,7 @@ local_repository(

load("@build_bazel_rules_nodejs//:defs.bzl", "check_bazel_version", "node_repositories")

check_bazel_version("0.15.0")
check_bazel_version("0.16.0")
node_repositories(package_json = ["//:package.json"])

load("@io_bazel_rules_go//go:def.bzl", "go_rules_dependencies", "go_register_toolchains")
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-srcs",
"version": "6.1.4",
"version": "6.1.6",
"private": true,
"branchPattern": "2.0.*",
"description": "Angular - a web framework for modern web apps",
7 changes: 7 additions & 0 deletions packages/bazel/src/esm5.bzl
Original file line number Diff line number Diff line change
@@ -44,6 +44,13 @@ def _esm5_outputs_aspect(target, ctx):
if not hasattr(target, "typescript"):
return []

# Workaround for https://github.com/bazelbuild/rules_typescript/issues/211
# TODO(gmagolan): generate esm5 output from ts_proto_library and have that
# output work with esm5_outputs_aspect
if not hasattr(target.typescript, "replay_params"):
print("WARNING: no esm5 output from target %s//%s:%s available" % (target.label.workspace_root, target.label.package, target.label.name))
return []

# We create a new tsconfig.json file that will have our compilation settings
tsconfig = ctx.actions.declare_file("%s_esm5.tsconfig.json" % target.label.name)

Loading