From 7402baaded989674d8738e566ce164c4a4ae9931 Mon Sep 17 00:00:00 2001 From: shiavm006 Date: Sun, 18 Jan 2026 15:19:28 +0530 Subject: [PATCH 1/3] fix: use @stdlib/utils/push for typed array support in DSV parser --- lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js b/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js index 42eb73f03823..691d1d7f88b1 100644 --- a/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js +++ b/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js @@ -29,6 +29,7 @@ var Boolean = require( '@stdlib/boolean/ctor' ); var format = require( '@stdlib/string/format' ); var rescape = require( '@stdlib/utils/escape-regexp-string' ); var replace = require( '@stdlib/string/base/replace' ); +var push = require( '@stdlib/utils/push' ); var defaults = require( './defaults.js' ); var state2enum = require( './states/state2enum.js' ); var enum2state = require( './states/enum2state.json' ); @@ -365,12 +366,10 @@ setReadOnly( Parser.prototype, '_reset', function reset() { setReadOnly( Parser.prototype, '_setField', function set( value, idx ) { var buf = this._rowBuffer; - // FIXME: as buffer may be provided from userland, use `set` accessor and consider using `@stdlib/utils/push` to allow support of dynamically resizing fixed length buffers - // Only expand the row buffer if we've run out of previously allocated memory... if ( idx >= buf.length ) { - buf.push( value ); - debug( 'Row buffer size increased. Length: %d.', buf.length ); + this._rowBuffer = push( buf, value ); + debug( 'Row buffer size increased. Length: %d.', this._rowBuffer.length ); } else { // Reuse existing memory: buf[ idx ] = value; From a4b750af7c933d813d6c4a3b9ee8b464bab5cd56 Mon Sep 17 00:00:00 2001 From: shiavm006 Date: Mon, 26 Jan 2026 17:59:42 +0530 Subject: [PATCH 2/3] docs: restore FIXME comment noting partial resolution Restore the FIXME comment as requested by reviewer. The comment notes that while @stdlib/utils/push is now used to support TypedArrays, the set accessor for _rowBuffer still needs to be implemented. --- lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js b/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js index 691d1d7f88b1..cce5a328f341 100644 --- a/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js +++ b/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js @@ -366,6 +366,9 @@ setReadOnly( Parser.prototype, '_reset', function reset() { setReadOnly( Parser.prototype, '_setField', function set( value, idx ) { var buf = this._rowBuffer; + // FIXME: as buffer may be provided from userland, use `set` accessor and consider using `@stdlib/utils/push` to allow support of dynamically resizing fixed length buffers + // Partially addressed: `@stdlib/utils/push` is now used to support TypedArrays, but `set` accessor still needs to be implemented. + // Only expand the row buffer if we've run out of previously allocated memory... if ( idx >= buf.length ) { this._rowBuffer = push( buf, value ); From 877c0057c70c42f0d7b3e95299f8dd30ac22bc1f Mon Sep 17 00:00:00 2001 From: shiavm006 Date: Wed, 28 Jan 2026 09:18:05 +0530 Subject: [PATCH 3/3] style: merge FIXME comment to fix linting error Merge the FIXME comment and its clarification into a single line to resolve the 'Missing empty line before comment' linting error. --- lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js b/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js index cce5a328f341..8fd49cbc5a79 100644 --- a/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js +++ b/lib/node_modules/@stdlib/utils/dsv/base/parse/lib/main.js @@ -366,8 +366,7 @@ setReadOnly( Parser.prototype, '_reset', function reset() { setReadOnly( Parser.prototype, '_setField', function set( value, idx ) { var buf = this._rowBuffer; - // FIXME: as buffer may be provided from userland, use `set` accessor and consider using `@stdlib/utils/push` to allow support of dynamically resizing fixed length buffers - // Partially addressed: `@stdlib/utils/push` is now used to support TypedArrays, but `set` accessor still needs to be implemented. + // FIXME: as buffer may be provided from userland, use `set` accessor and consider using `@stdlib/utils/push` to allow support of dynamically resizing fixed length buffers. Partially addressed: `@stdlib/utils/push` is now used to support TypedArrays, but `set` accessor still needs to be implemented. // Only expand the row buffer if we've run out of previously allocated memory... if ( idx >= buf.length ) {