Socket
Socket
Sign inDemoInstall

feathers-sequelize

Package Overview
Dependencies
Maintainers
2
Versions
84
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feathers-sequelize - npm Package Compare versions

Comparing version 3.0.2 to 3.1.0

17

CHANGELOG.md
# Change Log
## [v3.0.2](https://github.com/feathersjs-ecosystem/feathers-sequelize/tree/v3.0.2) (2018-03-25)
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-sequelize/compare/v3.0.1...v3.0.2)
**Closed issues:**
- Requesting for associated data returns empty [\#197](https://github.com/feathersjs-ecosystem/feathers-sequelize/issues/197)
- Is it possible to query for related data through REST? [\#195](https://github.com/feathersjs-ecosystem/feathers-sequelize/issues/195)
- sequelize version 4.35 not permit $in [\#193](https://github.com/feathersjs-ecosystem/feathers-sequelize/issues/193)
- Custom getter not being called properly. [\#129](https://github.com/feathersjs-ecosystem/feathers-sequelize/issues/129)
**Merged pull requests:**
- Update sqlite3 to the latest version 🚀 [\#196](https://github.com/feathersjs-ecosystem/feathers-sequelize/pull/196) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
- Fix Sequelize dependency [\#194](https://github.com/feathersjs-ecosystem/feathers-sequelize/pull/194) ([daffl](https://github.com/daffl))
- Update README.md [\#192](https://github.com/feathersjs-ecosystem/feathers-sequelize/pull/192) ([murbanowicz](https://github.com/murbanowicz))
- Update Readme on associations [\#191](https://github.com/feathersjs-ecosystem/feathers-sequelize/pull/191) ([daffl](https://github.com/daffl))
## [v3.0.1](https://github.com/feathersjs-ecosystem/feathers-sequelize/tree/v3.0.1) (2018-03-07)

@@ -4,0 +21,0 @@ [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-sequelize/compare/v3.0.0...v3.0.1)

53

lib/index.js

@@ -121,6 +121,6 @@ const omit = require('lodash.omit');

})
.then(select(params, this.id))
.catch(error => {
throw new errors.NotFound(`No record found for id '${id}'`, error);
});
.then(select(params, this.id))
.catch(error => {
throw new errors.NotFound(`No record found for id '${id}'`, error);
});
}

@@ -191,15 +191,15 @@

.then(results => this.getModel(params).update(omit(data, this.id), options))
.then(results => {
if (id === null) {
return results[1];
}
.then(results => {
if (id === null) {
return results[1];
}
if (!results[1].length) {
throw new errors.NotFound(`No record found for id '${id}'`);
}
if (!results[1].length) {
throw new errors.NotFound(`No record found for id '${id}'`);
}
return results[1][0];
})
.then(select(params, this.id))
.catch(utils.errorHandler);
return results[1][0];
})
.then(select(params, this.id))
.catch(utils.errorHandler);
}

@@ -211,3 +211,3 @@

const ids = id === null ? this._find(params)
.then(mapIds) : Promise.resolve([ id ]);
.then(mapIds) : Promise.resolve([ id ]);

@@ -223,9 +223,9 @@ return ids

return Model.update(omit(data, this.id), options)
.then(() => {
if (params.$returning !== false) {
return this._getOrFind(id, findParams);
} else {
return Promise.resolve([]);
}
});
.then(() => {
if (params.$returning !== false) {
return this._getOrFind(id, findParams);
} else {
return Promise.resolve([]);
}
});
})

@@ -237,2 +237,3 @@ .then(select(params, this.id))

update (id, data, params) {
const where = Object.assign({}, filterQuery(params.query || {}).query);
const options = Object.assign({ raw: this.raw }, params.sequelize);

@@ -247,3 +248,3 @@

return this._get(id, { sequelize: { raw: false } }).then(instance => {
return this._get(id, { sequelize: { raw: false }, query: where }).then(instance => {
if (!instance) {

@@ -264,4 +265,4 @@ throw new errors.NotFound(`No record found for id '${id}'`);

})
.then(select(params, this.id))
.catch(utils.errorHandler);
.then(select(params, this.id))
.catch(utils.errorHandler);
}

@@ -268,0 +269,0 @@

{
"name": "feathers-sequelize",
"description": "A service adapter for Sequelize an SQL ORM",
"version": "3.0.2",
"version": "3.1.0",
"homepage": "https://github.com/feathersjs-ecosystem/feathers-sequelize",

@@ -6,0 +6,0 @@ "main": "lib/",

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