Skip to content

Commit

Permalink
Bump version to 1.2.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Sherwin H committed Mar 9, 2019
1 parent cfec987 commit ae69641
Show file tree
Hide file tree
Showing 5 changed files with 1,098 additions and 5 deletions.
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "imgix-core-js",
"version": "1.2.0",
"version": "1.2.1",
"homepage": "https://github.com/imgix/imgix-core-js",
"authors": [
"Kelly Sutton <michael.k.sutton@gmail.com>",
Expand Down
12 changes: 11 additions & 1 deletion dist/imgix-core-js.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@
var Base64 = _jsBase64.Base64 || _jsBase64;
var crc = _crc;

var VERSION = '1.2.0';
var VERSION = '1.2.1';
var SHARD_STRATEGY_CRC = 'crc';
var SHARD_STRATEGY_CYCLE = 'cycle';
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;
var DEFAULTS = {
host: null,
domains: [],
Expand Down Expand Up @@ -62,6 +63,15 @@
this.settings.domains[0] = this.settings.host;
}

this.settings.domains.forEach(function(domain) {
if (DOMAIN_REGEX.exec(domain) == null) {
throw new Error(
'Domains must be passed in as fully-qualified ' +
'domain names and should not include a protocol or any path ' +
'element, i.e. "example.imgix.net".');
}
});

if (this.settings.includeLibraryParam) {
this.settings.libraryParam = "js-" + VERSION;
}
Expand Down
2 changes: 1 addition & 1 deletion dist/imgix-core-js.min.js

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

Loading

0 comments on commit ae69641

Please sign in to comment.