Skip to content

AngularFire version 6 #2282

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 38 commits into from
Jan 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
4723972
First.
jamesdaniels Jun 20, 2019
7718780
Simplified build script
jamesdaniels Jun 21, 2019
287cee1
Wrapper data-dep index.d.ts was bad
jamesdaniels Jun 21, 2019
d274b36
Build.ts arg types
jamesdaniels Jun 21, 2019
c2a8972
Zap the old releasing file
jamesdaniels Jun 21, 2019
e31d8df
Getting testing working locally
jamesdaniels Jun 21, 2019
f075296
Linting
jamesdaniels Jun 21, 2019
a7a054a
Travis runner
jamesdaniels Jun 21, 2019
4ffb550
ChromeHeadless
jamesdaniels Jun 21, 2019
7d50f50
Clean up, call NG build rather than do so ourselves. Preserve output …
jamesdaniels Jun 21, 2019
a351b11
More cleanup, node tests
jamesdaniels Jun 22, 2019
7449d04
Test all
jamesdaniels Jun 22, 2019
c995642
Adding the Firestore specific project config back in
jamesdaniels Jun 26, 2019
06f171b
Anys on the specs, to tsc doesn't fail
jamesdaniels Jun 26, 2019
5ab4f64
Ditch hardcoded paths in build and fix up ng-add package.json stuff
jamesdaniels Jun 27, 2019
ce7412c
Putting together tests using the emulator
jamesdaniels Jul 14, 2019
8320416
First.
jamesdaniels Jan 8, 2020
b992309
Merged packagr
jamesdaniels Jan 8, 2020
aa8550a
Updating the tests
jamesdaniels Jan 9, 2020
349756e
Getting emulators wired up
jamesdaniels Jan 9, 2020
40bb84d
Drop the side-effect imports
jamesdaniels Jan 14, 2020
843c78e
Updating things
jamesdaniels Jan 14, 2020
cbc15e7
Bumping more things
jamesdaniels Jan 15, 2020
4c79567
Fixing AuthGuard
jamesdaniels Jan 15, 2020
ceb9a5c
Tests
jamesdaniels Jan 15, 2020
0acd89c
Docs and more
jamesdaniels Jan 16, 2020
3b79df8
Updating ng9 test
jamesdaniels Jan 16, 2020
91b4e94
Merged master and working on specs (#2298)
jamesdaniels Jan 28, 2020
c3b2f62
Auth, fix callback => observable shorthand
jamesdaniels Jan 28, 2020
054b7f1
Dropping the wrapper from the build script
jamesdaniels Jan 29, 2020
ce9487c
Merge branch 'master' into version_6_initial
jamesdaniels Jan 29, 2020
9a671d5
Drop wrong registerVersion again (merge stuffs)
jamesdaniels Jan 29, 2020
4a74efe
Updating the schematic builder
jamesdaniels Jan 29, 2020
eafa16e
Updating the schematic for the list depreciation
jamesdaniels Jan 29, 2020
b89a98c
Getting tests green and `providedIn: "any"`
jamesdaniels Jan 30, 2020
58cc382
Dropping firebase-node, database-depreciated, and the wrapper
jamesdaniels Jan 30, 2020
ad00106
drop test:universal for now and fix auth-guard
jamesdaniels Jan 30, 2020
74369e3
Make the auth guard pure
jamesdaniels Jan 30, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
5 changes: 5 additions & 0 deletions .firebaserc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"projects": {
"default": "angularfire2-test"
}
}
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,8 @@ angularfire2-*.tgz
yarn-error.log
*.bak
package-lock.json
test/ng-build/**/yarn.lock
test/ng-build/**/yarn.lock
tools/build.js
coverage
*.log
api-*.json
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
*.spec.*
bundles/test.umd.js
test-config.*
1 change: 1 addition & 0 deletions .nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
lts/*
8 changes: 1 addition & 7 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,4 @@ install:
fi
fi

script:
- yarn build
- |
./node_modules/.bin/karma start --single-run --browsers ChromeHeadlessTravis --reporters mocha &&
yarn test:node &&
node tools/run-typings-test.js &&
bash ./test/ng-build/build.sh
script: yarn build && yarn test:all
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@

[![Build Status](https://travis-ci.org/angular/angularfire.svg?branch=master)](https://travis-ci.org/angular/angularfire) [![Join the chat at https://gitter.im/angular/angularfire2](https://badges.gitter.im/angular/angularfire2.svg)](https://gitter.im/angular/angularfire2?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

---

> **WARNING**: Master branch is the work in progress for version 6 of AngularFire. [You can find version 5 here](https://github.com/angular/angularfire/tree/v5), if you're looking for documentation or to contribute to stable. [Learn more about the road toward version 6 here](https://github.com/angular/angularfire/issues/2267).

---

## What is AngularFire?

- **Observable based** - Use the power of RxJS, Angular, and Firebase.
Expand Down
42 changes: 42 additions & 0 deletions angular.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
"$schema": "./node_modules/@angular/cli/lib/config/schema.json",
"version": 1,
"newProjectRoot": ".",
"projects": {
"angularfire": {
"projectType": "library",
"root": "src",
"sourceRoot": "src",
"prefix": "angularfire",
"architect": {
"build": {
"builder": "@angular-devkit/build-ng-packagr:build",
"options": {
"tsConfig": "tsconfig.json",
"project": "src/package.json"
}
},
"test": {
"builder": "@angular-devkit/build-angular:karma",
"options": {
"main": "src/test.ts",
"tsConfig": "tsconfig.spec.json",
"karmaConfig": "karma.conf.js"
}
},
"lint": {
"builder": "@angular-devkit/build-angular:tslint",
"options": {
"tsConfig": [
"tsconfig.json",
"tsconfig.spec.json"
],
"exclude": [
"**/node_modules/**"
]
}
}
}
}},
"defaultProject": "angularfire"
}
6 changes: 0 additions & 6 deletions angularfire2.ts

This file was deleted.

4 changes: 2 additions & 2 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# See go/angularfire-releasing for details on the AngularFire release process.
# If you need to trigger a release manually, be sure to use substitutions like so:
# @canary `gcloud builds submit --substitutions=SHORT_SHA="9b0a0b0"`
# @next `gcloud builds submit --substitutions=TAG_NAME="v1.2.3-rc.1"`
# @latest `gcloud builds submit --substitutions=TAG_NAME="v1.2.3"`
# @next `gcloud builds submit --substitutions=TAG_NAME="1.2.3-rc.1"`
# @latest `gcloud builds submit --substitutions=TAG_NAME="1.2.3"`
steps:
- name: node:lts
entrypoint: bash
Expand Down
12 changes: 12 additions & 0 deletions firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"database": {
"rules": "test/database.rules.json"
},
"firestore": {
"rules": "test/firestore.rules",
"indexes": "test/firestore.indexes.json"
},
"storage": {
"rules": "test/storage.rules"
}
}
8 changes: 0 additions & 8 deletions karma-test-shim.js

This file was deleted.

80 changes: 22 additions & 58 deletions karma.conf.js
Original file line number Diff line number Diff line change
@@ -1,73 +1,37 @@
// Karma configuration
module.exports = function(config) {
// Karma configuration file, see link for more information
// https://karma-runner.github.io/1.0/config/configuration-file.html
module.exports = function (config) {
config.set({

basePath: '',

frameworks: ['jasmine'],

files: [
// Polyfills.
'node_modules/es6-shim/es6-shim.js',

'node_modules/reflect-metadata/Reflect.js',

// Zone.js dependencies
'node_modules/zone.js/dist/zone.js',
'node_modules/zone.js/dist/proxy.js',
'node_modules/zone.js/dist/sync-test.js',
'node_modules/zone.js/dist/jasmine-patch.js',
'node_modules/zone.js/dist/async-test.js',
'node_modules/zone.js/dist/fake-async-test.js',
'node_modules/zone.js/dist/task-tracking.js',

'node_modules/rxjs/bundles/rxjs.umd.{js,map}',

...getAngularFiles(['core','common','compiler','platform-browser','platform-browser-dynamic']),

'karma-test-shim.js',
'node_modules/firebase/firebase-app.js',
'node_modules/firebase/firebase-auth.js',
'node_modules/firebase/firebase-database.js',
'node_modules/firebase/firebase-firestore.js',
'node_modules/firebase/firebase-functions.js',
'node_modules/firebase/firebase-performance.js',
'node_modules/firebase/firebase-storage.js',
'dist/packages-dist/bundles/core.umd.{js,map}',
'dist/packages-dist/bundles/auth.umd.{js,map}',
'dist/packages-dist/bundles/analytics.umd.{js,map}',
'dist/packages-dist/bundles/auth-guard.umd.{js,map}',
'dist/packages-dist/bundles/database.umd.{js,map}',
'dist/packages-dist/bundles/firestore.umd.{js,map}',
'dist/packages-dist/bundles/functions.umd.{js,map}',
'dist/packages-dist/bundles/messaging.umd.{js,map}',
'dist/packages-dist/bundles/remote-config.umd.{js,map}',
'dist/packages-dist/bundles/storage.umd.{js,map}',
'dist/packages-dist/bundles/performance.umd.{js,map}',
'dist/packages-dist/bundles/database-deprecated.umd.{js,map}',
'dist/packages-dist/bundles/test.umd.{js,map}',
frameworks: ['jasmine', '@angular-devkit/build-angular'],
plugins: [
require('karma-jasmine'),
require('karma-chrome-launcher'),
require('karma-jasmine-html-reporter'),
require('karma-coverage-istanbul-reporter'),
require('@angular-devkit/build-angular/plugins/karma')
],

client: {
clearContext: false // leave Jasmine Spec Runner output visible in browser
},
coverageIstanbulReporter: {
dir: `${process.cwd()}/coverage`,
reports: ['html', 'lcovonly'],
fixWebpackSourcePaths: true
},
reporters: ['progress', 'kjhtml'],
port: 9876,
colors: true,
logLevel: config.LOG_INFO,
autoWatch: true,
reporters: ['mocha'],
browsers: ['ChromeHeadless'],
browsers: ['Chrome', 'ChromeHeadless'],
singleRun: false,
restartOnFileChange: true,
customLaunchers: {
ChromeHeadlessTravis: {
base: 'ChromeHeadless',
flags: ['--no-sandbox']
}
},
})
});
};

function getAngularFiles(packages) {
return packages.reduce((files, pkg) => {
files.push(`node_modules/@angular/${pkg}/bundles/${pkg}.umd.js`);
files.push(`node_modules/@angular/${pkg}/bundles/${pkg}-testing.umd.js`);
return files;
}, []);
}
110 changes: 57 additions & 53 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
{
"name": "@angular/fire",
"version": "5.3.0",
"version": "6.0.0",
"description": "The official library of Firebase and Angular.",
"private": true,
"scripts": {
"test": "npm run build && karma start --single-run && npm run test:node",
"test:node": "jasmine 'dist/packages-dist/schematics/**/*[sS]pec.js'",
"test:watch": "concurrently \"npm run build:watch\" \"npm run delayed_karma\"",
"test:debug": "npm run build && karma start",
"karma": "karma start",
"test:universal": "npm run build && cd test/universal-test && yarn && npm run prerender",
"delayed_karma": "sleep 10 && karma start",
"build": "rimraf dist && node tools/build.js && npm pack ./dist/packages-dist",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1",
"build:wrapper": "npm i --prefix wrapper && npm run --prefix wrapper build && npm pack ./dist/wrapper-dist"
"test": "npm run test:node",
"test:watch": "npx firebase emulators:exec --project=angularfire2-test \"npx ng test --watch=true --browsers=Chrome\"",
"test:chrome": "npx firebase emulators:exec --project=angularfire2-test \"npx ng test --watch=false --browsers=Chrome\"",
"test:chrome-headless": "npx firebase emulators:exec --project=angularfire2-test \"npx ng test --watch=false --browsers=ChromeHeadless\"",
"lint": "npx ng lint",
"test:node": "npx tsc -p tsconfig.jasmine.json; cp ./dist/packages-dist/schematics/versions.json ./dist/out-tsc/jasmine/schematics && npx firebase emulators:exec --project=angularfire2-test \"node -r tsconfig-paths/register ./tools/jasmine.js\"",
"test:typings": "node ./tools/run-typings-test.js",
"test:build": "bash ./test/ng-build/build.sh",
"test:all": "npm run test:node && npm run test:chrome-headless && npm run test:typings && npm run test:build",
"build": "tsc tools/build.ts; node ./tools/build.js",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1"
},
"schematics": "./dist/packages-dist/collection.json",
"builders": "./dist/packages-dist/builders.json",
Expand All @@ -33,70 +34,73 @@
},
"homepage": "https://github.com/angular/angularfire2#readme",
"dependencies": {
"@angular-devkit/architect": "<0.900 || ^0.900.0-0 || ^9.0.0-0",
"@angular-devkit/core": ">=6.0.0 <9 || ^9.0.0-0",
"@angular-devkit/schematics": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/common": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/compiler": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/core": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/platform-browser": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/platform-browser-dynamic": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/router": ">=6.0.0 <9 || ^9.0.0-0",
"firebase": ">= 5.5.7 <8",
"firebase-tools": "^6.10.0",
"@angular-devkit/architect": "^0.900.0-0 || ^0.900.0",
"@angular-devkit/core": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"@angular-devkit/schematics": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"@angular/common": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"@angular/compiler": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"@angular/core": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"@angular/platform-browser": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"@angular/platform-browser-dynamic": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"@angular/router": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"firebase": "^7.6.2",
"firebase-tools": "^7.11.0",
"fuzzy": "^0.1.3",
"inquirer": "^6.2.2",
"inquirer-autocomplete-prompt": "^1.0.1",
"rxjs": "^6.0.0",
"ws": "^3.3.2",
"rxfire": "^3.9.7",
"rxjs": "^6.5.3",
"tslib": "^1.10.0",
"ws": "^7.2.1",
"xhr2": "^0.1.4",
"zone.js": "^0.8.0 || ^0.9.0"
"zone.js": "~0.10.2"
},
"optionalDependencies": {
"bufferutil": "~3.0.0",
"utf-8-validate": "~4.0.0"
"bufferutil": "^4.0.1",
"utf-8-validate": "^5.0.2"
},
"devDependencies": {
"@angular/animations": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/compiler-cli": ">=6.0.0 <9 || ^9.0.0-0",
"@angular/platform-server": ">=6.0.0 <9 || ^9.0.0-0",
"@angular-devkit/build-angular": "^0.900.0-0 || ^0.900.0",
"@angular-devkit/build-ng-packagr": "^0.900.0-0 || ^0.900.0",
"@angular/animations": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"@angular/cli": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"@angular/compiler-cli": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"@angular/platform-server": "^9.0.0-0 || ^9.0.0 || ^10.0.0-0",
"@types/fs-extra": "^7.0.0",
"@types/gzip-size": "^5.1.1",
"@types/inquirer": "^0.0.44",
"@types/jasmine": "^2.5.36",
"@types/jasmine": "^3.3.13",
"@types/node": "^12.6.2",
"@types/request": "0.0.30",
"codelyzer": "^5.0.0",
"concurrently": "^2.2.0",
"conventional-changelog-cli": "^1.2.0",
"es6-module-loader": "^0.17.10",
"es6-shim": "^0.35.0",
"fs-extra": "^4.0.0",
"gulp": "^3.9.0",
"gulp-jasmine": "^2.2.1",
"gulp-typescript": "^2.10.0",
"gzip-size": "^4.0.0",
"http-server": "^0.8.5",
"jasmine": "^2.4.1",
"jasmine-core": "^2.4.1",
"json": "^9.0.3",
"karma": "^2.0.0",
"fs-extra": "^8.0.1",
"gzip-size": "^5.1.1",
"jasmine": "^3.4.0",
"jasmine-core": "^3.4.0",
"karma": "^4.1.0",
"karma-chrome-launcher": "^2.2.0",
"karma-firefox-launcher": "^1.1.0",
"karma-jasmine": "^0.3.6",
"karma-mocha-reporter": "^2.0.2",
"karma-systemjs": "^0.10.0",
"karma-coverage-istanbul-reporter": "^2.0.5",
"karma-jasmine": "^2.0.1",
"karma-jasmine-html-reporter": "^1.4.2",
"ncp": "^2.0.0",
"parse5": "^1.3.2",
"ng-packagr": "^9.0.0-0 || ^9.0.0",
"pretty-size": "^2.0.0",
"protractor": "3.0.0",
"reflect-metadata": "0.1.2",
"replace-in-file": "^5.0.2",
"rimraf": "^2.5.4",
"rollup": "^0.64.1",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-watch": "^4.3.1",
"schematics-utilities": "^1.1.1",
"schematics-utilities": "^2.0.1",
"shelljs": "^0.8.0",
"systemjs": "^0.19.16",
"systemjs-builder": "^0.15.7",
"traceur": "0.0.96",
"typescript": ">=3.4.0 <3.5.0"
"tsconfig-paths": "^3.8.0",
"tsickle": "^0.35.0",
"tslint": "^5.17.0",
"typedoc": "^0.16.4",
"typescript": "~3.6.4"
},
"typings": "index.d.ts"
}
10 changes: 0 additions & 10 deletions publish.sh

This file was deleted.

Loading