mirror of
https://github.com/supabase/supabase.git
synced 2026-10-05 17:35:10 +03:00
## Context Drops the `@std/path` dependency which is used in `EdgeFunctions.utils` as `npm.jsr.io` was putting up a Cloudflare bot challenge on some connections which blocks `pnpm install`. Instead, opting to directly port the exact required methods as self-contained functions. Also added some unit tests to check that UI behaviour remains status quo. ## To test: Important to test that everything in the edge functions UI remains status quo - [ ] Open an existing edge function with a single root-level file - should load as expected <img width="310" height="176" alt="image" src="https://github.com/user-attachments/assets/4d724ab0-33bb-4093-a574-52984b2743fd" /> - [ ] Open (or create) an edge function with nested folders - confirm file paths in the editor are shown correctly - Can create nested folders by using `../` as such <img width="319" height="228" alt="image" src="https://github.com/user-attachments/assets/dd345b1f-7c45-47e9-975c-f2f2e53a0106" /> - [ ] Similarly, download the edge function as ZIP to verify that the nested folders are all correctly located - [ ] Open a function with `import_map.json` - confirm still detected as import map through the network tab GET request for the edge function code (Examples here with and without import map) <img width="333" height="245" alt="image" src="https://github.com/user-attachments/assets/90fc90e3-4a62-493b-9246-ed7e3b662e96" /> <img width="290" height="237" alt="image" src="https://github.com/user-attachments/assets/2f692362-c9d4-4394-bc5a-4f84ab5fb6f1" /> - [ ] Deploy a new function via the editor - [ ] Update an existing function via the editor (Test adding new files etc) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **Bug Fixes** - Improved Edge Functions file path handling across supported application environments. - Nested entrypoints, URL-based entrypoints, root-level files, and unmatched paths are now handled consistently. - Generated files retain their content and receive sequential identifiers reliably. - Improved compatibility when processing and displaying files in different application environments. - **Tests** - Added coverage for entrypoint path formatting, relative paths, fallback behavior, unchanged paths, and identifier assignment. <!-- end of auto-generated comment: release notes by coderabbit.ai -->