]> git.ardis.lu - csvio/log
csvio
3 months agoCut v0.1.11 main v0.1.11
Ardis Lu [Mon, 29 Jun 2026 05:34:40 +0000 (22:34 -0700)]
Cut v0.1.11

3 months agoUpgrade dependencies
Ardis Lu [Mon, 29 Jun 2026 05:32:38 +0000 (22:32 -0700)]
Upgrade dependencies

3 months agoSet `types` key for TS badge on npm registry
Ardis Lu [Wed, 24 Jun 2026 06:58:01 +0000 (23:58 -0700)]
Set `types` key for TS badge on npm registry

Although this key is redundant with `exports`, it is still required to have the "TS" badge on the npm registry.

4 months agoUse staged publishing
Ardis Lu [Sun, 14 Jun 2026 05:18:14 +0000 (22:18 -0700)]
Use staged publishing

Reference: https://docs.npmjs.com/staged-publishing/

4 months agoDisable `package-manager-cache`
Ardis Lu [Mon, 8 Jun 2026 02:44:25 +0000 (19:44 -0700)]
Disable `package-manager-cache`

From `setup-node`'s `README`: "For workflows with elevated privileges or access to sensitive information, we recommend disabling automatic caching ... when caching is not required for secure operation."

4 months agoUpgrade to TypeScript 6
Ardis Lu [Wed, 3 Jun 2026 05:09:32 +0000 (22:09 -0700)]
Upgrade to TypeScript 6

4 months agoDefine `CSVWriterStatusInternal` type
Ardis Lu [Tue, 2 Jun 2026 05:43:55 +0000 (22:43 -0700)]
Define `CSVWriterStatusInternal` type

This type captures the previously undocumented `start` property that is used internally only.

4 months agoAdd `aliases` to `CSVNormalizerHeader`
Ardis Lu [Thu, 28 May 2026 07:00:41 +0000 (00:00 -0700)]
Add `aliases` to `CSVNormalizerHeader`

This feature is useful when input CSVs may have completely different column names for the same column, beyond standard normalization issues (e.g., i18n).

8 months agoCut v0.1.10 v0.1.10
Ardis Lu [Wed, 28 Jan 2026 06:48:47 +0000 (22:48 -0800)]
Cut v0.1.10

8 months agoUpgrade dependencies
Ardis Lu [Wed, 28 Jan 2026 06:47:49 +0000 (22:47 -0800)]
Upgrade dependencies

9 months agoAdd empty row test
Ardis Lu [Fri, 2 Jan 2026 04:21:39 +0000 (20:21 -0800)]
Add empty row test

11 months agoAdd additional AsyncGenerator tests
Ardis Lu [Fri, 14 Nov 2025 06:52:01 +0000 (22:52 -0800)]
Add additional AsyncGenerator tests

11 months agoLoosen type definition to `AsyncIterable`
Ardis Lu [Thu, 13 Nov 2025 07:15:55 +0000 (23:15 -0800)]
Loosen type definition to `AsyncIterable`

This change reflects the actual runtime check that is being performed (i.e., that `Symbol.asyncIterator` is implemented) and allows users to pass (runtime-valid) `async function*` transformation functions without any type errors.

11 months agoFix type to include undefined
Ardis Lu [Wed, 12 Nov 2025 05:16:22 +0000 (21:16 -0800)]
Fix type to include undefined

11 months agoAdd explicit test for undefined
Ardis Lu [Wed, 12 Nov 2025 05:16:01 +0000 (21:16 -0800)]
Add explicit test for undefined

11 months agoCut v0.1.9 v0.1.9
Ardis Lu [Sun, 2 Nov 2025 05:13:15 +0000 (22:13 -0700)]
Cut v0.1.9

11 months agoUpgrade dependencies
Ardis Lu [Sun, 2 Nov 2025 05:12:42 +0000 (22:12 -0700)]
Upgrade dependencies

11 months agoAdd `.source` property for `FieldMap`
Ardis Lu [Sun, 2 Nov 2025 05:05:52 +0000 (22:05 -0700)]
Add `.source` property for `FieldMap`

This property is useful when there is no other variable set to access the underlying row (e.g., `.toFieldMap` was called with a literal object).

11 months agoAdd `.from` static method
Ardis Lu [Thu, 30 Oct 2025 06:46:01 +0000 (23:46 -0700)]
Add `.from` static method

This method is intended to be the inverse of the `.toObject` method. It is useful to have such a method as a functional (i.e., non-mutating) alternative to `.toFieldMap` to transform rows in a transformation function.

11 months agoAdd explicit types
Ardis Lu [Mon, 27 Oct 2025 06:08:16 +0000 (23:08 -0700)]
Add explicit types

11 months agoUpdate type to allow `Promise<ReadableStream<TransformationOutput>>` return value
Ardis Lu [Mon, 27 Oct 2025 05:52:12 +0000 (22:52 -0700)]
Update type to allow `Promise<ReadableStream<TransformationOutput>>` return value

11 months agoCut v0.1.8 v0.1.8
Ardis Lu [Mon, 20 Oct 2025 05:49:53 +0000 (22:49 -0700)]
Cut v0.1.8

11 months agoUpgrade dependencies
Ardis Lu [Mon, 20 Oct 2025 05:48:25 +0000 (22:48 -0700)]
Upgrade dependencies

11 months agoAdd test case for shorthand with literal names
Ardis Lu [Mon, 20 Oct 2025 05:42:50 +0000 (22:42 -0700)]
Add test case for shorthand with literal names

11 months agoSupport ReadableStream from transformation
Ardis Lu [Mon, 20 Oct 2025 05:39:11 +0000 (22:39 -0700)]
Support ReadableStream from transformation

11 months agoFix bug where batch is cleared before transform function can use it
Ardis Lu [Mon, 20 Oct 2025 04:43:40 +0000 (21:43 -0700)]
Fix bug where batch is cleared before transform function can use it

11 months agoDemonstrate string shorthand
Ardis Lu [Sun, 19 Oct 2025 06:39:23 +0000 (23:39 -0700)]
Demonstrate string shorthand

11 months agoImplement `.delete()` and `.clear()`
Ardis Lu [Sun, 19 Oct 2025 04:30:41 +0000 (21:30 -0700)]
Implement `.delete()` and `.clear()`

Useful when a user wants to mostly duplicate an input row but make some minor tweaks. Not having the capability to remove rows leads to unwieldy workarounds.

11 months agoAccept `string` as a shorthand for `{ name: string }`
Ardis Lu [Sun, 19 Oct 2025 04:17:43 +0000 (21:17 -0700)]
Accept `string` as a shorthand for `{ name: string }`

It is common to set headers using all the default values, so it is useful to have a shorthand for this situation.

12 months agoFix regression where `null` and `undefined` are unable to be denormalized
Ardis Lu [Fri, 17 Oct 2025 06:52:43 +0000 (23:52 -0700)]
Fix regression where `null` and `undefined` are unable to be denormalized

12 months agoAdd links to tags
Ardis Lu [Fri, 17 Oct 2025 06:29:22 +0000 (23:29 -0700)]
Add links to tags

12 months agoDon't pin versions in `devEngines` v0.1.7
Ardis Lu [Mon, 6 Oct 2025 06:00:41 +0000 (23:00 -0700)]
Don't pin versions in `devEngines`

This change is required to make the release CI work. The mismatched `npm` version in `devEngines` blocks the `npm i -g npm`, so it is impossible for `npm` to update itself.

Can revert this change only after Node.js version managers start using `devEngines` to automatically set `node` and `npm` versions.

12 months agoCut v0.1.7
Ardis Lu [Mon, 6 Oct 2025 05:35:02 +0000 (22:35 -0700)]
Cut v0.1.7

12 months agoUpgrade dependencies
Ardis Lu [Mon, 6 Oct 2025 05:34:28 +0000 (22:34 -0700)]
Upgrade dependencies

12 months agoSet default `name` property
Ardis Lu [Mon, 6 Oct 2025 05:19:46 +0000 (22:19 -0700)]
Set default `name` property

This change makes the typing easier to follow.

12 months agoStringify all values passed through
Ardis Lu [Mon, 6 Oct 2025 04:42:54 +0000 (21:42 -0700)]
Stringify all values passed through

This change makes `CSVDenormalizer` behave consistently with its current type definition and aligns expected behavior (if `CSVNormalizer` takes strings and gives native objects, then `CSVDenormalizer` should take native objects and give strings).

12 months agoAdd `CSVNormalizer.toFieldMap()`
Ardis Lu [Sun, 5 Oct 2025 06:08:02 +0000 (23:08 -0700)]
Add `CSVNormalizer.toFieldMap()`

12 months agoAdd `CSVNormalizer.toObject()` method
Ardis Lu [Sun, 5 Oct 2025 05:51:22 +0000 (22:51 -0700)]
Add `CSVNormalizer.toObject()` method

12 months agoDelete unnecessary ternary
Ardis Lu [Sun, 28 Sep 2025 05:02:47 +0000 (22:02 -0700)]
Delete unnecessary ternary

12 months agoImprove JSDoc type import consistency
Ardis Lu [Sat, 27 Sep 2025 06:06:44 +0000 (23:06 -0700)]
Improve JSDoc type import consistency

12 months agoDelete unnecessary option
Ardis Lu [Sat, 27 Sep 2025 05:59:06 +0000 (22:59 -0700)]
Delete unnecessary option

`type: 'string'` has been the default value since v0.1.3.

12 months agoPass through native type whenever possible
Ardis Lu [Fri, 26 Sep 2025 07:00:09 +0000 (00:00 -0700)]
Pass through native type whenever possible

The stringification was legacy code from the original design of always JSON serializing each row between every stream. Since that serialization is no longer done, `CSVNormalizer` can just pass the native data type through. The downstream `CSVDenormalizer` should stringify all the data if the old behavior is desired.

12 months agoRemove empty rows before the header row
Ardis Lu [Fri, 26 Sep 2025 06:45:57 +0000 (23:45 -0700)]
Remove empty rows before the header row

Empty rows before the header are sometimes used for formatting purposes, and they should be removed from the data.

It is not possible to normalize an empty row before the headers are known, so empty rows that come before the header row are *always* removed, even if `passthroughEmptyRows` is `true`.

12 months agoMake column matching case insensitive by default
Ardis Lu [Thu, 25 Sep 2025 06:33:37 +0000 (23:33 -0700)]
Make column matching case insensitive by default

Before: `datetime` and `dateTime` are considered different columns.

After: `datetime` and `dateTime` are considered the same column (last column prevails).

Note the output column name will still use the same casing passed in `CSVNormalizerHeader`.

`CSVNormalizer` already significantly modifies column names by normalizing to camelCase, so it is surprising the column matching is still case sensitive. It is likely that in the case a user wants `column A` and `columnA` to be the same column, that they'd also want `columna` to be the same as well.

12 months agoParse Unix timestamps
Ardis Lu [Thu, 25 Sep 2025 06:00:11 +0000 (23:00 -0700)]
Parse Unix timestamps

These three ways of representing dates as a number each have distinct magnitudes. I picked arbitrary cutoff dates to switch the logic under the assumption that values commonly seen in CSVs would not cross those cutoff dates.

12 months agoCut v0.1.6 v0.1.6
Ardis Lu [Sun, 21 Sep 2025 05:54:11 +0000 (22:54 -0700)]
Cut v0.1.6

12 months agoUpgrade dependencies
Ardis Lu [Sun, 21 Sep 2025 05:51:11 +0000 (22:51 -0700)]
Upgrade dependencies

12 months agoProperly isolate and perform memory leak test
Ardis Lu [Sun, 21 Sep 2025 05:28:59 +0000 (22:28 -0700)]
Properly isolate and perform memory leak test

Previously the garbage collection tests were flaky, because `gc()` may or may not happen before the memory leak threshold is tested.

Now the test will properly block on garbage collection (observed to take about 15 seconds). Separating it into its own test also makes it easier to debug the `large:` test suites by reducing concerns in each test.

13 months agoUse Trusted Publishing instead of long-lived npm token
Ardis Lu [Thu, 18 Sep 2025 07:10:55 +0000 (00:10 -0700)]
Use Trusted Publishing instead of long-lived npm token

See https://docs.npmjs.com/trusted-publishers

13 months agoAllow passing an array to `placeholder`
Ardis Lu [Thu, 18 Sep 2025 06:47:10 +0000 (23:47 -0700)]
Allow passing an array to `placeholder`

This functionality is helpful to indicate different and more useful placeholders for each column.

It also allows setting a completely blank row (without any commas) on error, which may be desirable to make output CSV row counts match input CSV row counts without clutter.

13 months agoAdd manual type overrides
Ardis Lu [Mon, 15 Sep 2025 04:46:17 +0000 (21:46 -0700)]
Add manual type overrides

13 months agoAdd example of processing `.csv.gz` files
Ardis Lu [Mon, 15 Sep 2025 03:22:11 +0000 (20:22 -0700)]
Add example of processing `.csv.gz` files

13 months agoDelete unnecessary utility function
Ardis Lu [Sat, 13 Sep 2025 05:24:48 +0000 (22:24 -0700)]
Delete unnecessary utility function

13 months agoAdd caching for dependencies
Ardis Lu [Sat, 13 Sep 2025 05:17:22 +0000 (22:17 -0700)]
Add caching for dependencies

13 months agoClean up unused variables
Ardis Lu [Sat, 13 Sep 2025 05:15:07 +0000 (22:15 -0700)]
Clean up unused variables

13 months agoAdd git.ardis.lu mirror
Ardis Lu [Mon, 8 Sep 2025 06:49:26 +0000 (23:49 -0700)]
Add git.ardis.lu mirror

13 months agoPin Node.js and npm versions in `devEngines`
Ardis Lu [Fri, 5 Sep 2025 06:10:17 +0000 (23:10 -0700)]
Pin Node.js and npm versions in `devEngines`

`devEngines` is the standardized field for this purpose [0], with varying levels of tooling support. The duplicative and non-standard `.node-version` file will eventually be removed once tooling support for `devEngines` is more widespread.

[0] https://github.com/openjs-foundation/package-metadata-interoperability-collab-space

13 months agoBroaden `value` type to `any`
Ardis Lu [Sun, 24 Aug 2025 04:29:29 +0000 (21:29 -0700)]
Broaden `value` type to `any`

13 months agoAdd note on long release notes
Ardis Lu [Sun, 24 Aug 2025 04:26:39 +0000 (21:26 -0700)]
Add note on long release notes

13 months agoAdd example for `stdin` and `stdout` usage
Ardis Lu [Fri, 22 Aug 2025 03:27:37 +0000 (20:27 -0700)]
Add example for `stdin` and `stdout` usage

13 months agoRename `CSVNormalizerRow` to `CSVNormalizerField`
Ardis Lu [Fri, 22 Aug 2025 02:36:54 +0000 (19:36 -0700)]
Rename `CSVNormalizerRow` to `CSVNormalizerField`

This type is not a row of data, it is a single field. So the name "row" never made sense.

13 months agoRemove platform-specific data from test gzip file
Ardis Lu [Wed, 20 Aug 2025 07:14:44 +0000 (00:14 -0700)]
Remove platform-specific data from test gzip file

