Skip to content

Commit 8d708ec

Browse files
committed
chore(repo): remove Deno 1.x testing suite
1 parent ec445bb commit 8d708ec

File tree

5 files changed

+9
-54
lines changed

5 files changed

+9
-54
lines changed

.github/workflows/ci-supabase-js.yml

Lines changed: 4 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -111,13 +111,9 @@ jobs:
111111
fail-on-error: false
112112
continue-on-error: true
113113
deno-tests:
114-
name: Deno Tests / ${{ matrix.deno }}
114+
name: Deno Tests
115115
runs-on: ubuntu-latest
116116
needs: build-package
117-
strategy:
118-
matrix:
119-
deno: ['1.x', '2.x']
120-
fail-fast: false
121117
steps:
122118
- name: Checkout code
123119
uses: actions/checkout@v4
@@ -128,7 +124,7 @@ jobs:
128124
- name: Setup Deno
129125
uses: denoland/setup-deno@v2
130126
with:
131-
deno-version: ${{ matrix.deno }}
127+
deno-version: '2.x'
132128

133129
- name: Setup Supabase CLI
134130
uses: supabase/setup-cli@v1
@@ -183,21 +179,7 @@ jobs:
183179
npm view @supabase/supabase-js version --registry http://localhost:4873
184180
npm view @supabase/supabase-js --registry http://localhost:4873 | head -20
185181
186-
- name: Run Deno Tests (1.x)
187-
if: ${{ matrix.deno == '1.x' }}
188-
env:
189-
STORAGE_JS_ENTRY: main
190-
DENO_NPM_REGISTRY: http://localhost:4873
191-
run: |
192-
cd packages/core/supabase-js/test/deno
193-
echo "registry=http://localhost:4873/" > .npmrc
194-
npm install
195-
npm test || npm test
196-
rm -f .npmrc
197-
cd ../../..
198-
199-
- name: Run Deno Tests (2.x)
200-
if: ${{ matrix.deno == '2.x' }}
182+
- name: Run Deno Tests
201183
env:
202184
DENO_NPM_REGISTRY: http://localhost:4873
203185
run: |
@@ -208,12 +190,10 @@ jobs:
208190
rm -f .npmrc
209191
cd ../../..
210192
211-
- name: Run integration and browser tests on Deno 2.x only
212-
if: ${{ matrix.deno == '2.x' }}
193+
- name: Run integration and browser tests
213194
run: npx nx test:integration:browser supabase-js
214195

215196
- name: Run Edge Functions Tests
216-
if: ${{ matrix.deno == '2.x' }}
217197
run: |
218198
cd packages/core/supabase-js/test/deno
219199
npm run test:edge-functions

docs/MIGRATION.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ npm install @supabase/auth-js@latest
5757

5858
- **Node.js 20+** - Native fetch support
5959
- **Modern browsers** - All modern browsers
60-
- **Deno 1.0+** - Native fetch built-in
60+
- **Deno 2.x** - Native fetch built-in
6161
- **Bun 0.1+** - Native fetch built-in
6262
- **React Native** - With fetch polyfill provided by the framework
6363
- **Expo** - With fetch polyfill provided by the framework

packages/core/functions-js/test/functions/hijack/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { serve } from 'https://deno.land/std@0.130.0/http/server.ts'
1+
import { serve } from 'https://deno.land/std/http/server.ts'
22

33
serve((req) => {
44
// Decode JWT to check if this is a health check

packages/core/supabase-js/test/deno/run-deno-test.js

Lines changed: 2 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2,33 +2,11 @@
22

33
const { execSync } = require('child_process');
44

5-
// Get Deno version
6-
let denoVersion = '1.0.0'; // default fallback
7-
try {
8-
const versionOutput = execSync('deno --version', { encoding: 'utf-8' });
9-
const match = versionOutput.match(/deno (\d+)\.(\d+)\.(\d+)/);
10-
if (match) {
11-
denoVersion = `${match[1]}.${match[2]}.${match[3]}`;
12-
}
13-
} catch (error) {
14-
console.warn('Could not determine Deno version, assuming 1.x');
15-
}
16-
17-
const majorVersion = parseInt(denoVersion.split('.')[0]);
18-
195
// Get test file from arguments
206
const testFile = process.argv[2] || 'integration.test.ts';
217

22-
// Base flags that work for both versions
23-
let flags = '--allow-all --no-check --unstable-sloppy-imports';
24-
25-
// Add version-specific flags
26-
if (majorVersion >= 2) {
27-
flags += ' --unstable-detect-cjs';
28-
console.log(`Running with Deno ${denoVersion} (v2+ detected, using --unstable-detect-cjs)`);
29-
} else {
30-
console.log(`Running with Deno ${denoVersion} (v1.x detected, skipping --unstable-detect-cjs)`);
31-
}
8+
// Flags for Deno 2.x
9+
const flags = '--allow-all --no-check --unstable-sloppy-imports --unstable-detect-cjs';
3210

3311
// Run the test
3412
const command = `deno test ${flags} ${testFile}`;

packages/core/supabase-js/test/deno/setup-deps.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -49,10 +49,7 @@ denoJson.imports = {
4949
'@supabase/functions-js': `npm:@supabase/functions-js@${versions.functions}`,
5050
'@supabase/postgrest-js': `npm:@supabase/postgrest-js@${versions.postgrest}`,
5151
'@supabase/auth-js': `npm:@supabase/auth-js@${versions.auth}`,
52-
'@supabase/storage-js':
53-
process.env.STORAGE_JS_ENTRY === 'main'
54-
? `npm:@supabase/storage-js@${versions.storage}/dist/main/index.js`
55-
: `npm:@supabase/storage-js@${versions.storage}/dist/module/index.js`,
52+
'@supabase/storage-js': `npm:@supabase/storage-js@${versions.storage}/dist/module/index.js`,
5653
}
5754

5855
// Ensure Node types are available for Deno type-checking of .d.ts files

0 commit comments

Comments
 (0)