The diff-release.sh script assumes that the codex.mjs produced by the ESM build (as well as the other packages' .mjs files) is unminified and easily diffable. However, while it does still have all of its whitespace, it's still uglified (has single-letter variable names instead of the original ones), and the uglified variable names change with every release. This makes the diff between releases of this file very noisy, and reviewing it almost impossible.
We could fix this by disabling all minification (including uglification) for the ESM build. We don't really need minification there because this file isn't designed to be delivered over the network anyway. Having an unminified file would help with diffing between releases, and is also desirable for inclusion in MediaWiki core, where external libraries are encouraged (or required?) to include an unminified version. (Alternatively, if we decide we do care about uglifying the ESM build output, we could build another version of either the ESM or CJS file with minification disabled.)