User tests: Successful: Unsuccessful:
Pull Request resolves # .
In build/build-modules-js/utils/compressFile.mjs the Brotli callback did not take the compressed result as argument, but wrote data, which is not defined in that scope. Calling compressFileAndSave() with enableBrotli = true therefore failed with a ReferenceError.
The callback now receives the result, same as the gzip branch above it.
The only caller in core (default-module-builder.mjs) does not enable Brotli, so the regular build is not affected. The bug was introduced with #46879.
Run in the root folder of the repository:
echo "console.log('test');" > /tmp/test.min.js
node -e "import('./build/build-modules-js/utils/compressFile.mjs').then((m) => m.compressFileAndSave('/tmp/test.min.js', true)).then(() => console.log('ok'), (e) => console.log(e.name + ': ' + e.message))"
Additionally run npm run build:js to check that the regular build still works.
ReferenceError: data is not defined, no /tmp/test.min.js.br is written.
ok, and /tmp/test.min.js.br exists next to /tmp/test.min.js.gz.
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
🤖 Generated with Claude Code
| Status | New | ⇒ | Pending |
| Category | ⇒ | JavaScript Repository |
I can confirm the before and after but without knowing what you mean by a "regular build" with a non-existent script means I cant record it as a success
I have tested this item ✅ successfully on 6eb90aa
Testing with JBT
ReferenceError: data is not defined before PR and there is no test.min.js.br file createdtest.min.js.br is creatednpm run build:js in 6.2-dev anymoreI have tested this item ✅ successfully on 6eb90aa
Testing with JBT
ReferenceError: data is not defined before PR and there is no test.min.js.br file createdtest.min.js.br is creatednpm run build:js in 6.2-dev anymore
that doesnt exist in 6.2 it was removed with #46879