Socket
Socket
Sign inDemoInstall

kinvey-html5-sdk

Package Overview
Dependencies
Maintainers
2
Versions
138
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kinvey-html5-sdk - npm Package Compare versions

Comparing version 3.4.5 to 3.5.0

28

CHANGELOG.md

@@ -1,2 +0,28 @@

# Changelog
# Change Log
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).
## [3.5.0](https://github.com/Kinvey/html5-sdk/tree/v3.5.0) (2017-04-20)
[Full Changelog](https://github.com/Kinvey/html5-sdk/compare/v3.4.5...v3.5.0)<br/>
### Added
_None_
### Removed
_None_
### Changed
- Registered `Popup` class using new `usePopupClass()` static function on `User` class. Removed config in `webpack.config` used to replace the `Popup` class when a bundle is generated. This makes it easier for other people to utilize the SDK with their own `Webpack` and `Browserify` bundles.
- Return the count of entities removed for storage adapters remove functions.
- Update `kinvey-js-sdk` dependency to [v3.5.0](https://github.com/Kinvey/js-sdk/tree/v3.5.0).
### Merged Pull Requests
- Update Storage Adapters [#15](https://github.com/Kinvey/html5-sdk/pull/15)
- Register Popup Class [#16](https://github.com/Kinvey/html5-sdk/pull/16)
### Closed Issues
_None_
## [v3.4.5](https://github.com/Kinvey/html5-sdk/tree/v3.4.5) (2016-04-13)

@@ -3,0 +29,0 @@ [Full Changelog](https://github.com/Kinvey/html5-sdk/compare/v3.4.4...v3.4.5)<br/>

@@ -9,2 +9,6 @@ 'use strict';

var _popup = require('./popup');
var _popup2 = _interopRequireDefault(_popup);
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }

@@ -16,3 +20,6 @@

// Setup popup
_export.User.usePopupClass(_popup2.default);
// Export
module.exports = _export2.default;

16

dist/middleware/src/http.js

@@ -9,4 +9,2 @@ 'use strict';

exports.deviceInformation = deviceInformation;
var _export = require('kinvey-js-sdk/dist/export');

@@ -22,2 +20,6 @@

var _isFunction = require('lodash/isFunction');
var _isFunction2 = _interopRequireDefault(_isFunction);
var _package = require('../../../package.json');

@@ -136,3 +138,3 @@

(0, _xhr2.default)({
_this2.xhrRequest = (0, _xhr2.default)({
method: method,

@@ -148,7 +150,5 @@ url: url,

return reject(new _export.TimeoutError('The network request timed out.'));
} else if (error.code === 'ENOENT') {
return reject(new _export.NoNetworkConnectionError('You do not have a network connection.'));
}
return reject(error);
return reject(new _export.NetworkConnectionError('There was an error connecting to the network.', error));
}

@@ -170,2 +170,6 @@

value: function cancel() {
if ((0, _export.isDefined)(this.xhrRequest) && (0, _isFunction2.default)(this.xhrRequest.abort)) {
this.xhrRequest.abort();
}
return _es6Promise2.default.resolve();

@@ -172,0 +176,0 @@ }

@@ -75,3 +75,3 @@ 'use strict';

if (db) {
if ((0, _export.isDefined)(db)) {
var containsCollection = (0, _isFunction2.default)(db.objectStoreNames.contains) ? db.objectStoreNames.contains(collection) : db.objectStoreNames.indexOf(collection) !== -1;

@@ -84,3 +84,3 @@

if (txn) {
if ((0, _export.isDefined)(txn)) {
return success(txn);

@@ -90,6 +90,6 @@ }

throw new Error('Unable to open a transaction for ' + collection + (' collection on the ' + this.name + ' IndexedDB database.'));
} catch (err) {
return error(err);
} catch (e) {
return error(e);
}
} else if (!write) {
} else if (write === false) {
return error(new _export.NotFoundError('The ' + collection + ' collection was not found on' + (' the ' + this.name + ' IndexedDB database.')));

@@ -99,3 +99,3 @@ }

if (!force && this.inTransaction) {
if (force === false && this.inTransaction) {
return this.queue.push(function () {

@@ -111,3 +111,3 @@ _this.openTransaction(collection, write, success, error);

try {
if (db) {
if ((0, _export.isDefined)(db)) {
var version = db.version + 1;

@@ -119,4 +119,4 @@ db.close();

}
} catch (err) {
error(err);
} catch (e) {
error(e);
}

@@ -131,3 +131,3 @@

if (write) {
if (write === true) {
db.createObjectStore(collection, { keyPath: '_id' });

@@ -147,3 +147,3 @@ }

db.onversionchange = function () {
if (db) {
if ((0, _export.isDefined)(db)) {
db.close();

@@ -216,3 +216,3 @@ db = null;

if (cursor) {
if ((0, _export.isDefined)(cursor)) {
entities.push(cursor.value);

@@ -244,3 +244,3 @@ return cursor.continue();

if (entity) {
if ((0, _export.isDefined)(entity)) {
resolve(entity);

@@ -306,4 +306,4 @@ } else {

if (entity) {
resolve(entity);
if ((0, _export.isDefined)(entity)) {
resolve({ count: 1 });
} else {

@@ -310,0 +310,0 @@ reject(new _export.NotFoundError('An entity with id = ' + id + ' was not found in the ' + collection + (' collection on the ' + _this5.name + ' IndexedDB database.')));

@@ -67,3 +67,3 @@ 'use strict';

if (!db) {
if ((0, _export.isDefined)(db) === false) {
db = global.openDatabase(this.name, 1, 'Kinvey Cache', size);

@@ -89,5 +89,5 @@ dbCache[this.name] = db;

var promise = new _es6Promise2.default(function (resolve, reject) {
var writeTxn = write || !(0, _isFunction2.default)(db.readTransaction);
var writeTxn = write || (0, _isFunction2.default)(db.readTransaction) === false;
db[writeTxn ? 'transaction' : 'readTransaction'](function (tx) {
if (write && !isMaster) {
if (write && isMaster === false) {
tx.executeSql('CREATE TABLE IF NOT EXISTS ' + escapedCollection + ' ' + '(key BLOB PRIMARY KEY NOT NULL, value BLOB NOT NULL)');

@@ -111,3 +111,3 @@ }

if (resultSet.rows.length) {
if (resultSet.rows.length > 0) {
for (var i = 0, len = resultSet.rows.length; i < len; i += 1) {

@@ -221,3 +221,3 @@ try {

return entities[0];
return { count: count };
});

@@ -224,0 +224,0 @@ }

@@ -93,3 +93,3 @@ 'use strict';

if (entities) {
if ((0, _export.isDefined)(entities)) {
return _es6Promise2.default.resolve(JSON.parse(entities));

@@ -118,3 +118,3 @@ }

if (!entity) {
if ((0, _export.isDefined)(entity) === false) {
throw new _export.NotFoundError('An entity with _id = ' + id + ' was not found in the ' + collection + (' collection on the ' + _this2.name + ' localstorage database.'));

@@ -147,3 +147,3 @@ }

if (entity) {
if ((0, _export.isDefined)(entity)) {
entitiesById[id] = (0, _merge2.default)(existingEntity, entity);

@@ -166,3 +166,3 @@ }

if (!entity) {
if ((0, _export.isDefined)(entity) === false) {
throw new _export.NotFoundError('An entity with _id = ' + id + ' was not found in the ' + collection + ' ' + ('collection on the ' + _this4.name + ' memory database.'));

@@ -173,3 +173,3 @@ }

return _this4.save(collection, (0, _values2.default)(entitiesById)).then(function () {
return entity;
return { count: 1 };
});

@@ -235,3 +235,3 @@ });

if (entities) {
if ((0, _export.isDefined)(entities)) {
return _es6Promise2.default.resolve(JSON.parse(entities));

@@ -260,3 +260,3 @@ }

if (!entity) {
if ((0, _export.isDefined)(entity) === false) {
throw new _export.NotFoundError('An entity with _id = ' + id + ' was not found in the ' + collection + (' collection on the ' + _this7.name + ' localstorage database.'));

@@ -289,3 +289,3 @@ }

if (entity) {
if ((0, _export.isDefined)(entity)) {
entitiesById[id] = (0, _merge2.default)(existingEntity, entity);

@@ -308,3 +308,3 @@ }

if (!entity) {
if ((0, _export.isDefined)(entity) === false) {
throw new _export.NotFoundError('An entity with _id = ' + id + ' was not found in the ' + collection + ' ' + ('collection on the ' + _this9.name + ' memory database.'));

@@ -315,3 +315,3 @@ }

return _this9.save(collection, (0, _values2.default)(entitiesById)).then(function () {
return entity;
return { count: 1 };
});

@@ -413,3 +413,3 @@ });

if (!entity) {
if ((0, _export.isDefined)(entity) === false) {
throw new _export.NotFoundError('An entity with _id = ' + id + ' was not found in the ' + collection + (' collection on the ' + _this12.name + ' localstorage database.'));

@@ -444,3 +444,3 @@ }

if (entity) {
if ((0, _export.isDefined)(entity)) {
entitiesById[id] = (0, _merge2.default)(existingEntity, entity);

@@ -465,3 +465,3 @@ }

if (!entity) {
if ((0, _export.isDefined)(entity) === false) {
throw new _export.NotFoundError('An entity with _id = ' + id + ' was not found in the ' + collection + ' ' + ('collection on the ' + _this14.name + ' memory database.'));

@@ -472,3 +472,3 @@ }

return _this14.save(collection, (0, _values2.default)(entitiesById)).then(function () {
return entity;
return { count: 1 };
});

@@ -475,0 +475,0 @@ });

{
"name": "kinvey-html5-sdk",
"version": "3.4.5",
"version": "3.5.0",
"description": "Kinvey JavaScript SDK for HTML5 applications.",

@@ -43,3 +43,3 @@ "homepage": "http://www.kinvey.com",

"es6-promise": "4.1.0",
"kinvey-js-sdk": "3.4.5",
"kinvey-js-sdk": "3.5.0",
"lodash": "4.17.4",

@@ -49,3 +49,3 @@ "xhr": "2.3.3"

"peerDependencies": {
"kinvey-js-sdk": "3.4.5"
"kinvey-js-sdk": "3.5.0"
},

@@ -52,0 +52,0 @@ "devDependencies": {

@@ -32,8 +32,4 @@ /* eslint-disable */

plugins: [
new webpack.BannerPlugin(BANNER, { raw: true }),
new webpack.NormalModuleReplacementPlugin(
/kinvey-js-sdk\/dist\/identity\/src\/popup\.js/,
require.resolve(path.resolve(__dirname, './dist/popup.js'))
)
new webpack.BannerPlugin(BANNER, { raw: true })
]
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc