Skip to content

Commit

Permalink
Merge branch 'hotfix/1.6.1'
Browse files Browse the repository at this point in the history
* hotfix/1.6.1:
  Update the LICENSE.txt
  Bump the JSDoc version to 1.6.1
  Update the CHANGELOG
  Bump the version to 1.6.1
  Fix promisqueue in build
  • Loading branch information
Thomas Conner committed Nov 11, 2015
2 parents 4048f11 + 6cb0732 commit e873028
Show file tree
Hide file tree
Showing 12 changed files with 68 additions and 68 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
## Changelog
#### 1.6.1 (2015-11-11)
* Bugfix: Fix bug when trying to configure the promise-queue library.

#### 1.6.0 (2015-11-06)
* Bugfix(MLIBZ-625): Fix third party library bug that prevented the library from being used in a Titanium environment.
* Bugfix(MLIBZ-652): Fix race condition in crypto localStorage adapter.
Expand Down
1 change: 1 addition & 0 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ module.exports = function(grunt) {
src: [
// Log
build === 'nodejs' ? 'src/internals/log/logger-node.js' : 'src/internals/log/logger.js',
build === 'nodejs' ? 'src/internals/deferreds/promisequeue-node.js' : 'src/internals/deferreds/promisequeue.js',
'src/core/log.js',

// Setup.
Expand Down
46 changes: 23 additions & 23 deletions LICENSE.txt
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ Summary:
* mocha-as-promised-1.4 [WTFPL] - used for testing.
* promiscuous-0.6 [MIT] - used for promises.
* promises-aplus-tests-2.0 [WTFPL] - used for testing.
* promise-queue [MIT] - used for promises.
* promise-queue [MIT] - used to queue promises.
* sift-0.0 [MIT] - used for offline querying.
* sinon-1.7 [BSD-3-Clause] - used for testing.
* sinon-chai-2.4 [WTFPL] - used for testing.
Expand Down Expand Up @@ -238,7 +238,7 @@ SECTION 1: BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE LICENSES
>>> jsOAuth
>>> loglevel
>>> mocha
>>> promiscuous'
>>> promiscuous
>>> promise-queue
>>> sift
>>> sinon
Expand Down Expand Up @@ -804,27 +804,27 @@ BSD-STYLE, MIT-STYLE, OR SIMILAR STYLE is applicable to the following component(
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

>>> promise-queue (https://github.com/azproduction/promise-queue/blob/master/LICENSE)
>>>
>>> Copyright (c) 2013 Mikhail Davydov and other contributors
>>>
>>> Permission is hereby granted, free of charge, to any person obtaining
>>> a copy of this software and associated documentation files (the
>>> 'Software'), to deal in the Software without restriction, including
>>> without limitation the rights to use, copy, modify, merge, publish,
>>> distribute, sublicense, and/or sell copies of the Software, and to
>>> permit persons to whom the Software is furnished to do so, subject to
>>> the following conditions:
>>>
>>> The above copyright notice and this permission notice shall be
>>> included in all copies or substantial portions of the Software.
>>>
>>> THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
>>> EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
>>> MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
>>> IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
>>> CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
>>> TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
>>> SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Copyright (c) 2013 Mikhail Davydov and other contributors

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
'Software'), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

>>> sift (https://raw.github.com/crcn/sift.js/master/sift.js)

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ Updating the library version should follow [Semantic Version 2.0.0](http://semve

## License

Copyright 2014 Kinvey, Inc.
Copyright 2015 Kinvey, Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down
9 changes: 5 additions & 4 deletions config.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,12 @@
"src/internals/persistence/local/websql.js",
"src/internals/persistence/local/indexeddb.js",
"src/internals/social/html5.js",
"src/internals/storage/local-storage.js",
"src/shims/angular/angular.js",
"src/shims/angular/intro.txt",
"src/shims/angular/defer.js",
"src/shims/angular/persistence/net.js",
"src/shims/angular/outro.txt",
"src/internals/storage/local-storage.js"
"src/shims/angular/outro.txt"
]
},
"backbone": {
Expand All @@ -32,7 +32,7 @@
"node_modules/backbone-associations/backbone-associations-min.js"
],
"externals": [
"node_modules/loglevel/lib/loglevel.min.js",
"node_modules/loglevel/lib/loglevel.js",
"node_modules/promiscuous/dist/promiscuous-browser.js",
"node_modules/sift/sift.min.js",
"node_modules/promise-queue/lib/index.js"
Expand Down Expand Up @@ -79,7 +79,8 @@
"src/shims/nodejs/nodejs.js",
"src/internals/deferreds/promiscuous-node.js",
"src/internals/persistence/net/node-http.js",
"src/internals/storage/memory.js"
"src/internals/storage/memory.js",
"src/internals/deferreds/promisequeue-node.js"
]
},
"phonegap": {
Expand Down
2 changes: 1 addition & 1 deletion lib/jsdoc.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Kinvey JavaScript library (1.6.0, 2015-11-16)
## Kinvey JavaScript library (1.6.1, 2015-11-11)

### Welcome
Thanks for choosing Kinvey to build your backend. This is your complete guide to the Kinvey JavaScript library, available for HTML5, AngularJS, Backbone.js, Node.js, PhoneGap, and Titanium.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kinvey",
"version": "1.6.0",
"version": "1.6.1",
"description": "Kinvey JavaScript Library",
"homepage": "http://www.kinvey.com",
"bugs": {
Expand Down
13 changes: 1 addition & 12 deletions src/core/persistence/sync.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,6 @@
// Most of these methods delegate back to `Sync`. Therefore, `Kinvey.Sync`
// provides the public interface for synchronization.

// Configure Queue
root.Queue.configure(function(handler) {
var deferred = Kinvey.Defer.deferred();
try {
handler(deferred.resolve, deferred.reject, deferred.progress);
} catch (err) {
deferred.reject(err);
}
return deferred.promise;
});

/**
* @private
* @namespace Sync
Expand Down Expand Up @@ -65,7 +54,7 @@ var Sync = /** @lends Sync */{
* Queue used to handle sync.
* @type {Queue}
*/
queue: new root.Queue(1, Infinity),
queue: new Queue(1, Infinity),

/**
* Counts the number of documents pending synchronization. If `collection` is
Expand Down
12 changes: 12 additions & 0 deletions src/internals/deferreds/promisequeue-node.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
var Queue = require('promise-queue');

// Configure the Queue with a Kinvey.Defer
Queue.configure(function(handler) {
var deferred = Kinvey.Defer.deferred();
try {
handler(deferred.resolve, deferred.reject, deferred.progress);
} catch (err) {
deferred.reject(err);
}
return deferred.promise;
});
16 changes: 16 additions & 0 deletions src/internals/deferreds/promisequeue.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
var Queue = function() {};

if (typeof root.Queue !== 'undefined') {
Queue = root.Queue;

// Configure the Queue with a Kinvey.Defer
Queue.configure(function(handler) {
var deferred = Kinvey.Defer.deferred();
try {
handler(deferred.resolve, deferred.reject, deferred.progress);
} catch (err) {
deferred.reject(err);
}
return deferred.promise;
});
}
13 changes: 1 addition & 12 deletions src/internals/persistence/local/indexeddb.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@

/* jshint evil: true */

// Configure Queue
root.Queue.configure(function(handler) {
var deferred = Kinvey.Defer.deferred();
try {
handler(deferred.resolve, deferred.reject, deferred.progress);
} catch (err) {
deferred.reject(err);
}
return deferred.promise;
});

// `Database` adapter for [IndexedDB](http://www.w3.org/TR/IndexedDB/).
var IDBAdapter = {
/**
Expand Down Expand Up @@ -84,7 +73,7 @@ var IDBAdapter = {
* Queue used to handle mutiple transactions.
* @type {Queue}
*/
queue: new root.Queue(1, Infinity),
queue: new Queue(1, Infinity),

/**
* Generates an object id.
Expand Down
17 changes: 3 additions & 14 deletions src/internals/persistence/local/websql.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,6 @@

/* jshint evil: true */

// Configure Queue
root.Queue.configure(function(handler) {
var deferred = Kinvey.Defer.deferred();
try {
handler(deferred.resolve, deferred.reject, deferred.progress);
} catch (err) {
deferred.reject(err);
}
return deferred.promise;
});

/**
* `Database` adapter for [WebSql](http://dev.w3.org/html5/webdatabase/).
*
Expand Down Expand Up @@ -76,8 +65,8 @@ var WebSqlAdapter = {
* Queue used to handle mutiple transactions.
* @type {Queue}
*/
transactionQueue: new root.Queue(1, Infinity),
cacheQueue: new root.Queue(1, Infinity),
transactionQueue: new Queue(1, Infinity),
cacheQueue: new Queue(1, Infinity),

/**
* Cache to store collections in memory.
Expand Down Expand Up @@ -630,7 +619,7 @@ var WebSqlAdapter = {

function useWebSqlAdapter() {
// Use WebSQL adapter.
if (('undefined' !== typeof openDatabase || 'undefined' !== typeof root.openDatabase) && 'undefined' !== typeof root.sift && 'undefined' !== typeof root.Queue) {
if (('undefined' !== typeof openDatabase || 'undefined' !== typeof root.openDatabase) && 'undefined' !== typeof root.sift && 'undefined' !== typeof Queue) {
// Normalize for Windows Phone 8.1
root.openDatabase = 'undefined' !== typeof openDatabase ? openDatabase : root.openDatabase;
Database.use(WebSqlAdapter);
Expand Down

0 comments on commit e873028

Please sign in to comment.