This step is not required for real-world usage, but for testing purposes it is useful to share the same tests and test data across platforms.

14 months agoCut v0.1.5 v0.1.5
Ardis Lu [Mon, 18 Aug 2025 04:11:15 +0000 (21:11 -0700)]
Cut v0.1.5

14 months agoAdd `types:check` script mentioned in `CONTRIBUTING.md`
Ardis Lu [Mon, 18 Aug 2025 03:15:31 +0000 (20:15 -0700)]
Add `types:check` script mentioned in `CONTRIBUTING.md`

14 months agoUpgrade dependencies
Ardis Lu [Mon, 18 Aug 2025 03:14:24 +0000 (20:14 -0700)]
Upgrade dependencies

14 months agoAdd test case for raw strings passed to `TransformStream` CSVWriter
Ardis Lu [Mon, 18 Aug 2025 03:08:26 +0000 (20:08 -0700)]
Add test case for raw strings passed to `TransformStream` CSVWriter

14 months agoAdd initial `TransformStream` CSVWriter implementation
Ardis Lu [Sun, 17 Aug 2025 06:40:55 +0000 (23:40 -0700)]
Add initial `TransformStream` CSVWriter implementation

This change enables users to create a `TransformStream` by doing `new CSVWriter()` instead of always creating an ultimate sink `WritableStream`. This behavior is useful when there is some transformation that must be performed on the CSV data before writing (e.g., compressing into a `.csv.gz` file using `CompressionStream`).

14 months agoDelete unused import
Ardis Lu [Sun, 17 Aug 2025 05:42:08 +0000 (22:42 -0700)]
Delete unused import

14 months agoLoosen `CSVNormalizerRow` type to match `CSVDenormalizer` usage
Ardis Lu [Sat, 16 Aug 2025 06:13:09 +0000 (23:13 -0700)]
Loosen `CSVNormalizerRow` type to match `CSVDenormalizer` usage

14 months agoAdd contribution checklist
Ardis Lu [Mon, 11 Aug 2025 06:42:42 +0000 (23:42 -0700)]
Add contribution checklist

14 months agoFix bug where it was not possible to read into an ArrayBuffer with offset
Ardis Lu [Wed, 6 Aug 2025 04:38:51 +0000 (21:38 -0700)]
Fix bug where it was not possible to read into an ArrayBuffer with offset

The code was originally correct because it was copied from the Streams specification [1], but turned incorrect after copying from Node.js's implementation [2], and now reverted back to the original correct implementation.

[1] https://streams.spec.whatwg.org/#example-rbs-pull
[2] https://github.com/nodejs/node/blob/134625d76139b4b3630d5baaf2efccae01ede564/lib/internal/fs/promises.js#L322

14 months agoDelete unnecessary negative test
Ardis Lu [Tue, 5 Aug 2025 06:50:42 +0000 (23:50 -0700)]
Delete unnecessary negative test

The row length check in `csvStreamEqualWritable` now covers the original testing edge case that necessitated the negative test. Now the test will correctly fail without requiring the negative test to trigger the failure.

14 months agoFix broken test
Ardis Lu [Tue, 5 Aug 2025 06:45:11 +0000 (23:45 -0700)]
Fix broken test

14 months agoFix `createProxy` type templates
Ardis Lu [Tue, 5 Aug 2025 06:13:47 +0000 (23:13 -0700)]
Fix `createProxy` type templates

14 months agoRemove intermediate JSON serialization and `rawInput`/`rawOutput` options
Ardis Lu [Mon, 4 Aug 2025 06:06:34 +0000 (23:06 -0700)]
Remove intermediate JSON serialization and `rawInput`/`rawOutput` options

Previously, each row was JSON serialized and deserialized on each `.pipeThrough`. The intent of this serialization was to normalize the data of each row, with an escape hatch in the `rawInput` and `rawOutput` options.

