@supabase/storage-js 2.101.0 → 2.101.1

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
@@ -1170,27 +1170,21 @@ npx nx docs storage-js
1170
1170
 
1171
1171
  ### Testing
1172
1172
 
1173
- **Important:** The storage-js tests require a local test infrastructure running in Docker. This is **NOT** the same as a regular Supabase instance - it's a specialized test setup with its own storage API, database, and Kong gateway.
1173
+ **Important:** The storage-js tests require a local Supabase stack running via the Supabase CLI. Docker must be running since the Supabase CLI uses it internally.
1174
1174
 
1175
1175
  #### Prerequisites
1176
1176
 
1177
- 1. **Docker** must be installed and running
1178
- 2. **Port availability** - The following ports must be free:
1179
- - 5432 (PostgreSQL database)
1180
- - 5050 (Storage API - sometimes 5000 conflicts macOS AirPlay conflict)
1181
- - 8000 (Kong API Gateway)
1182
- - 50020 (imgproxy for image transformations)
1183
-
1184
- **Note:** If port 5000 conflicts with macOS AirPlay Receiver, the docker-compose.yml has been configured to use port 5050 instead.
1177
+ 1. **Docker** must be installed and running (used by Supabase CLI internally)
1178
+ 2. **Supabase CLI** installed automatically via `npx supabase`
1185
1179
 
1186
1180
  #### Test Scripts Overview
1187
1181
 
1188
- | Script | Description | What it does |
1189
- | -------------- | --------------------------------- | ----------------------------------------------------------------- |
1190
- | `test:storage` | **Complete test workflow** | Runs the full test cycle: clean → start infra → run tests → clean |
1191
- | `test:suite` | **Jest tests only** | Runs Jest tests with coverage (requires infra to be running) |
1192
- | `test:infra` | **Start test infrastructure** | Starts Docker containers for storage API, database, and Kong |
1193
- | `test:clean` | **Stop and clean infrastructure** | Stops all Docker containers and removes them |
1182
+ | Script | Description | What it does |
1183
+ | ----------------- | --------------------------------- | ----------------------------------------------------------------- |
1184
+ | `test:storage` | **Complete test workflow** | Runs the full test cycle: clean → start infra → run tests → clean |
1185
+ | `test:suite` | **Jest tests only** | Runs Jest tests with coverage (requires infra to be running) |
1186
+ | `test:infra` | **Start test infrastructure** | Starts Supabase CLI stack (PostgreSQL, Storage API, Kong, etc.) |
1187
+ | `test:clean-post` | **Stop and clean infrastructure** | Stops the Supabase CLI stack |
1194
1188
 
1195
1189
  #### Running Tests
1196
1190
 
@@ -1225,7 +1219,7 @@ npx nx test:infra storage-js
1225
1219
  npx nx test:suite storage-js
1226
1220
 
1227
1221
  # Step 3: When done, clean up the infrastructure
1228
- npx nx test:clean storage-js
1222
+ npx nx test:clean-post storage-js
1229
1223
  ```
1230
1224
 
1231
1225
  ##### Option 3: Development Mode
@@ -1240,53 +1234,26 @@ npx nx test:infra storage-js
1240
1234
  npx nx test:suite storage-js --watch
1241
1235
 
1242
1236
  # Clean up when done
1243
- npx nx test:clean storage-js
1237
+ npx nx test:clean-post storage-js
1244
1238
  ```
1245
1239
 
1246
1240
  #### Test Infrastructure Details
1247
1241
 
1248
- The test infrastructure (`infra/docker-compose.yml`) includes:
1249
-
1250
- - **PostgreSQL Database** (port 5432)
1251
- - Initialized with storage schema and test data
1252
- - Contains bucket configurations and permissions
1253
-
1254
- - **Storage API** (port 5050, internal 5000)
1255
- - Supabase Storage service for handling file operations
1256
- - Configured with test authentication keys
1257
-
1258
- - **Kong Gateway** (port 8000)
1259
- - API gateway that routes requests to storage service
1260
- - Handles authentication and CORS
1261
-
1262
- - **imgproxy** (port 50020)
1263
- - Image transformation service for on-the-fly image processing
1242
+ The test infrastructure is managed via the Supabase CLI (`npx supabase start --workdir test`), which starts a local Supabase stack defined by the config in `test/`. This includes PostgreSQL, the Storage API, Kong Gateway, and supporting services.
1264
1243
 
1265
1244
  #### Common Issues and Solutions
1266
1245
 
1267
- | Issue | Solution |
1268
- | --------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------- |
1269
- | Port 5000 already in use | macOS AirPlay uses this port. Either disable AirPlay Receiver in System Settings or use the modified docker-compose.yml with port 5050 |
1270
- | Port 5432 already in use | Another PostgreSQL instance is running. Stop it or modify the port in docker-compose.yml |
1271
- | "request failed, reason:" errors | Infrastructure isn't running. Run `npx nx test:infra storage-js` first |
1272
- | Tests fail with connection errors | Ensure Docker is running and healthy |
1273
- | "Container name already exists" | Run `npx nx test:clean storage-js` to remove existing containers |
1246
+ | Issue | Solution |
1247
+ | --------------------------------- | ------------------------------------------------------------------------------------------------ |
1248
+ | Port conflicts | Another service is using a required port. Run `npx nx test:clean-post storage-js` then try again |
1249
+ | "request failed, reason:" errors | Infrastructure isn't running. Run `npx nx test:infra storage-js` first |
1250
+ | Tests fail with connection errors | Ensure Docker is running (Supabase CLI requires Docker) |
1251
+ | Stack already running | Run `npx nx test:clean-post storage-js` to stop it before restarting |
1274
1252
 
1275
1253
  #### Understanding Test Failures
1276
1254
 
1277
1255
  - **StorageUnknownError with "request failed"**: Infrastructure not running
1278
- - **Port binding errors**: Ports are already in use by other services
1279
- - **Snapshot failures**: Expected test data has changed - review and update snapshots if needed
1280
-
1281
- #### What About Supabase CLI?
1282
-
1283
- **No**, you don't need `supabase start` or a regular Supabase instance for these tests. The storage-js tests use their own specialized Docker setup that's lighter and focused specifically on testing the storage SDK. This test infrastructure:
1284
-
1285
- - Is completely independent from any Supabase CLI projects
1286
- - Uses fixed test authentication keys
1287
- - Has predictable test data and bucket configurations
1288
- - Runs faster than a full Supabase stack
1289
- - Doesn't interfere with your local Supabase development projects
1256
+ - **Snapshot failures**: Expected test data has changed review and update snapshots if needed
1290
1257
 
1291
1258
  ### Contributing
1292
1259
 
package/dist/index.cjs CHANGED
@@ -1432,7 +1432,7 @@ var StorageFileApi = class extends BaseApiClient {
1432
1432
 
1433
1433
  //#endregion
1434
1434
  //#region src/lib/version.ts
1435
- const version = "2.101.0";
1435
+ const version = "2.101.1";
1436
1436
 
1437
1437
  //#endregion
1438
1438
  //#region src/lib/constants.ts