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

mongochangestream

Package Overview
Dependencies
Maintainers
1
Versions
59
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongochangestream - npm Package Compare versions

Comparing version 0.39.0 to 0.40.0

4

CHANGELOG.md

@@ -0,1 +1,5 @@

# 0.40.0
- Don't emit the `cursorError` event when stopping.
# 0.39.0

@@ -2,0 +6,0 @@

12

dist/mongoChangeStream.js

@@ -197,4 +197,4 @@ "use strict";

await queue.flush();
// An error occurred checking for next
if (nextChecker.errorExists()) {
// An error occurred getting next and we are not stopping
if (nextChecker.errorExists() && !state.is('stopping')) {
emit('cursorError', {

@@ -205,4 +205,4 @@ name: 'runInitialScan',

}
// We're all done
else {
// Exited cleanly from the loop so we're done
if (!nextChecker.errorExists()) {
debug('Completed initial scan');

@@ -307,4 +307,4 @@ // Record scan complete

}
// Emit
if (nextChecker.errorExists()) {
// An error occurred getting next and we are not stopping
if (nextChecker.errorExists() && !state.is('stopping')) {
emit('cursorError', {

@@ -311,0 +311,0 @@ name: 'processChangeStream',

{
"name": "mongochangestream",
"version": "0.39.0",
"version": "0.40.0",
"description": "Sync MongoDB collections via change streams into any database.",

@@ -5,0 +5,0 @@ "author": "GovSpend",

@@ -226,3 +226,6 @@ /**

})
sync.emitter.on('cursorError', console.log)
let cursorError = false
sync.emitter.on('cursorError', () => {
cursorError = true
})
// Start

@@ -234,2 +237,4 @@ initialScan.start()

await initialScan.stop()
// Should not emit cursorError when stopping
assert.equal(cursorError, false)
// Wait for the initial scan to complete

@@ -313,2 +318,6 @@ initialScan.start()

let cursorError = false
sync.emitter.on('cursorError', () => {
cursorError = true
})
const processed = []

@@ -330,2 +339,4 @@ const processRecord = async (doc: ChangeStreamDocument) => {

await changeStream.stop()
// Should not emit cursorError when stopping
assert.equal(cursorError, false)
})

@@ -332,0 +343,0 @@

@@ -249,4 +249,4 @@ import _ from 'lodash/fp.js'

await queue.flush()
// An error occurred checking for next
if (nextChecker.errorExists()) {
// An error occurred getting next and we are not stopping
if (nextChecker.errorExists() && !state.is('stopping')) {
emit('cursorError', {

@@ -257,4 +257,4 @@ name: 'runInitialScan',

}
// We're all done
else {
// Exited cleanly from the loop so we're done
if (!nextChecker.errorExists()) {
debug('Completed initial scan')

@@ -373,4 +373,4 @@ // Record scan complete

}
// Emit
if (nextChecker.errorExists()) {
// An error occurred getting next and we are not stopping
if (nextChecker.errorExists() && !state.is('stopping')) {
emit('cursorError', {

@@ -377,0 +377,0 @@ name: 'processChangeStream',

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