Repository navigation
fix: update node, regenerate the lockfile and run the audit pass - #458
Merged
Merged
Conversation
npm 11 uses the `overrides` field, which npm 6 ignores. npm 11 kept the resolved versions. It removed `rollup-plugin-external-globals`, because no installed package requires it. The `engines` value is the same as in video.js. npm 7 and later do not add CHANGELOG.md to the package automatically. The releases made with npm 6 included it, so `files` now lists it.
GitHub deprecated the node16 and node20 action runtimes. The CI and release workflows both use the new versions. Headless browsers do not need xvfb.
`videojs-generate-rollup-config` 6.2.2 and later inline `global/window` in the browser bundles. This changes the UMD wrapper of `dist/mux.js` and `dist/mux-mp4.js`. With `rollup` 2.63 and later, the inlined `global/window` also makes `npm run build-prod` fail with an "Unexpected early exit" error. The `prepublishOnly` script runs `build-prod`. With the current version 6.2.1, the bundles do not change.
All versions stay inside the declared ranges. The lockfile now resolves fixed runtime versions of `@babel/runtime` and `min-document`. The fixed `terser` version minifies some expressions in a different way, so the `.min.js` files change. The other bundles keep the same syntax tree.
Karma 5 depends on vulnerable `socket.io`, `engine.io` and `ua-parser-js` versions. `videojs-generate-karma-config` 8.1 renames the BrowserStack Safari launchers, so `scripts/karma.conf.js` removes the new names.
`rollup` 2.79.2 and earlier have a DOM clobbering vulnerability. `videojs-generate-rollup-config` 7 uses `rollup-plugin-istanbul` 3, which removes the vulnerable `babel-traverse`. `rollup-plugin-terser` requires `serialize-javascript` 4.x, which has a known vulnerability. The override forces a fixed version. `videojs-generate-rollup-config` 7 also uses `@rollup/plugin-commonjs` 21. commonjs 21 changes the module wrappers in the browser bundles, but the transmuxer output stays the same. Two test files change for commonjs 21: - A `require()` of an ES module now returns the namespace, so the metadata stream test reads the default export of its worker. - A CommonJS worker entry now ends with `module.exports`, which fails in a Web Worker. The test worker is now an ES module.
Version 2 brings `doctoc` 1, which depends on vulnerable `underscore` and `trim` versions. The lockfile also moves `underscore` and `tmp` to fixed versions inside their ranges. Version 3 removes `conventional-changelog-cli` and `not-prerelease`, so the changelog scripts use `vjs-update-changelog`. The changelog output does not change. Husky 7 ignores the `husky` block in `package.json`. Its pre-commit hook did nothing, so `package.json` does not keep the block.
`conventional-changelog-cli` 2 uses `tempfile` 3, which depends on a vulnerable `uuid` version. `tempfile` only calls `uuid.v4()`, and `uuid` 11 keeps that function.
`videojs-standard` 8 depends on vulnerable `tmp`, `trim` and `flatted` versions. `npm run lint` does not run `vjsstandard` in this repo, so the lint result does not change.
spuppo-mux
approved these changes
Oct 28, 2026
Essk
approved these changes
Oct 29, 2026
1 of 4 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
mux.js still uses Node 10 and a v1 lockfile, so a new release needs a toolchain update first. The steps are the same as in videojs/video.js#9231 and videojs/video.js#9232:
Before, using
v10.24.16.14.12npm auditshowed:npm 11 counts vulnerabilities per package, not per path. With npm 11, the same lockfile shows
85 vulnerabilities (9 low, 16 moderate, 46 high, 14 critical).Now, using
v24.21.011.19.0npm auditshows16 vulnerabilities (7 moderate, 9 high). Two advisories cause all of them, and neither advisory has a patched release. Both affect only dev dependencies.The runtime dependency ranges do not change. The runtime advisories in
@babel/runtimeandmin-documenthave fixes inside the current ranges.Replaces #451 with the same rollup update. Please merge #453 before this PR or together with it. Without #453, the CI job waits for BrowserStack until it times out.
Specific Changes proposed
Each commit passes the build, karma, the node tests and
prepublishOnlyby itself..nvmrc, CI andengines. Theenginesvalue is the same as in video.js.CHANGELOG.mdtofilesinpackage.json. npm 7 and later do not add it to the package automatically, but the releases made with npm 6 included it.global/windowexternal in the browser bundles.videojs-generate-rollup-config6.2.2 and later inlineglobal/windowindist/mux.jsanddist/mux-mp4.js. This changes the UMD wrapper.rollup2.63 and later, it also makesnpm run build-prodfail with an "Unexpected early exit" error. TheprepublishOnlyscript runsbuild-prod.npm audit fix. Result:44 vulnerabilities (6 low, 10 moderate, 20 high, 8 critical)terserversion minifies some expressions in a different way, so the.min.jsfiles change.karmato 6 andvideojs-generate-karma-configto 8.1. Karma 5 depends on vulnerablesocket.io,engine.ioandua-parser-jsversions.videojs-generate-karma-config8.1 renames the BrowserStack Safari launchers, soscripts/karma.conf.jsremoves the new names.rollupto^2.80.0andvideojs-generate-rollup-configto 7.0.2. Added an override forserialize-javascript.rollup2.79.2 and earlier have a DOM clobbering vulnerability.videojs-generate-rollup-config7 usesrollup-plugin-istanbul3, which removes the vulnerablebabel-traverse.rollup-plugin-terserrequiresserialize-javascript4.x, which has a known vulnerability. The override forces a fixed version.videojs-generate-rollup-config7 uses@rollup/plugin-commonjs21. Two test files change for it. The metadata stream test reads the default export of its worker, and the test worker is now an ES module.@videojs/generator-helpersto 3.2. Version 2 bringsdoctoc1, which depends on vulnerableunderscoreandtrimversions.npm auditshows 0 critical vulnerabilities.conventional-changelog-cliandnot-prerelease. Theversionandupdate-changelogscripts now usevjs-update-changelog, like the release workflow.huskyblock frompackage.json. Its pre-commit hook did nothing, and husky 7 ignores that block.uuid.conventional-changelog-cli2 usestempfile3, which depends on a vulnerableuuidversion.tempfileonly callsuuid.v4(), anduuid11 keeps that function.videojs-standardto 9. Version 8 depends on vulnerabletmp,trimandflattedversions.npm run lintdoes not runvjsstandardin this repo, so the lint result does not change.Built files:
cjs/andes/have the same syntax tree as the build from main. Only the format changed.dist/files are different. The fixedterserversion minifies some expressions in a different way.@rollup/plugin-commonjs21 changes the module wrappers. The bundles are 1 to 3 percent larger.global/windowas a dependency.dist/file and withcjs/, and compares the results with the build from main. The script also runs the caption parser, the WebVTT parser, the probe functions and the inspectors.dist/file loaded with a<script>tag gives the same results as the build from main.debug/index.htmlplaystest-segment.tswith MSE and shows the same MP4 structure as main.bin/transmux.jsgives byte identical output for three test segments.npm pack --dry-rungives the same file list as the published mux.js 7.1.0 package.Follow-up items:
karma,lint-stagedand@babel/cli.videojs-standard.videojs-standardrelease with a newer eslint.lintscript is": vjsstandard".vjsstandard9 reports about 10000 problems.Requirements Checklist