say-under-me 1.5.0 → 1.5.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/dist/index.js CHANGED
@@ -129,7 +129,15 @@ function parsePrismaQuery(queryString, options = {}) {
129
129
  const rawVal = value.substring(dotIndex + 1);
130
130
  const prismaOp = OPERATOR_MAP[op];
131
131
  if (prismaOp) {
132
- whereTarget[targetKey] = { [prismaOp]: parseValue(rawVal, op) };
132
+ const parsedVal = parseValue(rawVal, op);
133
+ if (["contains", "startsWith", "endsWith"].includes(prismaOp) && typeof parsedVal === "string") {
134
+ whereTarget[targetKey] = {
135
+ [prismaOp]: parsedVal,
136
+ mode: "insensitive"
137
+ };
138
+ } else {
139
+ whereTarget[targetKey] = { [prismaOp]: parsedVal };
140
+ }
133
141
  return;
134
142
  }
135
143
  }
package/dist/index.mjs CHANGED
@@ -88,7 +88,15 @@ function parsePrismaQuery(queryString, options = {}) {
88
88
  const rawVal = value.substring(dotIndex + 1);
89
89
  const prismaOp = OPERATOR_MAP[op];
90
90
  if (prismaOp) {
91
- whereTarget[targetKey] = { [prismaOp]: parseValue(rawVal, op) };
91
+ const parsedVal = parseValue(rawVal, op);
92
+ if (["contains", "startsWith", "endsWith"].includes(prismaOp) && typeof parsedVal === "string") {
93
+ whereTarget[targetKey] = {
94
+ [prismaOp]: parsedVal,
95
+ mode: "insensitive"
96
+ };
97
+ } else {
98
+ whereTarget[targetKey] = { [prismaOp]: parsedVal };
99
+ }
92
100
  return;
93
101
  }
94
102
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "say-under-me",
3
- "version": "1.5.0",
3
+ "version": "1.5.2",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -25,5 +25,8 @@
25
25
  "react-dom": "^19.2.4",
26
26
  "tsup": "^8.0.0",
27
27
  "typescript": "^5.0.0"
28
+ },
29
+ "dependencies": {
30
+ "say-under-me": "^1.5.0"
28
31
  }
29
32
  }