Repository navigation
fix: update node, regenerate the lockfile and run the audit pass - #194
Conversation
npm 11 kept the resolved versions. It also installs `@babel/cli` automatically, because `@videojs/babel-config` declares it as a peer dependency. 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.
GitHub deprecated the node16 and node20 action runtimes. Headless browsers do not need xvfb.
All versions stay inside the declared ranges. The lockfile now resolves fixed runtime versions of `@xmldom/xmldom`, `@babel/runtime` and `min-document`.
Karma 5 depends on vulnerable `socket.io`, `engine.io` and `ua-parser-js` versions.
`rollup` 2.79.2 and earlier have a DOM clobbering vulnerability. `rollup-plugin-terser` requires `serialize-javascript` 4.x, which has a known vulnerability. The override forces a fixed version.
`jsdom` 16 depends on vulnerable `http-proxy-agent` versions. With `jsdom` 16, each `npm audit fix` run changed `jsdom` between 16.5.3 and 16.7.0. `jsdom` 30 does not support Node 22.13, so 29 is the newest version that our `engines` allow.
Version 2 brings `doctoc` 1, which depends on vulnerable `underscore` and `trim` versions. Husky 7 ignores the hooks in `package.json`. Without `.husky/pre-commit` and the `prepare` script, the pre-commit hook stops silently. Version 3 removes `conventional-changelog-cli` and `not-prerelease`, so the changelog scripts use `vjs-update-changelog`. The changelog output does not change. `vjsverify` 3 cannot parse the `npm pack --json` output when `prepare` writes to stdout. Without `videojs-generator-verify` 4, `prepublishOnly` fails.
`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.
spuppo-mux
left a comment
There was a problem hiding this comment.
CI times out at 6h on unit and coverage with the BrowserStack secrets set, the same hang as http-streaming#1612.
Please bring that change in here: drop the BROWSER_STACK_* env from ci.yml and run karma on local headless browsers in scripts/karma.conf.js. Also add timeout-minutes to the ci job.
Removing xvfb is fine once karma runs headless.
Rest of the diff looks good. Non-blocking: the description says generator-helpers 3 removes conventional-changelog-cli and not-prerelease, but both are still in the lockfile (transitive), and github-release.yml still uses not-prerelease.
BrowserStack sessions never start, so the ci jobs hang until the 6 hour GitHub timeout. Without the BROWSER_STACK_* env, karma detects the runner's local headless browsers. ChromiumHeadless cannot start on ubuntu-latest and Safari has no headless launcher, so both are filtered out. A 20 minute job timeout stops any future hang early.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #194 +/- ##
==========================================
+ Coverage 94.68% 94.73% +0.04%
==========================================
Files 19 19
Lines 847 855 +8
Branches 259 261 +2
==========================================
+ Hits 802 810 +8
Misses 45 45 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
mpd-parser 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
69 vulnerabilities (11 low, 16 moderate, 32 high, 10 critical).Now, using
v24.21.011.19.0npm auditshows19 vulnerabilities (7 moderate, 12 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
@xmldom/xmldom,@babel/runtimeandmin-documenthave fixes inside the current ranges.Replaces #190 with the same rollup update.
@xmldom/xmldomstays on^0.8.3, because 0.8.15 fixes all xmldom advisories. A move to 0.9 is a breaking change for consumers, and no advisory requires it.Specific Changes proposed
Each commit passes lint, 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.npm audit fix. Result:39 vulnerabilities (7 low, 14 moderate, 15 high, 3 critical)karmato 6. Karma 5 depends on vulnerablesocket.io,engine.ioandua-parser-jsversions.rollupto^2.80.0and added an override forserialize-javascript.rollup-plugin-terserrequiresserialize-javascript4.x, which has a known vulnerability. The override forces a fixed version.jsdomto 29.jsdom16 depends on vulnerablehttp-proxy-agentversions.jsdom16, eachnpm audit fixrun changedjsdombetween 16.5.3 and 16.7.0.@videojs/generator-helpersto 3.2. Version 2 bringsdoctoc1, which depends on vulnerableunderscoreandtrimversions.package.json. The pre-commit hook moved to.husky/pre-commit, and thepreparescript installs it.conventional-changelog-cliandnot-prerelease. Theversionandupdate-changelogscripts now usevjs-update-changelog, like the release workflow.vjsverify3 cannot parse thenpm pack --jsonoutput whenpreparewrites to stdout.videojs-generator-verify4 keepsprepublishOnlyworking.uuid.conventional-changelog-cli2 usestempfile3, which depends on a vulnerableuuidversion.tempfileonly callsuuid.v4(), anduuid11 keeps that function.unitandcoveragejobs stopped only at the 6 hour timeout. Karma now uses the headless browsers on the runner.scripts/karma.conf.jsfilters out Safari and Chromium. ChromiumHeadless cannot start onubuntu-latest, and Safari has no headless launcher.Built files:
dist/mpd-parser.min.jsis byte identical to the build from main.bin/parse.jsgives the same output for all 17 test manifests.npm pack --dry-rungives the same file list as the published mpd-parser 1.4.0 package.Follow-up items:
karma,lint-staged,@babel/cliandes-check.videojs-standard.videojs-standardrelease with a newer eslint.BROWSER_STACK_*env vars to the ci job again.Requirements Checklist