From 0eba837950fbb543e10828124bf9f80b03e32962 Mon Sep 17 00:00:00 2001 From: Philipp Burckhardt Date: Wed, 4 Oct 2023 21:21:35 -0400 Subject: [PATCH] build: resolve lint errors and use dist path --- lib/node_modules/@stdlib/_tools/scripts/publish_packages.js | 3 +++ .../@stdlib/_tools/scripts/templates/test_dist_test.js.txt | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js b/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js index 77da476b00e..9def1786c3f 100644 --- a/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js +++ b/lib/node_modules/@stdlib/_tools/scripts/publish_packages.js @@ -1103,9 +1103,12 @@ function publish( pkg, clbk ) { shell( command, opts ); try { shell( 'grep -rq proxyquire test/test.js', opts ); + // Case: `proxyquire` usage in test file so we copy a boilerplate test file: fs.copyFileSync( join( __dirname, 'templates', 'test_dist_test.js.txt' ), join( dist, 'test', 'dist', 'test.js' ) ); } catch ( error ) { + debug( 'Error: %s', error.message ); + // Case: no `proxyquire` usage in test file so we can reuse the original test file: command = 'cp test/test.js test/dist'; shell( command, opts ); diff --git a/lib/node_modules/@stdlib/_tools/scripts/templates/test_dist_test.js.txt b/lib/node_modules/@stdlib/_tools/scripts/templates/test_dist_test.js.txt index 7b6578d8982..a8a9c60f35f 100644 --- a/lib/node_modules/@stdlib/_tools/scripts/templates/test_dist_test.js.txt +++ b/lib/node_modules/@stdlib/_tools/scripts/templates/test_dist_test.js.txt @@ -21,7 +21,7 @@ // MODULES // var tape = require( 'tape' ); -var main = require( './../lib' ); +var main = require( './../../dist' ); // TESTS //