bigal 14.1.0 → 14.1.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,11 @@
1
+ ## [14.1.2](https://github.com/bigalorm/bigal/compare/v14.1.1...v14.1.2) (2025-12-03)
2
+
3
+ ### Bug Fixes
4
+
5
+ - Use async callback to satisfy await-thenable lint rule ([31daa0a](https://github.com/bigalorm/bigal/commit/31daa0a7c596e71999d222acb12e05ec5a412a55))
6
+
7
+ ## [14.1.1](https://github.com/bigalorm/bigal/compare/v14.1.0...v14.1.1) (2025-12-03)
8
+
1
9
  # [14.1.0](https://github.com/bigalorm/bigal/compare/v14.0.87...v14.1.0) (2025-12-02)
2
10
 
3
11
  ### Features
package/dist/index.cjs CHANGED
@@ -2023,11 +2023,12 @@ class Repository extends ReadonlyRepository {
2023
2023
  if (___default.isArray(values) && !values.length) {
2024
2024
  return [];
2025
2025
  }
2026
- if (this._type.beforeCreate) {
2026
+ const beforeCreate = this._type.beforeCreate;
2027
+ if (beforeCreate) {
2027
2028
  if (Array.isArray(values)) {
2028
- values = await Promise.all(values.map((value) => this._type.beforeCreate ? this._type.beforeCreate(value) : Promise.resolve()));
2029
+ values = await Promise.all(values.map(async (value) => beforeCreate(value)));
2029
2030
  } else {
2030
- values = await this._type.beforeCreate(values);
2031
+ values = await beforeCreate(values);
2031
2032
  }
2032
2033
  }
2033
2034
  let returnRecords = true;
package/dist/index.mjs CHANGED
@@ -2017,11 +2017,12 @@ class Repository extends ReadonlyRepository {
2017
2017
  if (_.isArray(values) && !values.length) {
2018
2018
  return [];
2019
2019
  }
2020
- if (this._type.beforeCreate) {
2020
+ const beforeCreate = this._type.beforeCreate;
2021
+ if (beforeCreate) {
2021
2022
  if (Array.isArray(values)) {
2022
- values = await Promise.all(values.map((value) => this._type.beforeCreate ? this._type.beforeCreate(value) : Promise.resolve()));
2023
+ values = await Promise.all(values.map(async (value) => beforeCreate(value)));
2023
2024
  } else {
2024
- values = await this._type.beforeCreate(values);
2025
+ values = await beforeCreate(values);
2025
2026
  }
2026
2027
  }
2027
2028
  let returnRecords = true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigal",
3
- "version": "14.1.0",
3
+ "version": "14.1.2",
4
4
  "description": "A fast and lightweight orm for postgres and node.js, written in typescript.",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.mjs",
@@ -43,8 +43,8 @@
43
43
  "@semantic-release/changelog": "6.0.3",
44
44
  "@semantic-release/commit-analyzer": "13.0.1",
45
45
  "@semantic-release/git": "10.0.1",
46
- "@semantic-release/github": "11.0.6",
47
- "@semantic-release/npm": "12.0.2",
46
+ "@semantic-release/github": "12.0.2",
47
+ "@semantic-release/npm": "13.1.2",
48
48
  "@semantic-release/release-notes-generator": "14.1.0",
49
49
  "@types/chai": "5.2.3",
50
50
  "@types/lodash": "4.17.21",
@@ -52,15 +52,15 @@
52
52
  "@types/node": ">=20",
53
53
  "chai": "6.2.1",
54
54
  "eslint": "9.39.1",
55
- "eslint-config-decent": "2.8.64",
55
+ "eslint-config-decent": "3.1.53",
56
56
  "husky": "9.1.7",
57
57
  "lint-staged": "16.2.7",
58
58
  "markdownlint-cli": "0.46.0",
59
59
  "mocha": "11.7.5",
60
60
  "npm-run-all2": "8.0.4",
61
61
  "pinst": "3.0.0",
62
- "prettier": "3.7.3",
63
- "semantic-release": "24.2.9",
62
+ "prettier": "3.7.4",
63
+ "semantic-release": "25.0.2",
64
64
  "strict-event-emitter-types": "2.0.0",
65
65
  "ts-mockito": "2.6.1",
66
66
  "ts-node": "10.9.2",