Skip to content

Commit

Permalink
fix(csv-stringify): node 12 compatibility in flush
Browse files Browse the repository at this point in the history
  • Loading branch information
wdavidw committed Nov 19, 2021
1 parent 30f7c84 commit 9145b75
Show file tree
Hide file tree
Showing 17 changed files with 85 additions and 0 deletions.
5 changes: 5 additions & 0 deletions packages/csv-stringify/dist/cjs/index.cjs
Expand Up @@ -295,6 +295,11 @@ class Stringifier extends stream.Transform {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv-stringify/dist/cjs/sync.cjs
Expand Up @@ -295,6 +295,11 @@ class Stringifier extends stream.Transform {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv-stringify/dist/esm/index.js
Expand Up @@ -5257,6 +5257,11 @@ class Stringifier extends Transform {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv-stringify/dist/esm/sync.js
Expand Up @@ -5257,6 +5257,11 @@ class Stringifier extends Transform {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv-stringify/dist/iife/index.js
Expand Up @@ -5260,6 +5260,11 @@ var csv_stringify = (function (exports) {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv-stringify/dist/iife/sync.js
Expand Up @@ -5260,6 +5260,11 @@ var csv_stringify_sync = (function (exports) {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv-stringify/dist/umd/index.js
Expand Up @@ -5263,6 +5263,11 @@
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv-stringify/dist/umd/sync.js
Expand Up @@ -5263,6 +5263,11 @@
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv-stringify/lib/index.js
Expand Up @@ -314,6 +314,11 @@ class Stringifier extends Transform {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv/dist/cjs/index.cjs
Expand Up @@ -1987,6 +1987,11 @@ class Stringifier extends stream.Transform {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv/dist/cjs/sync.cjs
Expand Up @@ -1809,6 +1809,11 @@ class Stringifier extends stream.Transform {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv/dist/esm/index.js
Expand Up @@ -7013,6 +7013,11 @@ class Stringifier extends Transform {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv/dist/esm/sync.js
Expand Up @@ -6835,6 +6835,11 @@ class Stringifier extends Transform {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv/dist/iife/index.js
Expand Up @@ -7016,6 +7016,11 @@ var csv = (function (exports) {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv/dist/iife/sync.js
Expand Up @@ -6838,6 +6838,11 @@ var csv_sync = (function (exports) {
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv/dist/umd/index.js
Expand Up @@ -7019,6 +7019,11 @@
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down
5 changes: 5 additions & 0 deletions packages/csv/dist/umd/sync.js
Expand Up @@ -6841,6 +6841,11 @@
callback(err);
}
_flush(callback){
if(this.state.stop === true){
// Note, Node.js 12 call flush even after an error, we must prevent
// `callback` from being called in flush without any error.
return;
}
if(this.info.records === 0){
this.bom();
const err = this.headers();
Expand Down

0 comments on commit 9145b75

Please sign in to comment.