diff --git a/gulpfile.js b/gulpfile.js
index 05986b71c5..4b83e9838e 100644
--- a/gulpfile.js
+++ b/gulpfile.js
@@ -1076,7 +1076,7 @@ function getChangedExamplesForCommit(commit, relativePath) {
return commit.getDiff().then(function(diffList) {
var filePaths = [];
diffList.forEach(function (diff) {
- diff.patches().forEach(function (patch) {
+ diff.patches().then(function (patch) {
if (patch.isAdded() || patch.isModified) {
var filePath = path.normalize(patch.newFile().path());
var isExample = filePath.indexOf(relativePath) >= 0;
diff --git a/package.json b/package.json
index fd0083db03..b8513be3da 100644
--- a/package.json
+++ b/package.json
@@ -61,7 +61,7 @@
"minimatch": "^2.0.10",
"mkdirp": "^0.5.1",
"node-html-encoder": "0.0.2",
- "nodegit": "0.5.0",
+ "nodegit": "0.13.0",
"path": "^0.11.14",
"prompt": "^0.2.14",
"protractor": "^3.0.0",
diff --git a/public/docs/_examples/cb-dependency-injection/e2e-spec.ts b/public/docs/_examples/cb-dependency-injection/e2e-spec.ts
index 2beb08af94..29a8822110 100644
--- a/public/docs/_examples/cb-dependency-injection/e2e-spec.ts
+++ b/public/docs/_examples/cb-dependency-injection/e2e-spec.ts
@@ -35,16 +35,11 @@ describe('Dependency Injection Cookbook', function () {
expect(sortedHero).toBeDefined();
});
- it('should render Hero of the Month when DI deps are defined using provide()', function () {
+ it('should render Hero of the Month', function () {
let heroOfTheMonth = element.all(by.xpath('//h3[text()="Hero of the month"]')).get(0);
expect(heroOfTheMonth).toBeDefined();
});
- it('should render Hero of the Month when DI deps are defined using provide object literal', function () {
- let heroOfTheMonth = element.all(by.xpath('//h3[text()="Hero of the month 2"]')).get(0);
- expect(heroOfTheMonth).toBeDefined();
- });
-
it('should render Hero Bios', function () {
let heroBios = element.all(by.xpath('//h3[text()="Hero Bios"]')).get(0);
expect(heroBios).toBeDefined();
@@ -60,16 +55,11 @@ describe('Dependency Injection Cookbook', function () {
expect(magmaPhone).toBeDefined();
});
- it('should render Hero-of-the-Month runner-ups when DI deps are defined using provide()', function () {
+ it('should render Hero-of-the-Month runner-ups', function () {
let runnersUp = element(by.id('rups1')).getText();
expect(runnersUp).toContain('RubberMan, Mr. Nice');
});
- it('should render Hero-of-the-Month runner-ups when DI deps are defined using provide object literal', function () {
- let runnersUp = element(by.id('rups2')).getText();
- expect(runnersUp).toContain('RubberMan, Mr. Nice');
- });
-
it('should render DateLogger log entry in Hero-of-the-Month', function () {
let logs = element.all(by.id('logs')).get(0).getText();
expect(logs).toContain('INFO: starting up at');
diff --git a/public/docs/_examples/cb-dependency-injection/ts/app/app.component.html b/public/docs/_examples/cb-dependency-injection/ts/app/app.component.html
index 0e1d15932d..a715e484fe 100644
--- a/public/docs/_examples/cb-dependency-injection/ts/app/app.component.html
+++ b/public/docs/_examples/cb-dependency-injection/ts/app/app.component.html
@@ -23,10 +23,6 @@
-
Unsorted Heroes
diff --git a/public/docs/_examples/cb-dependency-injection/ts/app/app.component.ts b/public/docs/_examples/cb-dependency-injection/ts/app/app.component.ts
index 7188e4f63f..a72af9e6da 100644
--- a/public/docs/_examples/cb-dependency-injection/ts/app/app.component.ts
+++ b/public/docs/_examples/cb-dependency-injection/ts/app/app.component.ts
@@ -9,13 +9,10 @@ import { HeroesBaseComponent,
import { HighlightDirective } from './highlight.directive';
import { ParentFinderComponent } from './parent-finder.component';
-// Object Literal syntax
-import { HeroOfTheMonthLiteralsComponent } from './hero-of-the-month-literals.component';
-
const DIRECTIVES = [
HeroBiosComponent, HeroBiosAndContactsComponent,
HeroesBaseComponent, SortedHeroesComponent,
- HeroOfTheMonthComponent, HeroOfTheMonthLiteralsComponent,
+ HeroOfTheMonthComponent,
HighlightDirective,
ParentFinderComponent
];
diff --git a/public/docs/_examples/cb-dependency-injection/ts/app/hero-of-the-month-literals.component.ts b/public/docs/_examples/cb-dependency-injection/ts/app/hero-of-the-month-literals.component.ts
deleted file mode 100644
index 13c6c0ab9d..0000000000
--- a/public/docs/_examples/cb-dependency-injection/ts/app/hero-of-the-month-literals.component.ts
+++ /dev/null
@@ -1,67 +0,0 @@
-/* tslint:disable:one-line:check-open-brace*/
-// #docplaster
-// #docregion opaque-token
-import { OpaqueToken } from '@angular/core';
-
-export const TITLE = new OpaqueToken('title');
-// #enddocregion opaque-token
-
-// #docregion hero-of-the-month
-import { Component, Inject } from '@angular/core';
-
-import { DateLoggerService,
- MinimalLogger } from './date-logger.service';
-import { Hero } from './hero';
-import { HeroService } from './hero.service';
-import { LoggerService } from './logger.service';
-import { RUNNERS_UP,
- runnersUpFactory } from './runners-up';
-
-// #enddocregion hero-of-the-month
-// #docregion some-hero
-const someHero = new Hero(42, 'Magma', 'Had a great month!', '555-555-5555');
-// #enddocregion some-hero
-
-const template = `
-
{{title}}
-
Winner: {{heroOfTheMonth.name}}
-
Reason for award: {{heroOfTheMonth.description}}
-
Runners-up: {{runnersUp}}
-
-
Logs:
-
- `;
-
-// #docregion hero-of-the-month
-@Component({
- selector: 'hero-of-the-month-lit',
- template: template,
- // #docregion providers-using-object-literals
- providers: [
- {provide: Hero, useValue: someHero},
- {provide: TITLE, useValue: 'Hero of the Month - Object Literals'},
- {provide: HeroService, useClass: HeroService},
- {provide: LoggerService, useClass: DateLoggerService},
- {provide: MinimalLogger, useExisting: LoggerService},
- {provide: RUNNERS_UP, useFactory: runnersUpFactory(2), deps: [Hero, HeroService]}
- ]
- // #enddocregion providers-using-object-literals
-})
-export class HeroOfTheMonthLiteralsComponent {
- logs: string[] = [];
-
-// #docregion ctor-signature
- constructor(
- logger: MinimalLogger,
- public heroOfTheMonth: Hero,
- @Inject(RUNNERS_UP) public runnersUp: string,
- @Inject(TITLE) public title: string)
-// #enddocregion ctor-signature
- {
- this.logs = logger.logs;
- logger.logInfo('starting up');
- }
-}
-// #enddocregion hero-of-the-month
diff --git a/public/docs/_examples/cb-dependency-injection/ts/app/hero-of-the-month.component.ts b/public/docs/_examples/cb-dependency-injection/ts/app/hero-of-the-month.component.ts
index 4183734753..c5bafca36d 100644
--- a/public/docs/_examples/cb-dependency-injection/ts/app/hero-of-the-month.component.ts
+++ b/public/docs/_examples/cb-dependency-injection/ts/app/hero-of-the-month.component.ts
@@ -7,7 +7,7 @@ export const TITLE = new OpaqueToken('title');
// #enddocregion opaque-token
// #docregion hero-of-the-month
-import { Component, Inject, provide } from '@angular/core';
+import { Component, Inject } from '@angular/core';
import { DateLoggerService,
MinimalLogger } from './date-logger.service';
@@ -40,20 +40,20 @@ const template = `
template: template,
providers: [
// #docregion use-value
- provide(Hero, {useValue: someHero}),
+ { provide: Hero, useValue: someHero },
// #docregion provide-opaque-token
- provide(TITLE, {useValue: 'Hero of the Month'}),
+ { provide: TITLE, useValue: 'Hero of the Month' },
// #enddocregion provide-opaque-token
// #enddocregion use-value
// #docregion use-class
- provide(HeroService, {useClass: HeroService}),
- provide(LoggerService, {useClass: DateLoggerService}),
+ { provide: HeroService, useClass: HeroService },
+ { provide: LoggerService, useClass: DateLoggerService },
// #enddocregion use-class
// #docregion use-existing
- provide(MinimalLogger, {useExisting: LoggerService}),
+ { provide: MinimalLogger, useExisting: LoggerService },
// #enddocregion use-existing
// #docregion provide-opaque-token, use-factory
- provide(RUNNERS_UP, {useFactory: runnersUpFactory(2), deps: [Hero, HeroService]})
+ { provide: RUNNERS_UP, useFactory: runnersUpFactory(2), deps: [Hero, HeroService] }
// #enddocregion provide-opaque-token, use-factory
]
})
diff --git a/public/docs/_examples/cb-dependency-injection/ts/app/main.ts b/public/docs/_examples/cb-dependency-injection/ts/app/main.ts
index 595971625e..fd4646a055 100644
--- a/public/docs/_examples/cb-dependency-injection/ts/app/main.ts
+++ b/public/docs/_examples/cb-dependency-injection/ts/app/main.ts
@@ -1,6 +1,5 @@
// #docregion
import { bootstrap } from '@angular/platform-browser-dynamic';
-import { provide } from '@angular/core';
import { XHRBackend } from '@angular/http';
import { ROUTER_PROVIDERS } from '@angular/router-deprecated';
import { LocationStrategy,
@@ -15,10 +14,9 @@ import { AppComponent } from './app.component';
// #docregion bootstrap
bootstrap(AppComponent, [
ROUTER_PROVIDERS,
- provide(LocationStrategy,
- {useClass: HashLocationStrategy}),
+ { provide: LocationStrategy, useClass: HashLocationStrategy },
- provide(XHRBackend, { useClass: InMemoryBackendService }), // in-mem server
- provide(SEED_DATA, { useClass: HeroData }) // in-mem server data
+ { provide: XHRBackend, useClass: InMemoryBackendService }, // in-mem server
+ { provide: SEED_DATA, useClass: HeroData } // in-mem server data
]).catch((err: any) => console.error(err));
// #enddocregion bootstrap
diff --git a/public/docs/_examples/cb-dependency-injection/ts/app/parent-finder.component.ts b/public/docs/_examples/cb-dependency-injection/ts/app/parent-finder.component.ts
index 7cfc460600..045ce8c545 100644
--- a/public/docs/_examples/cb-dependency-injection/ts/app/parent-finder.component.ts
+++ b/public/docs/_examples/cb-dependency-injection/ts/app/parent-finder.component.ts
@@ -22,14 +22,17 @@ const DifferentParent = Parent;
const provideParent =
// #enddocregion provide-parent, provide-the-parent
// #docregion provide-parent
- (component: any, parentType?: any) =>
- provide(parentType || Parent, { useExisting: forwardRef(() => component) });
+ (component: any, parentType?: any) => {
+ return { provide: parentType || Parent, useExisting: forwardRef(() => component) }
+ };
// #enddocregion provide-parent
// Simpler syntax version that always provides the component in the name of `Parent`.
const provideTheParent =
// #docregion provide-the-parent
- (component: any) => provide(Parent, { useExisting: forwardRef(() => component) });
+ (component: any) => {
+ return { provide: Parent, useExisting: forwardRef(() => component) }
+ };
// #enddocregion provide-the-parent
@@ -105,7 +108,7 @@ const templateB = `
selector: 'barry',
template: templateB,
directives: C_DIRECTIVES,
- providers: [ provide(Parent, { useExisting: forwardRef(() => BarryComponent) }) ]
+ providers: [{ provide: Parent, useExisting: forwardRef(() => BarryComponent) }]
})
export class BarryComponent implements Parent {
name = 'Barry';
@@ -155,7 +158,7 @@ const B_DIRECTIVES = [ BarryComponent, BethComponent, BobComponent ];
`,
// #enddocregion alex-1
// #docregion alex-providers
- providers: [ provide(Parent, { useExisting: forwardRef(() => AlexComponent) }) ],
+ providers: [{ provide: Parent, useExisting: forwardRef(() => AlexComponent) }],
// #enddocregion alex-providers
// #docregion alex-1
directives: C_DIRECTIVES
diff --git a/public/docs/_examples/cb-ts-to-js/js/app/main.js b/public/docs/_examples/cb-ts-to-js/js/app/main.js
index ed92d6f823..f483a7c8cd 100644
--- a/public/docs/_examples/cb-ts-to-js/js/app/main.js
+++ b/public/docs/_examples/cb-ts-to-js/js/app/main.js
@@ -4,8 +4,6 @@
// #enddocregion appimport
// #docregion ng2import
- var provide =
- ng.core.provide;
var bootstrap =
ng.platformBrowserDynamic.bootstrap;
var LocationStrategy =
@@ -25,10 +23,10 @@
bootstrap(app.HeroDIComponent, [app.DataService]);
bootstrap(app.HeroDIInlineComponent, [app.DataService]);
bootstrap(app.HeroDIInjectComponent, [
- ng.core.provide('heroName', {useValue: 'Windstorm'})
+ { provide: 'heroName', useValue: 'Windstorm' }
]);
bootstrap(app.HeroDIInjectComponent2, [
- ng.core.provide('heroName', {useValue: 'Bombasto'})
+ { provide: 'heroName', useValue: 'Bombasto' }
]);
bootstrap(app.HeroDIInjectAdditionalComponent);
bootstrap(app.HeroIOComponent);
diff --git a/public/docs/_examples/cb-ts-to-js/ts/app/main.ts b/public/docs/_examples/cb-ts-to-js/ts/app/main.ts
index 74befc103d..ea8f8377e1 100644
--- a/public/docs/_examples/cb-ts-to-js/ts/app/main.ts
+++ b/public/docs/_examples/cb-ts-to-js/ts/app/main.ts
@@ -1,6 +1,4 @@
// #docregion ng2import
-import { provide }
- from '@angular/core';
import { bootstrap }
from '@angular/platform-browser-dynamic';
import {
@@ -29,7 +27,7 @@ bootstrap(HeroComponent);
bootstrap(HeroLifecycleComponent);
bootstrap(HeroDIComponent, [DataService]);
bootstrap(HeroDIInjectComponent, [
- provide('heroName', {useValue: 'Windstorm'})
+ { provide: 'heroName', useValue: 'Windstorm' }
]);
bootstrap(AppDIInjectAdditionalComponent);
bootstrap(AppIOComponent);
diff --git a/public/docs/_examples/dependency-injection/dart/lib/providers_component.dart b/public/docs/_examples/dependency-injection/dart/lib/providers_component.dart
index 898ad1b001..11f2184242 100644
--- a/public/docs/_examples/dependency-injection/dart/lib/providers_component.dart
+++ b/public/docs/_examples/dependency-injection/dart/lib/providers_component.dart
@@ -27,38 +27,6 @@ class ProviderComponent1 {
}
}
-@Component(
- selector: 'provider-2',
- template: '{{log}}',
- providers:
- // #docregion providers-2
- const [const Provider(Logger, useClass: Logger)]
- // #enddocregion providers-2
-)
-class ProviderComponent2 {
- String log;
-
- ProviderComponent2(Logger logger) {
- logger.log('Hello from logger provided with Provider class and useClass');
- log = logger.logs[0];
- }
-}
-
-/// Component just used to ensure that shared E2E tests pass.
-@Component(
- selector: 'provider-3',
- template: '{{log}}',
- providers: const [const Provider(Logger, useClass: Logger)]
-)
-class ProviderComponent3 {
- String log;
-
- ProviderComponent3(Logger logger) {
- logger.log('Hello from logger provided with useClass');
- log = logger.logs[0];
- }
-}
-
/// Component just used to ensure that shared E2E tests pass.
@Component(
selector: 'provider-3a',
@@ -282,8 +250,6 @@ class ProviderComponent10 implements OnInit {
template: '''