bigal 13.0.0 → 13.0.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,5 +1,13 @@
1
1
  # Change Log
2
2
 
3
+ ## 13.0.2 - 2024-08-26
4
+
5
+ - Update npms
6
+
7
+ ## 13.0.1 - 2024-07-02
8
+
9
+ - Update postgres-pool npm
10
+
3
11
  ## 13.0.0 - 2024-07-02
4
12
 
5
13
  - Publish as CJS and ESM
package/dist/index.cjs CHANGED
@@ -1792,7 +1792,6 @@ ${stack ?? ""}`;
1792
1792
  }
1793
1793
  return rows.map((row) => this._buildInstance(row));
1794
1794
  }
1795
- // eslint-disable-next-line class-methods-use-this
1796
1795
  _convertSortsToOrderBy(sorts) {
1797
1796
  const result = [];
1798
1797
  if (sorts) {
package/dist/index.d.cts CHANGED
@@ -389,8 +389,6 @@ declare class MetadataStorage<T extends Entity> {
389
389
 
390
390
  declare function getMetadataStorage<T extends Entity>(): MetadataStorage<T>;
391
391
 
392
- type Comparer = '!' | '<' | '<=' | '>' | '>=' | 'contains' | 'endsWith' | 'like' | 'or' | 'startsWith';
393
-
394
392
  type ExcludeUndefined<T> = Exclude<T, undefined>;
395
393
  type LiteralValues<TValue> = (TValue | null)[] | TValue | null;
396
394
  type WhereClauseValue<TValue> = TValue extends NotEntityBrand | undefined ? Exclude<TValue, NotEntityBrand | undefined> : Extract<TValue, Entity> extends undefined ? LiteralValues<ExcludeUndefined<TValue>> : (ExcludeUndefined<Exclude<TValue, Entity>> | null)[] | (Pick<Extract<ExcludeUndefined<TValue>, Entity>, 'id'> | null)[] | ExcludeUndefined<Exclude<TValue, Entity>> | Pick<Extract<ExcludeUndefined<TValue>, Entity>, 'id'> | null;
@@ -410,6 +408,13 @@ type WhereQuery<T extends Entity> = {
410
408
  or?: WhereQuery<T>[];
411
409
  };
412
410
 
411
+ interface CountArgs<T extends Entity> {
412
+ where?: WhereQuery<T>;
413
+ pool?: Pool;
414
+ }
415
+
416
+ type Comparer = '!' | '<' | '<=' | '>' | '>=' | 'contains' | 'endsWith' | 'like' | 'or' | 'startsWith';
417
+
413
418
  interface CountResult<TEntity extends Entity> extends PromiseLike<number> {
414
419
  where(args: WhereQuery<TEntity>): CountResult<TEntity> | number;
415
420
  }
@@ -495,11 +500,6 @@ interface FindResult<T extends Entity, TReturn> extends PromiseLike<TReturn[]> {
495
500
  UNSAFE_withOriginalFieldType<TProperty extends string & keyof PickByValueType<T, Entity> & keyof T>(propertyName: TProperty): FindResult<T, Omit<TReturn, TProperty> & Pick<T, TProperty>>;
496
501
  }
497
502
 
498
- interface CountArgs<T extends Entity> {
499
- where?: WhereQuery<T>;
500
- pool?: Pool;
501
- }
502
-
503
503
  interface IReadonlyRepository<T extends Entity> {
504
504
  readonly model: ModelMetadata<T>;
505
505
  /**
package/dist/index.d.mts CHANGED
@@ -389,8 +389,6 @@ declare class MetadataStorage<T extends Entity> {
389
389
 
390
390
  declare function getMetadataStorage<T extends Entity>(): MetadataStorage<T>;
391
391
 
392
- type Comparer = '!' | '<' | '<=' | '>' | '>=' | 'contains' | 'endsWith' | 'like' | 'or' | 'startsWith';
393
-
394
392
  type ExcludeUndefined<T> = Exclude<T, undefined>;
395
393
  type LiteralValues<TValue> = (TValue | null)[] | TValue | null;
396
394
  type WhereClauseValue<TValue> = TValue extends NotEntityBrand | undefined ? Exclude<TValue, NotEntityBrand | undefined> : Extract<TValue, Entity> extends undefined ? LiteralValues<ExcludeUndefined<TValue>> : (ExcludeUndefined<Exclude<TValue, Entity>> | null)[] | (Pick<Extract<ExcludeUndefined<TValue>, Entity>, 'id'> | null)[] | ExcludeUndefined<Exclude<TValue, Entity>> | Pick<Extract<ExcludeUndefined<TValue>, Entity>, 'id'> | null;
@@ -410,6 +408,13 @@ type WhereQuery<T extends Entity> = {
410
408
  or?: WhereQuery<T>[];
411
409
  };
412
410
 
411
+ interface CountArgs<T extends Entity> {
412
+ where?: WhereQuery<T>;
413
+ pool?: Pool;
414
+ }
415
+
416
+ type Comparer = '!' | '<' | '<=' | '>' | '>=' | 'contains' | 'endsWith' | 'like' | 'or' | 'startsWith';
417
+
413
418
  interface CountResult<TEntity extends Entity> extends PromiseLike<number> {
414
419
  where(args: WhereQuery<TEntity>): CountResult<TEntity> | number;
415
420
  }
@@ -495,11 +500,6 @@ interface FindResult<T extends Entity, TReturn> extends PromiseLike<TReturn[]> {
495
500
  UNSAFE_withOriginalFieldType<TProperty extends string & keyof PickByValueType<T, Entity> & keyof T>(propertyName: TProperty): FindResult<T, Omit<TReturn, TProperty> & Pick<T, TProperty>>;
496
501
  }
497
502
 
498
- interface CountArgs<T extends Entity> {
499
- where?: WhereQuery<T>;
500
- pool?: Pool;
501
- }
502
-
503
503
  interface IReadonlyRepository<T extends Entity> {
504
504
  readonly model: ModelMetadata<T>;
505
505
  /**
package/dist/index.d.ts CHANGED
@@ -389,8 +389,6 @@ declare class MetadataStorage<T extends Entity> {
389
389
 
390
390
  declare function getMetadataStorage<T extends Entity>(): MetadataStorage<T>;
391
391
 
392
- type Comparer = '!' | '<' | '<=' | '>' | '>=' | 'contains' | 'endsWith' | 'like' | 'or' | 'startsWith';
393
-
394
392
  type ExcludeUndefined<T> = Exclude<T, undefined>;
395
393
  type LiteralValues<TValue> = (TValue | null)[] | TValue | null;
396
394
  type WhereClauseValue<TValue> = TValue extends NotEntityBrand | undefined ? Exclude<TValue, NotEntityBrand | undefined> : Extract<TValue, Entity> extends undefined ? LiteralValues<ExcludeUndefined<TValue>> : (ExcludeUndefined<Exclude<TValue, Entity>> | null)[] | (Pick<Extract<ExcludeUndefined<TValue>, Entity>, 'id'> | null)[] | ExcludeUndefined<Exclude<TValue, Entity>> | Pick<Extract<ExcludeUndefined<TValue>, Entity>, 'id'> | null;
@@ -410,6 +408,13 @@ type WhereQuery<T extends Entity> = {
410
408
  or?: WhereQuery<T>[];
411
409
  };
412
410
 
411
+ interface CountArgs<T extends Entity> {
412
+ where?: WhereQuery<T>;
413
+ pool?: Pool;
414
+ }
415
+
416
+ type Comparer = '!' | '<' | '<=' | '>' | '>=' | 'contains' | 'endsWith' | 'like' | 'or' | 'startsWith';
417
+
413
418
  interface CountResult<TEntity extends Entity> extends PromiseLike<number> {
414
419
  where(args: WhereQuery<TEntity>): CountResult<TEntity> | number;
415
420
  }
@@ -495,11 +500,6 @@ interface FindResult<T extends Entity, TReturn> extends PromiseLike<TReturn[]> {
495
500
  UNSAFE_withOriginalFieldType<TProperty extends string & keyof PickByValueType<T, Entity> & keyof T>(propertyName: TProperty): FindResult<T, Omit<TReturn, TProperty> & Pick<T, TProperty>>;
496
501
  }
497
502
 
498
- interface CountArgs<T extends Entity> {
499
- where?: WhereQuery<T>;
500
- pool?: Pool;
501
- }
502
-
503
503
  interface IReadonlyRepository<T extends Entity> {
504
504
  readonly model: ModelMetadata<T>;
505
505
  /**
package/dist/index.mjs CHANGED
@@ -1786,7 +1786,6 @@ ${stack ?? ""}`;
1786
1786
  }
1787
1787
  return rows.map((row) => this._buildInstance(row));
1788
1788
  }
1789
- // eslint-disable-next-line class-methods-use-this
1790
1789
  _convertSortsToOrderBy(sorts) {
1791
1790
  const result = [];
1792
1791
  if (sorts) {
package/eslint.config.mjs CHANGED
@@ -1,15 +1,9 @@
1
- import { defaultConfig } from 'eslint-config-decent';
2
- import tsEslint from 'typescript-eslint';
1
+ import { config } from 'eslint-config-decent';
3
2
 
4
- export default tsEslint.config(
5
- ...defaultConfig(),
6
- {
7
- files: ['**/*.mjs'],
8
- rules: {
9
- '@typescript-eslint/no-unsafe-call': 'off',
10
- '@typescript-eslint/no-unsafe-member-access': 'off',
11
- },
12
- },
3
+ export default [
4
+ ...config({
5
+ tsconfigRootDir: import.meta.dirname,
6
+ }),
13
7
  {
14
8
  files: ['**/*.ts'],
15
9
  rules: {
@@ -22,4 +16,4 @@ export default tsEslint.config(
22
16
  '@typescript-eslint/no-non-null-assertion': 'off',
23
17
  },
24
18
  },
25
- );
19
+ ];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "bigal",
3
- "version": "13.0.0",
3
+ "version": "13.0.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",
@@ -36,29 +36,28 @@
36
36
  "@types/pg": "^8.11.6",
37
37
  "lodash": "^4.17.21",
38
38
  "pg": "^8.12.0",
39
- "postgres-pool": "^9.0.0"
39
+ "postgres-pool": "^9.0.2"
40
40
  },
41
41
  "devDependencies": {
42
42
  "@faker-js/faker": "^8.4.1",
43
- "@types/chai": "^4.3.16",
44
- "@types/lodash": "^4.17.6",
43
+ "@types/chai": "^4.3.18",
44
+ "@types/lodash": "^4.17.7",
45
45
  "@types/mocha": "10.0.7",
46
- "@types/node": ">=20",
46
+ "@types/node": ">=22",
47
47
  "chai": "^5.1.1",
48
- "eslint": "^9.6.0",
49
- "eslint-config-decent": "^1.2.2",
50
- "husky": "^9.0.11",
51
- "lint-staged": "^15.2.7",
48
+ "eslint": "^9.9.1",
49
+ "eslint-config-decent": "^2.2.0",
50
+ "husky": "^9.1.5",
51
+ "lint-staged": "^15.2.9",
52
52
  "markdownlint-cli": "^0.41.0",
53
- "mocha": "^10.5.2",
53
+ "mocha": "^10.7.3",
54
54
  "npm-run-all": "^4.1.5",
55
55
  "pinst": "^3.0.0",
56
- "prettier": "^3.3.2",
56
+ "prettier": "^3.3.3",
57
57
  "strict-event-emitter-types": "^2.0.0",
58
58
  "ts-mockito": "^2.6.1",
59
59
  "ts-node": "^10.9.2",
60
- "typescript": "^5.5.3",
61
- "typescript-eslint": "^8.0.0-alpha.39",
60
+ "typescript": "^5.5.4",
62
61
  "unbuild": "^2.0.0"
63
62
  },
64
63
  "scripts": {