Skip to content

Create a new pull request by comparing changes across two branches #517

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 22 commits into from
Aug 14, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
4d17418
docs: delete one superfluous sentence (#38339)
gurdiga Aug 4, 2020
dcf7baf
docs: release notes for the v10.0.9 release
AndrewKushnir Aug 12, 2020
d6d7caa
release: cut the v10.1.0-next.5 release
AndrewKushnir Aug 12, 2020
823dd5b
docs: update web-worker CLI commands to bash style (#38421)
alan-agius4 Aug 12, 2020
aa3520e
refactor(dev-infra): use promptConfirm util in ng-dev's formatter (#3…
josephperrott Aug 11, 2020
5f2e475
docs: remove unused Input decorator (#38306)
falinsky Jul 30, 2020
8366eff
refactor(dev-infra): extract the commit message parsing function into…
josephperrott Aug 12, 2020
f4ced74
feat(dev-infra): save invalid commit message attempts to be restored …
josephperrott Jul 30, 2020
773f790
feat(dev-infra): update to latest benchpress version (#38440)
devversion Aug 13, 2020
9f7a37b
feat(dev-infra): migrate to unified commit message types in commit me…
josephperrott Aug 12, 2020
8763d82
build: update ng-dev config file for new commit message configuration…
josephperrott Aug 13, 2020
aa847cb
build: run browsers tests on chromium locally (#38435)
devversion Aug 13, 2020
a80f654
fix(core): error if CSS custom property in host binding has number in…
crisbeto Aug 13, 2020
b769771
refactor(router): Add annotations to correct Router documentation (#3…
atscott Aug 13, 2020
945751e
ci: disable closure size tracking test (#38449)
atscott Aug 13, 2020
175c79d
test(docs-infra): remove deprecated `ReflectiveInjector` (#38408)
sonukapoor Aug 10, 2020
f42e6ce
perf(compiler-cli): only generate type-check code for referenced DOM …
JoostK Aug 11, 2020
fb8f4b4
perf(compiler-cli): only generate directive declarations when used (#…
JoostK Aug 11, 2020
1388c17
perf(compiler-cli): don't emit template guards when child scope is em…
JoostK Aug 11, 2020
d5f819e
style(compiler-cli): remove unused constant (#38441)
ahnpnl Aug 13, 2020
b071495
fix(core): fix multiple nested views removal from ViewContainerRef (#…
waterplea Aug 13, 2020
ca79880
fix(router): export DefaultRouteReuseStrategy to Router public_api (#…
abarghoud Jul 15, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .ng-dev/commit-message.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,18 +7,6 @@ export const commitMessage: CommitMessageConfig = {
maxLineLength: 120,
minBodyLength: 20,
minBodyLengthTypeExcludes: ['docs'],
types: [
'build',
'ci',
'docs',
'feat',
'fix',
'perf',
'refactor',
'release',
'style',
'test',
],
scopes: [
'animations',
'bazel',
Expand Down
41 changes: 41 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,44 @@
<a name="10.1.0-next.5"></a>
# 10.1.0-next.5 (2020-08-12)


### Bug Fixes

* **compiler-cli:** avoid creating value expressions for symbols from type-only imports ([#37912](https://github.com/angular/angular/issues/37912)) ([18098d3](https://github.com/angular/angular/commit/18098d3)), closes [#37900](https://github.com/angular/angular/issues/37900)
* **compiler-cli:** type-check inputs that include undefined when there's coercion members ([#38273](https://github.com/angular/angular/issues/38273)) ([7525f3a](https://github.com/angular/angular/commit/7525f3a))
* **router:** defer loading of wildcard module until needed ([#38348](https://github.com/angular/angular/issues/38348)) ([8f708b5](https://github.com/angular/angular/commit/8f708b5)), closes [#25494](https://github.com/angular/angular/issues/25494)
* **router:** restore 'history.state' object for navigations coming from Angular router ([#28108](https://github.com/angular/angular/issues/28108)) ([#28176](https://github.com/angular/angular/issues/28176)) ([df76a20](https://github.com/angular/angular/commit/df76a20))


### Features

* **compiler-cli:** Add compiler option to report errors when assigning to restricted input fields ([#38249](https://github.com/angular/angular/issues/38249)) ([71138f6](https://github.com/angular/angular/commit/71138f6))
* **router:** better warning message when a router outlet has not been instantiated ([#30246](https://github.com/angular/angular/issues/30246)) ([1609815](https://github.com/angular/angular/commit/1609815))



<a name="10.0.9"></a>
## 10.0.9 (2020-08-12)


### Bug Fixes

* **common:** ensure scrollRestoration is writable ([#30630](https://github.com/angular/angular/issues/30630)) ([#38357](https://github.com/angular/angular/issues/38357)) ([58f4b3a](https://github.com/angular/angular/commit/58f4b3a)), closes [#30629](https://github.com/angular/angular/issues/30629)
* **compiler:** evaluate safe navigation expressions in correct binding order ([#37911](https://github.com/angular/angular/issues/37911)) ([f5b9d87](https://github.com/angular/angular/commit/f5b9d87)), closes [#37194](https://github.com/angular/angular/issues/37194)
* **compiler-cli:** avoid creating value expressions for symbols from type-only imports ([#38415](https://github.com/angular/angular/issues/38415)) ([ca2b4bc](https://github.com/angular/angular/commit/ca2b4bc)), closes [#37912](https://github.com/angular/angular/issues/37912)
* **compiler-cli:** infer quote expressions as any type in type checker ([#37917](https://github.com/angular/angular/issues/37917)) ([5b87c67](https://github.com/angular/angular/commit/5b87c67)), closes [#36568](https://github.com/angular/angular/issues/36568)
* **compiler-cli:** mark eager `NgModuleFactory` construction as not side effectful ([#38320](https://github.com/angular/angular/issues/38320)) ([016a41b](https://github.com/angular/angular/commit/016a41b)), closes [#38147](https://github.com/angular/angular/issues/38147)
* **compiler-cli:** match wrapHost parameter types within plugin interface ([#38004](https://github.com/angular/angular/issues/38004)) ([df01a82](https://github.com/angular/angular/commit/df01a82))
* **compiler-cli:** preserve quotes in class member names ([#38387](https://github.com/angular/angular/issues/38387)) ([c9acb7b](https://github.com/angular/angular/commit/c9acb7b)), closes [#38311](https://github.com/angular/angular/issues/38311)
* **core:** prevent NgModule scope being overwritten in JIT compiler ([#37795](https://github.com/angular/angular/issues/37795)) ([3acebdc](https://github.com/angular/angular/commit/3acebdc)), closes [#37105](https://github.com/angular/angular/issues/37105)
* **core:** queries not matching string injection tokens ([#38321](https://github.com/angular/angular/issues/38321)) ([32109dc](https://github.com/angular/angular/commit/32109dc)), closes [#38313](https://github.com/angular/angular/issues/38313) [#38315](https://github.com/angular/angular/issues/38315)
* **core:** Store the currently selected ICU in `LView` ([#38345](https://github.com/angular/angular/issues/38345)) ([ee5123f](https://github.com/angular/angular/commit/ee5123f))
* **platform-server:** remove styles added by ServerStylesHost on destruction ([#38367](https://github.com/angular/angular/issues/38367)) ([7f11149](https://github.com/angular/angular/commit/7f11149))
* **router:** prevent calling unsubscribe on undefined subscription in RouterPreloader ([#38344](https://github.com/angular/angular/issues/38344)) ([4151314](https://github.com/angular/angular/commit/4151314))
* **service-worker:** fix the chrome debugger syntax highlighter ([#38332](https://github.com/angular/angular/issues/38332)) ([f5d5bac](https://github.com/angular/angular/commit/f5d5bac))



<a name="10.1.0-next.4"></a>
# 10.1.0-next.4 (2020-08-04)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Component, OnInit, Input } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { ActivatedRoute } from '@angular/router';
import { Location } from '@angular/common';

Expand All @@ -11,7 +11,7 @@ import { HeroService } from '../hero.service';
styleUrls: [ './hero-detail.component.css' ]
})
export class HeroDetailComponent implements OnInit {
@Input() hero: Hero;
hero: Hero;

constructor(
private route: ActivatedRoute,
Expand Down
8 changes: 6 additions & 2 deletions aio/content/guide/web-worker.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,16 @@ The CLI does not support running Angular itself in a web worker.

To add a web worker to an existing project, use the Angular CLI `ng generate` command.

`ng generate web-worker` *location*
```bash
ng generate web-worker <location>
```

You can add a web worker anywhere in your application.
For example, to add a web worker to the root component, `src/app/app.component.ts`, run the following command.

`ng generate web-worker app`
```bash
ng generate web-worker app
```

The command performs the following actions.

Expand Down
1 change: 0 additions & 1 deletion aio/content/tutorial/toh-pt4.md
Original file line number Diff line number Diff line change
Expand Up @@ -385,7 +385,6 @@ next section on [Routing](tutorial/toh-pt5).
path="toh-pt4/src/app/heroes/heroes.component.ts">
</code-example>

The browser refreshes and the page displays the list of heroes.
Refresh the browser to see the list of heroes, and scroll to the bottom to see the
messages from the HeroService. Each time you click a hero, a new message appears to record
the selection. Use the "clear" button to clear the message history.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReflectiveInjector } from '@angular/core';
import { Injector } from '@angular/core';

import { of } from 'rxjs';

Expand All @@ -12,20 +12,22 @@ import { LocationService } from 'app/shared/location.service';
describe('ContributorListComponent', () => {

let component: ContributorListComponent;
let injector: ReflectiveInjector;
let injector: Injector;
let contributorService: TestContributorService;
let locationService: TestLocationService;
let contributorGroups: ContributorGroup[];

beforeEach(() => {
injector = ReflectiveInjector.resolveAndCreate([
ContributorListComponent,
{provide: ContributorService, useClass: TestContributorService },
{provide: LocationService, useClass: TestLocationService }
]);

locationService = injector.get(LocationService);
contributorService = injector.get(ContributorService);
injector = Injector.create({
providers: [
{provide: ContributorListComponent, deps: [ContributorService, LocationService] },
{provide: ContributorService, useClass: TestContributorService, deps: [] },
{provide: LocationService, useClass: TestLocationService, deps: [] }
]
});

locationService = injector.get(LocationService) as unknown as TestLocationService;
contributorService = injector.get(ContributorService) as unknown as TestContributorService;
contributorGroups = contributorService.testContributors;
});

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReflectiveInjector } from '@angular/core';
import { Injector } from '@angular/core';

import { of } from 'rxjs';

Expand All @@ -12,20 +12,22 @@ import { Category } from './resource.model';
describe('ResourceListComponent', () => {

let component: ResourceListComponent;
let injector: ReflectiveInjector;
let injector: Injector;
let resourceService: TestResourceService;
let locationService: TestLocationService;
let categories: Category[];

beforeEach(() => {
injector = ReflectiveInjector.resolveAndCreate([
ResourceListComponent,
{provide: ResourceService, useClass: TestResourceService },
{provide: LocationService, useClass: TestLocationService }
]);

locationService = injector.get(LocationService);
resourceService = injector.get(ResourceService);
injector = Injector.create({
providers: [
{provide: ResourceListComponent, deps: [ResourceService, LocationService] },
{provide: ResourceService, useClass: TestResourceService, deps: [] },
{provide: LocationService, useClass: TestLocationService, deps: [] }
]
});

locationService = injector.get(LocationService) as unknown as TestLocationService;
resourceService = injector.get(ResourceService) as unknown as TestResourceService;
categories = resourceService.testCategories;
});

Expand Down
15 changes: 9 additions & 6 deletions aio/src/app/search/search.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ReflectiveInjector, NgZone } from '@angular/core';
import { Injector, NgZone } from '@angular/core';
import { fakeAsync, tick } from '@angular/core/testing';
import { of } from 'rxjs';
import { SearchService } from './search.service';
import { WebWorkerClient } from 'app/shared/web-worker';

describe('SearchService', () => {

let injector: ReflectiveInjector;
let injector: Injector;
let service: SearchService;
let sendMessageSpy: jasmine.Spy;
let mockWorker: WebWorkerClient;
Expand All @@ -16,10 +16,13 @@ describe('SearchService', () => {
mockWorker = { sendMessage: sendMessageSpy } as any;
spyOn(WebWorkerClient, 'create').and.returnValue(mockWorker);

injector = ReflectiveInjector.resolveAndCreate([
SearchService,
{ provide: NgZone, useFactory: () => new NgZone({ enableLongStackTrace: false }) }
]);
injector = Injector.create({
providers: [
{ provide: SearchService, deps: [NgZone]},
{ provide: NgZone, useFactory: () => new NgZone({ enableLongStackTrace: false }), deps: [] }
]
});

service = injector.get(SearchService);
});

Expand Down
12 changes: 6 additions & 6 deletions aio/src/app/shared/deployment.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReflectiveInjector } from '@angular/core';
import { Injector } from '@angular/core';
import { environment } from 'environments/environment';
import { LocationService } from 'app/shared/location.service';
import { MockLocationService } from 'testing/location.service';
Expand All @@ -15,7 +15,7 @@ describe('Deployment service', () => {
it('should get the mode from the `mode` query parameter if available', () => {
const injector = getInjector();

const locationService: MockLocationService = injector.get(LocationService);
const locationService = injector.get(LocationService) as unknown as MockLocationService;
locationService.search.and.returnValue({ mode: 'bar' });

const deployment = injector.get(Deployment);
Expand All @@ -25,8 +25,8 @@ describe('Deployment service', () => {
});

function getInjector() {
return ReflectiveInjector.resolveAndCreate([
Deployment,
{ provide: LocationService, useFactory: () => new MockLocationService('') }
]);
return Injector.create({providers: [
{ provide: Deployment, deps: [LocationService] },
{ provide: LocationService, useFactory: () => new MockLocationService(''), deps: [] }
]});
}
11 changes: 8 additions & 3 deletions aio/src/app/shared/ga.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,23 @@
import { ReflectiveInjector } from '@angular/core';
import { Injector } from '@angular/core';

import { GaService } from 'app/shared/ga.service';
import { WindowToken } from 'app/shared/window';

describe('GaService', () => {
let gaService: GaService;
let injector: ReflectiveInjector;
let injector: Injector;
let gaSpy: jasmine.Spy;
let mockWindow: any;

beforeEach(() => {
gaSpy = jasmine.createSpy('ga');
mockWindow = { ga: gaSpy };
injector = ReflectiveInjector.resolveAndCreate([GaService, { provide: WindowToken, useFactory: () => mockWindow }]);
injector = Injector.create({
providers: [
{ provide: GaService, deps: [WindowToken] },
{ provide: WindowToken, useFactory: () => mockWindow, deps: [] }
]});

gaService = injector.get(GaService);
});

Expand Down
36 changes: 19 additions & 17 deletions aio/src/app/shared/location.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReflectiveInjector } from '@angular/core';
import { Injector } from '@angular/core';
import { Location, LocationStrategy, PlatformLocation } from '@angular/common';
import { MockLocationStrategy } from '@angular/common/testing';
import { Subject } from 'rxjs';
Expand All @@ -9,26 +9,28 @@ import { LocationService } from './location.service';
import { ScrollService } from './scroll.service';

describe('LocationService', () => {
let injector: ReflectiveInjector;
let injector: Injector;
let location: MockLocationStrategy;
let service: LocationService;
let swUpdates: MockSwUpdatesService;
let scrollService: MockScrollService;

beforeEach(() => {
injector = ReflectiveInjector.resolveAndCreate([
LocationService,
Location,
{ provide: GaService, useClass: TestGaService },
{ provide: LocationStrategy, useClass: MockLocationStrategy },
{ provide: PlatformLocation, useClass: MockPlatformLocation },
{ provide: SwUpdatesService, useClass: MockSwUpdatesService },
{ provide: ScrollService, useClass: MockScrollService }
]);

location = injector.get(LocationStrategy);
service = injector.get(LocationService);
swUpdates = injector.get(SwUpdatesService);
injector = Injector.create({
providers: [
{ provide: LocationService, deps: [GaService, Location, ScrollService, PlatformLocation, SwUpdatesService] },
{ provide: Location, deps: [LocationStrategy, PlatformLocation] },
{ provide: GaService, useClass: TestGaService, deps: [] },
{ provide: LocationStrategy, useClass: MockLocationStrategy, deps: [] },
{ provide: PlatformLocation, useClass: MockPlatformLocation, deps: [] },
{ provide: SwUpdatesService, useClass: MockSwUpdatesService, deps: [] },
{ provide: ScrollService, useClass: MockScrollService, deps: [] }
]
});

location = injector.get(LocationStrategy) as unknown as MockLocationStrategy;
service = injector.get(LocationService);
swUpdates = injector.get(SwUpdatesService) as unknown as MockSwUpdatesService;
scrollService = injector.get(ScrollService);
});

Expand Down Expand Up @@ -380,7 +382,7 @@ describe('LocationService', () => {
let platformLocation: MockPlatformLocation;

beforeEach(() => {
platformLocation = injector.get(PlatformLocation);
platformLocation = injector.get(PlatformLocation) as unknown as MockPlatformLocation;
});

it('should call replaceState on PlatformLocation', () => {
Expand Down Expand Up @@ -577,7 +579,7 @@ describe('LocationService', () => {
let gaLocationChanged: jasmine.Spy;

beforeEach(() => {
const gaService = injector.get(GaService);
const gaService = injector.get(GaService) as unknown as TestGaService;
gaLocationChanged = gaService.locationChanged;
// execute currentPath observable so that gaLocationChanged is called
service.currentPath.subscribe();
Expand Down
10 changes: 5 additions & 5 deletions aio/src/app/shared/logger.service.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ErrorHandler, ReflectiveInjector } from '@angular/core';
import { ErrorHandler, Injector } from '@angular/core';
import { Logger } from './logger.service';

describe('logger service', () => {
Expand All @@ -10,10 +10,10 @@ describe('logger service', () => {
beforeEach(() => {
logSpy = spyOn(console, 'log');
warnSpy = spyOn(console, 'warn');
const injector = ReflectiveInjector.resolveAndCreate([
Logger,
{ provide: ErrorHandler, useClass: MockErrorHandler }
]);
const injector = Injector.create({providers: [
{ provide: Logger, deps: [ErrorHandler] },
{ provide: ErrorHandler, useClass: MockErrorHandler, deps: [] }
]});
logger = injector.get(Logger);
errorHandler = injector.get(ErrorHandler);
});
Expand Down
13 changes: 7 additions & 6 deletions aio/src/app/shared/reporting-error-handler.spec.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ErrorHandler, ReflectiveInjector } from '@angular/core';
import { ErrorHandler, Injector } from '@angular/core';
import { TestBed } from '@angular/core/testing';
import { WindowToken } from 'app/shared/window';
import { AppModule } from 'app/app.module';
Expand All @@ -14,11 +14,12 @@ describe('ReportingErrorHandler service', () => {
onerrorSpy = jasmine.createSpy('onerror');
superHandler = spyOn(ErrorHandler.prototype, 'handleError');

const injector = ReflectiveInjector.resolveAndCreate([
{ provide: ErrorHandler, useClass: ReportingErrorHandler },
{ provide: WindowToken, useFactory: () => ({ onerror: onerrorSpy }) }
]);
handler = injector.get(ErrorHandler);
const injector = Injector.create({providers: [
{ provide: ErrorHandler, useClass: ReportingErrorHandler, deps: [WindowToken] },
{ provide: WindowToken, useFactory: () => ({ onerror: onerrorSpy }), deps: [] }
]});

handler = injector.get(ErrorHandler) as unknown as ReportingErrorHandler;
});

it('should be registered on the AppModule', () => {
Expand Down
Loading