From ac9b348b8e7a1d739b1b8b11dd28ec3b777bc28d Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Thu, 23 Oct 2025 16:48:08 +0300 Subject: [PATCH 1/6] chore(repo): cleanup package-lock.json --- package-lock.json | 31 ------------------------------- 1 file changed, 31 deletions(-) diff --git a/package-lock.json b/package-lock.json index ecf72da9..c7f8d508 100644 --- a/package-lock.json +++ b/package-lock.json @@ -36764,37 +36764,6 @@ "webpack-cli": "^4.9.2" } }, - "packages/core/supabase-js/node_modules/@supabase/auth-js": { - "version": "2.71.1", - "license": "MIT", - "dependencies": { - "@supabase/node-fetch": "^2.6.14" - } - }, - "packages/core/supabase-js/node_modules/@supabase/functions-js": { - "version": "2.4.5", - "license": "MIT", - "dependencies": { - "@supabase/node-fetch": "^2.6.14" - } - }, - "packages/core/supabase-js/node_modules/@supabase/postgrest-js": { - "version": "1.21.3", - "license": "MIT", - "dependencies": { - "@supabase/node-fetch": "^2.6.14" - } - }, - "packages/core/supabase-js/node_modules/@supabase/realtime-js": { - "version": "2.15.1", - "license": "MIT", - "dependencies": { - "@supabase/node-fetch": "^2.6.13", - "@types/phoenix": "^1.6.6", - "@types/ws": "^8.18.1", - "ws": "^8.18.2" - } - }, "packages/core/supabase-js/node_modules/@tsd/typescript": { "version": "5.3.3", "dev": true, From 8af2ef2eae94d0ea5d0795a96af67f79388d0918 Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Thu, 23 Oct 2025 17:01:00 +0300 Subject: [PATCH 2/6] chore(repo): remove bun.lock from git --- packages/core/supabase-js/.gitignore | 1 + .../supabase-js/test/integration/bun/bun.lock | 51 ------------------- 2 files changed, 1 insertion(+), 51 deletions(-) delete mode 100644 packages/core/supabase-js/test/integration/bun/bun.lock diff --git a/packages/core/supabase-js/.gitignore b/packages/core/supabase-js/.gitignore index 8dfe52ca..0da0d4c6 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/test/integration/bun/bun.lock b/packages/core/supabase-js/test/integration/bun/bun.lock deleted file mode 100644 index adfaf382..00000000 --- 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=="], - } -} From 350b3699cafd57e103d273a1d12d5574c56c920e Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Thu, 23 Oct 2025 17:08:08 +0300 Subject: [PATCH 3/6] chore(repo): fix failing test types --- packages/core/postgrest-js/package.json | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/postgrest-js/package.json b/packages/core/postgrest-js/package.json index 40f70d89..94477515 100644 --- a/packages/core/postgrest-js/package.json +++ b/packages/core/postgrest-js/package.json @@ -37,6 +37,7 @@ "build": "npm run clean && npm run build:cjs && npm run build:esm", "build:cjs": "tsc -p tsconfig.json", "build:esm": "cpy wrapper.mjs dist/esm/", + "build:module": "npm run build:cjs", "docs": "typedoc src/index.ts --out docs/v2", "docs:json": "typedoc --json docs/v2/spec.json --excludeExternals src/index.ts", "test:ci:postgrest": "npm run db:clean && npm run db:run && npm run test:run && npm run db:clean && npm run test:smoke", From 90cc7ae17f564c5b14628ffcf4b0a3396d233b2c Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Thu, 23 Oct 2025 17:10:16 +0300 Subject: [PATCH 4/6] chore(ci): fix esm issue --- packages/core/postgrest-js/wrapper.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/postgrest-js/wrapper.mjs b/packages/core/postgrest-js/wrapper.mjs index 67b173b5..4f5b8da8 100644 --- a/packages/core/postgrest-js/wrapper.mjs +++ b/packages/core/postgrest-js/wrapper.mjs @@ -1,4 +1,4 @@ -import index from '../cjs/index.js' +import * as index from '../cjs/index.js' const { PostgrestClient, PostgrestQueryBuilder, @@ -6,7 +6,7 @@ const { PostgrestTransformBuilder, PostgrestBuilder, PostgrestError, -} = index +} = index.default || index export { PostgrestBuilder, From 210e8b3a194c4914447090ce57cde4dd4f826e73 Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Thu, 23 Oct 2025 17:20:11 +0300 Subject: [PATCH 5/6] chore(supabase): update scripts --- packages/core/supabase-js/package.json | 10 +++++----- project.json | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/core/supabase-js/package.json b/packages/core/supabase-js/package.json index cdf213ee..5016739d 100644 --- a/packages/core/supabase-js/package.json +++ b/packages/core/supabase-js/package.json @@ -45,11 +45,11 @@ "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" + "update:test-deps": "npm run update:test-deps:expo && npm run update:test-deps:next && npm run update:test-deps:deno && npm run update:test-deps:bun", + "update:test-deps:expo": "cd test/integration/expo && npm install", + "update:test-deps:next": "cd test/integration/next && npm install --legacy-peer-deps", + "update:test-deps:deno": "cd test/deno && npm install", + "update:test-deps:bun": "cd test/integration/bun && bun install" }, "dependencies": { "@supabase/auth-js": "*", diff --git a/project.json b/project.json index 6937e63a..980e726a 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": { From 863ab13fba3e73b4321ab4dec30476d7ead2324d Mon Sep 17 00:00:00 2001 From: Katerina Skroumpelou Date: Thu, 23 Oct 2025 18:05:12 +0300 Subject: [PATCH 6/6] chore(supabase): fix deno test --- packages/core/supabase-js/package.json | 2 +- .../core/supabase-js/test/deno/package.json | 4 +- .../supabase-js/test/deno/run-deno-test.js | 41 +++++++++++++++++++ 3 files changed, 44 insertions(+), 3 deletions(-) create mode 100644 packages/core/supabase-js/test/deno/run-deno-test.js diff --git a/packages/core/supabase-js/package.json b/packages/core/supabase-js/package.json index 5016739d..867194cb 100644 --- a/packages/core/supabase-js/package.json +++ b/packages/core/supabase-js/package.json @@ -37,7 +37,7 @@ "test:coverage": "jest --runInBand --coverage --testPathIgnorePatterns=\"test/integration|test/deno\"", "test:integration": "jest --runInBand --detectOpenHandles test/integration.test.ts", "test:integration:browser": "deno test --allow-all test/integration.browser.test.ts", - "test:edge-functions": "deno test --allow-all --no-check --unstable-sloppy-imports --config test/deno/deno.json test/deno/edge-functions-integration.test.ts", + "test:edge-functions": "cd test/deno && npm run test:edge-functions", "test:watch": "jest --watch --verbose false --silent false", "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", diff --git a/packages/core/supabase-js/test/deno/package.json b/packages/core/supabase-js/test/deno/package.json index 102cb44d..4b9c530c 100644 --- a/packages/core/supabase-js/test/deno/package.json +++ b/packages/core/supabase-js/test/deno/package.json @@ -2,8 +2,8 @@ "name": "test-deno", "private": true, "scripts": { - "test": "npm run setup-deps && deno test --allow-all --no-check --unstable-sloppy-imports integration.test.ts", - "test:edge-functions": "npm run setup-deps && deno test --allow-all --no-check --unstable-sloppy-imports edge-functions-integration.test.ts", + "test": "npm run setup-deps && node run-deno-test.js integration.test.ts", + "test:edge-functions": "npm run setup-deps && node run-deno-test.js edge-functions-integration.test.ts", "setup-deps": "node setup-deps.js" }, "dependencies": { diff --git a/packages/core/supabase-js/test/deno/run-deno-test.js b/packages/core/supabase-js/test/deno/run-deno-test.js new file mode 100644 index 00000000..67d968b0 --- /dev/null +++ b/packages/core/supabase-js/test/deno/run-deno-test.js @@ -0,0 +1,41 @@ +#!/usr/bin/env node + +const { execSync } = require('child_process'); + +// Get Deno version +let denoVersion = '1.0.0'; // default fallback +try { + const versionOutput = execSync('deno --version', { encoding: 'utf-8' }); + const match = versionOutput.match(/deno (\d+)\.(\d+)\.(\d+)/); + if (match) { + denoVersion = `${match[1]}.${match[2]}.${match[3]}`; + } +} catch (error) { + console.warn('Could not determine Deno version, assuming 1.x'); +} + +const majorVersion = parseInt(denoVersion.split('.')[0]); + +// Get test file from arguments +const testFile = process.argv[2] || 'integration.test.ts'; + +// Base flags that work for both versions +let flags = '--allow-all --no-check --unstable-sloppy-imports'; + +// Add version-specific flags +if (majorVersion >= 2) { + flags += ' --unstable-detect-cjs'; + console.log(`Running with Deno ${denoVersion} (v2+ detected, using --unstable-detect-cjs)`); +} else { + console.log(`Running with Deno ${denoVersion} (v1.x detected, skipping --unstable-detect-cjs)`); +} + +// Run the test +const command = `deno test ${flags} ${testFile}`; +console.log(`Executing: ${command}\n`); + +try { + execSync(command, { stdio: 'inherit' }); +} catch (error) { + process.exit(error.status || 1); +} \ No newline at end of file