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

@wmfs/pg-delta-file

Package Overview
Dependencies
Maintainers
1
Versions
87
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wmfs/pg-delta-file - npm Package Compare versions

Comparing version 1.30.0 to 1.31.0

18

CHANGELOG.md

@@ -0,1 +1,19 @@

# [1.31.0](https://github.com/wmfs/pg-delta-file/compare/v1.30.0...v1.31.0) (2019-09-26)
### ✨ Features
* Per-model info includes count of filtered rows, if applicable ([bdb7da8](https://github.com/wmfs/pg-delta-file/commit/bdb7da8))
* Returned info additionally includes per-model totalCounts ([556ffb7](https://github.com/wmfs/pg-delta-file/commit/556ffb7))
### 🛠 Builds
* **deps-dev:** update dev dependancies ([ac4d482](https://github.com/wmfs/pg-delta-file/commit/ac4d482))
### 🚨 Tests
* Tweak delta export tests to check whole info object ([a6e8725](https://github.com/wmfs/pg-delta-file/commit/a6e8725))
# [1.30.0](https://github.com/wmfs/pg-delta-file/compare/v1.29.0...v1.30.0) (2019-07-11)

@@ -2,0 +20,0 @@

25

lib/Transformer.js

@@ -9,2 +9,7 @@ const Transform = require('stream').Transform

this.info = info
this.modelInfo = { totalCount: 0 }
if (!model.startsWith('-')) {
this.info[model] = this.modelInfo
}
this.transformerFn = options.transformFunction ? options.transformFunction : identityTransform

@@ -55,3 +60,3 @@ this.filterFn = options.filterFunction ? options.filterFunction : () => true

_transform (sourceRow, encoding, callback) {
this.info.totalCount++
this.bumpRowCount()

@@ -62,3 +67,3 @@ const outputValues = this.transformers

if (!this.filterFn(outputValues)) {
this.info.totalCount-- // I'm not a super-fan of having to diddle this back, but there we are
this.filterRowCount()
return callback(null, null)

@@ -72,2 +77,18 @@ }

} // _transform
bumpRowCount () {
this.info.totalCount++
this.modelInfo.totalCount++
}
filterRowCount () {
this.info.totalCount-- // I'm not a super-fan of having to diddle this back, but there we are
this.modelInfo.totalCount--
if (!this.modelInfo.filteredCount) {
this.modelInfo.filteredCount = 0
}
this.modelInfo.filteredCount++
}
}

@@ -74,0 +95,0 @@

12

package.json
{
"name": "@wmfs/pg-delta-file",
"version": "1.30.0",
"version": "1.31.0",
"description": "Outputs change-only-update CSV files (or “delta” files) that contain all the necessary actions required to re-synchronize rows in a cloned table.",

@@ -34,10 +34,10 @@ "author": "West Midlands Fire Service",

"conventional-changelog-metahub": "2.0.2",
"cz-conventional-changelog": "2.1.0",
"mocha": "5.2.0",
"cz-conventional-changelog": "3.0.2",
"mocha": "6.2.0",
"nyc": "14.1.1",
"semantic-release": "15.13.17",
"semantic-release": "15.13.24",
"standard": "12.0.1",
"@semantic-release/changelog": "3.0.4",
"@semantic-release/git": "7.0.13",
"@wmfs/hl-pg-client": "1.11.1"
"@semantic-release/git": "7.0.16",
"@wmfs/hl-pg-client": "1.13.0"
},

@@ -44,0 +44,0 @@ "scripts": {

@@ -42,2 +42,8 @@ /* eslint-env mocha */

count: 5,
info: {
totalCount: 5,
people: {
totalCount: 5
}
},
delta: {

@@ -68,2 +74,8 @@ namespace: 'springfield',

count: 7,
info: {
totalCount: 7,
people: {
totalCount: 5
}
},
delta: {

@@ -106,2 +118,11 @@ namespace: 'springfield',

count: 6,
info: {
totalCount: 6,
homes: {
totalCount: 3
},
people: {
totalCount: 3
}
},
delta: {

@@ -137,2 +158,8 @@ namespace: 'springfield', // to be inferred

count: 5,
info: {
totalCount: 5,
people: {
totalCount: 5
}
},
delta: {

@@ -168,2 +195,9 @@ namespace: 'springfield',

count: 3,
info: {
totalCount: 3,
people: {
totalCount: 3,
filteredCount: 2
}
},
delta: {

@@ -197,2 +231,9 @@ namespace: 'springfield',

count: 3,
info: {
totalCount: 3,
people: {
totalCount: 3,
filteredCount: 2
}
},
delta: {

@@ -241,2 +282,3 @@ namespace: 'springfield',

expect(info.totalCount).to.eql(test.count)
expect(info).to.eql(test.info)

@@ -243,0 +285,0 @@ const output = readRecords(outputFile)

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