@@ -189,7 +189,7 @@ public function testSynchronizeNewPackage()
189
189
],
190
190
],
191
191
],
192
- 'entrypoints ' => ['admin.js ' ],
192
+ 'entrypoints ' => ['admin.js ' , ' @symfony/new-package/entry.js ' ],
193
193
],
194
194
json_decode (file_get_contents ($ this ->tempDir .'/assets/controllers.json ' ), true )
195
195
);
@@ -323,11 +323,14 @@ public function testSynchronizeAssetMapperNewPackage()
323
323
file_put_contents ($ this ->tempDir .'/importmap.php ' , '<?php return []; ' );
324
324
325
325
$ fileModulePath = $ this ->tempDir .'/vendor/symfony/new-package/assets/dist/loader.js ' ;
326
- $ this ->scriptExecutor ->expects ($ this ->exactly (2 ))
326
+ $ entrypointPath = $ this ->tempDir .'/vendor/symfony/new-package/assets/entry.js ' ;
327
+
328
+ $ this ->scriptExecutor ->expects ($ this ->exactly (3 ))
327
329
->method ('execute ' )
328
330
->withConsecutive (
329
331
['symfony-cmd ' , 'importmap:require ' , ['@hotcake/foo@^1.9.0 ' ]],
330
- ['symfony-cmd ' , 'importmap:require ' , ['@symfony/new-package ' , '--path= ' .$ fileModulePath ]]
332
+ ['symfony-cmd ' , 'importmap:require ' , ['@symfony/new-package ' , '--path= ' .$ fileModulePath ]],
333
+ ['symfony-cmd ' , 'importmap:require ' , ['--entrypoint ' ,'@symfony/new-package/entry.js ' , '--path= ' .$ entrypointPath ]]
331
334
);
332
335
333
336
$ this ->synchronizer ->synchronize ([
@@ -382,7 +385,7 @@ public function testSynchronizeAssetMapperNewPackage()
382
385
],
383
386
],
384
387
],
385
- 'entrypoints ' => ['admin.js ' ],
388
+ 'entrypoints ' => ['admin.js ' , ' @symfony/new-package/entry.js ' ],
386
389
],
387
390
json_decode (file_get_contents ($ this ->tempDir .'/assets/controllers.json ' ), true )
388
391
);
@@ -399,11 +402,14 @@ public function testSynchronizeAssetMapperUpgradesPackageIfNeeded()
399
402
file_put_contents ($ this ->tempDir .'/importmap.php ' , sprintf ('<?php return %s; ' , var_export ($ importMap , true )));
400
403
401
404
$ fileModulePath = $ this ->tempDir .'/vendor/symfony/new-package/assets/dist/loader.js ' ;
402
- $ this ->scriptExecutor ->expects ($ this ->exactly (2 ))
405
+ $ entrypointPath = $ this ->tempDir .'/vendor/symfony/new-package/assets/entry.js ' ;
406
+
407
+ $ this ->scriptExecutor ->expects ($ this ->exactly (3 ))
403
408
->method ('execute ' )
404
409
->withConsecutive (
405
410
['symfony-cmd ' , 'importmap:require ' , ['@hotcake/foo@^1.9.0 ' ]],
406
- ['symfony-cmd ' , 'importmap:require ' , ['@symfony/new-package ' , '--path= ' .$ fileModulePath ]]
411
+ ['symfony-cmd ' , 'importmap:require ' , ['@symfony/new-package ' , '--path= ' .$ fileModulePath ]],
412
+ ['symfony-cmd ' , 'importmap:require ' , ['--entrypoint ' ,'@symfony/new-package/entry.js ' , '--path= ' .$ entrypointPath ]]
407
413
);
408
414
409
415
$ this ->synchronizer ->synchronize ([
@@ -425,10 +431,13 @@ public function testSynchronizeAssetMapperSkipsUpgradeIfAlreadySatisfied()
425
431
file_put_contents ($ this ->tempDir .'/importmap.php ' , sprintf ('<?php return %s; ' , var_export ($ importMap , true )));
426
432
427
433
$ fileModulePath = $ this ->tempDir .'/vendor/symfony/new-package/assets/dist/loader.js ' ;
428
- $ this ->scriptExecutor ->expects ($ this ->once ())
434
+ $ entrypointPath = $ this ->tempDir .'/vendor/symfony/new-package/assets/entry.js ' ;
435
+
436
+ $ this ->scriptExecutor ->expects ($ this ->exactly (2 ))
429
437
->method ('execute ' )
430
438
->withConsecutive (
431
- ['symfony-cmd ' , 'importmap:require ' , ['@symfony/new-package ' , '--path= ' .$ fileModulePath ]]
439
+ ['symfony-cmd ' , 'importmap:require ' , ['@symfony/new-package ' , '--path= ' .$ fileModulePath ]],
440
+ ['symfony-cmd ' , 'importmap:require ' , ['--entrypoint ' ,'@symfony/new-package/entry.js ' , '--path= ' .$ entrypointPath ]]
432
441
);
433
442
434
443
$ this ->synchronizer ->synchronize ([
0 commit comments