Skip to content

Commit

Permalink
Merge pull request #30 from tylim88/new-features
Browse files Browse the repository at this point in the history
@firebase/rules-unit-testing is now supported and tested.
  • Loading branch information
tylim88 authored Apr 13, 2022
2 parents 713c085 + 7b84c56 commit cd8c59b
Show file tree
Hide file tree
Showing 42 changed files with 500 additions and 175 deletions.
6 changes: 4 additions & 2 deletions .github/workflows/github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ jobs:
node-version: '16.14'
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- run: npm i -g firebase-tools
- run: npm i
- run: npm run lint --fix
- run: npm run pretty-quick
Expand All @@ -19,8 +20,8 @@ jobs:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
- run: npm run build
- run: npm run link
- run: npm run e-tsc
- run: npm run e-test
- run: npm run b-tsc
- run: npm run b-test
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
- uses: codecov/codecov-action@v2
Expand All @@ -35,6 +36,7 @@ jobs:
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
registry-url: 'https://registry.npmjs.org'
- run: npm i -g firebase-tools
- run: npm i
- run: npm run build
- run: npm publish
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@
/.config
.env
/.parcel-cache
firebase-debug.log
firestore-debug.log

npm-debug.log*
yarn-debug.log*
Expand Down
2 changes: 1 addition & 1 deletion .husky/pre-commit
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ npm run lint --fix
npm run pretty-quick
npm run build
npm run d-test
npm run d-e-test
npm run d-b-test
6 changes: 4 additions & 2 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
.gitignore
.npmignore
note.txt
V0Doc.md

# config file
jest.config.js
Expand All @@ -39,4 +38,7 @@ tsconfig.prod.json

# misc
CHANGELOG.md
package-lock.json
package-lock.json
firebase-debug.log
firestore-debug.log
/firebase.json
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# HISTORY

## v1.2.0 13-April-22

- @firebase/rules-unit-testing is now supported and tested.

## v1.2.0 12-April-22

- gradually add support for @firebase/rules-unit-testing, stage 1
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,11 @@
<a href="https://firelordjs.com/quick_start" target="_blank"><strong>Documentation</strong></a>
</div>

# Note
<br/>

support [@firebase/rules-unit-testing](https://www.npmjs.com/package/@firebase/rules-unit-testing)

1. V1 rewrite from scratch using Firestore V9 API and is better than V0 by a huge margin.
2. V1 is not compatible with V0, the old V0 Documentation can be found [here](https://github.com/tylim88/Firelordjs/V0Doc.md).
The development code, built code and published code are all tested in ci.

## Related Projects

Expand Down
130 changes: 0 additions & 130 deletions V0Doc.md

This file was deleted.

10 changes: 10 additions & 0 deletions codeForDoc/firebase.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"emulators": {
"firestore": {
"port": 8080
},
"ui": {
"enabled": true
}
}
}
5 changes: 3 additions & 2 deletions codeForDoc/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,9 @@
"description": "test published Firelordjs",
"main": "index.js",
"scripts": {
"reinstall": "(rm -rf node_modules || true) && (rm package-lock.json || true) && npm i",
"test": "rm -rf coverage && jest --forceExit"
"uninstall": "rm -rf node_modules && rm -rf package-lock.json",
"reinstall": "npm run uninstall && npm i",
"test": "firebase emulators:exec --only firestore \"rm -rf coverage && jest --forceExit\""
},
"author": "",
"license": "ISC",
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 1 addition & 2 deletions codeForDoc/dist.test.ts → codeForDoc/src/dist.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,7 @@ describe('dist files test', () => {
unsub()
done()
},
// @ts-expect-error
{ includeMetadataChanges: false },
() => {},
{ includeMetadataChanges: true }
)
})
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit cd8c59b

Please sign in to comment.