imgix / js-core

A JavaScript client library for generating image URLs with imgix
https://www.imgix.com
BSD 2-Clause "Simplified" License
122 stars 20 forks source link

fix: apply custom encoder to base64 parameters #350

Closed sherwinski closed 1 year ago

sherwinski commented 1 year ago

Description

Before this PR, the encoder buildParams option would only be applied to the non-base64 parameters (i.e. parameters whose values did not end in 64). After this PR, the same encoder will be applied to base64 parameters as well.

It also adds an optional parameter key to the encoder which allows users to specify encoding logic conditional to the parameter key. This is helpful if users wish to encode base64 and non-base64 parameters differently.

Checklist

commit-lint[bot] commented 1 year ago

Bug Fixes

Tests

Features

Documentation

Chore

Contributors

sherwinski

Commit-Lint commands
You can trigger Commit-Lint actions by commenting on this PR: - `@Commit-Lint merge patch` will merge dependabot PR on "patch" versions (X.X.Y - Y change) - `@Commit-Lint merge minor` will merge dependabot PR on "minor" versions (X.Y.Y - Y change) - `@Commit-Lint merge major` will merge dependabot PR on "major" versions (Y.Y.Y - Y change) - `@Commit-Lint merge disable` will desactivate merge dependabot PR - `@Commit-Lint review` will approve dependabot PR - `@Commit-Lint stop review` will stop approve dependabot PR
sherwinski commented 1 year ago

At the risk of making this PR lengthier, I patched in some missing TS definitions as well.

imgix-git-robot commented 1 year ago

:tada: This PR is included in version 3.8.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: