Skip to content

Commit

Permalink
v0.12.0 (#255)
Browse files Browse the repository at this point in the history
* feat(query): support `collectionGroup` for listeners - #264  - @rscotten
* fix(query): use correct value in snapshot cache - #258 - @illuminist
* feat(query): support `storeAs` property in `populates` objects in queries - #261  - @jfrumar-infinitusai 
* chore(deps): update immer from 3.2.0 to v5.0.0
* chore(deps): update dev dependencies including babel, eslint and crossenv
* chore(ci): switch from TravisCI to Github Actions
* chore(deps): switch to yarn in place of npm

Co-authored-by: jfrumar-infinitusai <[email protected]>
Co-authored-by: Richard Scotten <[email protected]>
Co-authored-by: illuminist <[email protected]>
  • Loading branch information
4 people authored Feb 3, 2020
1 parent b6e2851 commit a0bab1f
Show file tree
Hide file tree
Showing 27 changed files with 7,683 additions and 11,405 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: NPM Package Publish

on:
push:
branches:
- master
- next

jobs:
publish-npm:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1

- name: Check package version
uses: technote-space/package-version-check-action@v1
with:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12
registry-url: https://registry.npmjs.org/

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}

- name: Install Dependencies
env:
CI: true
run: yarn install --frozen-lockfile

- name: Run Unit Tests + Coverage
env:
CI: true
CODE_CLIMATE: ${{ secrets.CODE_CLIMATE }}
run: yarn test:cov && yarn codecov

- name: Upload Coverage
if: success()
env:
CI: true
CODE_COV: ${{ secrets.CODE_COV }}
# Upload to Code Cover. Curl used in place of codecov/codecov-action
# due to long build time. See https://github.com/codecov/codecov-action/issues/21
run: curl -s https://codecov.io/bash | bash -s -- -t $CODE_COV

- name: Publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish $(if [ ${{github.ref}} == 'refs/heads/next' ]; then echo '--tag next';fi;)

- name: Archive Build Artifact
uses: actions/upload-artifact@master
if: success()
with:
name: build
path: lib
47 changes: 47 additions & 0 deletions .github/workflows/verify.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Verify

on: [pull_request]

jobs:
build:
name: Build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v1

- name: Setup Node
uses: actions/setup-node@v1
with:
node-version: 12

- name: Get yarn cache
id: yarn-cache
run: echo "::set-output name=dir::$(yarn cache dir)"

# Setup dependency caching
- uses: actions/cache@v1
with:
path: ${{ steps.yarn-cache.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}

- name: Install Dependencies
env:
CI: true
run: yarn install --frozen-lockfile

- name: Run Build
run: yarn build

- name: Run Unit Tests + Coverage
if: success()
run: yarn test:cov

- name: Upload Coverage
if: success()
env:
CI: true
CODE_COV: ${{ secrets.CODE_COV }}
# Upload to codecov.io. Curl used in place of codecov/codecov-action
# due to long build time. See https://github.com/codecov/codecov-action/issues/21
run: curl -s https://codecov.io/bash | bash -s -- -t $CODE_COV
49 changes: 0 additions & 49 deletions .travis.yml

This file was deleted.

6 changes: 3 additions & 3 deletions examples/complete/.eslintrc.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
module.exports = {
'extends': ['react-app', 'prettier', 'prettier/react'],
'extends': ['standard', 'standard-react', 'prettier', 'prettier/react'],
root: true,
parser: 'babel-eslint',
plugins: ['import', 'babel', 'react', 'react-hooks', 'prettier'],
plugins: ['import', 'react', 'react-hooks', 'prettier'],
settings: {
react: {
version: '16.9'
version: '16.12'
},
'import/resolver': {
node: {
Expand Down
4 changes: 2 additions & 2 deletions examples/complete/.firebaserc
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"master": {
"env": "staging",
"firebase": {
"apiKey": "${STAGE_FIREBASE_API_KEY}",
"apiKey": "AIzaSyBTvAcJwsN8iygsnwAZyzIuy1uleYEpWIo",
"authDomain": "redux-firebasev3.firebaseapp.com",
"databaseURL": "https://redux-firebasev3.firebaseio.com",
"projectId": "redux-firebasev3",
Expand All @@ -19,7 +19,7 @@
"prod": {
"env": "production",
"firebase": {
"apiKey": "${PROD_FIREBASE_API_KEY}",
"apiKey": "AIzaSyBTvAcJwsN8iygsnwAZyzIuy1uleYEpWIo",
"authDomain": "redux-firebasev3.firebaseapp.com",
"databaseURL": "https://redux-firebasev3.firebaseio.com",
"projectId": "redux-firebasev3",
Expand Down
3 changes: 0 additions & 3 deletions examples/complete/database.rules.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@
"$uid": {
".write": "auth !== null && $uid === auth.uid"
}
},
"projects": {
".indexOn": ["createdBy"]
}
}
}
2 changes: 1 addition & 1 deletion examples/complete/firestore.rules
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ service cloud.firestore {
match /projects/{projectId} {
// Only projects you own can be viewed
allow create: if isOwner(request.resource);
allow read, update: if isOwner(resource);
allow read, update, delete: if isOwner(resource);
// Rules apply to all child collections
match /{allChildren=**} {
allow read, write: if isOwner(get(/databases/$(database)/documents/projects/$(projectId)));
Expand Down
40 changes: 21 additions & 19 deletions examples/complete/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,44 +25,46 @@
"author": "prescottprue (https://github.com/prescottprue)",
"license": "MIT",
"dependencies": {
"@material-ui/core": "^4.5.2",
"@material-ui/core": "^4.7.1",
"@material-ui/icons": "^4.5.1",
"firebase": "^7.5.0",
"history": "^4.10.1",
"lodash": "^4.17.15",
"prop-types": "^15.7.2",
"react": "^16.11.0",
"react-dom": "^16.11.0",
"react-google-button": "^0.5.3",
"react": "^16.12.0",
"react-dom": "^16.12.0",
"react-google-button": "^0.6.0",
"react-loadable": "^5.5.0",
"react-redux": "^7.1.1",
"react-redux-firebase": "^3.0.2",
"react-redux-firebase": "^3.0.5",
"react-router-dom": "^5.1.2",
"recompose": "^0.30.0",
"redux": "^4.0.4",
"redux-auth-wrapper": "^2.1.0",
"redux-firestore": "^0.9.0",
"redux-form": "^8.2.0",
"redux-firestore": "^0.11.0",
"redux-form": "^8.2.6",
"redux-thunk": "^2.3.0"
},
"devDependencies": {
"babel-eslint": "^10.0.0",
"eslint": "^6.6.0",
"babel-eslint": "^10.0.3",
"eslint": "^6.7.2",
"eslint-config-prettier": "^6.5.0",
"eslint-config-react-app": "^5.0.1",
"eslint-plugin-babel": "^5.3.0",
"eslint-plugin-flowtype": "^4.3.0",
"eslint-config-standard": "^14.1.0",
"eslint-config-standard-react": "^9.2.0",
"eslint-plugin-import": "^2.18.2",
"eslint-plugin-jsdoc": "^15.11.0",
"eslint-plugin-jsdoc": "^18.4.2",
"eslint-plugin-jsx-a11y": "^6.2.3",
"eslint-plugin-node": "^10.0.0",
"eslint-plugin-prettier": "^3.1.0",
"eslint-plugin-react": "^7.16.0",
"eslint-plugin-react-hooks": "^2.2.0",
"firebase-ci": "^0.6.0",
"firebase-tools": "^7.6.2",
"husky": "^3.0.9",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-react": "^7.17.0",
"eslint-plugin-react-hooks": "^2.3.0",
"eslint-plugin-standard": "^4.0.1",
"firebase-ci": "^0.9.1",
"firebase-tools": "^7.8.1",
"husky": "^3.1.0",
"node-sass": "^4.12.0",
"prettier": "^1.18.2",
"prettier": "^1.19.1",
"react-scripts": "3.2.0"
},
"eslintConfig": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,13 @@ function FormTextField({
}

FormTextField.propTypes = {
formTextField: PropTypes.object
label: PropTypes.string,
input: PropTypes.object,
meta: PropTypes.shape({
touched: PropTypes.bool,
invalid: PropTypes.bool,
error: PropTypes.string
})
}

export default FormTextField
7 changes: 1 addition & 6 deletions examples/complete/src/containers/App/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,19 +18,14 @@ const theme = createMuiTheme(ThemeSettings)

// Initialize Firebase instance
firebase.initializeApp(config.firebase)
// Combine default and environment specific configs for react-redux-firebase
const rrfConfig = {
...defaultRRFConfig,
...(config.reduxFirebase || {})
}

function App({ routes, store }) {
return (
<MuiThemeProvider theme={theme}>
<Provider store={store}>
<ReactReduxFirebaseProvider
firebase={firebase}
config={rrfConfig}
config={defaultRRFConfig}
dispatch={store.dispatch}
createFirestoreInstance={createFirestoreInstance}>
<Router>{routes}</Router>
Expand Down
6 changes: 3 additions & 3 deletions examples/complete/src/containers/Navbar/AccountMenu.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import React, { Fragment, useState } from 'react'
import React, { useState } from 'react'
import { useFirebase } from 'react-redux-firebase'
import { useHistory } from 'react-router-dom'
import Menu from '@material-ui/core/Menu'
Expand Down Expand Up @@ -37,7 +37,7 @@ function AccountMenu() {
}

return (
<Fragment>
<>
<IconButton
aria-owns={anchorEl ? 'menu-appbar' : null}
aria-haspopup="true"
Expand All @@ -55,7 +55,7 @@ function AccountMenu() {
<MenuItem onClick={goToAccount}>Account</MenuItem>
<MenuItem onClick={handleLogout}>Sign Out</MenuItem>
</Menu>
</Fragment>
</>
)
}

Expand Down
5 changes: 3 additions & 2 deletions examples/complete/src/containers/Navbar/NavbarWithoutAuth.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ function NavbarWithoutAuth({ children, brandPath }) {
to={brandPath || '/'}
className={classes.brand}
data-test="brand">
material example
Complete
</Typography>
<div className={classes.flex} />
{children}
Expand All @@ -32,7 +32,8 @@ function NavbarWithoutAuth({ children, brandPath }) {
}

NavbarWithoutAuth.propTypes = {
children: PropTypes.element
children: PropTypes.element,
brandPath: PropTypes.string
}

export default NavbarWithoutAuth
Loading

0 comments on commit a0bab1f

Please sign in to comment.