diff --git a/packages/ckeditor5-dev-release-tools/lib/utils/executeinparallel.js b/packages/ckeditor5-dev-release-tools/lib/utils/executeinparallel.js index 77ccd1b4e..e4fc77542 100644 --- a/packages/ckeditor5-dev-release-tools/lib/utils/executeinparallel.js +++ b/packages/ckeditor5-dev-release-tools/lib/utils/executeinparallel.js @@ -70,7 +70,13 @@ export default async function executeInParallel( options ) { return createWorker( { signal: signal || defaultAbortController.signal, onPackageDone, - workerData: { packages, callbackModule, taskOptions } + workerData: { + packages, + taskOptions, + // The callback module is dynamically imported inside worker script. + // To make it work in Windows, absolute path to a dynamically imported file must start with the "file:" protocol URL. + callbackModule: 'file://' + callbackModule + } } ); } ); diff --git a/packages/ckeditor5-dev-release-tools/tests/utils/executeinparallel.js b/packages/ckeditor5-dev-release-tools/tests/utils/executeinparallel.js index afcdcc0cc..8818a1188 100644 --- a/packages/ckeditor5-dev-release-tools/tests/utils/executeinparallel.js +++ b/packages/ckeditor5-dev-release-tools/tests/utils/executeinparallel.js @@ -105,11 +105,11 @@ describe( 'executeInParallel()', () => { 'utf-8' ); expect( firstWorker.workerData ).toBeInstanceOf( Object ); - expect( firstWorker.workerData ).toHaveProperty( 'callbackModule', '/home/ckeditor/uuid-4.mjs' ); + expect( firstWorker.workerData ).toHaveProperty( 'callbackModule', 'file:///home/ckeditor/uuid-4.mjs' ); expect( firstWorker.workerData ).toHaveProperty( 'packages' ); expect( secondWorker.workerData ).toBeInstanceOf( Object ); - expect( secondWorker.workerData ).toHaveProperty( 'callbackModule', '/home/ckeditor/uuid-4.mjs' ); + expect( secondWorker.workerData ).toHaveProperty( 'callbackModule', 'file:///home/ckeditor/uuid-4.mjs' ); expect( secondWorker.workerData ).toHaveProperty( 'packages' ); // Workers did not emit an error. @@ -231,11 +231,11 @@ describe( 'executeInParallel()', () => { const [ firstWorker, secondWorker ] = stubs.WorkerMock.instances; expect( firstWorker.workerData ).toBeInstanceOf( Object ); - expect( firstWorker.workerData ).toHaveProperty( 'callbackModule', 'C:/Users/ckeditor/uuid-4.mjs' ); + expect( firstWorker.workerData ).toHaveProperty( 'callbackModule', 'file://C:/Users/ckeditor/uuid-4.mjs' ); expect( firstWorker.workerData ).toHaveProperty( 'packages' ); expect( secondWorker.workerData ).toBeInstanceOf( Object ); - expect( secondWorker.workerData ).toHaveProperty( 'callbackModule', 'C:/Users/ckeditor/uuid-4.mjs' ); + expect( secondWorker.workerData ).toHaveProperty( 'callbackModule', 'file://C:/Users/ckeditor/uuid-4.mjs' ); expect( secondWorker.workerData ).toHaveProperty( 'packages' ); // Workers did not emit an error.