Skip to content
This repository has been archived by the owner on Oct 30, 2024. It is now read-only.

Commit

Permalink
v3.1.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick Kunka committed Dec 17, 2016
1 parent 4be4087 commit 83bf6d9
Show file tree
Hide file tree
Showing 9 changed files with 72 additions and 22 deletions.
9 changes: 7 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,15 @@ Change Log
## 3.1.0

- Added `selectors.controls` configuration option to allow for further specificity of control querying
in addition to the mandatory data attirbutes.
in addition to the mandatory data attributes.
- Fixed package.json issues.

## 3.1.1

- Fixed issue where `transitionend` event handlers were not rebound to re-rendered targets during dirtyCheck updates.
- Fixed issue where dataset operation objects where created on push to queue, resulting in corrupted target data.
- Fixed issue where dataset operation objects where created on push to queue, resulting in corrupted target data.

## 3.1.2

- Improved `compareVersions` util function to handle semver notation correctly (e.g. `'^'`, `'~'`, `'-beta'`, etc).
- Fixed issue with "Filtering by URL" demo that added a `#mix` segment to the URL for filter "all"
2 changes: 1 addition & 1 deletion demos/filtering-by-url/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
// Equivalent to filter "all", remove the hash

history.pushState(null, document.title, window.location.pathname); // or history.replaceState()
} else if (newHash !== window.location.hash) {
} else if (newHash !== window.location.hash && selector !== targetSelector) {
// Change the hash

history.pushState(null, document.title, window.location.pathname + newHash); // or history.replaceState()
Expand Down
10 changes: 5 additions & 5 deletions demos/mixitup.min.js

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions dist/mixitup.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**!
* MixItUp v3.1.1
* MixItUp v3.1.2
* A high-performance, dependency-free library for animated filtering, sorting and more
* Build 089145d5-822b-4610-879b-c9f0026e27a6
* Build 8db25e3d-698e-4c92-9857-72cb05b80ed1
*
* @copyright Copyright 2014-2016 KunkaLabs Limited.
* @author KunkaLabs Limited.
Expand Down Expand Up @@ -1386,8 +1386,8 @@
i = -1;

for (i = 0; i < controlParts.length; i++) {
controlPart = parseInt(controlParts[i]);
specimenPart = parseInt(specimenParts[i] || 0);
controlPart = parseInt(controlParts[i].replace(/[^\d.]/g, ''));
specimenPart = parseInt(specimenParts[i].replace(/[^\d.]/g, '') || 0);

if (specimenPart < controlPart) {
return false;
Expand Down Expand Up @@ -10376,5 +10376,5 @@
mixitup.registerJqPlugin(jq);
}
mixitup.NAME = 'mixitup';
mixitup.CORE_VERSION = '3.1.1';
mixitup.CORE_VERSION = '3.1.2';
})(window);
10 changes: 5 additions & 5 deletions dist/mixitup.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "mixitup",
"title": "MixItUp",
"version": "3.1.1",
"version": "3.1.2",
"description": "A high-performance, dependency-free library for animated filtering, sorting and more",
"author": "KunkaLabs Limited",
"homepage": "https://www.kunkalabs.com/mixitup/",
Expand Down
4 changes: 2 additions & 2 deletions src/h.js
Original file line number Diff line number Diff line change
Expand Up @@ -889,8 +889,8 @@ h = {
i = -1;

for (i = 0; i < controlParts.length; i++) {
controlPart = parseInt(controlParts[i]);
specimenPart = parseInt(specimenParts[i] || 0);
controlPart = parseInt(controlParts[i].replace(/[^\d.]/g, ''));
specimenPart = parseInt(specimenParts[i].replace(/[^\d.]/g, '') || 0);

if (specimenPart < controlPart) {
return false;
Expand Down
44 changes: 44 additions & 0 deletions tests/unit/h.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
'use strict';

const chai = require('chai');
const mixitup = require('../../dist/mixitup.js');

const h = mixitup.h;

describe('h#compareVersions()', () => {
it('should return true if versions are matching', () => {
let result = h.compareVersions('1.0.0', '1.0.0');

chai.assert.isOk(result);
});

it('should return false if specimen version is less than control', () => {
let result = h.compareVersions('1.0.0', '0.1.2');

chai.assert.isNotOk(result);
});

it('should return true if specimen version is greater than control', () => {
let result = h.compareVersions('1.0.0', '1.1.2');

chai.assert.isOk(result);
});

it('should return true if specimen version is greater than control, with double figures', () => {
let result = h.compareVersions('3.0.0', '10.1.2');

chai.assert.isOk(result);
});

it('should handle semver carat notation', () => {
let result = h.compareVersions('^3.0.0', '2.0.0');

chai.assert.isNotOk(result);
});

it('should handle semver label notation', () => {
let result = h.compareVersions('^3.0.0', '3.0.0-beta');

chai.assert.isOk(result);
});
});
3 changes: 2 additions & 1 deletion tests/unit/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ require('./controls-live');
require('./queue');
require('./extension');
require('./callbacks');
require('./jquery');
require('./jquery');
require('./h');

0 comments on commit 83bf6d9

Please sign in to comment.