@instantdb/core 1.0.41 → 1.0.42

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@instantdb/core",
3
- "version": "1.0.41",
3
+ "version": "1.0.42",
4
4
  "description": "Instant's core local abstraction",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/instantdb/instant/tree/main/client/packages/core",
@@ -57,7 +57,7 @@
57
57
  "dependencies": {
58
58
  "mutative": "^1.0.10",
59
59
  "uuid": "^11.1.0",
60
- "@instantdb/version": "1.0.41"
60
+ "@instantdb/version": "1.0.42"
61
61
  },
62
62
  "scripts": {
63
63
  "test": "vitest",
package/src/instaql.ts CHANGED
@@ -137,10 +137,9 @@ function makeLikeMatcher(caseSensitive: boolean, pattern: string) {
137
137
  const escapedPattern = pattern.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
138
138
  const regexPattern = escapedPattern.replace(/%/g, '.*').replace(/_/g, '.');
139
139
 
140
- const regex = new RegExp(
141
- `^${regexPattern}$`,
142
- caseSensitive ? undefined : 'i',
143
- );
140
+ // The `s` (dotall) flag makes `%` (-> .*) and `_` (-> .) match newline
141
+ // characters, matching Postgres LIKE/ILIKE on the server.
142
+ const regex = new RegExp(`^${regexPattern}$`, caseSensitive ? 's' : 'is');
144
143
 
145
144
  return function likeMatcher(value) {
146
145
  if (typeof value !== 'string') {