Skip to content
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

feat: add srcset generation #53

Merged
merged 16 commits into from
Jul 26, 2019
Merged

feat: add srcset generation #53

merged 16 commits into from
Jul 26, 2019

Conversation

sherwinski
Copy link
Contributor

@sherwinski sherwinski commented Jul 18, 2019

This PR creates a new class method in ImgixClient that will generate a srcset string, which can be used in the srcset attribute on an <img> HTML element. buildSrcSet() takes a path and params argument similar to createURL(), and will return a String in one of two srcset formats.

Srcset Width-Pairs
The first format creates srcset width-pairs, a comma-delimited list of URLs and width descriptors corresponding to each one. This allows for responsive size switching based on the current width of the browser viewport. buildSrcSet() will append any params passed to the method to each URL constructed within the list. The following is an example of how to generate a width-pair srcset:

var client = new ImgixClient({domain:'my-social-network.imgix.net', includeLibraryParam:false});
var srcset = client.buildSrcSet('image.jpg');
console.log(srcset);

will return the following String (collapsed for brevity):

https://my-social-network.imgix.net/image.jpg?w=100 100w,
https://my-social-network.imgix.net/image.jpg?w=116 116w,
https://my-social-network.imgix.net/image.jpg?w=134 134w,
                                            ...
https://my-social-network.imgix.net/image.jpg?w=7400 7400w,
https://my-social-network.imgix.net/image.jpg?w=8192 8192w

Notice that a w= parameter is automatically inserted for each entry in the srcset list. This is required in order for the element to properly display the correctly-sized image corresponding to the viewport's width.

Device Pixel Ratio (DPR) Srcset
The second format this method can return is a srcset list of same-size images in varying resolutions. In this case, images are scaled using the dpr= parameter to adjust for the device pixel ratio of the browser. A DPR srcset will be automatically generated instead of a width-pair srcset if exact dimensions for the output image are specified, by providing either a w (width) or a h (height) and ar (aspect ratio) in the params argument. The following is an example of how to generate a DPR srcset:

var client = new ImgixClient({domain:'my-social-network.imgix.net', includeLibraryParam:false});
var srcset = client.buildSrcSet('image.jpg', {h:800, ar:'3:2'});
console.log(srcset);

which will return the following String:

https://my-social-network.imgix.net/image.jpg?h=800&ar=3%3A2 1x,
https://my-social-network.imgix.net/image.jpg?h=800&ar=3%3A2 2x,
https://my-social-network.imgix.net/image.jpg?h=800&ar=3%3A2 3x,
https://my-social-network.imgix.net/image.jpg?h=800&ar=3%3A2 4x,
https://my-social-network.imgix.net/image.jpg?h=800&ar=3%3A2 5x

Signing URLs
buildSrcSet() also supports signing URLs, which can be very useful for generating server-side and then passing it to the client. This will avoid having to expose your imgix source's secure token to the client.

var client = new ImgixClient({domain:'my-social-network.imgix.net', secureURLToken:'my-token', includeLibraryParam:false});
var srcset = client.buildSrcSet('image.jpg', {w:100});
console.log(srcset);

generates a srcset with unique signatures for each URL:

https://test.imgix.net/bridge.png?dpr=1&w=100&s=f461367db3c5fad8ae9d18864b38533a 1x,
https://test.imgix.net/bridge.png?dpr=2&w=100&s=9cac4c9fa5a263cef1ca443340a64a2c 2x,
https://test.imgix.net/bridge.png?dpr=3&w=100&s=29a0aa19b074a000de96eb4f1a24803b 3x,
https://test.imgix.net/bridge.png?dpr=4&w=100&s=f16ac140640d46ed8499102730e1f62d 4x,
https://test.imgix.net/bridge.png?dpr=5&w=100&s=3ef7c404f749ed5296fe0b6de47d8d2f 5x

For more information on srcset, building responsive images, and resolution switching:

src/imgix-core-js.js Outdated Show resolved Hide resolved
@sherwinski sherwinski requested a review from jayeb July 19, 2019 22:48
src/imgix-core-js.js Outdated Show resolved Hide resolved
src/imgix-core-js.js Outdated Show resolved Hide resolved
src/imgix-core-js.js Outdated Show resolved Hide resolved
src/imgix-core-js.js Outdated Show resolved Hide resolved
src/imgix-core-js.js Outdated Show resolved Hide resolved
src/imgix-core-js.js Outdated Show resolved Hide resolved
@sherwinski sherwinski requested a review from jayeb July 23, 2019 21:54
@sherwinski
Copy link
Contributor Author

@jayeb Also wanted to ask, do you have any ideas for other test cases that could helpful here?

Copy link
Contributor

@jayeb jayeb left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd like to see the tests fleshed out a bit more (see comment), but otherwise this is looking great.

test/test-client.js Outdated Show resolved Hide resolved
@sherwinski sherwinski requested a review from jayeb July 25, 2019 23:12
src/imgix-core-js.js Outdated Show resolved Hide resolved
@sherwinski sherwinski merged commit 81f38e7 into master Jul 26, 2019
@sherwinski sherwinski deleted the srcset-generation branch July 26, 2019 22:32
ericdeansanchez added a commit that referenced this pull request Feb 3, 2021
# [0.3.0-beta.1](v0.2.3...v0.3.0-beta.1) (2021-02-03)

### Bug Fixes

