@supabase/postgrest-js 2.105.5-beta.0 → 2.105.5-beta.10
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/LICENSE +21 -0
- package/README.md +18 -18
- package/dist/index.cjs +9 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -0
- package/dist/index.d.cts.map +1 -1
- package/dist/index.d.mts +3 -0
- package/dist/index.d.mts.map +1 -1
- package/dist/index.mjs +9 -12
- package/dist/index.mjs.map +1 -1
- package/package.json +17 -17
- package/src/PostgrestBuilder.ts +2 -2
- package/src/PostgrestError.ts +0 -6
- package/src/PostgrestFilterBuilder.ts +3 -0
- package/src/version.ts +1 -1
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2020 Supabase
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -73,16 +73,16 @@ This package is part of the [Supabase JavaScript monorepo](https://github.com/su
|
|
|
73
73
|
|
|
74
74
|
```bash
|
|
75
75
|
# Build (from monorepo root)
|
|
76
|
-
|
|
76
|
+
pnpm nx build postgrest-js
|
|
77
77
|
|
|
78
78
|
# Build with watch mode for development
|
|
79
|
-
|
|
79
|
+
pnpm nx build:watch postgrest-js
|
|
80
80
|
|
|
81
81
|
# TypeScript type checking
|
|
82
|
-
|
|
82
|
+
pnpm nx type-check postgrest-js
|
|
83
83
|
|
|
84
84
|
# Generate documentation
|
|
85
|
-
|
|
85
|
+
pnpm nx docs postgrest-js
|
|
86
86
|
```
|
|
87
87
|
|
|
88
88
|
### Testing
|
|
@@ -93,7 +93,7 @@ npx nx docs postgrest-js
|
|
|
93
93
|
|
|
94
94
|
```bash
|
|
95
95
|
# Run all tests (from monorepo root)
|
|
96
|
-
|
|
96
|
+
pnpm nx test:ci:postgrest postgrest-js
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
This single command automatically:
|
|
@@ -108,19 +108,19 @@ This single command automatically:
|
|
|
108
108
|
|
|
109
109
|
```bash
|
|
110
110
|
# Run Jest tests with coverage (requires infrastructure running)
|
|
111
|
-
|
|
111
|
+
pnpm nx test:run postgrest-js
|
|
112
112
|
|
|
113
113
|
# Run type tests with tstyche
|
|
114
|
-
|
|
114
|
+
pnpm nx test:types postgrest-js
|
|
115
115
|
|
|
116
116
|
# Run smoke tests (CommonJS and ESM imports)
|
|
117
|
-
|
|
117
|
+
pnpm nx test:smoke postgrest-js
|
|
118
118
|
|
|
119
119
|
# Format code
|
|
120
|
-
|
|
120
|
+
pnpm nx format postgrest-js
|
|
121
121
|
|
|
122
122
|
# Check formatting
|
|
123
|
-
|
|
123
|
+
pnpm nx format:check postgrest-js
|
|
124
124
|
```
|
|
125
125
|
|
|
126
126
|
#### Test Infrastructure
|
|
@@ -132,8 +132,8 @@ The tests use Supabase CLI to spin up:
|
|
|
132
132
|
|
|
133
133
|
```bash
|
|
134
134
|
# Manually manage test infrastructure (from monorepo root)
|
|
135
|
-
|
|
136
|
-
|
|
135
|
+
pnpm nx test:infra postgrest-js # Start containers
|
|
136
|
+
pnpm nx test:clean-pre postgrest-js # Stop and remove containers
|
|
137
137
|
```
|
|
138
138
|
|
|
139
139
|
Or directly via Supabase CLI:
|
|
@@ -151,7 +151,7 @@ When the database schema changes, regenerate TypeScript types from the actual da
|
|
|
151
151
|
|
|
152
152
|
```bash
|
|
153
153
|
# From the monorepo root
|
|
154
|
-
|
|
154
|
+
pnpm run codegen:postgrest
|
|
155
155
|
```
|
|
156
156
|
|
|
157
157
|
This command automatically:
|
|
@@ -167,9 +167,9 @@ The generated types are written to `test/types.generated.ts`.
|
|
|
167
167
|
|
|
168
168
|
#### Test Types Explained
|
|
169
169
|
|
|
170
|
-
- **Unit Tests** - Jest tests covering all client functionality (`
|
|
171
|
-
- **Type Tests** - Validates TypeScript types using tstyche (`
|
|
172
|
-
- **Smoke Tests** - Basic import/require tests for CommonJS and ESM (`
|
|
170
|
+
- **Unit Tests** - Jest tests covering all client functionality (`pnpm nx test:run postgrest-js`)
|
|
171
|
+
- **Type Tests** - Validates TypeScript types using tstyche (`pnpm nx test:types postgrest-js`)
|
|
172
|
+
- **Smoke Tests** - Basic import/require tests for CommonJS and ESM (`pnpm nx test:smoke postgrest-js`)
|
|
173
173
|
|
|
174
174
|
#### Prerequisites
|
|
175
175
|
|
|
@@ -185,7 +185,7 @@ We maintain backward compatibility tests for PostgREST v12 (the current Supabase
|
|
|
185
185
|
|
|
186
186
|
```bash
|
|
187
187
|
# Run v12 compatibility tests (requires Docker)
|
|
188
|
-
|
|
188
|
+
pnpm nx test:ci:v12 postgrest-js
|
|
189
189
|
```
|
|
190
190
|
|
|
191
191
|
This command:
|
|
@@ -197,7 +197,7 @@ This command:
|
|
|
197
197
|
**Type-only tests** for v12 compatibility also run as part of the regular type tests:
|
|
198
198
|
|
|
199
199
|
```bash
|
|
200
|
-
|
|
200
|
+
pnpm nx test:types postgrest-js # Includes v12-compat.test-d.ts
|
|
201
201
|
```
|
|
202
202
|
|
|
203
203
|
**Note:** These v12 tests will be removed when v3 ships (sometime in 2026).
|
package/dist/index.cjs
CHANGED
|
@@ -51,12 +51,6 @@ var PostgrestError = class extends Error {
|
|
|
51
51
|
*/
|
|
52
52
|
constructor(context) {
|
|
53
53
|
super(context.message);
|
|
54
|
-
Object.defineProperty(this, "message", {
|
|
55
|
-
value: context.message,
|
|
56
|
-
enumerable: true,
|
|
57
|
-
writable: true,
|
|
58
|
-
configurable: true
|
|
59
|
-
});
|
|
60
54
|
this.name = "PostgrestError";
|
|
61
55
|
this.details = context.details;
|
|
62
56
|
this.hint = context.hint;
|
|
@@ -395,7 +389,7 @@ var PostgrestBuilder = class {
|
|
|
395
389
|
}
|
|
396
390
|
return {
|
|
397
391
|
success: error === null,
|
|
398
|
-
error
|
|
392
|
+
error,
|
|
399
393
|
data,
|
|
400
394
|
count,
|
|
401
395
|
status,
|
|
@@ -1380,6 +1374,9 @@ var PostgrestFilterBuilder = class extends PostgrestTransformBuilder {
|
|
|
1380
1374
|
/**
|
|
1381
1375
|
* Match only rows where `column` is not equal to `value`.
|
|
1382
1376
|
*
|
|
1377
|
+
* This filter does not include rows where `column` is `NULL`. To match null
|
|
1378
|
+
* values, use `.is(column, null)` instead.
|
|
1379
|
+
*
|
|
1383
1380
|
* @param column - The column to filter on
|
|
1384
1381
|
* @param value - The value to filter with
|
|
1385
1382
|
*
|
|
@@ -4627,7 +4624,7 @@ var PostgrestQueryBuilder = class {
|
|
|
4627
4624
|
};
|
|
4628
4625
|
|
|
4629
4626
|
//#endregion
|
|
4630
|
-
//#region \0@oxc-project+runtime@0.
|
|
4627
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/typeof.js
|
|
4631
4628
|
function _typeof(o) {
|
|
4632
4629
|
"@babel/helpers - typeof";
|
|
4633
4630
|
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o$1) {
|
|
@@ -4638,7 +4635,7 @@ function _typeof(o) {
|
|
|
4638
4635
|
}
|
|
4639
4636
|
|
|
4640
4637
|
//#endregion
|
|
4641
|
-
//#region \0@oxc-project+runtime@0.
|
|
4638
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/toPrimitive.js
|
|
4642
4639
|
function toPrimitive(t, r) {
|
|
4643
4640
|
if ("object" != _typeof(t) || !t) return t;
|
|
4644
4641
|
var e = t[Symbol.toPrimitive];
|
|
@@ -4651,14 +4648,14 @@ function toPrimitive(t, r) {
|
|
|
4651
4648
|
}
|
|
4652
4649
|
|
|
4653
4650
|
//#endregion
|
|
4654
|
-
//#region \0@oxc-project+runtime@0.
|
|
4651
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/toPropertyKey.js
|
|
4655
4652
|
function toPropertyKey(t) {
|
|
4656
4653
|
var i = toPrimitive(t, "string");
|
|
4657
4654
|
return "symbol" == _typeof(i) ? i : i + "";
|
|
4658
4655
|
}
|
|
4659
4656
|
|
|
4660
4657
|
//#endregion
|
|
4661
|
-
//#region \0@oxc-project+runtime@0.
|
|
4658
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/defineProperty.js
|
|
4662
4659
|
function _defineProperty(e, r, t) {
|
|
4663
4660
|
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
4664
4661
|
value: t,
|
|
@@ -4669,7 +4666,7 @@ function _defineProperty(e, r, t) {
|
|
|
4669
4666
|
}
|
|
4670
4667
|
|
|
4671
4668
|
//#endregion
|
|
4672
|
-
//#region \0@oxc-project+runtime@0.
|
|
4669
|
+
//#region \0@oxc-project+runtime@0.103.0/helpers/objectSpread2.js
|
|
4673
4670
|
function ownKeys(e, r) {
|
|
4674
4671
|
var t = Object.keys(e);
|
|
4675
4672
|
if (Object.getOwnPropertySymbols) {
|