Skip to content

Commit 97111c7

Browse files
Merge pull request #21 from angular/master
Update upstream
2 parents e3f9614 + 286f464 commit 97111c7

File tree

5 files changed

+24
-28
lines changed

5 files changed

+24
-28
lines changed

.travis.yml

Lines changed: 12 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,23 @@ node_js:
55

66
addons:
77
chrome: stable
8-
apt:
9-
sources:
10-
- ubuntu-toolchain-r-test
11-
packages:
12-
- g++-4.8
138

14-
cache: npm
9+
cache:
10+
yarn: true
11+
directories:
12+
- node_modules
13+
- "$HOME/.npm"
14+
- "$HOME/.cache"
1515

16-
env:
17-
- CXX=g++-4.8
16+
branches:
17+
only:
18+
- master # otherwise pull requests get built twice
1819

1920
install:
20-
# ditched yarn, since it was acting up and giving old versions of tsc
21-
- npm install
22-
23-
before_script:
24-
- export DISPLAY=:99.0
25-
- sh -e /etc/init.d/xvfb start
21+
- yarn install
2622

2723
script:
28-
- npm run build
29-
- ./node_modules/.bin/karma start --single-run --browsers Firefox --reporters mocha
24+
- yarn run build
25+
- ./node_modules/.bin/karma start --single-run --browsers ChromeHeadlessTravis --reporters mocha
3026
# Run integration test to make sure our typings are correct for user-land.
3127
- node tools/run-typings-test.js
32-
33-
notifications:
34-
webhooks:
35-
on_success: always # options: [always|never|change] default: always
36-
on_failure: always # options: [always|never|change] default: always
37-
on_start: false # default: false

PULL_REQUEST_TEMPLATE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ before sending PRs. We cannot accept code without this.
2525
- Issue number for this PR: #nnn (required)
2626
- Docs included?: (yes/no; required for all API/functional changes)
2727
- Test units included?: (yes/no; required)
28-
- In a clean directory, `npm install`, `npm run build`, and `npm test` run successfully? (yes/no; required)
28+
- In a clean directory, `yarn install`, `yarn test` run successfully? (yes/no; required)
2929

3030
### Description
3131

karma.conf.js

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,14 @@ module.exports = function(config) {
4141
logLevel: config.LOG_INFO,
4242
autoWatch: true,
4343
reporters: ['mocha'],
44-
browsers: ['Firefox'],
45-
singleRun: false
44+
browsers: ['ChromeHeadless'],
45+
singleRun: false,
46+
customLaunchers: {
47+
ChromeHeadlessTravis: {
48+
base: 'ChromeHeadless',
49+
flags: ['--no-sandbox']
50+
}
51+
},
4652
})
4753
};
4854

src/firestore/document/document.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,9 @@ export class AngularFirestoreDocument<T> {
8989
/**
9090
* Listen to unwrapped snapshot updates from the document.
9191
*/
92-
valueChanges(): Observable<T> {
92+
valueChanges(): Observable<T|null> {
9393
return this.snapshotChanges().map(action => {
94-
return (action.payload.exists ? action.payload.data() : null) as T;
94+
return action.payload.exists ? action.payload.data() as T : null;
9595
});
9696
}
9797
}

tools/run-typings-test.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ ncp(pathToTestSrcFolder, pathToTestFolder, () => {
3535
.replace('{{TYPESCRIPT_VERSION}}', rootPackage.devDependencies.typescript)
3636
.replace(/\{\{ANGULAR_VERSION\}\}/g, rootPackage.dependencies['@angular/core']));
3737

38-
spawnIt('npm', ['install'])
38+
spawnIt('yarn', ['install'])
3939
.then(_ => spawnIt(`${pathToTestFolder}/node_modules/.bin/tsc`, ['--version']))
4040
.then(_ => new Promise((res, rej) => {
4141
child_process.exec(`${pathToTestFolder}/node_modules/.bin/tsc --diagnostics -p ${pathToTestFolder}/tsconfig-test.json`, (err, stdout, stderr) => {

0 commit comments

Comments
 (0)