Skip to content

v0.8#32

Merged
fityannugroho merged 2 commits intomainfrom
v0.8
Jul 27, 2024
Merged

v0.8#32
fityannugroho merged 2 commits intomainfrom
v0.8

Conversation

@fityannugroho
Copy link
Owner

PR Checklist

Please check if your PR fulfills the following requirements:

Put [x] to check

  • I have read the documentation.
  • I have read and followed the Contributing Guidelines.
  • I have included a pull request description of my changes.
  • I have included the necessary changes to the documentation.
  • I have added tests to cover my changes.

PR Type

What kind of change does this PR introduce?

Please check any kind of changes that applies to this PR using [x]

  • Bug fix
  • Feature
  • Code style update (formatting, local variables)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • CI related changes

What is the current behavior?

Please describe the current behavior that you are modifying, or link to a relevant issue.

Issue Number: N/A

  • Initial validation is needed to ensure that the url provided is an URL to image file (not pdf, docx, or another non-image files).
  • Currently options.extension is only used to change the file extension on the path, not convert the actual binary file.
  • Currently, the image.directory value is not an absolute path, unless options.directory is not set (default)

What is the new behavior?

  • options.name and options.directory now can contain extension
  • Ensure the originalExtension is an image extension, throw error if not
  • options.extension now must be one of supported image extension by sharp, throw error if not
  • Use sharp to actually convert the image format if options.extension specified
  • image.directory now always return absolute path of the output directory

Other information

This is BREAKING CHANGES

BREAKING CHANGES!
- `options.name` and `options.directory` now can contain extension
- Ensure the `originalExtension` is an image extension, throw error if not
- `options.extension` now must be one of supported image extension by `sharp`, throw error if not
- Use `sharp` to actually convert the image format if `options.extension` specified
@fityannugroho fityannugroho added bug Something isn't working enhancement New feature or request labels Jul 27, 2024
@fityannugroho fityannugroho merged commit f46e1ba into main Jul 27, 2024
@fityannugroho fityannugroho deleted the v0.8 branch July 27, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant