Skip to content

Commit

Permalink
Merge pull request #4 from perimetre/3.0.3
Browse files Browse the repository at this point in the history
3.0.3
  • Loading branch information
adarleyjrr authored Jul 19, 2024
2 parents 98c4e2d + 44315ca commit 0f7e8d8
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 2 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Fixed

## [3.0.3] - 2024-07-19

### Fixed

- Fixes CSV maker helper to use file encoding option from args, when provided

## [3.0.2] - 2024-07-16

### Fixed
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@perimetre/helpers",
"description": "Our bundle with all of our utilities and reusable helpers",
"version": "3.0.2",
"version": "3.0.3",
"repository": {
"type": "git",
"url": "git+https://github.com/perimetre/helpers.git"
Expand Down
5 changes: 4 additions & 1 deletion src/helpers/csv/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,10 @@ export const parseCsv = <T>(
*/
export const makeCsv = async (dir: string, name: string, content: Input, opts: Options = {}, append = false) =>
new Promise<void>((resolve, reject) => {
const writeStream = fs.createWriteStream(path.join(dir, name), { flags: append ? 'a' : 'w', encoding: 'utf8' });
const writeStream = fs.createWriteStream(path.join(dir, name), {
flags: append ? 'a' : 'w',
encoding: opts.encoding || 'utf8'
});

stringify(content, opts)
.on('data', (chunk) => {
Expand Down

0 comments on commit 0f7e8d8

Please sign in to comment.