Skip to content

[6.2] Watch all command for asset builder - #47815

Merged
MacJoom merged 3 commits into
joomla:6.2-devfrom
LadySolveig:6.2/chore/build-watch-all
May 24, 2026
Merged

MacJoom merged 3 commits into
joomla:6.2-devfrom
LadySolveig:6.2/chore/build-watch-all

Conversation

@LadySolveig

Copy link
Copy Markdown
Contributor

Pull Request resolves #46879 (comment) .

  • I read the Generative AI policy and my contribution is either not created with the help of AI or is compatible with the policy and GNU/GPL 2 or later.

Summary of Changes

  • Added a new --all (-a) option to the watch command, allowing to watch all available builders at once.
  • Add a summary output when unsupported builders are specified. (core vendor assets have no watch option).

Testing Instructions

  • Test 1:
    npm run watch -- --all or npm run watch -- --a
  • Test 2:
    still in watch mode all - modify a media_source file e. g. media_source/com_actionlogs/js/admin-actionlogs-default.es6.js
  • Test 3:
    npm run watch -- -n com_actionslogs and modify a media_source file e. g. media_source/com_actionlogs/js/admin-actionlogs-default.es6.js
  • Test 4:
    npm run watch -- -n test
  • Test 5:
    npm run watch

Actual result BEFORE applying this Pull Request

Resulst 1:

error: unknown option '--all'

Result 2:

Skipped builders (watch not supported): vendor
Watcher updating js for [com_actionlogs]...

Result 3: (should work as before)

Initialize watch [com_actionlogs]
Watcher rebuild everything in [com_actionlogs]...
Watcher updating js for [com_actionlogs]...

Result 4: (should fail)

Builder "test" does not exists.
Nothing to watch. Please specify the builder name to watch.

Result 5: (should fail)

Nothing to watch. Please specify the builder name to watch.

Expected result AFTER applying this Pull Request

Result 1:

Skipped builders (watch not supported): vendor

Result 1 - 5 should be the same as before.

Link to documentations

Please select:

  • Documentation link for guide.joomla.org:

  • No documentation changes for guide.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@LadySolveig
LadySolveig marked this pull request as ready for review May 21, 2026 13:41
@laoneo

laoneo commented May 22, 2026

Copy link
Copy Markdown
Member

Thanks, unfortunately, when I do npm run watch -- --all then I get the error:

Trace: Error: EEXIST: file already exists, mkdir '/var/www/html/Projects/cms6/media/system'
    at async mkdir (node:internal/fs/promises:859:10)
    at async mkDirAndCopy (node:internal/fs/cp/cp:318:3)
    at async DefaultModuleBuilder.watch (file:///var/www/html/Projects/cms6/build/build-modules-js/builder/default-module-builder.mjs:266:5)
    at async Promise.all (index 1) {
  errno: -17,
  code: 'EEXIST',
  syscall: 'mkdir',
  path: '/var/www/html/Projects/cms6/media/system'
}
    at file:///var/www/html/Projects/cms6/build/build-modules-js/command/watch-command.mjs:82:17
    at async Promise.all (index 1)
EEXIST: file already exists, mkdir '/var/www/html/Projects/cms6/media/system'

@LadySolveig

Copy link
Copy Markdown
Contributor Author

npm run watch -- -n system works fine with and without the PR?
Or do we have to dig even deeper here.

I haven't been able to reproduce the error yet. I tested both directly on the VM and within the Docker container, but I wasn't able to trigger the issue with either the initial command or subsequent file changes.

Could you also check the folder and file permissions? Only to rule out that as possible cause.

@laoneo

laoneo commented May 22, 2026

Copy link
Copy Markdown
Member

Does my command work for you?

@LadySolveig

LadySolveig commented May 22, 2026 •

Copy link
Copy Markdown
Contributor Author

Yes
npm run watch -- --all as well as npm run watch -- -a - both work for me in vm and in a docker container with no problems and also the watch is working as it should. I can unfortunately not reproduce what you reported.

@laoneo

laoneo commented May 22, 2026

Copy link
Copy Markdown
Member

I have tested this item ✅ successfully on bd84626

Not sure what happend yesterday, but today it works as expected.
npm run watch -- -n system worked and npm run watch -- -all worked. Added a console.log statement to media_source/com_banners/js/admin-banner-edit.es6.js after I started the all watch and it printed it when I edited a banner.


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/47815.

@MacJoom MacJoom added this to the Joomla! 6.2.0 milestone May 24, 2026
@MacJoom
MacJoom merged commit 68f06d0 into joomla:6.2-dev May 24, 2026
52 checks passed
@MacJoom

MacJoom commented May 24, 2026

Copy link
Copy Markdown
Member

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants