diff --git a/deno.lock b/deno.lock index 6e42c9b5d..a78561391 100644 --- a/deno.lock +++ b/deno.lock @@ -4,6 +4,17 @@ "https://deno.land/x/sleep/mod.ts": "https://deno.land/x/sleep@v1.3.0/mod.ts" }, "remote": { + "https://deno.land/std@0.168.0/async/abortable.ts": "80b2ac399f142cc528f95a037a7d0e653296352d95c681e284533765961de409", + "https://deno.land/std@0.168.0/async/deadline.ts": "2c2deb53c7c28ca1dda7a3ad81e70508b1ebc25db52559de6b8636c9278fd41f", + "https://deno.land/std@0.168.0/async/debounce.ts": "60301ffb37e730cd2d6f9dadfd0ecb2a38857681bd7aaf6b0a106b06e5210a98", + "https://deno.land/std@0.168.0/async/deferred.ts": "77d3f84255c3627f1cc88699d8472b664d7635990d5358c4351623e098e917d6", + "https://deno.land/std@0.168.0/async/delay.ts": "5a9bfba8de38840308a7a33786a0155a7f6c1f7a859558ddcec5fe06e16daf57", + "https://deno.land/std@0.168.0/async/mod.ts": "7809ad4bb223e40f5fdc043e5c7ca04e0e25eed35c32c3c32e28697c553fa6d9", + "https://deno.land/std@0.168.0/async/mux_async_iterator.ts": "770a0ff26c59f8bbbda6b703a2235f04e379f73238e8d66a087edc68c2a2c35f", + "https://deno.land/std@0.168.0/async/pool.ts": "6854d8cd675a74c73391c82005cbbe4cc58183bddcd1fbbd7c2bcda42b61cf69", + "https://deno.land/std@0.168.0/async/retry.ts": "e8e5173623915bbc0ddc537698fa418cf875456c347eda1ed453528645b42e67", + "https://deno.land/std@0.168.0/async/tee.ts": "3a47cc4e9a940904fd4341f0224907e199121c80b831faa5ec2b054c6d2eff5e", + "https://deno.land/std@0.168.0/http/server.ts": "e99c1bee8a3f6571ee4cdeb2966efad465b8f6fe62bec1bdb59c1f007cc4d155", "https://deno.land/std@0.192.0/_util/asserts.ts": "178dfc49a464aee693a7e285567b3d0b555dc805ff490505a8aae34f9cfb1462", "https://deno.land/std@0.192.0/async/abortable.ts": "fd682fa46f3b7b16b4606a5ab52a7ce309434b76f820d3221bdfb862719a15d7", "https://deno.land/std@0.192.0/async/deadline.ts": "58f72a3cc0fcb731b2cc055ba046f4b5be3349ff6bf98f2e793c3b969354aab2", @@ -135,7 +146,7 @@ "npm:typedoc@~0.27.9", "npm:typescript@~5.8.3", "npm:verdaccio@^6.0.5", - "npm:vite@7.1.5", + "npm:vite@7.1.11", "npm:vitest@^3.2.4", "npm:webpack-cli@^5.1.4" ] @@ -146,7 +157,8 @@ "dependencies": [ "npm:@supabase/node-fetch@2.6.15", "npm:jest@^28.1.3", - "npm:ts-jest@^28.0.7" + "npm:ts-jest@^28.0.7", + "npm:tslib@2.8.1" ] } }, @@ -160,7 +172,8 @@ "npm:nanoid@^3.3.1", "npm:openai@^4.52.5", "npm:testcontainers@^8.5.1", - "npm:ts-jest@^29.4.2" + "npm:ts-jest@^29.4.2", + "npm:tslib@2.8.1" ] } }, @@ -174,6 +187,7 @@ "npm:node-abort-controller@^3.0.1", "npm:prettier@^2.6.2", "npm:ts-jest@^28.0.3", + "npm:tslib@2.8.1", "npm:tstyche@^4.3.0", "npm:type-fest@^4.32.0", "npm:wait-for-localhost-cli@3", @@ -194,6 +208,7 @@ "npm:jsdom@^16.7.0", "npm:mock-socket@^9.3.1", "npm:nyc@^15.1.0", + "npm:tslib@2.8.1", "npm:web-worker@1.2.0", "npm:ws@^8.18.2" ] @@ -209,6 +224,7 @@ "npm:pretty-quick@^3.1.0", "npm:ts-jest@29", "npm:ts-loader@^9.4.2", + "npm:tslib@2.8.1", "npm:webpack-cli@^5.0.1", "npm:webpack@^5.75.0" ] diff --git a/docs/TESTING.md b/docs/TESTING.md index c4aaf569d..f7de2fc79 100644 --- a/docs/TESTING.md +++ b/docs/TESTING.md @@ -22,14 +22,14 @@ Each package has unique testing requirements. Please refer to the individual REA ### Core Packages -| Package | Docker Required | Test Command | Documentation | -| ---------------- | ---------------------------------------- | -------------------------------- | ------------------------------------------------------------- | -| **auth-js** | ✅ Yes (GoTrue + PostgreSQL) | `npx nx test:auth auth-js` | [Testing Guide](packages/core/auth-js/README.md#testing) | -| **functions-js** | ✅ Yes (Deno relay via testcontainers) | `npx nx test functions-js` | [Testing Guide](packages/core/functions-js/README.md#testing) | -| **postgrest-js** | ✅ Yes (PostgREST + PostgreSQL) | `npx nx test postgrest-js` | [Testing Guide](packages/core/postgrest-js/README.md#testing) | -| **realtime-js** | ❌ No (uses mock WebSockets) | `npx nx test realtime-js` | [Testing Guide](packages/core/realtime-js/README.md#testing) | -| **storage-js** | ✅ Yes (Storage API + PostgreSQL + Kong) | `npx nx test:storage storage-js` | [Testing Guide](packages/core/storage-js/README.md#testing) | -| **supabase-js** | ❌ No (unit tests only) | `npx nx test supabase-js` | [Testing Guide](packages/core/supabase-js/README.md#testing) | +| Package | Docker Required | Test Command | Documentation | +| ---------------- | ---------------------------------------- | -------------------------------- | ---------------------------------------------------------------- | +| **auth-js** | ✅ Yes (GoTrue + PostgreSQL) | `npx nx test:auth auth-js` | [Testing Guide](../packages/core/auth-js/README.md#testing) | +| **functions-js** | ✅ Yes (Deno relay via testcontainers) | `npx nx test functions-js` | [Testing Guide](../packages/core/functions-js/README.md#testing) | +| **postgrest-js** | ✅ Yes (PostgREST + PostgreSQL) | `npx nx test postgrest-js` | [Testing Guide](../packages/core/postgrest-js/README.md#testing) | +| **realtime-js** | ❌ No (uses mock WebSockets) | `npx nx test realtime-js` | [Testing Guide](../packages/core/realtime-js/README.md#testing) | +| **storage-js** | ✅ Yes (Storage API + PostgreSQL + Kong) | `npx nx test:storage storage-js` | [Testing Guide](../packages/core/storage-js/README.md#testing) | +| **supabase-js** | ✅ Yes | `npx nx test supabase-js` | [Testing Guide](../packages/core/supabase-js/TESTING.md) | ### Common Test Commands diff --git a/packages/core/supabase-js/.gitignore b/packages/core/supabase-js/.gitignore index 8dfe52ca3..0da0d4c66 100644 --- a/packages/core/supabase-js/.gitignore +++ b/packages/core/supabase-js/.gitignore @@ -109,6 +109,7 @@ docs/v2 # Test package-lock files (use local tarball, checksums change with builds) test/*/package-lock.json test/integration/*/package-lock.json +test/integration/*/bun.lock .cursor/ diff --git a/packages/core/supabase-js/README.md b/packages/core/supabase-js/README.md index 9bf7a7549..8588c7aa4 100644 --- a/packages/core/supabase-js/README.md +++ b/packages/core/supabase-js/README.md @@ -146,280 +146,7 @@ npx nx build supabase-js --watch ### Testing -**Important:** The test suite includes tests for multiple runtime environments (Node.js, Deno, Bun, Expo, Next.js). Each environment has its own test runner and specific requirements. - -#### Prerequisites for All Integration Tests - -1. **Docker** must be installed and running -2. **Supabase CLI** must be installed (`npm install -g supabase` or via package manager) -3. **Local Supabase instance** must be started: - -```bash -# Navigate to the supabase-js package directory -cd packages/core/supabase-js - -# Start Supabase (downloads and starts all required containers) -npx supabase start - -# The output will show: -# - API URL: http://127.0.0.1:54321 -# - Database URL: postgresql://postgres:postgres@127.0.0.1:54322/postgres -# - Studio URL: http://127.0.0.1:54323 -# - Anon key: [your-anon-key] -# - Service role key: [your-service-role-key] # Important for some tests! - -# Return to monorepo root for running tests -cd ../../.. -``` - -#### Test Scripts Overview - -| Script | Description | Requirements | -| -------------------------- | ----------------------------------------- | --------------------------------------- | -| `test` | Runs unit tests + type checking | None | -| `test:all` | Unit + integration + browser tests | Supabase running | -| `test:run` | Jest unit tests only | None | -| `test:unit` | Jest unit tests in test/unit directory | None | -| `test:coverage` | Unit tests with coverage report | None | -| `test:integration` | Node.js integration tests | Supabase running + SERVICE_ROLE_KEY | -| `test:integration:browser` | Browser tests using Deno + Puppeteer | Supabase running + Deno installed | -| `test:edge-functions` | Edge Functions tests | Supabase running + Deno installed | -| `test:types` | TypeScript type checking + JSR validation | None | -| `test:bun` | Bun runtime compatibility tests | Supabase running + Bun installed | -| `test:node:playwright` | WebSocket browser tests | Supabase running + Playwright | -| Deno (see section below) | Deno runtime compatibility tests | Supabase running + Deno installed | -| Expo (see section below) | React Native/Expo tests | Supabase running + dependencies updated | -| Next.js (see below) | Next.js SSR tests | Supabase running + dependencies updated | - -#### Unit Testing - -```bash -# Run all unit tests (Jest) -npx nx test supabase-js - -# Run only unit tests in test/unit directory -npx nx test:unit supabase-js - -# Run tests in watch mode during development -npx nx test supabase-js --watch - -# Run tests with coverage report -npx nx test:coverage supabase-js -``` - -#### Integration Testing - -```bash -# Prerequisites: Start Supabase first (see above) - -# Run Node.js integration tests -# IMPORTANT: Requires SUPABASE_SERVICE_ROLE_KEY environment variable -cd packages/core/supabase-js -export SUPABASE_SERVICE_ROLE_KEY="$(npx supabase status --output json | jq -r '.SERVICE_ROLE_KEY')" -cd ../../.. -npx nx test:integration supabase-js - -# Run browser-based integration tests (requires Deno) -npx nx test:integration:browser supabase-js -``` - -#### Running All Tests - -```bash -# This runs type checking, unit tests, and integration tests sequentially -# NOTE: Will fail if Supabase is not running or dependencies not updated -npx nx test:all supabase-js -``` - -**Common Issues and Solutions:** - -| Issue | Solution | -| -------------------------------------------- | --------------------------------------------------------------- | -| "Cannot find module 'https://deno.land/...'" | Deno tests incorrectly run by Jest - check `jest.config.ts` | -| "Port 54322 already allocated" | Stop existing Supabase: `npx supabase stop --project-id ` | -| "503 Service Unavailable" for Edge Functions | Supabase not running - start with `npx supabase start` | -| "Uncommitted changes" during type check | Commit changes or add `--allow-dirty` to JSR publish | -| Integration tests fail with auth errors | Export `SUPABASE_SERVICE_ROLE_KEY` (see Integration Testing) | - -### Platform-Specific Testing - -#### Expo Testing (React Native) - -```bash -# Prerequisites: -# 1. Supabase must be running (see Prerequisites) -# 2. Update test dependencies and pack current build -cd packages/core/supabase-js -npm run update:test-deps:expo - -# Run Expo tests from the Expo test project -cd test/integration/expo -npm install -npm test -cd ../../.. -``` - -#### Next.js Testing (SSR) - -```bash -# Prerequisites: -# 1. Supabase must be running (see Prerequisites) -# 2. Update test dependencies and pack current build -npx nx update:test-deps:next supabase-js - -# 3. Install Playwright browsers and dependencies -npx playwright install --with-deps - -# Run Next.js tests from the Next test project -cd packages/core/supabase-js/test/integration/next -npm install --legacy-peer-deps -npm run test -cd ../../.. -``` - -#### Deno Testing - -```bash -# Prerequisites: -# 1. Deno must be installed (https://deno.land) -# 2. Supabase must be running (see Prerequisites) -# 3. Update test dependencies: -npx nx update:test-deps:deno supabase-js - -# Run Deno tests -npx nx test:deno supabase-js -``` - -### Edge Functions Testing - -The project includes Edge Functions integration tests that require a local Supabase instance to be running. - -```bash -# Prerequisites: -# 1. Ensure Docker is installed and running -# 2. Navigate to the supabase-js package directory -cd packages/core/supabase-js - -# 3. Start Supabase locally (this will download and start all required containers) -npx supabase start - -# Wait for the output showing all services are ready, including: -# - API URL: http://127.0.0.1:54321 -# - Database URL: postgresql://postgres:postgres@127.0.0.1:54322/postgres -# - Edge Runtime container - -# 4. Run the Edge Functions tests from the monorepo root -cd ../../../ # Back to monorepo root -npx nx test:edge-functions supabase-js -``` - -**Important Notes:** - -- The Edge Functions tests will fail with 503 errors if Supabase is not running -- If you encounter port conflicts (e.g., "port 54322 already allocated"), stop any existing Supabase instances: - - ```bash - npx supabase stop --project-id - # Or stop all Docker containers if unsure: - docker ps | grep supabase # List all Supabase containers - ``` - -- The tests use the default local development credentials (anon key) -- Edge Functions are automatically served when `supabase start` is run - -#### Bun Testing - -```bash -# Prerequisites: -# 1. Bun must be installed (https://bun.sh) -# 2. Supabase must be running (see Prerequisites) -# 3. Update test dependencies: -npx nx update:test-deps:bun supabase-js - -# Run Bun tests -npx nx test:bun supabase-js -``` - -#### WebSocket Browser Testing - -```bash -# Prerequisites: -# 1. Supabase must be running (see Prerequisites) -# 2. Build the UMD bundle first: -npx nx build supabase-js - -# Run WebSocket browser tests with Playwright -cd packages/core/supabase-js/test/integration/node-browser -npm install -cp ../../../dist/umd/supabase.js . -npm run test -cd ../../.. -``` - -#### CI/CD Testing - -When running on CI, the tests automatically use the latest dependencies from the root project. The CI pipeline: - -1. Builds the main project with current dependencies -2. Creates a package archive (`.tgz`) with the latest versions -3. Uses this archive in Expo, Next.js, Deno, and Bun tests to ensure consistency - -### Updating Test Dependencies - -The platform-specific tests (Expo, Next.js, Deno, Bun) use a packaged version of supabase-js rather than directly importing from source. This ensures they test the actual built package as it would be consumed by users. - -#### How It Works - -1. **Build** the current supabase-js package -2. **Pack** it into a `.tgz` file (like `npm pack` does) -3. **Copy** the `.tgz` to the test directory -4. **Install** it in the test project - -This mimics how real users would install and use the package. - -#### Update Scripts - -```bash -# Update ALL test environment dependencies at once -# This builds, packs, and installs in all test directories -npx nx update:test-deps supabase-js - -# Or update specific test environments: -npx nx update:test-deps:expo supabase-js # Expo/React Native only -npx nx update:test-deps:next supabase-js # Next.js only -npx nx update:test-deps:deno supabase-js # Deno only -npx nx update:test-deps:bun supabase-js # Bun only -``` - -**When to Update:** - -- After making changes to the source code -- Before running platform-specific tests locally -- When debugging test failures that might be due to stale dependencies - -**Note:** CI automatically handles this, so manual updates are only needed for local development. - -### Test Coverage - -#### Viewing Coverage Reports - -```bash -# Generate coverage report -npx nx test:coverage supabase-js - -# Serve coverage report locally (opens interactive HTML report) -npx nx serve:coverage supabase-js -# This starts a local server at http://localhost:3000 with the coverage report -``` - -The coverage report shows: - -- Line coverage -- Branch coverage -- Function coverage -- Uncovered lines with highlights - -Coverage results are also automatically uploaded to Coveralls in CI for tracking over time. +Please read our [testing guide](./TESTING.md) for detailed instructions on how to run your tests locally. ### Contributing diff --git a/packages/core/supabase-js/TESTING.md b/packages/core/supabase-js/TESTING.md new file mode 100644 index 000000000..bc90db92a --- /dev/null +++ b/packages/core/supabase-js/TESTING.md @@ -0,0 +1,194 @@ +# Testing your changes locally + +**Important:** The test suite includes tests for multiple runtime environments (Node.js, Deno, Bun, Expo, Next.js). Each environment has its own test runner and specific requirements. + +## Prerequisites for All Integration Tests + +1. **Docker** must be installed and running +2. **Supabase CLI** must be installed (`npm install -g supabase` or via package manager) +3. **Local Supabase instance** must be started: + +```bash +# Navigate to the supabase-js package directory +cd packages/core/supabase-js + +# Start Supabase (downloads and starts all required containers) +npx supabase start + +# The output will show: +# - API URL: http://127.0.0.1:54321 +# - Database URL: postgresql://postgres:postgres@127.0.0.1:54322/postgres +# - Studio URL: http://127.0.0.1:54323 +# - Anon key: [your-anon-key] +# - Service role key: [your-service-role-key] # Important for some tests! + +# Return to monorepo root for running tests +cd ../../.. +``` + +## Integration Testing + +Integration tests verify that the SDK works correctly across different runtime environments (Node.js, Deno, Bun, Expo, Next.js). There are two approaches: + +### Recommended: Verdaccio Workflow (Mirrors CI) + +For the most accurate testing that mirrors CI exactly, use a local Verdaccio registry: + +**Setup:** +```bash +# Terminal 1: Start local Verdaccio registry (stays running) +npx nx local-registry + +# Terminal 2: Build and publish packages to local registry +npx nx run-many --target=build --all +npx nx populate-local-registry +``` + +**Run Tests:** +```bash +# Individual platform tests (from supabase-js directory) +npx nx test:verdaccio:bun supabase-js +npx nx test:verdaccio:expo supabase-js +npx nx test:verdaccio:next supabase-js +npx nx test:verdaccio:deno supabase-js + +# Run all platform tests +npx nx test:verdaccio:all supabase-js +``` + +**Tips:** +- Keep Verdaccio running in Terminal 1 for multiple test runs +- Only rebuild/republish when you change source code +- Registry runs on `http://localhost:4873/` +- To stop Verdaccio: Ctrl+C in Terminal 1 + +### Alternative: Basic Integration Tests + +For basic Node.js and browser integration testing (without platform-specific tests): + +```bash +# Run Node.js integration tests +# IMPORTANT: Requires SUPABASE_SERVICE_ROLE_KEY environment variable +cd packages/core/supabase-js +export SUPABASE_SERVICE_ROLE_KEY="$(npx supabase status --output json | jq -r '.SERVICE_ROLE_KEY')" +cd ../../.. +npx nx test:integration supabase-js + +# Run browser-based integration tests (requires Deno) +npx nx test:integration:browser supabase-js + +# Run Edge Functions tests +npx nx test:edge-functions supabase-js +``` + +**Note:** For platform-specific tests (Bun, Expo, Next.js), you still need Verdaccio running as these tests install packages from the registry. + +## Test Scripts Overview + +| Script | Description | Requirements | +| -------------------------- | ----------------------------------------- | --------------------------------------- | +| `test` | Runs unit tests + type checking | None | +| `test:all` | Unit + integration + browser tests | Supabase running | +| `test:run` | Jest unit tests only | None | +| `test:unit` | Jest unit tests in test/unit directory | None | +| `test:coverage` | Unit tests with coverage report | None | +| `test:integration` | Node.js integration tests | Supabase running + SERVICE_ROLE_KEY | +| `test:integration:browser` | Browser tests using Deno + Puppeteer | Supabase running + Deno installed | +| `test:edge-functions` | Edge Functions tests | Supabase running + Deno installed | +| `test:types` | TypeScript type checking + JSR validation | None | +| `test:bun` | Bun runtime compatibility tests | Supabase running + Bun installed | +| `test:node:playwright` | WebSocket browser tests | Supabase running + Playwright | +| Deno (see section below) | Deno runtime compatibility tests | Supabase running + Deno installed | +| Expo (see section below) | React Native/Expo tests | Supabase running + dependencies updated | +| Next.js (see below) | Next.js SSR tests | Supabase running + dependencies updated | + +## Unit Testing + +```bash +# Run all unit tests (Jest) +npx nx test supabase-js + +# Run only unit tests in test/unit directory +npx nx test:unit supabase-js + +# Run tests in watch mode during development +npx nx test supabase-js --watch + +# Run tests with coverage report +npx nx test:coverage supabase-js +``` + + +## Running All Tests + +```bash +# This runs type checking, unit tests, and integration tests sequentially +# NOTE: Will fail if Supabase is not running or dependencies not updated +npx nx test:all supabase-js +``` + +**Common Issues and Solutions:** + +| Issue | Solution | +| -------------------------------------------- | --------------------------------------------------------------- | +| "Cannot find module 'https://deno.land/...'" | Deno tests incorrectly run by Jest - check `jest.config.ts` | +| "Port 54322 already allocated" | Stop existing Supabase: `npx supabase stop --project-id ` | +| "503 Service Unavailable" for Edge Functions | Supabase not running - start with `npx supabase start` | +| "Uncommitted changes" during type check | Commit changes or add `--allow-dirty` to JSR publish | +| Integration tests fail with auth errors | Export `SUPABASE_SERVICE_ROLE_KEY` (see Integration Testing section) | + +## Additional Test Commands + +#### WebSocket Browser Testing + +```bash +# Build the UMD bundle first +npx nx build supabase-js + +# Run WebSocket browser tests with Playwright +cd packages/core/supabase-js/test/integration/node-browser +npm install +cp ../../../dist/umd/supabase.js . +npm run test +cd ../../.. +``` + +#### Playwright Setup (for Next.js tests) + +```bash +# Install Playwright browsers and dependencies +npx playwright install --with-deps +``` + +## CI/CD Testing + +When running on CI, the tests automatically publish packages to a local Verdaccio registry. The CI pipeline: + +1. Builds all packages with current dependencies +2. Starts a local Verdaccio registry +3. Publishes all packages to Verdaccio +4. Integration tests install from Verdaccio, ensuring they test the actual built packages + +**For local development:** Use the Verdaccio workflow described above. This mirrors CI exactly and allows you to test your local changes before pushing. + +## Test Coverage + +### Viewing Coverage Reports + +```bash +# Generate coverage report +npx nx test:coverage supabase-js + +# Serve coverage report locally (opens interactive HTML report) +npx nx serve:coverage supabase-js +# This starts a local server at http://localhost:3000 with the coverage report +``` + +The coverage report shows: + +- Line coverage +- Branch coverage +- Function coverage +- Uncovered lines with highlights + +Coverage results are also automatically uploaded to Coveralls in CI for tracking over time. diff --git a/packages/core/supabase-js/package.json b/packages/core/supabase-js/package.json index cdf213ee5..ea8b1676e 100644 --- a/packages/core/supabase-js/package.json +++ b/packages/core/supabase-js/package.json @@ -42,14 +42,14 @@ "test:node:playwright": "cd test/integration/node-browser && npm install && cp ../../../dist/umd/supabase.js . && npm run test", "test:bun": "cd test/integration/bun && bun install && bun test", "test:types": "tsd --files test/types/*.test-d.ts && jsr publish --dry-run --allow-dirty", + "test:verdaccio:bun": "cd test/integration/bun && echo 'registry=http://localhost:4873/' > .npmrc && bun install && bun test && rm .npmrc", + "test:verdaccio:expo": "cd test/integration/expo && echo 'registry=http://localhost:4873/' > .npmrc && npm install && npm test && rm .npmrc", + "test:verdaccio:next": "cd test/integration/next && echo 'registry=http://localhost:4873/' > .npmrc && npm install --legacy-peer-deps && npm test && rm .npmrc", + "test:verdaccio:deno": "cd test/deno && echo 'registry=http://localhost:4873/' > .npmrc && npm install && npm test && rm .npmrc", + "test:verdaccio:all": "npm run test:verdaccio:bun && npm run test:verdaccio:expo && npm run test:verdaccio:next && npm run test:verdaccio:deno", "docs": "typedoc --entryPoints src/index.ts --out docs/v2", "docs:json": "typedoc --entryPoints src/index.ts --json docs/v2/spec.json --excludeExternals", - "serve:coverage": "npx nx test:coverage supabase-js && serve test/coverage", - "update:test-deps": "npx nx build supabase-js && npm pack && cp supabase-supabase-js-*.tgz test/integration/expo/supabase-supabase-js-0.0.0-automated.tgz && cp supabase-supabase-js-*.tgz test/integration/next/supabase-supabase-js-0.0.0-automated.tgz && cp supabase-supabase-js-*.tgz test/deno/supabase-supabase-js-0.0.0-automated.tgz && cp supabase-supabase-js-*.tgz test/integration/bun/supabase-supabase-js-0.0.0-automated.tgz && cd test/integration/expo && npm install && cd ../next && npm install --legacy-peer-deps && cd ../../deno && npm install && cd ../integration/bun && bun install", - "update:test-deps:expo": "npx nx build supabase-js && npm pack && cp supabase-supabase-js-*.tgz test/integration/expo/supabase-supabase-js-0.0.0-automated.tgz && cd test/integration/expo && npm install", - "update:test-deps:next": "npx nx build supabase-js && npm pack && cp supabase-supabase-js-*.tgz test/integration/next/supabase-supabase-js-0.0.0-automated.tgz && cd test/integration/next && npm install --legacy-peer-deps", - "update:test-deps:deno": "npx nx build supabase-js && npm pack && cp supabase-supabase-js-*.tgz test/deno/supabase-supabase-js-0.0.0-automated.tgz && cd test/deno && npm install", - "update:test-deps:bun": "npx nx build supabase-js && npm pack && cp supabase-supabase-js-*.tgz test/integration/bun/supabase-supabase-js-0.0.0-automated.tgz && cd test/integration/bun && bun install" + "serve:coverage": "npx nx test:coverage supabase-js && serve test/coverage" }, "dependencies": { "@supabase/auth-js": "*", diff --git a/packages/core/supabase-js/test/integration/bun/bun.lock b/packages/core/supabase-js/test/integration/bun/bun.lock deleted file mode 100644 index adfaf382f..000000000 --- a/packages/core/supabase-js/test/integration/bun/bun.lock +++ /dev/null @@ -1,51 +0,0 @@ -{ - "lockfileVersion": 1, - "workspaces": { - "": { - "name": "test-bun", - "dependencies": { - "@supabase/supabase-js": "file:supabase-supabase-js-0.0.0-automated.tgz", - }, - "devDependencies": { - "bun-types": "latest", - }, - }, - }, - "packages": { - "@supabase/auth-js": ["@supabase/auth-js@2.72.0", "", { "dependencies": { "@supabase/node-fetch": "^2.6.14" } }, "sha512-4+bnUrtTDK1YD0/FCx2YtMiQH5FGu9Jlf4IQi5kcqRwRwqp2ey39V61nHNdH86jm3DIzz0aZKiWfTW8qXk1swQ=="], - - "@supabase/functions-js": ["@supabase/functions-js@2.5.0", "", { "dependencies": { "@supabase/node-fetch": "^2.6.14" } }, "sha512-SXBx6Jvp+MOBekeKFu+G11YLYPeVeGQl23eYyAG9+Ro0pQ1aIP0UZNIBxHKNHqxzR0L0n6gysNr2KT3841NATw=="], - - "@supabase/node-fetch": ["@supabase/node-fetch@2.6.15", "", { "dependencies": { "whatwg-url": "^5.0.0" } }, "sha512-1ibVeYUacxWYi9i0cf5efil6adJ9WRyZBLivgjs+AUpewx1F3xPi7gLgaASI2SmIQxPoCEjAsLAzKPgMJVgOUQ=="], - - "@supabase/postgrest-js": ["@supabase/postgrest-js@1.21.4", "", { "dependencies": { "@supabase/node-fetch": "^2.6.14" } }, "sha512-TxZCIjxk6/dP9abAi89VQbWWMBbybpGWyvmIzTd79OeravM13OjR/YEYeyUOPcM1C3QyvXkvPZhUfItvmhY1IQ=="], - - "@supabase/realtime-js": ["@supabase/realtime-js@2.15.6", "", { "dependencies": { "@supabase/node-fetch": "^2.6.13", "@types/phoenix": "^1.6.6", "@types/ws": "^8.18.1", "ws": "^8.18.2" } }, "sha512-pYuO/3pYkVmi/0EVYh5HNFrPiSoNaiKa1NLLDaNbCrs4RASGIMtZ5HhGFec5u+Fz15j0Rt7lSrBo3D3vvo/CfA=="], - - "@supabase/storage-js": ["@supabase/storage-js@2.12.2", "", { "dependencies": { "@supabase/node-fetch": "^2.6.14" } }, "sha512-SiySHxi3q7gia7NBYpsYRu8gyI0NhFwSORMxbZIxJ/zAVkN6QpwDRan158CJ+UdzD4WB/rQMAGRqIJQP+7ccAQ=="], - - "@supabase/supabase-js": ["@supabase/supabase-js@supabase-supabase-js-0.0.0-automated.tgz", { "dependencies": { "@supabase/auth-js": "*", "@supabase/functions-js": "*", "@supabase/node-fetch": "2.6.15", "@supabase/postgrest-js": "*", "@supabase/realtime-js": "*", "@supabase/storage-js": "*" } }], - - "@types/node": ["@types/node@24.6.0", "", { "dependencies": { "undici-types": "~7.13.0" } }, "sha512-F1CBxgqwOMc4GKJ7eY22hWhBVQuMYTtqI8L0FcszYcpYX0fzfDGpez22Xau8Mgm7O9fI+zA/TYIdq3tGWfweBA=="], - - "@types/phoenix": ["@types/phoenix@1.6.6", "", {}, "sha512-PIzZZlEppgrpoT2QgbnDU+MMzuR6BbCjllj0bM70lWoejMeNJAxCchxnv7J3XFkI8MpygtRpzXrIlmWUBclP5A=="], - - "@types/react": ["@types/react@19.1.16", "", { "dependencies": { "csstype": "^3.0.2" } }, "sha512-WBM/nDbEZmDUORKnh5i1bTnAz6vTohUf9b8esSMu+b24+srbaxa04UbJgWx78CVfNXA20sNu0odEIluZDFdCog=="], - - "@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="], - - "bun-types": ["bun-types@1.2.23", "", { "dependencies": { "@types/node": "*" }, "peerDependencies": { "@types/react": "^19" } }, "sha512-R9f0hKAZXgFU3mlrA0YpE/fiDvwV0FT9rORApt2aQVWSuJDzZOyB5QLc0N/4HF57CS8IXJ6+L5E4W1bW6NS2Aw=="], - - "csstype": ["csstype@3.1.3", "", {}, "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw=="], - - "tr46": ["tr46@0.0.3", "", {}, "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw=="], - - "undici-types": ["undici-types@7.13.0", "", {}, "sha512-Ov2Rr9Sx+fRgagJ5AX0qvItZG/JKKoBRAVITs1zk7IqZGTJUwgUr7qoYBpWwakpWilTZFM98rG/AFRocu10iIQ=="], - - "webidl-conversions": ["webidl-conversions@3.0.1", "", {}, "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ=="], - - "whatwg-url": ["whatwg-url@5.0.0", "", { "dependencies": { "tr46": "~0.0.3", "webidl-conversions": "^3.0.0" } }, "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw=="], - - "ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="], - } -} diff --git a/project.json b/project.json index 6937e63a8..980e726a4 100644 --- a/project.json +++ b/project.json @@ -9,7 +9,7 @@ "port": 4873, "config": ".verdaccio/config.yml", "storage": "tmp/local-registry/storage", - "clear": false + "clear": true } }, "populate-local-registry": {