From ccdc020b40a8fa17ce6c3f3646656d1eca0c2bd4 Mon Sep 17 00:00:00 2001 From: Michael Kauzmann Date: Mon, 18 Nov 2024 13:37:25 -0700 Subject: [PATCH] use import instead of require, https://github.com/phetsims/perennial/issues/410 --- js/grunt/tasks/compare-phet-io-api.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/js/grunt/tasks/compare-phet-io-api.ts b/js/grunt/tasks/compare-phet-io-api.ts index 43e897bd..fb3b976b 100644 --- a/js/grunt/tasks/compare-phet-io-api.ts +++ b/js/grunt/tasks/compare-phet-io-api.ts @@ -22,6 +22,7 @@ import IntentionalAny from '../../../../phet-core/js/types/IntentionalAny.js'; import getSimList from '../../common/getSimList.js'; import transpile from '../../common/transpile.js'; import generatePhetioMacroAPI from '../../phet-io/generatePhetioMacroAPI.js'; +import phetioCompareAPISets from '../../phet-io/phetioCompareAPISets'; import getPhetLibs from '../getPhetLibs.js'; const repo = getRepo(); @@ -59,7 +60,7 @@ let proposedAPIs: Record | null = null; if ( getOption( 'compareBreakingAPIChanges' ) ) { options.compareBreakingAPIChanges = getOption( 'compareBreakingAPIChanges' ); } - const ok = await require( '../../phet-io/phetioCompareAPISets' )( sims, proposedAPIs, options ); + const ok = await phetioCompareAPISets( sims, proposedAPIs, options ); !ok && grunt.fail.fatal( 'PhET-iO API comparison failed' ); } )(); \ No newline at end of file