Skip to content

Commit

Permalink
chore(release): v3.1.2 (#272)
Browse files Browse the repository at this point in the history
  • Loading branch information
ericdeansanchez committed Mar 25, 2021
1 parent 859a8a9 commit f1a5463
Show file tree
Hide file tree
Showing 7 changed files with 26 additions and 11 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,11 @@

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.2](https://github.com/imgix/js-core/compare/v3.1.1...v3.1.2) (2021-03-25)

* fix: improve error messages for target width validator ([#267](https://github.com/imgix/js-core/pull/267))
* build: use js extensions ([#269](https://github.com/imgix/js-core/pull/269))

## [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))
Expand Down
2 changes: 1 addition & 1 deletion dist/imgix-js-core.umd.js

Large diffs are not rendered by default.

11 changes: 8 additions & 3 deletions dist/index.cjs → dist/index.cjs.js
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ function _nonIterableRest() {
}

// package version used in the ix-lib parameter
var VERSION = 'v3.1.1'; // regex pattern used to determine if a domain is valid
var VERSION = 'v3.1.2'; // 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 @@ -197,7 +197,7 @@ function validateAndDestructureOptions(options) {
}
function validateRange(min, max) {
if (!(Number.isInteger(min) && Number.isInteger(max)) || min <= 0 || max <= 0 || min > max) {
throw new Error('The min and max srcset widths can only be passed positive Number values');
throw new Error("The min and max srcset widths can only be passed positive Number values, and min must be less than max. Found min: ".concat(min, " and max: ").concat(max, "."));
}
}
function validateWidthTolerance(widthTolerance) {
Expand Down Expand Up @@ -243,7 +243,7 @@ var ImgixClient = /*#__PURE__*/function () {
}

if (this.settings.includeLibraryParam) {
this.settings.libraryParam = 'js-' + VERSION;
this.settings.libraryParam = 'js-' + ImgixClient.version();
}

this.settings.urlPrefix = this.settings.useHTTPS ? 'https://' : 'http://';
Expand Down Expand Up @@ -376,6 +376,11 @@ var ImgixClient = /*#__PURE__*/function () {
return srcset.join(',\n');
}
}], [{
key: "version",
value: function version() {
return VERSION;
}
}, {
key: "targetWidths",
value: function targetWidths() {
var minWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;
Expand Down
11 changes: 8 additions & 3 deletions dist/index.mjs → dist/index.esm.js
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.1'; // regex pattern used to determine if a domain is valid
var VERSION = 'v3.1.2'; // 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 @@ -191,7 +191,7 @@ function validateAndDestructureOptions(options) {
}
function validateRange(min, max) {
if (!(Number.isInteger(min) && Number.isInteger(max)) || min <= 0 || max <= 0 || min > max) {
throw new Error('The min and max srcset widths can only be passed positive Number values');
throw new Error("The min and max srcset widths can only be passed positive Number values, and min must be less than max. Found min: ".concat(min, " and max: ").concat(max, "."));
}
}
function validateWidthTolerance(widthTolerance) {
Expand Down Expand Up @@ -237,7 +237,7 @@ var ImgixClient = /*#__PURE__*/function () {
}

if (this.settings.includeLibraryParam) {
this.settings.libraryParam = 'js-' + VERSION;
this.settings.libraryParam = 'js-' + ImgixClient.version();
}

this.settings.urlPrefix = this.settings.useHTTPS ? 'https://' : 'http://';
Expand Down Expand Up @@ -370,6 +370,11 @@ var ImgixClient = /*#__PURE__*/function () {
return srcset.join(',\n');
}
}], [{
key: "version",
value: function version() {
return VERSION;
}
}, {
key: "targetWidths",
value: function targetWidths() {
var minWidth = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 100;
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.1",
"version": "v3.1.2",
"repository": "https://github.com/imgix/js-core",
"license": "BSD-2-Clause",
"main": "dist/index.cjs.js",
Expand Down
2 changes: 1 addition & 1 deletion src/constants.js
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.1';
export const VERSION = 'v3.1.2';
// 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 f1a5463

Please sign in to comment.