@naturalcycles/db-lib 8.16.1 → 8.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## [8.16.2](https://github.com/NaturalCycles/db-lib/compare/v8.16.1...v8.16.2) (2021-10-04)
2
+
3
+
4
+ ### Bug Fixes
5
+
6
+ * unnecessary await ([11282ba](https://github.com/NaturalCycles/db-lib/commit/11282ba44982c174b1b9eeb052c911c30ee22076))
7
+
1
8
  ## [8.16.1](https://github.com/NaturalCycles/db-lib/compare/v8.16.0...v8.16.1) (2021-10-04)
2
9
 
3
10
 
@@ -548,7 +548,8 @@ class CommonDao {
548
548
  // DBM > BM
549
549
  const bm = await this.cfg.hooks.beforeDBMToBM(dbm);
550
550
  // Validate/convert BM
551
- return await this.validateAndConvert(bm, this.cfg.bmSchema, db_model_1.DBModelType.BM, opt);
551
+ // eslint-disable-next-line @typescript-eslint/return-await
552
+ return this.validateAndConvert(bm, this.cfg.bmSchema, db_model_1.DBModelType.BM, opt);
552
553
  }
553
554
  async dbmsToBM(dbms, opt = {}) {
554
555
  return await (0, js_lib_1.pMap)(dbms, async (dbm) => await this.dbmToBM(dbm, opt));
@@ -565,7 +566,8 @@ class CommonDao {
565
566
  // BM > DBM
566
567
  const dbm = { ...(await this.cfg.hooks.beforeBMToDBM(bm)) };
567
568
  // Validate/convert DBM
568
- return await this.validateAndConvert(dbm, this.cfg.dbmSchema, db_model_1.DBModelType.DBM, opt);
569
+ // eslint-disable-next-line @typescript-eslint/return-await
570
+ return this.validateAndConvert(dbm, this.cfg.dbmSchema, db_model_1.DBModelType.DBM, opt);
569
571
  }
570
572
  async bmsToDBM(bms, opt = {}) {
571
573
  // try/catch?
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "engines": {
43
43
  "node": ">=12.13"
44
44
  },
45
- "version": "8.16.1",
45
+ "version": "8.16.2",
46
46
  "description": "Lowest Common Denominator API to supported Databases",
47
47
  "keywords": [
48
48
  "db",
@@ -724,7 +724,8 @@ export class CommonDao<
724
724
  const bm = await this.cfg.hooks!.beforeDBMToBM!(dbm)
725
725
 
726
726
  // Validate/convert BM
727
- return await this.validateAndConvert(bm, this.cfg.bmSchema, DBModelType.BM, opt)
727
+ // eslint-disable-next-line @typescript-eslint/return-await
728
+ return this.validateAndConvert(bm, this.cfg.bmSchema, DBModelType.BM, opt)
728
729
  }
729
730
 
730
731
  async dbmsToBM(dbms: DBM[], opt: CommonDaoOptions = {}): Promise<Saved<BM>[]> {
@@ -752,7 +753,8 @@ export class CommonDao<
752
753
  const dbm = { ...(await this.cfg.hooks!.beforeBMToDBM!(bm)) }
753
754
 
754
755
  // Validate/convert DBM
755
- return await this.validateAndConvert(dbm, this.cfg.dbmSchema, DBModelType.DBM, opt)
756
+ // eslint-disable-next-line @typescript-eslint/return-await
757
+ return this.validateAndConvert(dbm, this.cfg.dbmSchema, DBModelType.DBM, opt)
756
758
  }
757
759
 
758
760
  async bmsToDBM(bms: BM[], opt: CommonDaoOptions = {}): Promise<DBM[]> {