* percent encode plus signs in path components ([#223](#223)) ([a5d756e](a5d756e))
* remove ensureEven requirement ([#206](#206)) ([1007f86](1007f86))
* update minor or patch prior to release ([65c6f3e](65c6f3e))
* **buildSrcSet:** ensure largest size can't be repeated ([#184](#184)) ([71a092a](71a092a))
* **buildURL:** ensure operation is idempotent ([8c6c6f9](8c6c6f9))
* add missing variable declarations ([#121](#121)) ([851a607](851a607))
* deprecate domain sharding ([#39](#39)) ([1b90df3](1b90df3))
* ensure URL-legal, path-illegal characters are encoded ([#61](#61)) ([b89dba1](b89dba1))
* include dpr parameter when generating fixed-width srcset ([#59](#59)) ([189d4f7](189d4f7))
* remove deprecated domain sharding functionality ([#42](#42)) ([66d5cd9](66d5cd9))
* remove deprecated settings.host ([#45](#45)) ([41ef41f](41ef41f))
* throw error when certain srcset modifiers are passed zero ([#114](#114)) ([2630f96](2630f96))

### Features

* add babel core for mocha ([1266c1a](1266c1a))
* add minimal babelrc ([3809a93](3809a93))
* add rollup config ([f62e8db](f62e8db))
* add semantic-release ([ebed795](ebed795))
* add settings.domain argument ([#44](#44)) ([af40091](af40091))
* add src, README to files list ([9d3bb9e](9d3bb9e))
* add srcset generation ([#53](#53)) ([81f38e7](81f38e7))
* add srcset option parameter to buildSrcSet() method signature ([#118](#118)) ([1e5507a](1e5507a))
* add support for defining a custom srcset width array ([#110](#110)) ([84974a5](84974a5))
* add support for defining a custom srcset width tolerance ([#109](#109)) ([504af70](504af70))
* add support for defining a min and max srcset width ([#108](#108)) ([fe5f5ba](fe5f5ba))
* add typescript declaration file for ImgixClient ([#64](#64)) ([a065ad9](a065ad9))
* add validation tests ([91cc39c](91cc39c))
* append variable qualities to dpr srcsets ([#111](#111)) ([b52148d](b52148d))
* create a DPR srcset when a fixed height is specified ([#215](#215)) ([628e6c7](628e6c7)), closes [#177](#177)
* drop bower.json ([#222](#222)) ([2def739](2def739))
* enforce 0.01 lower bound for widthTolerance ([#211](#211)) ([8079e75](8079e75))
* generalize test-suite transpilation ([cf49986](cf49986))
* pull constants into separate file ([bb4b36d](bb4b36d))
* pull validation into separate module ([a113fea](a113fea))
* reintro renovate ([d9afcdb](d9afcdb))
* remove old interface ([7a5c1e0](7a5c1e0))
* remove renovate (for now) ([1be0281](1be0281))
* require @babel/register ([c488e43](c488e43))
* rewrite ix-core-js as esm ([7e98689](7e98689))
* run mocha with babel/register ([d5c519c](d5c519c))
* run release on beta branch ([e4e8d92](e4e8d92))
* test on node version 14 ([1d8d4a5](1d8d4a5))
* update @babel/preset-env ([879e235](879e235))
* update buildSrcSet test suite ([5e5d5da](5e5d5da))
* update buildURL test suite ([585bb19](585bb19))
* update client test suite ([e238dc4](e238dc4))
* update package.json ([c8491e0](c8491e0))
* use --experimental-modules ([4c9735d](4c9735d))
* use const in validators ([be3ee98](be3ee98))
* use const where possible/appropriate ([4c2a31d](4c2a31d))
* use crypto-js ([a41ef47](a41ef47))
* use explicit extensions for main, module, and browser ([#225](#225)) ([3aa5bab](3aa5bab))
* use mjs file extensions with type module ([#209](#209)) ([72830c4](72830c4))
* use object spread operator ([6142e75](6142e75))

### Performance Improvements

* **srcset:** memoize generated srcset width-pairs ([#115](#115)) ([073d63d](073d63d))
ericdeansanchez added a commit that referenced this pull request Feb 3, 2021
# [0.3.0-beta.1](v0.2.3...v0.3.0-beta.1) (2021-02-03)

### Bug Fixes

* percent encode plus signs in path components ([#223](#223)) ([a5d756e](a5d756e))
* remove ensureEven requirement ([#206](#206)) ([1007f86](1007f86))
* update minor or patch prior to release ([65c6f3e](65c6f3e))
* **buildSrcSet:** ensure largest size can't be repeated ([#184](#184)) ([71a092a](71a092a))
* **buildURL:** ensure operation is idempotent ([8c6c6f9](8c6c6f9))
* add missing variable declarations ([#121](#121)) ([851a607](851a607))
* deprecate domain sharding ([#39](#39)) ([1b90df3](1b90df3))
* ensure URL-legal, path-illegal characters are encoded ([#61](#61)) ([b89dba1](b89dba1))
* include dpr parameter when generating fixed-width srcset ([#59](#59)) ([189d4f7](189d4f7))
* remove deprecated domain sharding functionality ([#42](#42)) ([66d5cd9](66d5cd9))
* remove deprecated settings.host ([#45](#45)) ([41ef41f](41ef41f))
* throw error when certain srcset modifiers are passed zero ([#114](#114)) ([2630f96](2630f96))

### Features

* add babel core for mocha ([1266c1a](1266c1a))
* add minimal babelrc ([3809a93](3809a93))
* add rollup config ([f62e8db](f62e8db))
* add semantic-release ([ebed795](ebed795))
* add settings.domain argument ([#44](#44)) ([af40091](af40091))
* add src, README to files list ([9d3bb9e](9d3bb9e))
* add srcset generation ([#53](#53)) ([81f38e7](81f38e7))
* add srcset option parameter to buildSrcSet() method signature ([#118](#118)) ([1e5507a](1e5507a))
* add support for defining a custom srcset width array ([#110](#110)) ([84974a5](84974a5))
* add support for defining a custom srcset width tolerance ([#109](#109)) ([504af70](504af70))
* add support for defining a min and max srcset width ([#108](#108)) ([fe5f5ba](fe5f5ba))
* add typescript declaration file for ImgixClient ([#64](#64)) ([a065ad9](a065ad9))
* add validation tests ([91cc39c](91cc39c))
* append variable qualities to dpr srcsets ([#111](#111)) ([b52148d](b52148d))
* create a DPR srcset when a fixed height is specified ([#215](#215)) ([628e6c7](628e6c7)), closes [#177](#177)
* drop bower.json ([#222](#222)) ([2def739](2def739))
* enforce 0.01 lower bound for widthTolerance ([#211](#211)) ([8079e75](8079e75))
* generalize test-suite transpilation ([cf49986](cf49986))
* pull constants into separate file ([bb4b36d](bb4b36d))
* pull validation into separate module ([a113fea](a113fea))
* reintro renovate ([d9afcdb](d9afcdb))
* remove old interface ([7a5c1e0](7a5c1e0))
* remove renovate (for now) ([1be0281](1be0281))
* require @babel/register ([c488e43](c488e43))
* rewrite ix-core-js as esm ([7e98689](7e98689))
* run mocha with babel/register ([d5c519c](d5c519c))
* run release on beta branch ([857c864](857c864))
* test on node version 14 ([1d8d4a5](1d8d4a5))
* update @babel/preset-env ([879e235](879e235))
* update buildSrcSet test suite ([5e5d5da](5e5d5da))
* update buildURL test suite ([585bb19](585bb19))
* update client test suite ([e238dc4](e238dc4))
* update package.json ([c8491e0](c8491e0))
* use --experimental-modules ([4c9735d](4c9735d))
* use const in validators ([be3ee98](be3ee98))
* use const where possible/appropriate ([4c2a31d](4c2a31d))
* use crypto-js ([a41ef47](a41ef47))
* use explicit extensions for main, module, and browser ([#225](#225)) ([3aa5bab](3aa5bab))
* use mjs file extensions with type module ([#209](#209)) ([72830c4](72830c4))
* use object spread operator ([6142e75](6142e75))

### Performance Improvements

* **srcset:** memoize generated srcset width-pairs ([#115](#115)) ([073d63d](073d63d))
@ericdeansanchez
Copy link
Contributor

🎉 This PR is included in version 0.3.0-beta.1 🎉

The release is available on:

Your semantic-release bot 📦🚀

ericdeansanchez added a commit that referenced this pull request Feb 5, 2021
# [0.3.0-beta.1](v0.2.3...v0.3.0-beta.1) (2021-02-05)

### Bug Fixes

* percent encode plus signs in path components ([#223](#223)) ([a5d756e](a5d756e))
* remove ensureEven requirement ([#206](#206)) ([1007f86](1007f86))
* update minor or patch prior to release ([65c6f3e](65c6f3e))
* **buildSrcSet:** ensure largest size can't be repeated ([#184](#184)) ([71a092a](71a092a))
* **buildURL:** ensure operation is idempotent ([8c6c6f9](8c6c6f9))
* add missing variable declarations ([#121](#121)) ([851a607](851a607))
* deprecate domain sharding ([#39](#39)) ([1b90df3](1b90df3))
* ensure URL-legal, path-illegal characters are encoded ([#61](#61)) ([b89dba1](b89dba1))
* include dpr parameter when generating fixed-width srcset ([#59](#59)) ([189d4f7](189d4f7))
* remove deprecated domain sharding functionality ([#42](#42)) ([66d5cd9](66d5cd9))
* remove deprecated settings.host ([#45](#45)) ([41ef41f](41ef41f))
* throw error when certain srcset modifiers are passed zero ([#114](#114)) ([2630f96](2630f96))

### Features

* add babel core for mocha ([1266c1a](1266c1a))
* add minimal babelrc ([3809a93](3809a93))
* add rollup config ([f62e8db](f62e8db))
* add semantic-release ([ebed795](ebed795))
* add settings.domain argument ([#44](#44)) ([af40091](af40091))
* add src, README to files list ([9d3bb9e](9d3bb9e))
* add srcset generation ([#53](#53)) ([81f38e7](81f38e7))
* add srcset option parameter to buildSrcSet() method signature ([#118](#118)) ([1e5507a](1e5507a))
* add support for defining a custom srcset width array ([#110](#110)) ([84974a5](84974a5))
* add support for defining a custom srcset width tolerance ([#109](#109)) ([504af70](504af70))
* add support for defining a min and max srcset width ([#108](#108)) ([fe5f5ba](fe5f5ba))
* add typescript declaration file for ImgixClient ([#64](#64)) ([a065ad9](a065ad9))
* add validation tests ([91cc39c](91cc39c))
* append variable qualities to dpr srcsets ([#111](#111)) ([b52148d](b52148d))
* create a DPR srcset when a fixed height is specified ([#215](#215)) ([628e6c7](628e6c7)), closes [#177](#177)
* drop bower.json ([#222](#222)) ([2def739](2def739))
* enforce 0.01 lower bound for widthTolerance ([#211](#211)) ([8079e75](8079e75))
* generalize test-suite transpilation ([cf49986](cf49986))
* pull constants into separate file ([bb4b36d](bb4b36d))
* pull validation into separate module ([a113fea](a113fea))
* reintro renovate ([d9afcdb](d9afcdb))
* remove old interface ([7a5c1e0](7a5c1e0))
* remove renovate (for now) ([1be0281](1be0281))
* require @babel/register ([c488e43](c488e43))
* rewrite ix-core-js as esm ([7e98689](7e98689))
* run mocha with babel/register ([d5c519c](d5c519c))
* run release on beta branch ([857c864](857c864))
* test on node version 14 ([1d8d4a5](1d8d4a5))
* update @babel/preset-env ([879e235](879e235))
* update buildSrcSet test suite ([5e5d5da](5e5d5da))
* update buildURL test suite ([585bb19](585bb19))
* update client test suite ([e238dc4](e238dc4))
* update package.json ([c8491e0](c8491e0))
* use --experimental-modules ([4c9735d](4c9735d))
* use const in validators ([be3ee98](be3ee98))
* use const where possible/appropriate ([4c2a31d](4c2a31d))
* use crypto-js ([a41ef47](a41ef47))
* use explicit extensions for main, module, and browser ([#225](#225)) ([3aa5bab](3aa5bab))
* use mjs file extensions with type module ([#209](#209)) ([72830c4](72830c4))
* use object spread operator ([6142e75](6142e75))

### Performance Improvements

* **srcset:** memoize generated srcset width-pairs ([#115](#115)) ([073d63d](073d63d))
ericdeansanchez added a commit that referenced this pull request Feb 5, 2021
# [0.3.0-beta.1](v0.2.3...v0.3.0-beta.1) (2021-02-05)

### Bug Fixes

* percent encode plus signs in path components ([#223](#223)) ([a5d756e](a5d756e))
* remove ensureEven requirement ([#206](#206)) ([1007f86](1007f86))
* update minor or patch prior to release ([65c6f3e](65c6f3e))
* **buildSrcSet:** ensure largest size can't be repeated ([#184](#184)) ([71a092a](71a092a))
* **buildURL:** ensure operation is idempotent ([8c6c6f9](8c6c6f9))
* add missing variable declarations ([#121](#121)) ([851a607](851a607))
* deprecate domain sharding ([#39](#39)) ([1b90df3](1b90df3))
* ensure URL-legal, path-illegal characters are encoded ([#61](#61)) ([b89dba1](b89dba1))
* include dpr parameter when generating fixed-width srcset ([#59](#59)) ([189d4f7](189d4f7))
* remove deprecated domain sharding functionality ([#42](#42)) ([66d5cd9](66d5cd9))
* remove deprecated settings.host ([#45](#45)) ([41ef41f](41ef41f))
* throw error when certain srcset modifiers are passed zero ([#114](#114)) ([2630f96](2630f96))

### Features

* add babel core for mocha ([1266c1a](1266c1a))
* add minimal babelrc ([3809a93](3809a93))
* add rollup config ([f62e8db](f62e8db))
* add semantic-release ([ebed795](ebed795))
* add settings.domain argument ([#44](#44)) ([af40091](af40091))
* add src, README to files list ([9d3bb9e](9d3bb9e))
* add srcset generation ([#53](#53)) ([81f38e7](81f38e7))
* add srcset option parameter to buildSrcSet() method signature ([#118](#118)) ([1e5507a](1e5507a))
* add support for defining a custom srcset width array ([#110](#110)) ([84974a5](84974a5))
* add support for defining a custom srcset width tolerance ([#109](#109)) ([504af70](504af70))
* add support for defining a min and max srcset width ([#108](#108)) ([fe5f5ba](fe5f5ba))
* add typescript declaration file for ImgixClient ([#64](#64)) ([a065ad9](a065ad9))
* add validation tests ([91cc39c](91cc39c))
* append variable qualities to dpr srcsets ([#111](#111)) ([b52148d](b52148d))
* create a DPR srcset when a fixed height is specified ([#215](#215)) ([628e6c7](628e6c7)), closes [#177](#177)
* drop bower.json ([#222](#222)) ([2def739](2def739))
* enforce 0.01 lower bound for widthTolerance ([#211](#211)) ([8079e75](8079e75))
* generalize test-suite transpilation ([cf49986](cf49986))
* pull constants into separate file ([bb4b36d](bb4b36d))
* pull validation into separate module ([a113fea](a113fea))
* re-add semantic-release with retagged 2.3.2 release ([6ad6531](6ad6531))
* reintro renovate ([d9afcdb](d9afcdb))
* remove old interface ([7a5c1e0](7a5c1e0))
* remove renovate (for now) ([1be0281](1be0281))
* require @babel/register ([c488e43](c488e43))
* rewrite ix-core-js as esm ([7e98689](7e98689))
* run mocha with babel/register ([d5c519c](d5c519c))
* run release on beta branch ([857c864](857c864))
* test on node version 14 ([1d8d4a5](1d8d4a5))
* update @babel/preset-env ([879e235](879e235))
* update buildSrcSet test suite ([5e5d5da](5e5d5da))
* update buildURL test suite ([585bb19](585bb19))
* update client test suite ([e238dc4](e238dc4))
* update package.json ([c8491e0](c8491e0))
* use --experimental-modules ([4c9735d](4c9735d))
* use const in validators ([be3ee98](be3ee98))
* use const where possible/appropriate ([4c2a31d](4c2a31d))
* use crypto-js ([a41ef47](a41ef47))
* use explicit extensions for main, module, and browser ([#225](#225)) ([3aa5bab](3aa5bab))
* use mjs file extensions with type module ([#209](#209)) ([72830c4](72830c4))
* use object spread operator ([6142e75](6142e75))

### Performance Improvements

* **srcset:** memoize generated srcset width-pairs ([#115](#115)) ([073d63d](073d63d))
ericdeansanchez added a commit that referenced this pull request Feb 5, 2021
# [0.3.0-beta.1](v0.2.3...v0.3.0-beta.1) (2021-02-05)

### Bug Fixes

* percent encode plus signs in path components ([#223](#223)) ([a5d756e](a5d756e))
* remove ensureEven requirement ([#206](#206)) ([1007f86](1007f86))
* update minor or patch prior to release ([65c6f3e](65c6f3e))
* **buildSrcSet:** ensure largest size can't be repeated ([#184](#184)) ([71a092a](71a092a))
* **buildURL:** ensure operation is idempotent ([8c6c6f9](8c6c6f9))
* add missing variable declarations ([#121](#121)) ([851a607](851a607))
* deprecate domain sharding ([#39](#39)) ([1b90df3](1b90df3))
* ensure URL-legal, path-illegal characters are encoded ([#61](#61)) ([b89dba1](b89dba1))
* include dpr parameter when generating fixed-width srcset ([#59](#59)) ([189d4f7](189d4f7))
* remove deprecated domain sharding functionality ([#42](#42)) ([66d5cd9](66d5cd9))
* remove deprecated settings.host ([#45](#45)) ([41ef41f](41ef41f))
* throw error when certain srcset modifiers are passed zero ([#114](#114)) ([2630f96](2630f96))

### Features

* add babel core for mocha ([1266c1a](1266c1a))
* add minimal babelrc ([3809a93](3809a93))
* add rollup config ([f62e8db](f62e8db))
* add semantic-release ([ebed795](ebed795))
* add settings.domain argument ([#44](#44)) ([af40091](af40091))
* add src, README to files list ([9d3bb9e](9d3bb9e))
* add srcset generation ([#53](#53)) ([81f38e7](81f38e7))
* add srcset option parameter to buildSrcSet() method signature ([#118](#118)) ([1e5507a](1e5507a))
* add support for defining a custom srcset width array ([#110](#110)) ([84974a5](84974a5))
* add support for defining a custom srcset width tolerance ([#109](#109)) ([504af70](504af70))
* add support for defining a min and max srcset width ([#108](#108)) ([fe5f5ba](fe5f5ba))
* add typescript declaration file for ImgixClient ([#64](#64)) ([a065ad9](a065ad9))
* add validation tests ([91cc39c](91cc39c))
* append variable qualities to dpr srcsets ([#111](#111)) ([b52148d](b52148d))
* create a DPR srcset when a fixed height is specified ([#215](#215)) ([628e6c7](628e6c7)), closes [#177](#177)
* drop bower.json ([#222](#222)) ([2def739](2def739))
* enforce 0.01 lower bound for widthTolerance ([#211](#211)) ([8079e75](8079e75))
* generalize test-suite transpilation ([cf49986](cf49986))
* pull constants into separate file ([bb4b36d](bb4b36d))
* pull validation into separate module ([a113fea](a113fea))
* reintro renovate ([d9afcdb](d9afcdb))
* remove old interface ([7a5c1e0](7a5c1e0))
* remove renovate (for now) ([1be0281](1be0281))
* require @babel/register ([c488e43](c488e43))
* rewrite ix-core-js as esm ([7e98689](7e98689))
* run mocha with babel/register ([d5c519c](d5c519c))
* run release on beta branch ([857c864](857c864))
* test on node version 14 ([1d8d4a5](1d8d4a5))
* update @babel/preset-env ([879e235](879e235))
* update buildSrcSet test suite ([5e5d5da](5e5d5da))
* update buildURL test suite ([585bb19](585bb19))
* update client test suite ([e238dc4](e238dc4))
* update package.json ([c8491e0](c8491e0))
* use --experimental-modules ([4c9735d](4c9735d))
* use const in validators ([be3ee98](be3ee98))
* use const where possible/appropriate ([4c2a31d](4c2a31d))
* use crypto-js ([a41ef47](a41ef47))
* use explicit extensions for main, module, and browser ([#225](#225)) ([3aa5bab](3aa5bab))
* use mjs file extensions with type module ([#209](#209)) ([72830c4](72830c4))
* use object spread operator ([6142e75](6142e75))

### Performance Improvements

* **srcset:** memoize generated srcset width-pairs ([#115](#115)) ([073d63d](073d63d))
ericdeansanchez added a commit that referenced this pull request Feb 5, 2021
# [0.3.0-beta.1](v0.2.3...v0.3.0-beta.1) (2021-02-05)

### Bug Fixes

* percent encode plus signs in path components ([#223](#223)) ([a5d756e](a5d756e))
* remove ensureEven requirement ([#206](#206)) ([1007f86](1007f86))
* update minor or patch prior to release ([65c6f3e](65c6f3e))
* **buildSrcSet:** ensure largest size can't be repeated ([#184](#184)) ([71a092a](71a092a))
* **buildURL:** ensure operation is idempotent ([8c6c6f9](8c6c6f9))
* add missing variable declarations ([#121](#121)) ([851a607](851a607))
* deprecate domain sharding ([#39](#39)) ([1b90df3](1b90df3))
* ensure URL-legal, path-illegal characters are encoded ([#61](#61)) ([b89dba1](b89dba1))
* include dpr parameter when generating fixed-width srcset ([#59](#59)) ([189d4f7](189d4f7))
* remove deprecated domain sharding functionality ([#42](#42)) ([66d5cd9](66d5cd9))
* remove deprecated settings.host ([#45](#45)) ([41ef41f](41ef41f))
* throw error when certain srcset modifiers are passed zero ([#114](#114)) ([2630f96](2630f96))

### Features

* add babel core for mocha ([1266c1a](1266c1a))
* add minimal babelrc ([3809a93](3809a93))
* add rollup config ([f62e8db](f62e8db))
* add semantic-release ([ebed795](ebed795))
* add settings.domain argument ([#44](#44)) ([af40091](af40091))
* add src, README to files list ([9d3bb9e](9d3bb9e))
* add srcset generation ([#53](#53)) ([81f38e7](81f38e7))
* add srcset option parameter to buildSrcSet() method signature ([#118](#118)) ([1e5507a](1e5507a))
* add support for defining a custom srcset width array ([#110](#110)) ([84974a5](84974a5))
* add support for defining a custom srcset width tolerance ([#109](#109)) ([504af70](504af70))
* add support for defining a min and max srcset width ([#108](#108)) ([fe5f5ba](fe5f5ba))
* add typescript declaration file for ImgixClient ([#64](#64)) ([a065ad9](a065ad9))
* add validation tests ([91cc39c](91cc39c))
* append variable qualities to dpr srcsets ([#111](#111)) ([b52148d](b52148d))
* create a DPR srcset when a fixed height is specified ([#215](#215)) ([628e6c7](628e6c7)), closes [#177](#177)
* drop bower.json ([#222](#222)) ([2def739](2def739))
* enforce 0.01 lower bound for widthTolerance ([#211](#211)) ([8079e75](8079e75))
* generalize test-suite transpilation ([cf49986](cf49986))
* pull constants into separate file ([bb4b36d](bb4b36d))
* pull validation into separate module ([a113fea](a113fea))
* reintro renovate ([d9afcdb](d9afcdb))
* remove old interface ([7a5c1e0](7a5c1e0))
* remove renovate (for now) ([1be0281](1be0281))
* require @babel/register ([c488e43](c488e43))
* rewrite ix-core-js as esm ([7e98689](7e98689))
* run mocha with babel/register ([d5c519c](d5c519c))
* run release on beta branch ([857c864](857c864))
* test on node version 14 ([1d8d4a5](1d8d4a5))
* update @babel/preset-env ([879e235](879e235))
* update buildSrcSet test suite ([5e5d5da](5e5d5da))
* update buildURL test suite ([585bb19](585bb19))
* update changelog format, trigger semantic ([4aa7127](4aa7127))
* update client test suite ([e238dc4](e238dc4))
* update package.json ([c8491e0](c8491e0))
* use --experimental-modules ([4c9735d](4c9735d))
* use const in validators ([be3ee98](be3ee98))
* use const where possible/appropriate ([4c2a31d](4c2a31d))
* use crypto-js ([a41ef47](a41ef47))
* use explicit extensions for main, module, and browser ([#225](#225)) ([3aa5bab](3aa5bab))
* use mjs file extensions with type module ([#209](#209)) ([72830c4](72830c4))
* use object spread operator ([6142e75](6142e75))

### Performance Improvements

* **srcset:** memoize generated srcset width-pairs ([#115](#115)) ([073d63d](073d63d))
ericdeansanchez added a commit that referenced this pull request Feb 5, 2021
# [0.3.0-beta.1](v0.2.3...v0.3.0-beta.1) (2021-02-05)

### Bug Fixes

* percent encode plus signs in path components ([#223](#223)) ([a5d756e](a5d756e))
* remove ensureEven requirement ([#206](#206)) ([1007f86](1007f86))
* update minor or patch prior to release ([65c6f3e](65c6f3e))
* **buildSrcSet:** ensure largest size can't be repeated ([#184](#184)) ([71a092a](71a092a))
* **buildURL:** ensure operation is idempotent ([8c6c6f9](8c6c6f9))
* add missing variable declarations ([#121](#121)) ([851a607](851a607))
* deprecate domain sharding ([#39](#39)) ([1b90df3](1b90df3))
* ensure URL-legal, path-illegal characters are encoded ([#61](#61)) ([b89dba1](b89dba1))
* include dpr parameter when generating fixed-width srcset ([#59](#59)) ([189d4f7](189d4f7))
* remove deprecated domain sharding functionality ([#42](#42)) ([66d5cd9](66d5cd9))
* remove deprecated settings.host ([#45](#45)) ([41ef41f](41ef41f))
* throw error when certain srcset modifiers are passed zero ([#114](#114)) ([2630f96](2630f96))

### Features

* add babel core for mocha ([1266c1a](1266c1a))
* add minimal babelrc ([3809a93](3809a93))
* add rollup config ([f62e8db](f62e8db))
* add semantic-release ([ebed795](ebed795))
* add settings.domain argument ([#44](#44)) ([af40091](af40091))
* add src, README to files list ([9d3bb9e](9d3bb9e))
* add srcset generation ([#53](#53)) ([81f38e7](81f38e7))
* add srcset option parameter to buildSrcSet() method signature ([#118](#118)) ([1e5507a](1e5507a))
* add support for defining a custom srcset width array ([#110](#110)) ([84974a5](84974a5))
* add support for defining a custom srcset width tolerance ([#109](#109)) ([504af70](504af70))
* add support for defining a min and max srcset width ([#108](#108)) ([fe5f5ba](fe5f5ba))
* add typescript declaration file for ImgixClient ([#64](#64)) ([a065ad9](a065ad9))
* add validation tests ([91cc39c](91cc39c))
* append variable qualities to dpr srcsets ([#111](#111)) ([b52148d](b52148d))
* create a DPR srcset when a fixed height is specified ([#215](#215)) ([628e6c7](628e6c7)), closes [#177](#177)
* drop bower.json ([#222](#222)) ([2def739](2def739))
* enforce 0.01 lower bound for widthTolerance ([#211](#211)) ([8079e75](8079e75))
* generalize test-suite transpilation ([cf49986](cf49986))
* pull constants into separate file ([bb4b36d](bb4b36d))
* pull validation into separate module ([a113fea](a113fea))
* reintro renovate ([d9afcdb](d9afcdb))
* remove old interface ([7a5c1e0](7a5c1e0))
* remove renovate (for now) ([1be0281](1be0281))
* require @babel/register ([c488e43](c488e43))
* rewrite ix-core-js as esm ([7e98689](7e98689))
* run mocha with babel/register ([d5c519c](d5c519c))
* run release on beta branch ([857c864](857c864))
* test on node version 14 ([1d8d4a5](1d8d4a5))
* update @babel/preset-env ([879e235](879e235))
* update buildSrcSet test suite ([5e5d5da](5e5d5da))
* update buildURL test suite ([585bb19](585bb19))
* update client test suite ([e238dc4](e238dc4))
* update package.json ([c8491e0](c8491e0))
* update semantic release ([f55ff4a](f55ff4a))
* use --experimental-modules ([4c9735d](4c9735d))
* use const in validators ([be3ee98](be3ee98))
* use const where possible/appropriate ([4c2a31d](4c2a31d))
* use crypto-js ([a41ef47](a41ef47))
* use explicit extensions for main, module, and browser ([#225](#225)) ([3aa5bab](3aa5bab))
* use mjs file extensions with type module ([#209](#209)) ([72830c4](72830c4))
* use object spread operator ([6142e75](6142e75))

### Performance Improvements

* **srcset:** memoize generated srcset width-pairs ([#115](#115)) ([073d63d](073d63d))
ericdeansanchez added a commit that referenced this pull request Feb 5, 2021
# [0.3.0-beta.1](v0.2.3...v0.3.0-beta.1) (2021-02-05)

### Bug Fixes

* percent encode plus signs in path components ([#223](#223)) ([a5d756e](a5d756e))
* remove ensureEven requirement ([#206](#206)) ([1007f86](1007f86))
* update minor or patch prior to release ([65c6f3e](65c6f3e))
* **buildSrcSet:** ensure largest size can't be repeated ([#184](#184)) ([71a092a](71a092a))
* **buildURL:** ensure operation is idempotent ([8c6c6f9](8c6c6f9))
* add missing variable declarations ([#121](#121)) ([851a607](851a607))
* deprecate domain sharding ([#39](#39)) ([1b90df3](1b90df3))
* ensure URL-legal, path-illegal characters are encoded ([#61](#61)) ([b89dba1](b89dba1))
* include dpr parameter when generating fixed-width srcset ([#59](#59)) ([189d4f7](189d4f7))
* remove deprecated domain sharding functionality ([#42](#42)) ([66d5cd9](66d5cd9))
* remove deprecated settings.host ([#45](#45)) ([41ef41f](41ef41f))
* throw error when certain srcset modifiers are passed zero ([#114](#114)) ([2630f96](2630f96))

### Features

* add babel core for mocha ([1266c1a](1266c1a))
* add minimal babelrc ([3809a93](3809a93))
* add rollup config ([f62e8db](f62e8db))
* add semantic-release ([ebed795](ebed795))
* add settings.domain argument ([#44](#44)) ([af40091](af40091))
* add src, README to files list ([9d3bb9e](9d3bb9e))
* add srcset generation ([#53](#53)) ([81f38e7](81f38e7))
* add srcset option parameter to buildSrcSet() method signature ([#118](#118)) ([1e5507a](1e5507a))
* add support for defining a custom srcset width array ([#110](#110)) ([84974a5](84974a5))
* add support for defining a custom srcset width tolerance ([#109](#109)) ([504af70](504af70))
* add support for defining a min and max srcset width ([#108](#108)) ([fe5f5ba](fe5f5ba))
* add typescript declaration file for ImgixClient ([#64](#64)) ([a065ad9](a065ad9))
* add validation tests ([91cc39c](91cc39c))
* append variable qualities to dpr srcsets ([#111](#111)) ([b52148d](b52148d))
* create a DPR srcset when a fixed height is specified ([#215](#215)) ([628e6c7](628e6c7)), closes [#177](#177)
* drop bower.json ([#222](#222)) ([2def739](2def739))
* enforce 0.01 lower bound for widthTolerance ([#211](#211)) ([8079e75](8079e75))
* generalize test-suite transpilation ([cf49986](cf49986))
* pull constants into separate file ([bb4b36d](bb4b36d))
* pull validation into separate module ([a113fea](a113fea))
* reintro renovate ([d9afcdb](d9afcdb))
* remove old interface ([7a5c1e0](7a5c1e0))
* remove renovate (for now) ([1be0281](1be0281))
* require @babel/register ([c488e43](c488e43))
* rewrite ix-core-js as esm ([7e98689](7e98689))
* run mocha with babel/register ([d5c519c](d5c519c))
* run release on beta branch ([857c864](857c864))
* test on node version 14 ([1d8d4a5](1d8d4a5))
* update @babel/preset-env ([879e235](879e235))
* update buildSrcSet test suite ([5e5d5da](5e5d5da))
* update buildURL test suite ([585bb19](585bb19))
* update client test suite ([e238dc4](e238dc4))
* update package.json ([c8491e0](c8491e0))
* update semantic release ([ddfe8c7](ddfe8c7))
* use --experimental-modules ([4c9735d](4c9735d))
* use const in validators ([be3ee98](be3ee98))
* use const where possible/appropriate ([4c2a31d](4c2a31d))
* use crypto-js ([a41ef47](a41ef47))
* use explicit extensions for main, module, and browser ([#225](#225)) ([3aa5bab](3aa5bab))
* use mjs file extensions with type module ([#209](#209)) ([72830c4](72830c4))
* use object spread operator ([6142e75](6142e75))

### Performance Improvements

* **srcset:** memoize generated srcset width-pairs ([#115](#115)) ([073d63d](073d63d))
ericdeansanchez added a commit that referenced this pull request Feb 6, 2021
# [0.3.0-beta.1](v0.2.3...v0.3.0-beta.1) (2021-02-06)

### Bug Fixes

* percent encode plus signs in path components ([#223](#223)) ([a5d756e](a5d756e))
* remove ensureEven requirement ([#206](#206)) ([1007f86](1007f86))
* update minor or patch prior to release ([65c6f3e](65c6f3e))
* **buildSrcSet:** ensure largest size can't be repeated ([#184](#184)) ([71a092a](71a092a))
* **buildURL:** ensure operation is idempotent ([8c6c6f9](8c6c6f9))
* add missing variable declarations ([#121](#121)) ([851a607](851a607))
* deprecate domain sharding ([#39](#39)) ([1b90df3](1b90df3))
* ensure URL-legal, path-illegal characters are encoded ([#61](#61)) ([b89dba1](b89dba1))
* include dpr parameter when generating fixed-width srcset ([#59](#59)) ([189d4f7](189d4f7))
* remove deprecated domain sharding functionality ([#42](#42)) ([66d5cd9](66d5cd9))
* remove deprecated settings.host ([#45](#45)) ([41ef41f](41ef41f))
* throw error when certain srcset modifiers are passed zero ([#114](#114)) ([2630f96](2630f96))

### Features

* add babel core for mocha ([1266c1a](1266c1a))
* add minimal babelrc ([3809a93](3809a93))
* add rollup config ([f62e8db](f62e8db))
* add semantic-release ([ebed795](ebed795))
* add settings.domain argument ([#44](#44)) ([af40091](af40091))
* add src, README to files list ([9d3bb9e](9d3bb9e))
* add srcset generation ([#53](#53)) ([81f38e7](81f38e7))
* add srcset option parameter to buildSrcSet() method signature ([#118](#118)) ([1e5507a](1e5507a))
* add support for defining a custom srcset width array ([#110](#110)) ([84974a5](84974a5))
* add support for defining a custom srcset width tolerance ([#109](#109)) ([504af70](504af70))
* add support for defining a min and max srcset width ([#108](#108)) ([fe5f5ba](fe5f5ba))
* add typescript declaration file for ImgixClient ([#64](#64)) ([a065ad9](a065ad9))
* add validation tests ([91cc39c](91cc39c))
* append variable qualities to dpr srcsets ([#111](#111)) ([b52148d](b52148d))
* create a DPR srcset when a fixed height is specified ([#215](#215)) ([628e6c7](628e6c7)), closes [#177](#177)
* drop bower.json ([#222](#222)) ([2def739](2def739))
* enforce 0.01 lower bound for widthTolerance ([#211](#211)) ([8079e75](8079e75))
* generalize test-suite transpilation ([cf49986](cf49986))
* pull constants into separate file ([bb4b36d](bb4b36d))
* pull validation into separate module ([a113fea](a113fea))
* reintro renovate ([d9afcdb](d9afcdb))
* remove old interface ([7a5c1e0](7a5c1e0))
* remove renovate (for now) ([1be0281](1be0281))
* require @babel/register ([c488e43](c488e43))
* rewrite ix-core-js as esm ([7e98689](7e98689))
* run mocha with babel/register ([d5c519c](d5c519c))
* run release on beta branch ([857c864](857c864))
* test on node version 14 ([1d8d4a5](1d8d4a5))
* update @babel/preset-env ([879e235](879e235))
* update buildSrcSet test suite ([5e5d5da](5e5d5da))
* update buildURL test suite ([585bb19](585bb19))
* update client test suite ([e238dc4](e238dc4))
* update package.json ([c8491e0](c8491e0))
* update semantic release ([bf2dcad](bf2dcad))
* use --experimental-modules ([4c9735d](4c9735d))
* use const in validators ([be3ee98](be3ee98))
* use const where possible/appropriate ([4c2a31d](4c2a31d))
* use crypto-js ([a41ef47](a41ef47))
* use explicit extensions for main, module, and browser ([#225](#225)) ([3aa5bab](3aa5bab))
* use mjs file extensions with type module ([#209](#209)) ([72830c4](72830c4))
* use object spread operator ([6142e75](6142e75))

### Performance Improvements

* **srcset:** memoize generated srcset width-pairs ([#115](#115)) ([073d63d](073d63d))
ericdeansanchez added a commit that referenced this pull request Feb 6, 2021
# [0.3.0-beta.1](v0.2.3...v0.3.0-beta.1) (2021-02-06)

### Bug Fixes

* percent encode plus signs in path components ([#223](#223)) ([a5d756e](a5d756e))
* remove ensureEven requirement ([#206](#206)) ([1007f86](1007f86))
* update minor or patch prior to release ([65c6f3e](65c6f3e))
* **buildSrcSet:** ensure largest size can't be repeated ([#184](#184)) ([71a092a](71a092a))
* **buildURL:** ensure operation is idempotent ([8c6c6f9](8c6c6f9))
* add missing variable declarations ([#121](#121)) ([851a607](851a607))
* deprecate domain sharding ([#39](#39)) ([1b90df3](1b90df3))
* ensure URL-legal, path-illegal characters are encoded ([#61](#61)) ([b89dba1](b89dba1))
* include dpr parameter when generating fixed-width srcset ([#59](#59)) ([189d4f7](189d4f7))
* remove deprecated domain sharding functionality ([#42](#42)) ([66d5cd9](66d5cd9))
* remove deprecated settings.host ([#45](#45)) ([41ef41f](41ef41f))
* throw error when certain srcset modifiers are passed zero ([#114](#114)) ([2630f96](2630f96))

### Features

* add babel core for mocha ([1266c1a](1266c1a))
* add minimal babelrc ([3809a93](3809a93))
* add rollup config ([f62e8db](f62e8db))
* add semantic-release ([ebed795](ebed795))
* add settings.domain argument ([#44](#44)) ([af40091](af40091))
* add src, README to files list ([9d3bb9e](9d3bb9e))
* add srcset generation ([#53](#53)) ([81f38e7](81f38e7))
* add srcset option parameter to buildSrcSet() method signature ([#118](#118)) ([1e5507a](1e5507a))
* add support for defining a custom srcset width array ([#110](#110)) ([84974a5](84974a5))
* add support for defining a custom srcset width tolerance ([#109](#109)) ([504af70](504af70))
* add support for defining a min and max srcset width ([#108](#108)) ([fe5f5ba](fe5f5ba))
* add typescript declaration file for ImgixClient ([#64](#64)) ([a065ad9](a065ad9))
* add validation tests ([91cc39c](91cc39c))
* append variable qualities to dpr srcsets ([#111](#111)) ([b52148d](b52148d))
* create a DPR srcset when a fixed height is specified ([#215](#215)) ([628e6c7](628e6c7)), closes [#177](#177)
* drop bower.json ([#222](#222)) ([2def739](2def739))
* enforce 0.01 lower bound for widthTolerance ([#211](#211)) ([8079e75](8079e75))
* generalize test-suite transpilation ([cf49986](cf49986))
* pull constants into separate file ([bb4b36d](bb4b36d))
* pull validation into separate module ([a113fea](a113fea))
* reintro renovate ([d9afcdb](d9afcdb))
* remove old interface ([7a5c1e0](7a5c1e0))
* remove renovate (for now) ([1be0281](1be0281))
* require @babel/register ([c488e43](c488e43))
* rewrite ix-core-js as esm ([7e98689](7e98689))
* run mocha with babel/register ([d5c519c](d5c519c))
* run release on beta branch ([857c864](857c864))
* test on node version 14 ([1d8d4a5](1d8d4a5))
* update @babel/preset-env ([879e235](879e235))
* update buildSrcSet test suite ([5e5d5da](5e5d5da))
* update buildURL test suite ([585bb19](585bb19))
* update client test suite ([e238dc4](e238dc4))
* update package.json ([c8491e0](c8491e0))
* update semantic release ([bf2dcad](bf2dcad))
* use --experimental-modules ([4c9735d](4c9735d))
* use const in validators ([be3ee98](be3ee98))
* use const where possible/appropriate ([4c2a31d](4c2a31d))
* use crypto-js ([a41ef47](a41ef47))
* use explicit extensions for main, module, and browser ([#225](#225)) ([3aa5bab](3aa5bab))
* use mjs file extensions with type module ([#209](#209)) ([72830c4](72830c4))
* use object spread operator ([6142e75](6142e75))

### Performance Improvements

* **srcset:** memoize generated srcset width-pairs ([#115](#115)) ([073d63d](073d63d))
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.

3 participants