Skip to content

Commit d53b5ff

Browse files
authored
v1.0.0 (#110)
* feat(callFirestore): support complex where queries (nested array passed to settings) * feat(callFirestore): support direction for orderBy * chore(types): improve query types for `callRtdb` and `callFirestore` tasks * chore(tests): remove tests which mock admin SDK (emulators are now used) * chore(tests): add a test for confirming firestore collection delete * chore(tests): add a tests for different firestore get query options * chore(tests): switch rtdb tests back to async/await * chore(tests): improve attachCustomCommands tests * chore(build): add size-limit for checking library size (check in CI workflow) As well as all changes from v1.0.0 pre-releases
1 parent 6800727 commit d53b5ff

36 files changed

+5638
-3800
lines changed

.eslintignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,5 @@ lib-esm
44
node_modules
55
coverage
66
.nyc_output
7-
.github
7+
.github
8+
index.d.ts

.github/workflows/publish.yml

+29-3
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,18 @@ jobs:
1212
runs-on: ubuntu-latest
1313
steps:
1414
- name: Checkout code
15-
uses: actions/checkout@v1
15+
uses: actions/checkout@v2
1616

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

22-
- name: Setup Node
22+
- name: Use Node 12
2323
uses: actions/setup-node@v1
2424
with:
2525
node-version: 12
26+
registry-url: https://registry.npmjs.org/
2627

2728
- name: Get yarn cache
2829
id: yarn-cache
@@ -43,15 +44,40 @@ jobs:
4344
CI: true
4445
run: yarn lint
4546

47+
- name: Expose Test Environment Variables
48+
env:
49+
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
50+
GITHUB_HEAD_REF: ${{ github.head_ref }}
51+
GITHUB_REF: ${{ github.ref }}
52+
# Generate Service Account file required to prevent credential error (jq used to format)
53+
run: |
54+
echo "Generating Service Account File..."
55+
echo "$(echo $SERVICE_ACCOUNT | jq .)" > $HOME/serviceAccount.json
56+
echo "::set-env name=GOOGLE_APPLICATION_CREDENTIALS::$HOME/serviceAccount.json"
57+
4658
- name: Run Unit Tests + Coverage
4759
env:
4860
CI: true
4961
CODE_CLIMATE: ${{ secrets.CODE_CLIMATE }}
5062
run: yarn test:cov && yarn codecov
5163

64+
- name: Run Build
65+
run: yarn build
66+
67+
# Skipped since yarn isn't supported
68+
# - name: Size Check
69+
# uses: andresz1/[email protected]
70+
# env:
71+
# CI_JOB_NUMBER: 1
72+
# with:
73+
# github_token: ${{ secrets.GITHUB_TOKEN }}
74+
75+
- name: Size Check
76+
run: yarn size
77+
5278
- name: Publish
5379
env:
54-
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
80+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
5581
GITHUB_REF: ${{ github.ref }}
5682
run: |
5783
export GIT_BRANCH=${GITHUB_REF##*/}

.github/workflows/verify.yml

+31-10
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@ jobs:
66
build:
77
name: Build
88
runs-on: ubuntu-latest
9+
strategy:
10+
matrix:
11+
node-version: [10.x, 12.x]
912
steps:
1013
- name: Checkout code
11-
uses: actions/checkout@v1
14+
uses: actions/checkout@v2
1215

13-
- name: Setup Node
16+
- name: Use Node.js ${{ matrix.node-version }}
1417
uses: actions/setup-node@v1
1518
with:
16-
node-version: 12
19+
node-version: ${{ matrix.node-version }}
1720

1821
- name: Get yarn cache
1922
id: yarn-cache
@@ -24,26 +27,44 @@ jobs:
2427
with:
2528
path: ${{ steps.yarn-cache.outputs.dir }}
2629
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
27-
restore-keys: |
28-
${{ runner.os }}-yarn-
2930

3031
- name: Install Dependencies
3132
env:
3233
CI: true
3334
run: yarn install --frozen-lockfile
3435

35-
- name: Run Build
36-
run: yarn build
37-
3836
- name: Check For Lint
39-
env:
40-
CI: true
4137
run: yarn lint
4238

39+
- name: Expose Test Environment Variables
40+
env:
41+
SERVICE_ACCOUNT: ${{ secrets.SERVICE_ACCOUNT }}
42+
GITHUB_HEAD_REF: ${{ github.head_ref }}
43+
GITHUB_REF: ${{ github.ref }}
44+
# Generate Service Account file required to prevent credential error (jq used to format)
45+
run: |
46+
echo "Generating Service Account File..."
47+
echo "$(echo $SERVICE_ACCOUNT | jq .)" > $HOME/serviceAccount.json
48+
echo "::set-env name=GOOGLE_APPLICATION_CREDENTIALS::$HOME/serviceAccount.json"
49+
4350
- name: Run Unit Tests + Coverage
4451
if: success()
4552
run: yarn test:cov
4653

54+
- name: Run Build
55+
run: yarn build
56+
57+
# Skipped since yarn isn't supported
58+
# - name: Size Check
59+
# uses: andresz1/[email protected]
60+
# env:
61+
# CI_JOB_NUMBER: 1
62+
# with:
63+
# github_token: ${{ secrets.GITHUB_TOKEN }}
64+
65+
- name: Size Check
66+
run: yarn size
67+
4768
- name: Upload Coverage
4869
if: success()
4970
env:

.mocharc.js

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
'use strict';
2+
3+
module.exports = {
4+
require: ['ts-node/register', './test/setup.ts'],
5+
recursive: true
6+
};

0 commit comments

Comments
 (0)