Skip to content

Commit

Permalink
chore(release): v3.1.1 (#266)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdeansanchez committed Mar 23, 2021
1 parent ce312a1 commit 4a4fe1e
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 15 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.

## [v3.1.1](https://github.com/imgix/js-core/compare/v3.1.0...v3.1.1) (2021-03-23)

* fix: validate minWidth, maxWidth, widthTolerance ([#257](https://github.com/imgix/js-core/pull/257))
* fix: remove type and browser attributes from package.json ([#260](https://github.com/imgix/js-core/pull/260))
* build: tell rollup we want to explicitly export default ([#262](https://github.com/imgix/js-core/pull/262))

## [v3.1.0](https://github.com/imgix/js-core/compare/v3.0.0...v3.1.0) (2021-03-09)

* fix: typings for ImgixClient.targetWidths ([47658bc](https://github.com/imgix/js-core/commit/47658bc4869a156db6541cd97dfb41f6cc23351f))
Expand Down
2 changes: 1 addition & 1 deletion dist/imgix-js-core.umd.js

Large diffs are not rendered by default.

16 changes: 9 additions & 7 deletions dist/index.cjs
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
'use strict';

function _interopDefault (ex) { return (ex && (typeof ex === 'object') && 'default' in ex) ? ex['default'] : ex; }

var md5 = _interopDefault(require('md5'));
var md5 = require('md5');
var jsBase64 = require('js-base64');

function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }

var md5__default = /*#__PURE__*/_interopDefaultLegacy(md5);

function _classCallCheck(instance, Constructor) {
if (!(instance instanceof Constructor)) {
throw new TypeError("Cannot call a class as a function");
Expand Down Expand Up @@ -149,7 +151,7 @@ function _nonIterableRest() {
}

// package version used in the ix-lib parameter
var VERSION = 'v3.1.0'; // regex pattern used to determine if a domain is valid
var VERSION = 'v3.1.1'; // regex pattern used to determine if a domain is valid

var DOMAIN_REGEX = /^(?:[a-z\d\-_]{1,62}\.){0,125}(?:[a-z\d](?:\-(?=\-*[a-z\d])|[a-z]|\d){0,62}\.)[a-z\d]{1,63}$/i; // minimum generated srcset width

Expand Down Expand Up @@ -282,7 +284,7 @@ var ImgixClient = /*#__PURE__*/function () {
key: "_signParams",
value: function _signParams(path, queryParams) {
var signatureBase = this.settings.secureURLToken + path + queryParams;
var signature = md5(signatureBase);
var signature = md5__default['default'](signatureBase);
return queryParams.length > 0 ? queryParams + '&s=' + signature : '?s=' + signature;
}
}, {
Expand Down Expand Up @@ -335,8 +337,6 @@ var ImgixClient = /*#__PURE__*/function () {
validateWidths(options.widths);
targetWidthValues = _toConsumableArray(options.widths);
} else {
validateRange(minWidth, maxWidth);
validateWidthTolerance(widthTolerance);
targetWidthValues = ImgixClient.targetWidths(minWidth, maxWidth, widthTolerance, this.targetWidthsCache);
}

Expand Down Expand Up @@ -384,6 +384,8 @@ var ImgixClient = /*#__PURE__*/function () {
var cache = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var minW = Math.floor(minWidth);
var maxW = Math.floor(maxWidth);
validateRange(minWidth, maxWidth);
validateWidthTolerance(widthTolerance);
var cacheKey = widthTolerance + '/' + minW + '/' + maxW; // First, check the cache.

if (cacheKey in cache) {
Expand Down
6 changes: 3 additions & 3 deletions dist/index.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ function _nonIterableRest() {
}

// package version used in the ix-lib parameter
var VERSION = 'v3.1.0'; // regex pattern used to determine if a domain is valid
var VERSION = 'v3.1.1'; // regex pattern used to determine if a domain is valid

var DOMAIN_REGEX = /^(?:[a-z\d\-_]{1,62}\.){0,125}(?:[a-z\d](?:\-(?=\-*[a-z\d])|[a-z]|\d){0,62}\.)[a-z\d]{1,63}$/i; // minimum generated srcset width

Expand Down Expand Up @@ -331,8 +331,6 @@ var ImgixClient = /*#__PURE__*/function () {
validateWidths(options.widths);
targetWidthValues = _toConsumableArray(options.widths);
} else {
validateRange(minWidth, maxWidth);
validateWidthTolerance(widthTolerance);
targetWidthValues = ImgixClient.targetWidths(minWidth, maxWidth, widthTolerance, this.targetWidthsCache);
}

Expand Down Expand Up @@ -380,6 +378,8 @@ var ImgixClient = /*#__PURE__*/function () {
var cache = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : {};
var minW = Math.floor(minWidth);
var maxW = Math.floor(maxWidth);
validateRange(minWidth, maxWidth);
validateWidthTolerance(widthTolerance);
var cacheKey = widthTolerance + '/' + minW + '/' + maxW; // First, check the cache.

if (cacheKey in cache) {
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@imgix/js-core",
"description": "A JavaScript client library for generating image URLs with imgix",
"version": "v3.1.0",
"version": "v3.1.1",
"repository": "https://github.com/imgix/js-core",
"license": "BSD-2-Clause",
"main": "dist/index.cjs",
Expand Down
2 changes: 1 addition & 1 deletion src/constants.mjs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// package version used in the ix-lib parameter
export const VERSION = 'v3.1.0';
export const VERSION = 'v3.1.1';
// regex pattern used to determine if a domain is valid
export const DOMAIN_REGEX = /^(?:[a-z\d\-_]{1,62}\.){0,125}(?:[a-z\d](?:\-(?=\-*[a-z\d])|[a-z]|\d){0,62}\.)[a-z\d]{1,63}$/i;
// minimum generated srcset width
Expand Down

0 comments on commit 4a4fe1e

Please sign in to comment.