Skip to content

Commit

Permalink
Updated packages + changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Dale Nguyen committed Sep 15, 2020
1 parent 0e63a77 commit 05a291d
Show file tree
Hide file tree
Showing 10 changed files with 82 additions and 30 deletions.
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,16 @@
---

## ## [0.8.0] - 2020-09-15

#### - :rocket: [New Feature]

- Added Automatic Timestamp Parsing (Thank @benwinding)

#### - :nail_care: [Polish]

- Updated firebase-admin packages (9.2.0)

## ## [0.7.0] - 2020-09-04

#### - :rocket: [New Feature]
Expand Down
13 changes: 11 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -93,15 +93,24 @@ const options = {
dates: ['date1', 'date1.date2', 'date1.date2.date3'],
geos: ['location', 'locations'],
refs: ['refKey'],
nested: true, // look up the data keys also in nested maps
};
```
If you don't want to specify `dates`, you can use another parameter in order to transform fields to date auttomatically.
```javascript
// Import options with auto parse date
const options = {
autoParseDates: true // use this one in stead of dates: [...]
geos: ['location', 'locations'],
refs: ['refKey'],
};
```
After that, the data will be converted based on their types.
```javascript
// In your index.js
const firestoreService = require('firestore-export-import');
const serviceAccount = require('./serviceAccountKey.json');
Expand Down
2 changes: 2 additions & 0 deletions dist/helper.d.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
export interface IImportOptions {
dates?: string[];
autoParseDates?: boolean;
geos?: string[];
refs?: string[];
}
Expand All @@ -18,3 +19,4 @@ export declare const makeTime: (firebaseTimestamp: {
* @param callback
*/
export declare const traverseObjects: (data: any, callback: Function) => void;
export declare function parseAndConvertDates(data: object): void;
8 changes: 5 additions & 3 deletions dist/helper.js

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

2 changes: 1 addition & 1 deletion dist/helper.js.map

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

1 change: 1 addition & 0 deletions dist/import.js

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

2 changes: 1 addition & 1 deletion dist/import.js.map

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

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "firestore-export-import",
"version": "0.7.0",
"version": "0.8.0",
"description": "NPM package for backup and restore Firebase Firestore",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand Down Expand Up @@ -31,7 +31,7 @@
"devDependencies": {
"@types/chai": "^4.2.12",
"@types/mocha": "^8.0.3",
"@types/node": "^14.6.4",
"@types/node": "^14.10.2",
"chai": "^4.2.0",
"jsmin": "^1.0.1",
"minimist": "^1.2.5",
Expand All @@ -42,7 +42,7 @@
"typescript": "^4.0.2"
},
"dependencies": {
"firebase-admin": "^9.1.1"
"firebase-admin": "^9.2.0"
},
"resolutions": {
"minimist": "1.2.5"
Expand Down
Loading

0 comments on commit 05a291d

Please sign in to comment.