Skip to content

Update Firebase, make it a dep rather than peer #3159

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 47 commits into from
Mar 23, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
47 commits
Select commit Hold shift + click to select a range
ae9b97f
Update Firebase, make it a dep rather than peer
jamesdaniels Feb 14, 2022
34da69d
Drop firebase-tools 9 from the canary tests
jamesdaniels Feb 14, 2022
72d9ad4
Drop the skip for now, canary acting up
jamesdaniels Feb 14, 2022
71c3594
Only need build for now
jamesdaniels Feb 14, 2022
e6f1d64
Npx tsc
jamesdaniels Feb 14, 2022
4da1451
I meant wait on build...
jamesdaniels Feb 14, 2022
6fbecbc
Drop firebase and rxfire from peers installed in schematic
jamesdaniels Feb 15, 2022
88ced12
GCFv2
jamesdaniels Feb 15, 2022
dd63f0c
Deprecate firestore-bundles
jamesdaniels Feb 15, 2022
3d2b576
Upgrade firebase-admin
jamesdaniels Feb 15, 2022
f4dc302
Test ng-build prerender
jamesdaniels Feb 15, 2022
9707c9d
lockfile
jamesdaniels Feb 15, 2022
8d31d69
Ng cli
jamesdaniels Feb 15, 2022
8206916
Install ng 13 between 12 and next
jamesdaniels Feb 15, 2022
5386863
github actions fixes
jamesdaniels Feb 15, 2022
d0a177d
Fix ga
jamesdaniels Feb 15, 2022
2bf0699
Dropping ngx from the ng update
jamesdaniels Feb 15, 2022
e8b9c0c
Derp... windows, go back to ngx ng
jamesdaniels Feb 15, 2022
f9d039e
Bump
jamesdaniels Mar 18, 2022
04ab63e
Switch browser test defaults, always run in canary
jamesdaniels Mar 18, 2022
ce5e46e
Try/catch around delete
jamesdaniels Mar 21, 2022
bada006
Try to fix canary with a resolution, bump yarn timeouts
jamesdaniels Mar 21, 2022
00a5cfc
Npx @angular/cli
jamesdaniels Mar 21, 2022
ed13bf1
npx json, tweek database-types logic
jamesdaniels Mar 21, 2022
e4101ed
No frozen lockfile and interpolate better
jamesdaniels Mar 21, 2022
3657a2e
Jasmine tests werent running, whoops
jamesdaniels Mar 22, 2022
142716d
skipLibCheck on canary
jamesdaniels Mar 22, 2022
94a9ad1
Dropping node 12 from the matrix to save time/resources
jamesdaniels Mar 22, 2022
c4d9ecf
Compile jasmine entry
jamesdaniels Mar 22, 2022
4b0d329
Try forcing as commonjs
jamesdaniels Mar 22, 2022
edf7639
Split out node vs node-esm tests
jamesdaniels Mar 22, 2022
ac944e6
Zone.js is acting up for ESM, we can simplify for now
jamesdaniels Mar 22, 2022
7ce10a9
drop polyfill and skip esm test on rxjs 6
jamesdaniels Mar 22, 2022
930049c
Fix ng upgrade and better skipLibCheck
jamesdaniels Mar 22, 2022
9004a81
Add || true back to ng 13 test, skip storage.spec for the time being
jamesdaniels Mar 22, 2022
42f9925
Deleting the app is sound in theory but a mess in practice
jamesdaniels Mar 22, 2022
aa079d6
Analytics and compat analytics colliding, goOffline
jamesdaniels Mar 22, 2022
b80e226
Test node-only in windows contribute
jamesdaniels Mar 22, 2022
707741c
ng 13 upgrade gets weird sometimes
jamesdaniels Mar 22, 2022
1252925
Make sure the emulators are always running the latest
jamesdaniels Mar 22, 2022
8367342
Run but allow failure on windows
jamesdaniels Mar 22, 2022
5302add
Consolidate
jamesdaniels Mar 22, 2022
9e2f610
The upgrade issues are isolated to windows, continue-on-error there
jamesdaniels Mar 22, 2022
42309f2
same for ng-build
jamesdaniels Mar 22, 2022
60a12cc
Test notify
jamesdaniels Mar 22, 2022
7189938
Runs-on
jamesdaniels Mar 22, 2022
2091c0e
Changelog, drop old tests
jamesdaniels Mar 23, 2022
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
119 changes: 103 additions & 16 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
if: steps.node_modules_cache.outputs.cache-hit != 'true'
run: |
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
yarn config set network-timeout 300000
yarn config set yarn-offline-mirror-pruning true
yarn install --frozen-lockfile --prefer-offline
- name: Build
Expand All @@ -67,9 +68,9 @@ jobs:
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
node: ["12", "14", "16"]
node: [ "14", "16"]
firebase: ["9"]
firebaseTools: ["9", "10"]
firebaseTools: ["10"]
rxjs: ["6", "7"]
ng: ["12", "13"]
exclude:
Expand Down Expand Up @@ -110,6 +111,7 @@ jobs:
- name: Configure yarn
run: |
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
yarn config set network-timeout 300000
yarn config set ignore-engines true
- name: Yarn install
if: steps.node_modules_cache.outputs.cache-hit != 'true'
Expand All @@ -119,7 +121,15 @@ jobs:
yarn add firebase@${{ matrix.firebase }}
yarn add firebase-tools@${{ matrix.firebaseTools }}
yarn add rxjs@${{ matrix.rxjs }} --prefer-offline
npx ng update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force || true
# Can't update more than one major at a times, take the incremental step
- name: Update to ng@13
run: npx @angular/cli@13 update @angular/core@13 @angular/cli@13 --allow-dirty --force
if: matrix.ng == '14' || matrix.ng == 'next'
continue-on-error: ${{ matrix.os == 'windows-latest' }}
- name: Update to ng@${{ matrix.ng }}
run: npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force
if: matrix.ng != '12'
continue-on-error: ${{ matrix.os == 'windows-latest' }}
- name: Firebase emulator cache
uses: actions/cache@v2
with:
Expand All @@ -129,25 +139,53 @@ jobs:
uses: actions/download-artifact@v2
- name: Relocate Artifacts
run: mv angularfire-${{ github.run_id }} dist
- name: Test node
- name: Test Node (CJS)
run: |
yarn build:jasmine
yarn test:node
if: matrix.ng == '12'
- name: Test Node (ESM)
run: |
yarn build:jasmine
yarn test:node-esm
if: matrix.ng != '12' && matrix.rxjs == '7'
- name: Test browser
if: matrix.os == 'ubuntu-latest' && matrix.node == '14' && matrix.firebaseTools == '9'
if: matrix.os == 'ubuntu-latest' && matrix.node == '14' && matrix.firebaseTools == '10'
run: yarn test:chrome-headless
- name: ng-build yarn install
run: |
cd ./test/ng-build
yarn --prefer-offline
yarn add firebase@${{ matrix.firebase }}
- name: Update ng-build to ng@13
run: |
cd ./test/ng-build
npx @angular/cli@13 update @angular/core@13 @angular/cli@13 @nguniversal/express-engine@13 --allow-dirty --force
if: matrix.ng == '14' || matrix.ng == 'next'
continue-on-error: ${{ matrix.os == 'windows-latest' }}
- name: Update ng-build to ng@${{ matrix.ng }}
run: |
cd ./test/ng-build
npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} @nguniversal/express-engine@${{ matrix.ng }} --allow-dirty --force
if: matrix.ng != '12'
continue-on-error: ${{ matrix.os == 'windows-latest' }}
- name: ng-build prerender
run: |
cd ./test/ng-build
yarn prerender

# TODO dry up
canary:
runs-on: ${{ matrix.os }}
if: ${{ github.ref == 'refs/heads/master' }}
needs: [ 'build', 'test' ]
# if: ${{ github.ref == 'refs/heads/master' }}
# needs: [ 'build', 'test' ]
needs: [ 'build' ]
strategy:
matrix:
os: [ ubuntu-latest ]
node: ["14"]
firebase: ["9", "canary", "next"]
firebaseTools: ["9", "10"]
firebaseTools: ["10"]
rxjs: ["7"]
ng: ["12", "13", "next"]
exclude:
Expand Down Expand Up @@ -187,6 +225,7 @@ jobs:
- name: Configure yarn
run: |
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
yarn config set network-timeout 300000
yarn config set ignore-engines true
- name: Yarn install
if: steps.node_modules_cache.outputs.cache-hit != 'true'
Expand All @@ -196,7 +235,13 @@ jobs:
yarn add firebase@${{ matrix.firebase }}
yarn add firebase-tools@${{ matrix.firebaseTools }}
yarn add rxjs@${{ matrix.rxjs }} --prefer-offline
npx ng update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force || true
# Can't update more than one major at a times, take the incremental step
- name: Update to ng@13
run: npx @angular/cli@13 update @angular/core@13 @angular/cli@13 --allow-dirty --force
if: matrix.ng == '14' || matrix.ng == 'next'
- name: Update to ng@${{ matrix.ng }}
run: npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} --allow-dirty --force
if: matrix.ng != '12'
- name: Firebase emulator cache
uses: actions/cache@v2
with:
Expand All @@ -206,21 +251,51 @@ jobs:
uses: actions/download-artifact@v2
- name: Relocate Artifacts
run: mv angularfire-${{ github.run_id }} dist
- name: Test node
- name: Test Node (CJS)
run: |
yarn build:jasmine
yarn test:node
if: matrix.ng == '12'
- name: Test Node (ESM)
run: |
yarn build:jasmine
yarn test:node-esm
if: matrix.ng != '12'
- name: Test browser
if: matrix.os == 'ubuntu-latest' && matrix.node == '14' && matrix.firebaseTools == '9'
run: yarn test:chrome-headless
- name: ng-build yarn install
run: |
cd ./test/ng-build
yarn --prefer-offline
yarn add firebase@${{ matrix.firebase }}
# on @canary firebase-admin and firebase database-types conflict, skip the lib check for now
- name: ng-build skipLibCheck
run: |
cd ./test/ng-build
sed -i 's/"skipLibCheck": false,/"skipLibCheck": true,/g' tsconfig.json
if: matrix.firebase == 'canary'
- name: Update ng-build to ng@13
run: |
cd ./test/ng-build
npx @angular/cli@13 update @angular/core@13 @angular/cli@13 @nguniversal/express-engine@13 --allow-dirty --force
if: matrix.ng == 'next'
- name: Update ng-build to ng@${{ matrix.ng }}
run: |
cd ./test/ng-build
npx @angular/cli@${{ matrix.ng }} update @angular/core@${{ matrix.ng }} @angular/cli@${{ matrix.ng }} @nguniversal/express-engine@${{ matrix.ng }} --allow-dirty --force
if: matrix.ng != '12'
- name: ng-build prerender
run: |
cd ./test/ng-build
yarn prerender

