New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@northernv/supermodel

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@northernv/supermodel - npm Package Compare versions

Comparing version 1.0.4 to 1.0.5

7

__tests__/index.js

@@ -42,2 +42,9 @@ const k = require('knex')

})
it('should return empty array when passed empty array', async () => {
tracker.on('query', (query) => {
throw new Error('cant insert empty array')
})
const res = await Fake.create([], { db })
expect(res).toEqual([])
})
it('should return a single object when passed object', async () => {

@@ -44,0 +51,0 @@ tracker.on('query', (query) => {

5

index.js

@@ -109,2 +109,5 @@ const assert = require('assert')

// If we have empty array, just bail
if (inserts.length === 0) return Promise.resolve([])
const q = knex(this.table).insert(inserts)

@@ -151,3 +154,3 @@

// This caused problems with an empty update and the collection overriden
// in the model was looking for properties not includes int he query
// in the model was looking for properties not includes in the query
if (isEmpty(properties)) return this.collection(query, opts)

@@ -154,0 +157,0 @@

3

package.json
{
"name": "@northernv/supermodel",
"version": "1.0.4",
"version": "1.0.5",
"description": "A Base model for Knex",

@@ -10,2 +10,3 @@ "main": "index.js",

"test": "jest",
"test:coverage": "jest --collectCoverage",
"lint": "eslint --quiet ./"

@@ -12,0 +13,0 @@ },

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