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 2.3.0 to 2.3.1

15

CHANGELOG.md
# Change Log
## [v2.3.0](https://github.com/feathersjs/feathers-sequelize/tree/v2.3.0) (2017-08-19)
[Full Changelog](https://github.com/feathersjs/feathers-sequelize/compare/v2.2.1...v2.3.0)
**Closed issues:**
- use inside php server [\#151](https://github.com/feathersjs/feathers-sequelize/issues/151)
- Patch returns Model instance by default [\#146](https://github.com/feathersjs/feathers-sequelize/issues/146)
- Run tests against PostgreSQL [\#105](https://github.com/feathersjs/feathers-sequelize/issues/105)
- Avoid findAndCount if paginate is false [\#95](https://github.com/feathersjs/feathers-sequelize/issues/95)
**Merged pull requests:**
- Finalize running tests against Postgresql [\#152](https://github.com/feathersjs/feathers-sequelize/pull/152) ([daffl](https://github.com/daffl))
- Fix postgres tests [\#150](https://github.com/feathersjs/feathers-sequelize/pull/150) ([Ryanthegiantlion](https://github.com/Ryanthegiantlion))
## [v2.2.1](https://github.com/feathersjs/feathers-sequelize/tree/v2.2.1) (2017-08-08)

@@ -4,0 +19,0 @@ [Full Changelog](https://github.com/feathersjs/feathers-sequelize/compare/v2.2.0...v2.2.1)

31

lib/index.js

@@ -92,3 +92,4 @@ 'use strict';

offset: filters.$skip,
raw: this.raw
raw: this.raw,
distinct: true
}, params.sequelize);

@@ -102,2 +103,14 @@

// Until Sequelize fix all the findAndCount issues, a few 'hacks' are needed to get the total count correct
// Adding an empty include changes the way the count is done
// See: https://github.com/sequelize/sequelize/blob/7e441a6a5ca44749acd3567b59b1d6ceb06ae64b/lib/model.js#L1780-L1782
q.include = q.include || [];
// Non-raw is the default but setting it manually breaks paging
// See: https://github.com/sequelize/sequelize/issues/7931
if (q.raw === false) {
delete q.raw;
}
return Model.findAndCount(q).then(function (result) {

@@ -268,2 +281,4 @@ return {

value: function update(id, data, params) {
var _this3 = this;
var options = _extends({ raw: this.raw }, params.sequelize);

@@ -277,2 +292,3 @@

// update
return this._get(id, { sequelize: { raw: false } }).then(function (instance) {

@@ -292,7 +308,4 @@ if (!instance) {

return instance.update(copy, options).then(function (instance) {
if (options.raw === false) {
return instance;
}
return instance.toJSON();
return instance.update(copy, { raw: false }).then(function () {
return _this3._get(id, { sequelize: options });
});

@@ -304,3 +317,3 @@ }).then((0, _feathersCommons.select)(params, this.id)).catch(utils.errorHandler);

value: function remove(id, params) {
var _this3 = this;
var _this4 = this;

@@ -312,3 +325,3 @@ var opts = _extends({ raw: this.raw }, params);

if (id !== null) {
where[_this3.id] = id;
where[_this4.id] = id;
}

@@ -318,3 +331,3 @@

var Model = _this3.applyScope(params);
var Model = _this4.applyScope(params);

@@ -321,0 +334,0 @@ return Model.destroy(options).then(function () {

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

@@ -48,3 +48,7 @@ "main": "lib/",

"test": "npm run lint && npm run coverage",
"coverage": "istanbul cover node_modules/mocha/bin/_mocha -- --opts mocha.opts"
"test:postgres": "env DB=postgres npm run lint && npm run coverage:postgres",
"test:mysql": "env DB=mysql npm run lint && npm run coverage:mysql",
"coverage": "istanbul cover node_modules/mocha/bin/_mocha -- --opts mocha.opts",
"coverage:postgres": "env DB=postgres istanbul cover node_modules/mocha/bin/_mocha -- --opts mocha.opts",
"coverage:mysql": "env DB=mysql istanbul cover node_modules/mocha/bin/_mocha -- --opts mocha.opts"
},

@@ -84,2 +88,3 @@ "semistandard": {

"mocha": "^3.0.0",
"mysql2": "^1.4.2",
"pg": "^6.1.5",

@@ -86,0 +91,0 @@ "pg-hstore": "^2.3.2",

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