However, this approach is counterintuitive because most users would expect a CSV row to simply be an `Array<string>`, NOT a `string` that can be `JSON.parse`-ed into an `Array<string>`. Furthermore, this excessive serialization has a significant performance impact. Lastly, the `rawInput` and `rawOutput` options effectively made `CSVTransformer` an overly complex and difficult-to-use JSON parser on top of a CSV transformer.

So, simply removing the JSON serialization and directly enqueuing the actual object (i.e., the `Array<string>`) resolves all these issues with minimal impact to the user-facing API.

14 months agoFix words
Ardis Lu [Mon, 4 Aug 2025 01:52:53 +0000 (18:52 -0700)]
Fix words

14 months agoAdd npm script to create local dev packages
Ardis Lu [Sat, 2 Aug 2025 07:21:13 +0000 (00:21 -0700)]
Add npm script to create local dev packages

14 months agoAdd initial `TransformStream` CSVReader implementation
Ardis Lu [Wed, 30 Jul 2025 06:53:47 +0000 (23:53 -0700)]
Add initial `TransformStream` CSVReader implementation

This change enables users to create a `TransformStream` by doing `new CSVReader()` instead of always creating an underlying source `ReadableStream`. This behavior is useful when there is some transformation that must be performed on the source file before parsing (e.g., decompressing a `.csv.gz` file using `DecompressionStream`).

14 months agoAdd tests for `instanceof` behavior
Ardis Lu [Tue, 29 Jul 2025 06:35:40 +0000 (23:35 -0700)]
Add tests for `instanceof` behavior

In preparation for possible future refactoring for these classes to return a `Proxy` object (this pattern is required to simulate dynamic superclasses, e.g., `CSVReader` returning either `ReadableStream` OR `TransformStream` depending on constructor argument). If such refactoring takes place, these tests will check that `Proxy` was implemented correctly and maintain backwards compatibility.

15 months agoAdd initial tests for memory leaks
Ardis Lu [Tue, 15 Jul 2025 05:07:56 +0000 (22:07 -0700)]
Add initial tests for memory leaks

Future tests should be dedicated for finding memory leaks only, but as an initial step it makes sense to add a simple sanity check to the large file tests.

15 months agoCut v0.1.4 v0.1.4
Ardis Lu [Mon, 14 Jul 2025 04:41:15 +0000 (21:41 -0700)]
Cut v0.1.4

15 months agoUpgrade dependencies
Ardis Lu [Mon, 14 Jul 2025 04:40:27 +0000 (21:40 -0700)]
Upgrade dependencies

15 months agoDelete redundant BOM check
Ardis Lu [Sun, 13 Jul 2025 05:44:16 +0000 (22:44 -0700)]
Delete redundant BOM check

`TextDecoderStream` already handles it upstream, no need to check for it again.

15 months agoSimplify implementation
Ardis Lu [Sun, 13 Jul 2025 05:30:53 +0000 (22:30 -0700)]
Simplify implementation

15 months agoUse consistent JSDoc typecasting formatting
Ardis Lu [Sun, 13 Jul 2025 05:04:31 +0000 (22:04 -0700)]
Use consistent JSDoc typecasting formatting

15 months agoAdd initial documentation for `CSVNormalizer`
Ardis Lu [Sun, 13 Jul 2025 04:47:52 +0000 (21:47 -0700)]
Add initial documentation for `CSVNormalizer`

15 months agoRe-export callback types
Ardis Lu [Sat, 12 Jul 2025 06:22:50 +0000 (23:22 -0700)]
Re-export callback types

These types were initially missed because they are defined with the `callback` annotation and not `typedef`. For future completeness, search for `export type` in the generated declaration files.

15 months agoAdd `useLiteralNames` option to disable column name normalization
Ardis Lu [Sat, 12 Jul 2025 05:09:25 +0000 (22:09 -0700)]
Add `useLiteralNames` option to disable column name normalization

