@@ -6,7 +6,6 @@ const path = require('node:path')
66// Get the directory of the script
77const scriptDir = __dirname
88const projectRoot = path . dirname ( path . dirname ( scriptDir ) )
9- const monorepoRoot = path . dirname ( path . dirname ( path . dirname ( path . dirname ( path . dirname ( scriptDir ) ) ) ) )
109
1110// Read package.json from main project
1211const packageJsonPath = path . join ( projectRoot , 'package.json' )
@@ -51,7 +50,10 @@ denoJson.imports = {
5150 '@supabase/functions-js' : `npm:@supabase/functions-js@${ versions . functions } ` ,
5251 '@supabase/postgrest-js' : `npm:@supabase/postgrest-js@${ versions . postgrest } ` ,
5352 '@supabase/auth-js' : `npm:@supabase/auth-js@${ versions . auth } ` ,
54- '@supabase/storage-js' : `npm:@supabase/auth-js@${ versions . storage } ` ,
53+ '@supabase/storage-js' :
54+ process . env . STORAGE_JS_ENTRY === 'main'
55+ ? `npm:@supabase/storage-js@${ versions . storage } /dist/main/index.js`
56+ : `npm:@supabase/storage-js@${ versions . storage } /dist/module/index.js` ,
5557 '@supabase/node-fetch' : `npm:@supabase/node-fetch@${ versions . node_fetch } ` ,
5658}
5759
@@ -65,4 +67,4 @@ denoJson.compilerOptions.types = Array.isArray(denoJson.compilerOptions.types)
6567fs . writeFileSync ( denoJsonPath , JSON . stringify ( denoJson , null , 2 ) + '\n' )
6668
6769console . log ( 'Updated deno.json with versions from package.json' )
68- console . log ( 'Versions used:' , versions )
70+ console . log ( 'Versions used:' , versions )
0 commit comments