Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

orm

Package Overview
Dependencies
Maintainers
2
Versions
103
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

orm - npm Package Compare versions

Comparing version 4.0.2 to 5.0.0

localhost

5

Changelog.md

@@ -0,1 +1,6 @@

### v5.0.0
- Upgrade to latest `sqlite` & `mysql` package versions
- Upgrade to `pg` 7.x. ORM will not work with `pg` < 7
- Drop support for nodejs < 4 (required due to `pg` upgrade)
### v4.0.2

@@ -2,0 +7,0 @@ - Fix timezone bug in sqlite ([822](../../pull/822)]

2

examples/anontxt/package.json

@@ -10,3 +10,3 @@ {

"nodemon": "0.7.10",
"moment": "2.4.0",
"moment": "2.21.0",
"pg": "2.6.2",

@@ -13,0 +13,0 @@ "colors": "0.6.2"

@@ -12,3 +12,3 @@ var _ = require("lodash");

connect: function (cb) {
this.db.connect(this.config, function (err, client, done) {
this.db.connect(function (err, client, done) {
if (!err) {

@@ -24,3 +24,3 @@ done();

}
this.db.connect(this.config, function (err, client, done) {
this.db.connect(function (err, client, done) {
if (err) {

@@ -41,7 +41,2 @@ return cb(err);

return this;
},
on: function(ev, cb) {
// Because `pg` is the same for all instances of this driver
// we can't keep adding listeners since they are never removed.
return this;
}

@@ -65,8 +60,2 @@ },

return this;
},
on: function(ev, cb) {
if (ev == "error") {
this.db.on("error", cb);
}
return this;
}

@@ -105,3 +94,3 @@ }

functions = switchableFunctions.pool;
this.db = pg;
this.db = new pg.Pool(this.config);
} else {

@@ -127,2 +116,9 @@ this.db = new pg.Client(this.config);

Driver.prototype.on = function(ev, cb) {
if (ev == "error") {
this.db.on("error", cb);
}
return this;
};
Driver.prototype.ping = function (cb) {

@@ -129,0 +125,0 @@ this.execSimpleQuery("SELECT * FROM pg_stat_activity LIMIT 1", function () {

@@ -55,3 +55,3 @@ var _ = require("lodash");

var connect = function (opts, cb) {
exports.connect = function (opts, cb) {
if (arguments.length === 0 || !opts || !optsChecker(opts)) {

@@ -140,2 +140,4 @@ cb = typeof(cb) !== 'function' ? opts : cb;

exports.connectAsync = Promise.promisify(exports.connect, { context: exports });
var use = function (connection, proto, opts, cb) {

@@ -176,8 +178,2 @@ if (DriverAliases[proto]) {

/**
*
* @param opts
*/
exports.connectAsync = Promise.promisify(connect);
exports.addAdapter = adapters.add;

@@ -468,3 +464,1 @@

}
exports.connect = connect;

@@ -15,3 +15,3 @@ {

],
"version": "4.0.2",
"version": "5.0.0",
"license": "MIT",

@@ -61,13 +61,12 @@ "homepage": "http://dresende.github.io/node-orm2",

"engines": {
"node": "*"
"node": ">= 4.0.0"
},
"analyse": false,
"dependencies": {
"async": "2.5.0",
"bluebird": "^3.5.0",
"async": "2.6.1",
"bluebird": "3.5.1",
"enforce": "0.1.7",
"hat": "0.0.3",
"lodash": "4.17.4",
"lodash": "4.17.10",
"path-is-absolute": "1.0.1",
"sinon": "^3.2.1",
"sql-ddl-sync": "0.3.13",

@@ -77,13 +76,14 @@ "sql-query": "0.1.26"

"devDependencies": {
"chalk": "2.0.1",
"chalk": "2.4.1",
"glob": "7.1.2",
"mocha": "3.4.2",
"mocha": "5.2.0",
"mongodb": "1.4.10",
"mysql": "2.13.0",
"pg": "6.4.1",
"semver": "5.3.0",
"should": "11.2.1",
"sqlite3": "3.1.8"
"mysql": "2.15.0",
"pg": "7.4.3",
"semver": "5.5.0",
"should": "13.2.1",
"sinon": "6.0.0",
"sqlite3": "4.0.0"
},
"optionalDependencies": {}
}

@@ -9,2 +9,9 @@ ## Object Relational Mapping

## This package is not actively maintained
If you're starting a new project, please consider using one of the following instead as they have a much more active community:
* https://github.com/bookshelf/bookshelf
* https://github.com/sequelize/sequelize
## Install

@@ -18,3 +25,3 @@

Supported: 0.12 - 6.0 +
Supported: 4.0 +

@@ -140,7 +147,7 @@ Tests are run on [Travis CI](https://travis-ci.org/)

};
orm.connectAsync(opts)
.then(function(db) {
.then(function(db) {
// connected
// ...
// ...
})

@@ -324,6 +331,6 @@ .catch(function() {

// SQL: "SELECT * FROM person WHERE surname = 'Doe'"
console.log("People found: %d", people.length);
console.log("First person: %s, age %d", people[0].fullName(), people[0].age);
people[0].age = 16;

@@ -345,3 +352,3 @@ return people[0].saveAsync();

var [min, max] = result; // you should use destructuring here
console.log(min, max);

@@ -1159,2 +1166,2 @@ });

## License
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdresende%2Fnode-orm2.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdresende%2Fnode-orm2?ref=badge_large)
[![FOSSA Status](https://app.fossa.io/api/projects/git%2Bgithub.com%2Fdresende%2Fnode-orm2.svg?type=large)](https://app.fossa.io/projects/git%2Bgithub.com%2Fdresende%2Fnode-orm2?ref=badge_large)

Sorry, the diff of this file is not supported yet

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