node-csvtojson icon indicating copy to clipboard operation
node-csvtojson copied to clipboard

replacing bluebird with native promises

Open cton opened this issue 6 years ago • 6 comments

Because the latest version of this library is incompatible with the angular version 8.3.19 I have replaced bluebird with native promises as proposed in #339. @Keyang please review the changes I've made and merge if everything is working.

cton avatar Nov 22 '19 07:11 cton

Pull Request Test Coverage Report for Build 215

  • 18 of 18 (100.0%) changed or added relevant lines in 3 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.05%) to 95.409%

Totals Coverage Status
Change from base Build 212: 0.05%
Covered Lines: 1322
Relevant Lines: 1354

💛 - Coveralls

coveralls avatar Nov 22 '19 07:11 coveralls

Not sure, if we need this or not. @Keyang thoughts?

jeremyrajan avatar Apr 08 '20 12:04 jeremyrajan

@jeremyrajan Thanks. Bluebird was used because it was fastest promise implementation (faster than native promise) at the time, especially for node 6. If we want to drop Bluebird we probably want to drop support of node 6 as well. Alternatively, we could expose a package level config field for promise library and allow user to override the underline Promise implementation. Like require("csvtojson").Promise=Promise. What would you think?

Keyang avatar Apr 08 '20 13:04 Keyang

Ah ok! :) I think a lot of providers have already stopped support for node 6. May be let look at 8+. LTS is at 12 now :D. And then we can get this PR to include native promises :)

jeremyrajan avatar Apr 08 '20 13:04 jeremyrajan

It would be great to have this merged!

Node 10 is now in maintenance so older versions should definitely be dropped. https://nodejs.org/en/about/releases/ Screen Shot 2020-11-05 at 15 03 52

Jolg42 avatar Nov 05 '20 14:11 Jolg42

afaict rxjs can not be used with bluebird promises. Any chance of merging this? https://stackoverflow.com/questions/65457823/merge-two-observables-in-angular-for-csv-to-json-conversion

semla avatar Dec 17 '21 12:12 semla