Skip to content

Commit

Permalink
chore(release): 3.0.4
Browse files Browse the repository at this point in the history
### [3.0.4](v3.0.3...v3.0.4) (2022-12-14)
  • Loading branch information
imgix-git-robot committed Dec 14, 2022
1 parent 9afe4ee commit 3034bf0
Show file tree
Hide file tree
Showing 5 changed files with 86 additions and 86 deletions.
56 changes: 28 additions & 28 deletions dist/imgix-vue.esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { defineComponent, h } from 'vue';
*
* @author Dan Kogai (https://github.com/dankogai)
*/
var version = '3.7.2';
var version = '3.7.3';
/**
* @deprecated use lowercase `version`.
*/
Expand Down Expand Up @@ -1154,7 +1154,7 @@ function _nonIterableRest() {
}

// package version used in the ix-lib parameter
var VERSION$1 = '3.6.1-rc.1'; // regex pattern used to determine if a domain is valid
var VERSION$1 = '3.7.0'; // 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 @@ -1315,11 +1315,9 @@ var ImgixClient = /*#__PURE__*/function () {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

var path = this._sanitizePath(rawPath, {
encode: !options.disablePathEncoding
});
var path = this._sanitizePath(rawPath, options);

var finalParams = this._buildParams(params);
var finalParams = this._buildParams(params, options);

if (!!this.settings.secureURLToken) {
finalParams = this._signParams(path, finalParams);
Expand Down Expand Up @@ -1355,6 +1353,10 @@ var ImgixClient = /*#__PURE__*/function () {
key: "_buildParams",
value: function _buildParams() {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
// If a custom encoder is present, use it
// Otherwise just use the encodeURIComponent
var encode = options.encoder || encodeURIComponent;
var queryParams = [].concat(_toConsumableArray(this.settings.libraryParam ? ["ixlib=".concat(this.settings.libraryParam)] : []), _toConsumableArray(Object.entries(params).reduce(function (prev, _ref) {
var _ref2 = _slicedToArray(_ref, 2),
key = _ref2[0],
Expand All @@ -1364,8 +1366,8 @@ var ImgixClient = /*#__PURE__*/function () {
return prev;
}

var encodedKey = encodeURIComponent(key);
var encodedValue = key.substr(-2) === '64' ? gBase64.encodeURI(value) : encodeURIComponent(value);
var encodedKey = encode(key);
var encodedValue = key.substr(-2) === '64' ? gBase64.encodeURI(value) : encode(value);
prev.push("".concat(encodedKey, "=").concat(encodedValue));
return prev;
}, [])));
Expand Down Expand Up @@ -1397,16 +1399,20 @@ var ImgixClient = /*#__PURE__*/function () {
// Strip leading slash first (we'll re-add after encoding)
var _path = path.replace(/^\//, '');

if (!(options.encode === false)) {
if (/^https?:\/\//.test(_path)) {
// Use de/encodeURIComponent to ensure *all* characters are handled,
// since it's being used as a path
_path = encodeURIComponent(_path);
} else {
// Use de/encodeURI if we think the path is just a path,
// so it leaves legal characters like '/' and '@' alone
_path = encodeURI(_path).replace(/[#?:+]/g, encodeURIComponent);
}
if (options.disablePathEncoding) {
return '/' + _path;
}

if (options.encoder) {
_path = options.encoder(_path);
} else if (/^https?:\/\//.test(_path)) {
// Use de/encodeURIComponent to ensure *all* characters are handled,
// since it's being used as a path
_path = encodeURIComponent(_path);
} else {
// Use de/encodeURI if we think the path is just a path,
// so it leaves legal characters like '/' and '@' alone
_path = encodeURI(_path).replace(/[#?:+]/g, encodeURIComponent);
}

return '/' + _path;
Expand Down Expand Up @@ -1466,9 +1472,7 @@ var ImgixClient = /*#__PURE__*/function () {
var srcset = targetWidthValues.map(function (w) {
return "".concat(_this.buildURL(path, _objectSpread2(_objectSpread2({}, params), {}, {
w: w
}), {
disablePathEncoding: options.disablePathEncoding
}), " ").concat(w, "w");
}), options), " ").concat(w, "w");
});
return srcset.join(',\n');
}
Expand Down Expand Up @@ -1501,17 +1505,13 @@ var ImgixClient = /*#__PURE__*/function () {
return "".concat(_this2.buildURL(path, _objectSpread2(_objectSpread2({}, params), {}, {
dpr: dpr,
q: params.q || qualities[dpr] || qualities[Math.floor(dpr)]
}), {
disablePathEncoding: options.disablePathEncoding
}), " ").concat(dpr, "x");
}), options), " ").concat(dpr, "x");
};

var srcset = disableVariableQuality ? targetRatios.map(function (dpr) {
return "".concat(_this2.buildURL(path, _objectSpread2(_objectSpread2({}, params), {}, {
dpr: dpr
}), {
disablePathEncoding: options.disablePathEncoding
}), " ").concat(dpr, "x");
}), options), " ").concat(dpr, "x");
}) : targetRatios.map(function (dpr) {
return withQuality(path, params, dpr);
});
Expand Down Expand Up @@ -1677,7 +1677,7 @@ var IxImg = defineComponent({

function objectWithoutProperties (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; }
// Do not change this
var VERSION = '3.0.2';
var VERSION = '3.0.3';
var clientOptionDefaults = {
includeLibraryParam: true,
};
Expand Down
56 changes: 28 additions & 28 deletions dist/imgix-vue.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ var VueImgix = (function (exports, vue) {
*
* @author Dan Kogai (https://github.com/dankogai)
*/
var version = '3.7.2';
var version = '3.7.3';
/**
* @deprecated use lowercase `version`.
*/
Expand Down Expand Up @@ -1155,7 +1155,7 @@ var VueImgix = (function (exports, vue) {
}

// package version used in the ix-lib parameter
var VERSION$1 = '3.6.1-rc.1'; // regex pattern used to determine if a domain is valid
var VERSION$1 = '3.7.0'; // 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 @@ -1316,11 +1316,9 @@ var VueImgix = (function (exports, vue) {
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

var path = this._sanitizePath(rawPath, {
encode: !options.disablePathEncoding
});
var path = this._sanitizePath(rawPath, options);

var finalParams = this._buildParams(params);
var finalParams = this._buildParams(params, options);

if (!!this.settings.secureURLToken) {
finalParams = this._signParams(path, finalParams);
Expand Down Expand Up @@ -1356,6 +1354,10 @@ var VueImgix = (function (exports, vue) {
key: "_buildParams",
value: function _buildParams() {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
// If a custom encoder is present, use it
// Otherwise just use the encodeURIComponent
var encode = options.encoder || encodeURIComponent;
var queryParams = [].concat(_toConsumableArray(this.settings.libraryParam ? ["ixlib=".concat(this.settings.libraryParam)] : []), _toConsumableArray(Object.entries(params).reduce(function (prev, _ref) {
var _ref2 = _slicedToArray(_ref, 2),
key = _ref2[0],
Expand All @@ -1365,8 +1367,8 @@ var VueImgix = (function (exports, vue) {
return prev;
}

var encodedKey = encodeURIComponent(key);
var encodedValue = key.substr(-2) === '64' ? gBase64.encodeURI(value) : encodeURIComponent(value);
var encodedKey = encode(key);
var encodedValue = key.substr(-2) === '64' ? gBase64.encodeURI(value) : encode(value);
prev.push("".concat(encodedKey, "=").concat(encodedValue));
return prev;
}, [])));
Expand Down Expand Up @@ -1398,16 +1400,20 @@ var VueImgix = (function (exports, vue) {
// Strip leading slash first (we'll re-add after encoding)
var _path = path.replace(/^\//, '');

if (!(options.encode === false)) {
if (/^https?:\/\//.test(_path)) {
// Use de/encodeURIComponent to ensure *all* characters are handled,
// since it's being used as a path
_path = encodeURIComponent(_path);
} else {
// Use de/encodeURI if we think the path is just a path,
// so it leaves legal characters like '/' and '@' alone
_path = encodeURI(_path).replace(/[#?:+]/g, encodeURIComponent);
}
if (options.disablePathEncoding) {
return '/' + _path;
}

if (options.encoder) {
_path = options.encoder(_path);
} else if (/^https?:\/\//.test(_path)) {
// Use de/encodeURIComponent to ensure *all* characters are handled,
// since it's being used as a path
_path = encodeURIComponent(_path);
} else {
// Use de/encodeURI if we think the path is just a path,
// so it leaves legal characters like '/' and '@' alone
_path = encodeURI(_path).replace(/[#?:+]/g, encodeURIComponent);
}

return '/' + _path;
Expand Down Expand Up @@ -1467,9 +1473,7 @@ var VueImgix = (function (exports, vue) {
var srcset = targetWidthValues.map(function (w) {
return "".concat(_this.buildURL(path, _objectSpread2(_objectSpread2({}, params), {}, {
w: w
}), {
disablePathEncoding: options.disablePathEncoding
}), " ").concat(w, "w");
}), options), " ").concat(w, "w");
});
return srcset.join(',\n');
}
Expand Down Expand Up @@ -1502,17 +1506,13 @@ var VueImgix = (function (exports, vue) {
return "".concat(_this2.buildURL(path, _objectSpread2(_objectSpread2({}, params), {}, {
dpr: dpr,
q: params.q || qualities[dpr] || qualities[Math.floor(dpr)]
}), {
disablePathEncoding: options.disablePathEncoding
}), " ").concat(dpr, "x");
}), options), " ").concat(dpr, "x");
};

var srcset = disableVariableQuality ? targetRatios.map(function (dpr) {
return "".concat(_this2.buildURL(path, _objectSpread2(_objectSpread2({}, params), {}, {
dpr: dpr
}), {
disablePathEncoding: options.disablePathEncoding
}), " ").concat(dpr, "x");
}), options), " ").concat(dpr, "x");
}) : targetRatios.map(function (dpr) {
return withQuality(path, params, dpr);
});
Expand Down Expand Up @@ -1678,7 +1678,7 @@ var VueImgix = (function (exports, vue) {

function objectWithoutProperties (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; }
// Do not change this
var VERSION = '3.0.2';
var VERSION = '3.0.3';
var clientOptionDefaults = {
includeLibraryParam: true,
};
Expand Down
56 changes: 28 additions & 28 deletions dist/imgix-vue.umd.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
*
* @author Dan Kogai (https://github.com/dankogai)
*/
var version = '3.7.2';
var version = '3.7.3';
/**
* @deprecated use lowercase `version`.
*/
Expand Down Expand Up @@ -1158,7 +1158,7 @@
}

// package version used in the ix-lib parameter
var VERSION$1 = '3.6.1-rc.1'; // regex pattern used to determine if a domain is valid
var VERSION$1 = '3.7.0'; // 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 @@ -1319,11 +1319,9 @@
var params = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
var options = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};

var path = this._sanitizePath(rawPath, {
encode: !options.disablePathEncoding
});
var path = this._sanitizePath(rawPath, options);

var finalParams = this._buildParams(params);
var finalParams = this._buildParams(params, options);

if (!!this.settings.secureURLToken) {
finalParams = this._signParams(path, finalParams);
Expand Down Expand Up @@ -1359,6 +1357,10 @@
key: "_buildParams",
value: function _buildParams() {
var params = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
// If a custom encoder is present, use it
// Otherwise just use the encodeURIComponent
var encode = options.encoder || encodeURIComponent;
var queryParams = [].concat(_toConsumableArray(this.settings.libraryParam ? ["ixlib=".concat(this.settings.libraryParam)] : []), _toConsumableArray(Object.entries(params).reduce(function (prev, _ref) {
var _ref2 = _slicedToArray(_ref, 2),
key = _ref2[0],
Expand All @@ -1368,8 +1370,8 @@
return prev;
}

var encodedKey = encodeURIComponent(key);
var encodedValue = key.substr(-2) === '64' ? gBase64.encodeURI(value) : encodeURIComponent(value);
var encodedKey = encode(key);
var encodedValue = key.substr(-2) === '64' ? gBase64.encodeURI(value) : encode(value);
prev.push("".concat(encodedKey, "=").concat(encodedValue));
return prev;
}, [])));
Expand Down Expand Up @@ -1401,16 +1403,20 @@
// Strip leading slash first (we'll re-add after encoding)
var _path = path.replace(/^\//, '');

if (!(options.encode === false)) {
if (/^https?:\/\//.test(_path)) {
// Use de/encodeURIComponent to ensure *all* characters are handled,
// since it's being used as a path
_path = encodeURIComponent(_path);
} else {
// Use de/encodeURI if we think the path is just a path,
// so it leaves legal characters like '/' and '@' alone
_path = encodeURI(_path).replace(/[#?:+]/g, encodeURIComponent);
}
if (options.disablePathEncoding) {
return '/' + _path;
}

if (options.encoder) {
_path = options.encoder(_path);
} else if (/^https?:\/\//.test(_path)) {
// Use de/encodeURIComponent to ensure *all* characters are handled,
// since it's being used as a path
_path = encodeURIComponent(_path);
} else {
// Use de/encodeURI if we think the path is just a path,
// so it leaves legal characters like '/' and '@' alone
_path = encodeURI(_path).replace(/[#?:+]/g, encodeURIComponent);
}

return '/' + _path;
Expand Down Expand Up @@ -1470,9 +1476,7 @@
var srcset = targetWidthValues.map(function (w) {
return "".concat(_this.buildURL(path, _objectSpread2(_objectSpread2({}, params), {}, {
w: w
}), {
disablePathEncoding: options.disablePathEncoding
}), " ").concat(w, "w");
}), options), " ").concat(w, "w");
});
return srcset.join(',\n');
}
Expand Down Expand Up @@ -1505,17 +1509,13 @@
return "".concat(_this2.buildURL(path, _objectSpread2(_objectSpread2({}, params), {}, {
dpr: dpr,
q: params.q || qualities[dpr] || qualities[Math.floor(dpr)]
}), {
disablePathEncoding: options.disablePathEncoding
}), " ").concat(dpr, "x");
}), options), " ").concat(dpr, "x");
};

var srcset = disableVariableQuality ? targetRatios.map(function (dpr) {
return "".concat(_this2.buildURL(path, _objectSpread2(_objectSpread2({}, params), {}, {
dpr: dpr
}), {
disablePathEncoding: options.disablePathEncoding
}), " ").concat(dpr, "x");
}), options), " ").concat(dpr, "x");
}) : targetRatios.map(function (dpr) {
return withQuality(path, params, dpr);
});
Expand Down Expand Up @@ -1681,7 +1681,7 @@

function objectWithoutProperties (obj, exclude) { var target = {}; for (var k in obj) if (Object.prototype.hasOwnProperty.call(obj, k) && exclude.indexOf(k) === -1) target[k] = obj[k]; return target; }
// Do not change this
var VERSION = '3.0.2';
var VERSION = '3.0.3';
var clientOptionDefaults = {
includeLibraryParam: true,
};
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"module": "dist/imgix-vue.esm.js",
"jsnext:main": "dist/imgix-vue.esm.js",
"unpkg": "dist/imgix-vue.min.js",
"version": "3.0.3",
"version": "3.0.4",
"scripts": {
"serve": "vue-cli-service serve",
"build": "rollup --config build/rollup.config.js",
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/imgix-vue/imgix-vue.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
} from './types';

// Do not change this
const VERSION = '3.0.3';
const VERSION = '3.0.4';

const clientOptionDefaults = {
includeLibraryParam: true,
Expand Down

0 comments on commit 3034bf0

Please sign in to comment.