Replace the intl-messageformat browser build and keep the socket.io-client pin (both upstream artifacts are permanently unusable)
Background
#8303 pinned two npm-asset packages to exact versions because the newer releases on the asset-packagist mirror ship unusable build artifacts:
npm-asset/intl-messageformatpinned to 11.1.2 — the shippedintl-messageformat.iife.jsis not an IIFE but an ES module with a top-levelexportstatement. SinceIntlMessageFormatAssetis part ofAppAsset::STATIC_DEPENDS, theexportends up inside the combinedresources/js/humhub-app.jsand the whole head bundle fails withUncaught SyntaxError: Unexpected token 'export'— jQuery and everything else never execute (this is what turned CI ondevelop/nextred on 2026-07-15).npm-asset/socket.io-clientpinned to 2.5.0 — the 2.5.1 package does not contain thedist/directory, butSocketIoAssetreferencesdist/socket.io.slim.js(breaks live push).
This issue originally tracked lifting those pins once upstream ships usable artifacts again.
Findings (2026-09-19)
Neither pin can be lifted by waiting. In both cases the assumption behind this issue — a temporary upstream regression that will be fixed — turned out to be wrong.
intl-messageformat: upstream is permanently ESM-only
Checked the tarballs straight from the npm registry:
| Version | intl-messageformat.iife.js |
|---|---|
| 11.1.2 (current pin), 11.1.3 | real IIFE (var IntlMessageFormat = (() => {) |
| 11.1.4 | never published |
| 11.2.0 | real IIFE |
| 11.2.1 … 11.2.15, 12.0.x … 12.1.1 (latest) | ES module with top-level export { … } |
So the breakage started with 11.2.1, not 11.2.10 — 11.2.10 was merely the version composer update happened to resolve to at the time. The current latest (12.1.1) is affected identically; the file is byte-for-byte the same shape.
This is not a build glitch: package.json of 12.1.1 declares "type": "module" with "exports": { ".": "./index.js" } and ships no browser bundle at all. The .iife.js filename is a leftover of the old pipeline; the content is plain rolldown ESM output.
Upstream has no intention of restoring UMD/IIFE builds — formatjs/formatjs#3188 (react-intl.iife.js is broken) and formatjs/formatjs#3462 (Request to bring back UMD builds) were both closed by the stale bot without a fix. There is not even an open report for the mislabelled intl-messageformat.iife.js.
Consequence: relaxing the constraint to ^11.1 or ^12 will never be safe. The only usable published versions are 11.1.2, 11.1.3 and 11.2.0, so a widened range buys nothing.
Upside for a proper fix: the only ESM syntax in the file is a single trailing export (line 2808 of 2809) — no import, nothing else. Bundling the package ourselves with esbuild --format=iife --global-name=IntlMessageFormat from @npm/intl-messageformat/index.js produces exactly the artifact 11.1.2 used to provide, and would let the pin be dropped entirely.
socket.io-client: 2.5.1 is not an npm release at all
The "missing dist/" is a symptom; the cause is different from what was assumed:
- npm has no 2.5.1.
registry.npmjs.org/socket.io-client/2.5.1returns 404, thev2-latestdist-tag still points at 2.5.0 (2022-06-26), andsocketio/socket.io-clienthas no2.5.1tag (its2.xbranch is still at version 2.5.0). - A throwaway
composer require npm-asset/socket.io-client:^2.5against asset-packagist nevertheless installs 2.5.1, from:https://api.github.com/repos/socketio/socket.io/zipball/88b2cdb6abd38d6466fa4360748f2f67d8837ad4
That is a source zipball of the socket.io monorepo, not an npm tarball. It contains lib/, test/, examples/ — dist/ is generated at publish time and simply does not exist in the repository. The entry will therefore never become usable, and ^2.5 stays permanently broken.
The pin on 2.5.0 is thus not a workaround but the normal state for as long as we stay on socket.io-client 2.x.
Upgrading the client alone is not possible: humhub/humhub-pushservice runs socket.io: ^2.0.4 (unchanged since 2017 apart from a docs-link commit), and the v2 and v4 wire protocols are incompatible — client, service and every existing deployment would have to move together. Given that MercurePushDriver (#7831, since 1.18) already provides a maintained alternative, phasing out the socket.io push driver looks more sensible than a 4.x upgrade.
CI guard
Still absent. .github/workflows/php-test-base.yml runs grunt build-assets and never inspects the result, so this class of breakage only surfaces in the acceptance tests as $ is not defined.
The current build is healthy: assets/*/js/humhub-app.js starts with the jQuery IIFE and contains no top-level export.
Tasks
-
intl-messageformat: add anesbuild --format=iife --global-name=IntlMessageFormatstep togrunt build-assets, pointIntlMessageFormatAssetat the self-built artifact and relax thecomposer.jsonconstraint to^12. Optionally file an upstream bug for the mislabelledintl-messageformat.iife.js. -
socket.io-client: document the 2.5.0 pin as permanent (comment incomposer.json) and track deprecating the socket.io push driver in favour of Mercure separately. - Add a CI guard: grep the built bundles for top-level
export/importaftergrunt build-assets.
Verification (for whoever picks this up)
The CI build does not catch this class of breakage — grunt build-assets and uglify pass happily with an ESM file in the bundle, and only the acceptance tests fail afterwards ($ is not defined). After changing anything here, verify locally:
grunt build-assetsresources/js/humhub-app.jsmust start with the jQuery IIFE and contain no top-levelexport- Load the bundle in a browser as a classic
<script>and checkwindow.jQueryis defined (note:node --checkis not sufficient — Node ≥ 20.19 auto-detects ESM syntax and reports no error)
Source: humhub/humhub