@lokalise/prisma-utils 6.1.0 → 7.0.0

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/README.md CHANGED
@@ -30,7 +30,7 @@ const prisma = prismaClientFactory(PrismaClient, {
30
30
  ```typescript
31
31
  import { prismaClientFactory } from '@lokalise/prisma-utils'
32
32
  import { PrismaClient } from '@prisma/client'
33
- import * as promClient from 'prom-client'
33
+ import * as promClient from '@prometheus-io/client'
34
34
 
35
35
  const prisma = prismaClientFactory(
36
36
  PrismaClient,
@@ -1,2 +1,2 @@
1
- export { prismaBulkUpdate } from "./prismaBulkUpdate.js";
1
+ export { prismaBulkUpdate } from './prismaBulkUpdate.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export * from "./prismaError.js";
1
+ export * from './prismaError.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1,3 +1,3 @@
1
+ import type Prometheus from '@prometheus-io/client';
1
2
  import type { PrismaClient } from 'db-client/client.ts';
2
- import type Prometheus from 'prom-client';
3
3
  export declare const extendPrismaClientWithMetrics: <Client extends PrismaClient>(prisma: Client, promClient: typeof Prometheus) => Client;
@@ -1,2 +1,2 @@
1
- export { prismaClientFactory } from "./prismaClientFactory.js";
1
+ export { prismaClientFactory } from './prismaClientFactory.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  import type * as RuntimePrisma from '@prisma/client/runtime/client';
2
+ import type Prometheus from '@prometheus-io/client';
2
3
  import type { PrismaClient } from 'db-client/client.ts';
3
4
  import type { PrismaClientConstructor } from 'db-client/internal/class.ts';
4
- import type Prometheus from 'prom-client';
5
5
  export type prismaClientFactoryOptions = {
6
6
  promClient?: typeof Prometheus;
7
7
  };
@@ -1,4 +1,4 @@
1
- import { extendPrismaClientWithMetrics } from "./extendPrismaClientWithMetrics.js";
1
+ import { extendPrismaClientWithMetrics } from './extendPrismaClientWithMetrics.js';
2
2
  /**
3
3
  * Factory function to create a Prisma client instance with default configuration
4
4
  * and optional Prometheus metrics integration.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
- export * from "./bulk-update/index.js";
2
- export * from "./errors/index.js";
3
- export * from "./factory/index.js";
4
- export * from "./transaction/index.js";
1
+ export * from './bulk-update/index.js';
2
+ export * from './errors/index.js';
3
+ export * from './factory/index.js';
4
+ export * from './transaction/index.js';
5
5
  //# sourceMappingURL=index.js.map
@@ -1,2 +1,2 @@
1
- export { prismaTransaction } from "./prismaTransaction.js";
1
+ export { prismaTransaction } from './prismaTransaction.js';
2
2
  //# sourceMappingURL=index.js.map
@@ -1,7 +1,7 @@
1
1
  import { setTimeout } from 'node:timers/promises';
2
2
  import { deepClone } from '@lokalise/node-core';
3
- import { isCockroachDBRetryTransaction } from "../errors/cockroachdbError.js";
4
- import { isPrismaClientKnownRequestError, isPrismaTransactionClosedError, PRISMA_SERIALIZATION_ERROR, PRISMA_SERVER_CLOSED_CONNECTION_ERROR, PRISMA_TRANSACTION_ERROR, } from "../errors/index.js";
3
+ import { isCockroachDBRetryTransaction } from '../errors/cockroachdbError.js';
4
+ import { isPrismaClientKnownRequestError, isPrismaTransactionClosedError, PRISMA_SERIALIZATION_ERROR, PRISMA_SERVER_CLOSED_CONNECTION_ERROR, PRISMA_TRANSACTION_ERROR, } from '../errors/index.js';
5
5
  const DEFAULT_OPTIONS = {
6
6
  retriesAllowed: 2, // first try + 2 retries = 3 tries
7
7
  baseRetryDelayMs: 100,
package/dist/types.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  type ObjectValues<T> = T[keyof T];
2
2
  export declare const DbDriverEnum: {
3
- readonly COCKROACH_DB: "CockroachDb";
4
- readonly POSTGRES: "Postgres";
3
+ readonly COCKROACH_DB: 'CockroachDb';
4
+ readonly POSTGRES: 'Postgres';
5
5
  };
6
6
  export type DbDriver = ObjectValues<typeof DbDriverEnum>;
7
7
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lokalise/prisma-utils",
3
- "version": "6.1.0",
3
+ "version": "7.0.0",
4
4
  "type": "module",
5
5
  "license": "Apache-2.0",
6
6
  "files": [
@@ -22,22 +22,22 @@
22
22
  "peerDependencies": {
23
23
  "@lokalise/node-core": ">=14.7.4",
24
24
  "@prisma/client": "^7.0.0",
25
- "prisma": "^7.0.0",
26
- "prom-client": ">=15.0.0"
25
+ "@prometheus-io/client": "^0.16.1",
26
+ "prisma": "^7.0.0"
27
27
  },
28
28
  "devDependencies": {
29
- "@biomejs/biome": "^2.4.16",
29
+ "@biomejs/biome": "^2.5.9",
30
30
  "dotenv": "^17.0.0",
31
- "@lokalise/biome-config": "^3.1.0",
32
- "@lokalise/tsconfig": "^4.0.0",
33
31
  "@prisma/adapter-pg": "^7.4.0",
34
32
  "@prisma/client": "^7.4.0",
35
- "@vitest/coverage-v8": "^4.1.8",
33
+ "@vitest/coverage-v8": "^4.1.11",
36
34
  "cross-env": "^10.0.0",
37
- "prisma": "^7.4.0",
38
- "rimraf": "^6.0.1",
39
- "typescript": "6.0.3",
40
- "vitest": "^4.1.8"
35
+ "prisma": "^7.10.0",
36
+ "rimraf": "^6.1.3",
37
+ "typescript": "7.0.2",
38
+ "vitest": "^4.1.11",
39
+ "@lokalise/biome-config": "^3.1.1",
40
+ "@lokalise/tsconfig": "^5.0.0"
41
41
  },
42
42
  "scripts": {
43
43
  "build": "rimraf dist && pnpm run db:update-client && tsc --project tsconfig.build.json",