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 2.1.22 to 2.1.23

6

Changelog.md

@@ -0,1 +1,7 @@

### v2.1.23
- Green tests on io.js & node 0.12 (#618)
- Don't crash on null dates if timezone is set (#618)
- Fix wrong error when module is missing (#593)
- Fix key field when using `mapsTo` and cache (#580)
### v2.1.22

@@ -2,0 +8,0 @@ - Fix ignorecase unique scope for hasOne property (#603)

5

lib/Drivers/DML/postgres.js

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

case "date":
if (this.config.timezone && this.config.timezone != 'local') {
if (_.isDate(value) && this.config.timezone && this.config.timezone != 'local') {
var tz = convertTimezone(this.config.timezone);

@@ -273,2 +273,3 @@

value.setTime(value.getTime() - (value.getTimezoneOffset() * 60000));
if (tz !== false) {

@@ -325,3 +326,3 @@ // shift UTC to timezone

case "date":
if (this.config.timezone && this.config.timezone != 'local') {
if (_.isDate(value) && this.config.timezone && this.config.timezone != 'local') {
var tz = convertTimezone(this.config.timezone);

@@ -328,0 +329,0 @@

8

lib/Model.js

@@ -399,2 +399,7 @@ var _ = require("lodash");

newInstance : function (data, cb) {
// We need to do the rename before we construct the UID & do the cache lookup
// because the cache is loaded using propertyName rather than fieldName
Utilities.renameDatastoreFieldsToPropertyNames(data, fieldToPropertyMap);
// Construct UID
var uid = opts.driver.uid + "/" + opts.table + (merge ? "+" + merge.from.table : "");

@@ -405,4 +410,3 @@ for (var i = 0; i < opts.keys.length; i++) {

Utilities.renameDatastoreFieldsToPropertyNames(data, fieldToPropertyMap);
// Now we can do the cache lookup
Singleton.get(uid, {

@@ -409,0 +413,0 @@ cache : options.cache,

@@ -137,3 +137,3 @@ var util = require("util");

} catch (ex) {
if (ex.code === "MODULE_NOT_FOUND" || ex.message.indexOf('find module')) {
if (ex.code === "MODULE_NOT_FOUND" || ex.message.indexOf('find module') > -1) {
return ORM_Error(new ORMError("Connection protocol not supported - have you installed the database driver for " + proto + "?", 'NO_SUPPORT'), cb);

@@ -140,0 +140,0 @@ }

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

],
"version" : "2.1.22",
"version" : "2.1.23",
"license" : "MIT",

@@ -47,5 +47,5 @@ "homepage" : "http://dresende.github.io/node-orm2",

"devDependencies": {
"mysql" : "2.0.0-alpha9",
"pg" : "2.6.2",
"sqlite3" : "2.1.7",
"mysql" : "2.5.5",
"pg" : "4.3.0",
"sqlite3" : "3.0.5",
"async" : "0.9.0",

@@ -52,0 +52,0 @@ "mocha" : "1.13.0",

@@ -16,5 +16,7 @@ ## Object Relational Mapping

Tests are done using [Travis CI](https://travis-ci.org/) for node versions `0.6.x`, `0.8.x` and `0.10.x`. If you want you can run
tests locally.
Supported: 0.8, 0.10, 0.12, iojs-1.5
Tests are run on [Travis CI](https://travis-ci.org/) for node versions `0.10.x`, `0.12.x` and `iojs-1.5`.
If you want you can run tests locally:
```sh

@@ -226,7 +228,7 @@ npm test

See information in the [wiki](https://github.com/dresende/node-orm2/wiki/Synching-and-Dropping-Models).
See information in the [wiki](https://github.com/dresende/node-orm2/wiki/Syncing-and-dropping-models).
## Dropping Models
See information in the [wiki](https://github.com/dresende/node-orm2/wiki/Synching-and-Dropping-Models).
See information in the [wiki](https://github.com/dresende/node-orm2/wiki/Syncing-and-dropping-models).

@@ -233,0 +235,0 @@ ## Advanced Options

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