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 5.0.9 to 6.0.0

.mocharc.json

17

Changelog.md

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

### v6.0.0
- [POSSIBLY BREAKING] Set internal default property value to `undefined` instead of `null` ([855](../../pull/855)).
- This will prevent `null` values being explicitly sent to the database when no value was assigned and instead result in the database setting the column to null, or generating a default value.
- Properties with an internal value of `undefined` will still return `null` when accessed.
- Setting a previously filled property to `undefined` will still set it to null in the DB.
- No ORM tests were broken by this change, and as such, the impact of this should be limited to a very small number of corner cases.
- Add PostgreSQL `uuid` column support ([855](../../pull/855)).
- Allow specifying `defaultExpression` (eg. `uuid_generate_v4()` for PostgreSQL or `uuid()` for MySQL) to be executed by the database engine for generating default values ([855](../../pull/855)).
### v5.0.9
- Add async versions of driver functions ([851](../../pull/851)
- Add async versions of driver functions ([851](../../pull/851))
### v5.0.8
- Improve Typescript typings - add offset prop to find options ([850](../../pull/850)
- Improve Typescript typings - add offset prop to find options ([850](../../pull/850))

@@ -16,3 +25,3 @@ ### v5.0.7

### v5.0.5
- Update lodash & sql-ddl-sync version to address security vulnerabilities ([845](../../pull/845)
- Update lodash & sql-ddl-sync version to address security vulnerabilities ([845](../../pull/845))
- Node 11+ support (stable sort; see https://github.com/nodejs/node/issues/24294 for details)

@@ -22,3 +31,3 @@ - Test against node 12 & 13

### v5.0.4
- Update sql-query version to address security vulnerabilities ([841](../../pull/841)
- Update sql-query version to address security vulnerabilities ([841](../../pull/841))

@@ -25,0 +34,0 @@ ### v5.0.3

@@ -156,5 +156,7 @@ var Utilities = require("./Utilities");

if (prop) {
/*
if (opts.data[k] == null && (prop.type == 'serial' || typeof prop.defaultValue == 'function')) {
continue;
}
*/

@@ -488,3 +490,3 @@ if (opts.driver.propertyToValue) {

var addInstanceProperty = function (key) {
var defaultValue = null;
var defaultValue = undefined;
var prop = Model.allProperties[key];

@@ -507,3 +509,9 @@

get: function () {
return opts.data[key];
var val = opts.data[key];
if (val === undefined) {
return null;
} else {
return opts.data[key];
}
},

@@ -737,3 +745,3 @@ set: function (val) {

for (k in asc.field) {
if (!opts.data.hasOwnProperty(k)) {
if (!instance.hasOwnProperty(k)) {
addInstanceProperty(k);

@@ -740,0 +748,0 @@ }

@@ -6,3 +6,3 @@ var _ = require('lodash');

"text", "number", "integer", "boolean", "date", "enum", "object",
"binary", "point", "serial"
"binary", "point", "serial", "uuid"
];

@@ -9,0 +9,0 @@

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

],
"version": "5.0.9",
"version": "6.0.0",
"license": "MIT",

@@ -58,3 +58,3 @@ "homepage": "http://dresende.github.io/node-orm2",

"scripts": {
"test": "make test"
"test": "nyc make test"
},

@@ -72,3 +72,3 @@ "engines": {

"path-is-absolute": "1.0.1",
"sql-ddl-sync": "0.3.16",
"sql-ddl-sync": "0.3.18",
"sql-query": "0.1.27"

@@ -82,2 +82,3 @@ },

"mysql": "~2.18.1",
"nyc": "~15.1.0",
"pg": "~8.7.1",

@@ -89,3 +90,10 @@ "semver": "~7.3.5",

},
"optionalDependencies": {}
"optionalDependencies": {},
"nyc": {
"check-coverage": true,
"statements": 89.22,
"branches": 79.76,
"functions": 91.46,
"lines": 89.68
}
}

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