From c695f3daf3ea40cd45b885979b86d40adfb1ad34 Mon Sep 17 00:00:00 2001 From: zhanggy Date: Tue, 6 May 2025 08:52:30 +0800 Subject: [PATCH 1/3] chore: fix JavaScript lint errors (issue #6934) --- .../@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js b/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js index efad04bd2da4..a9a7e76ae758 100644 --- a/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js +++ b/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js @@ -60,7 +60,7 @@ function entryPoints( pkgs ) { var k; total = pkgs.length; - out = new Array( total ); + out = Array.from({ length: total }); debug( 'Determining main entry points for %d packages...', total ); for ( i = 0; i < total; i++ ) { From 336ce17b2a00d9dc2be5a6e68291c91ff0f23df6 Mon Sep 17 00:00:00 2001 From: zhanggy Date: Wed, 7 May 2025 08:04:37 +0800 Subject: [PATCH 2/3] chore: fix EditorConfig lint errors (issue #6933) --- .../@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js b/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js index a9a7e76ae758..d599c08b9965 100644 --- a/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js +++ b/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js @@ -60,7 +60,7 @@ function entryPoints( pkgs ) { var k; total = pkgs.length; - out = Array.from({ length: total }); + out = []; debug( 'Determining main entry points for %d packages...', total ); for ( i = 0; i < total; i++ ) { From 7aa45da084d79cee67d3ad1ac68f628cedaeb732 Mon Sep 17 00:00:00 2001 From: Athan Date: Thu, 8 May 2025 00:54:48 -0700 Subject: [PATCH 3/3] refactor: avoid sparse arrays Signed-off-by: Athan --- .../@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js b/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js index d599c08b9965..8abaf6c54f71 100644 --- a/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js +++ b/lib/node_modules/@stdlib/_tools/pkgs/entry-points/lib/entries.sync.js @@ -69,14 +69,14 @@ function entryPoints( pkgs ) { main = pkgs[ i ].id; debug( 'Determined main entry point for package: %s (%d of %d). Main: %s', pkg, k, total, main ); - out[ i ] = { + out.push({ 'id': main, 'pkg': pkg, 'dir': pkgs[ i ].dir, 'entries': [ main ] - }; + }); } debug( 'Finished determining main entry points.' );