This behavior is useful to preserve data when an input CSV has multiple columns with the same normalized name. By default, `CSVNormalizer` will remove these duplicate columns (the data from the last column is used).

Note that columns with the same *literal* name are still removed even when `useLiteralNames` is `true`. If you need to preserve columns with the same literal name, use a lower-level transformation (e.g., `CSVTransformer`).

15 months agoAdd explicit test for `passthroughEmptyRows`
Ardis Lu [Sat, 12 Jul 2025 04:55:20 +0000 (21:55 -0700)]
Add explicit test for `passthroughEmptyRows`

15 months agoRe-export all types in `index.js`
Ardis Lu [Fri, 11 Jul 2025 04:49:00 +0000 (21:49 -0700)]
Re-export all types in `index.js`

Currently, the types are accessible internally in the library and within `index.js`, but NOT accessible from consumers importing from the `index.js` file. A re-export is required to make the types accessible to end-users.

Additionally, the JSDoc import will only work for types declared at the module scope, so `CSVWriterStatus` was moved to the outer scope.

15 months agoCut v0.1.3 v0.1.3
Ardis Lu [Thu, 10 Jul 2025 06:31:34 +0000 (23:31 -0700)]
Cut v0.1.3

15 months agoUpgrade dependencies
Ardis Lu [Thu, 10 Jul 2025 06:30:14 +0000 (23:30 -0700)]
Upgrade dependencies

15 months agoFix bug where `defaultValue` was not set if row is uneven
Ardis Lu [Thu, 10 Jul 2025 06:11:45 +0000 (23:11 -0700)]
Fix bug where `defaultValue` was not set if row is uneven

15 months agoAdd explicit test for sparse CSV
Ardis Lu [Thu, 10 Jul 2025 06:07:03 +0000 (23:07 -0700)]
Add explicit test for sparse CSV

15 months agoDelete debugging flag
Ardis Lu [Thu, 10 Jul 2025 05:48:36 +0000 (22:48 -0700)]
Delete debugging flag

15 months agoAdd an example for `CSVTransformer` interaction with `CSVNormalizer`
Ardis Lu [Thu, 10 Jul 2025 05:35:32 +0000 (22:35 -0700)]
Add an example for `CSVTransformer` interaction with `CSVNormalizer`

15 months agoSimplify type annotation
Ardis Lu [Thu, 10 Jul 2025 05:31:41 +0000 (22:31 -0700)]
Simplify type annotation

15 months agoIgnore `handleHeaders` if the row has been normalized
Ardis Lu [Thu, 10 Jul 2025 05:10:20 +0000 (22:10 -0700)]
Ignore `handleHeaders` if the row has been normalized

This behavior is desirable when `CSVTransformer` interacts with `CSVNormalizer` or any other transformation which converts the row from `Array<string>` into `Array<Object>`, because it avoids the need to pass `handleHeaders: true` to `CSVTransformer` (which is counterintuitive). It is more accurate to say the header row has been deleted by the transformation and must by re-inserted into the write stream later.

The loosening of the type checking is not a breaking change. Since the row is passed directly to `JSON.parse()`, the fields could have always been type `Object` instead of `string`.

15 months agoFall back on `name` if `displayName` is undefined
Ardis Lu [Thu, 10 Jul 2025 04:33:12 +0000 (21:33 -0700)]
Fall back on `name` if `displayName` is undefined

This behavior is useful when passing rows to `CSVDenormalizer` after a transformation *other* than `CSVNormalizer` (which automatically creates `displayName`).

15 months agoSet default normalization type to `'string'`
Ardis Lu [Thu, 10 Jul 2025 04:12:44 +0000 (21:12 -0700)]
Set default normalization type to `'string'`

This behavior is helpful to perform minimal normalization tasks but otherwise preserve the default CSV transformation behavior (i.e., have all input values be a string).

This is not a breaking change. Previously, `type` would also default to `'string'` after logging a warning in console.

This page took 0.100605 seconds and 4 git commands to generate.