contribute:
runs-on: ${{ matrix.os }}
name: Contribute ${{ matrix.os }} on Node.js ${{ matrix.node }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
node: ["12", "14", "16"]
node: ["14", "16"]
exclude:
# we build with this combination, safely skip
- os: ubuntu-latest
Expand Down Expand Up @@ -257,14 +332,18 @@ jobs:
if: steps.node_modules_cache.outputs.cache-hit != 'true'
run: |
yarn config set yarn-offline-mirror ~/.npm-packages-offline-cache
yarn config set network-timeout 300000
yarn config set ignore-engines true
yarn install --frozen-lockfile --prefer-offline
- name: Build
run: yarn build
- name: Test
# TODO figure out why tests are flaking
continue-on-error: true
run: yarn test
- name: Test Node
run: |
npm run build:jasmine
npm run test:node
- name: Test headless
run: yarn test:chrome-headless
continue-on-error: ${{ matrix.os == 'windows-latest' }}

# Break the branch protection test into a seperate step, so we can manage the matrix more easily
test_and_contribute:
Expand Down Expand Up @@ -294,3 +373,11 @@ jobs:
./publish.sh
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

notify:
runs-on: ubuntu-latest
name: Notify
needs: ['build', 'test', 'contribute', 'canary']
if: always()
steps:
- run: echo ${{ github.run_id }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,5 @@ angularfire.tgz
unpack.sh
publish.sh
.firebase
.angular
.vscode
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
<a name="7.3.0"></a>
# [7.3.0](https://github.com/angular/angularfire/compare/7.2.1...7.3.0) (2022-03-23)

### Features

* **storage:** adding wrappers for getBlob, getBytes, and getStream ([#3159](https://github.com/angular/angularfire/pull/3159))

### Misc.

* **core:** update firebase dependency ([#3159](https://github.com/angular/angularfire/pull/3159))
* **core:** mark firebase-tools 10 as compatible ([#3159](https://github.com/angular/angularfire/pull/3159))
* **firestore-protos:** no longer needed ([#3159](https://github.com/angular/angularfire/pull/3159))

<a name="7.2.1"></a>
# [7.2.1](https://github.com/angular/angularfire/compare/7.2.0...7.2.1) (2022-02-10)

Expand Down
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,23 +1,24 @@
{
"name": "@angular/fire",
"version": "7.2.1",
"version": "7.3.0",
"description": "The official Angular library for Firebase.",
"private": true,
"scripts": {
"test": "npm run build:jasmine && npm run test:node && npm run test:chrome-headless",
"test:watch": "firebase emulators:exec --project=angularfire2-test \"ng test --watch=true --browsers=Chrome\"",
"test:chrome": "firebase emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=Chrome\"",
"test:firefox": "firebase emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=Firefox\"",
"test:safari": "firebase emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=SafariNative\"",
"test:chrome-headless": "firebase emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=ChromeHeadless\"",
"test:firefox-headless": "firebase emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=FirefoxHeadless\"",
"test:watch": "npx firebase-tools@latest emulators:exec --project=angularfire2-test \"ng test --watch=true --browsers=Chrome\"",
"test:chrome": "npx firebase-tools@latest emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=Chrome\"",
"test:firefox": "npx firebase-tools@latest emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=Firefox\"",
"test:safari": "npx firebase-tools@latest emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=SafariNative\"",
"test:chrome-headless": "npx firebase-tools@latest emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=ChromeHeadless\"",
"test:firefox-headless": "npx firebase-tools@latest emulators:exec --project=angularfire2-test \"ng test --watch=false --browsers=FirefoxHeadless\"",
"lint": "ng lint",
"test:node": "node -r tsconfig-paths/register ./tools/load-jasmine.js",
"test:node": "node -r tsconfig-paths/register ./dist/out-tsc/jasmine/tools/jasmine.js --input-type=commonjs",
"test:node-esm": "node -r tsconfig-paths/register ./dist/out-tsc/jasmine/tools/jasmine.mjs --input-type=commonjs",
"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": "rimraf dist && ttsc -p tsconfig.build.json && node --trace-warnings ./tools/build.js && npm pack ./dist/packages-dist",
"build:jasmine": "tsc -p tsconfig.jasmine.json && cp ./dist/packages-dist/schematics/versions.json ./dist/out-tsc/jasmine/schematics",
"build:jasmine": "npx tsc -p tsconfig.jasmine.json --module es2015 && cp ./dist/out-tsc/jasmine/tools/jasmine.js ./dist/out-tsc/jasmine/tools/jasmine.mjs && npx tsc -p tsconfig.jasmine.json && cp ./dist/packages-dist/schematics/versions.json ./dist/out-tsc/jasmine/schematics",
"changelog": "conventional-changelog -p angular -i CHANGELOG.md -s -r 1"
},
"husky": {
Expand Down Expand Up @@ -53,7 +54,7 @@
"@angular/platform-browser-dynamic": "^12.0.0",
"@angular/router": "^12.0.0",
"@schematics/angular": "^12.0.0",
"firebase": "^9.4.0",
"firebase": "^9.6.9",
"firebase-admin": "^9.11.1",
"firebase-functions": "^3.6.0",
"firebase-tools": "^9.0.0",
Expand Down
7 changes: 3 additions & 4 deletions samples/advanced/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 0 additions & 2 deletions samples/advanced/server.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading