Skip to content

refactor: follow storage-js #4

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 16, 2025
Merged

refactor: follow storage-js #4

merged 9 commits into from
Jan 16, 2025

Conversation

zoedsoupe
Copy link
Member

@zoedsoupe zoedsoupe commented Jan 14, 2025

Problem

The project lacked support for advanced configurations and optimizations for file handling, bucket attributes, and operational flexibility. Documentation was incomplete or unclear in some areas, leading to potential misuse or inefficiencies. The transform_options functionality required modularity to support advanced transformations.

Solution

  • Workflows:

    • Introduced static-analysis and enhanced caching in CI workflows.
    • Updated the Elixir version for linting to 1.17.0 for consistency with best practices.
  • Enhancements to the File Module:

    • Added support for advanced configurations such as transform_options.
    • Improved modularity for handling file transformations, making it more extendable and user-friendly.
  • Bucket Handling:

    • Introduced attributes such as file_size_limit and allowed_mime_types in Supabase.Storage.Bucket.
    • Modularized options and configurations for better flexibility and extensibility.
  • Documentation Improvements:

    • Enhanced module-level and inline documentation across all updated modules.
    • Provided clearer examples for File, Bucket, and Object operations, ensuring users understand new and existing features.
  • Transform Options:

    • Modularized transform_options to handle complex transformations in a more structured and extensible manner.
    • Added validation and parsing mechanisms for transformation-related options.
  • Refactoring:

    • Simplified and modularized Supabase.Storage.Bucket, File, and related modules to ensure clean and maintainable code.
    • Improved the ObjectOptions and SearchOptions modules for better handling of object-related configurations.

Rationale

These changes were implemented to:

  1. Align the project with Supabase's evolving API and Elixir best practices.
  2. Enhance the functionality and scalability of the library by adding support for advanced features like transform_options and new bucket configurations.
  3. Improve the user experience with comprehensive documentation and better modularity.
  4. Ensure long-term maintainability and scalability through cleaner, more extensible code structures.
  5. Provide robust workflows for quality assurance and seamless integration in CI pipelines.

@zoedsoupe zoedsoupe changed the base branch from main to feat/follow-supabase-ex-refactor January 14, 2025 02:19
@zoedsoupe zoedsoupe force-pushed the feat/follow-supabase-ex-refactor branch from f83dd1a to c22977f Compare January 14, 2025 19:37
Base automatically changed from feat/follow-supabase-ex-refactor to main January 16, 2025 01:47
…ctor

* 'main' of github.com:zoedsoupe/storage-ex:
  refactor: match with new supabase_potion release (#3)
* fork/test/unit-testing:
  wip: bucket handler tests
  fix: dialyzer
@zoedsoupe zoedsoupe merged commit 077f18f into main Jan 16, 2025
3 checks passed
zoedsoupe added a commit that referenced this pull request Jan 18, 2025
@zoedsoupe zoedsoupe mentioned this pull request Jul 15, 2025
@zoedsoupe zoedsoupe deleted the feat/refactor branch July 15, 2025 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant