Repository navigation
fix: update node and run the audit pass - #1617
Open
javierarams wants to merge 12 commits into
Open
javierarams wants to merge 12 commits into
javierarams wants to merge 12 commits into
Conversation
The tests expect the karma server at `localhost:9999`. When a different process uses that port, karma starts on a different port, and 8 tests fail.
npm 7 and later do not add CHANGELOG.md to the package automatically. The packages for 3.17.3 and earlier included it, but 3.17.4 and 3.17.5 do not.
video.js and mpd-parser use the same Node version and the same `engines` value. CI reads the Node version from `.nvmrc`.
GitHub deprecated the node16 and node20 action runtimes. `coactions/setup-xvfb` has only a node16 runtime. The karma config starts browsers that need a display, and the runner image includes xvfb, so the ci job calls `xvfb-run` directly.
All versions stay inside the declared ranges. The lockfile now resolves fixed runtime versions of `@xmldom/xmldom`, `@babel/runtime` and `min-document`.
`rollup` versions before 2.80.0 have known vulnerabilities. `rollup-plugin-terser` requires `serialize-javascript` 4.x, which has a known vulnerability. The override forces a fixed version. The plugin only calls `serialize(options)`, and 7.x keeps that function.
`docs:api` writes the generated pages to `docs/api`, and `files` includes `docs/`. Without the exclusion, a publish after `npm run docs` includes those pages.
jsdoc has no `-g` option, so the script failed and made no files. The markdown plugin now loads from `.jsdoc.json`.
jsdoc 3 depends on vulnerable `taffydb` and `markdown-it` versions, and `taffydb` has no fixed version. jsdoc 4 makes the same 52 pages.
`water-plant-uml` 2.0.2 is the latest release. It requires `axios` 0.21.x, which has known vulnerabilities. The override applies only to `water-plant-uml`. With `axios` 0.34, the exported diagrams are byte identical.
`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.
#1308 removed these files, so `shelljs` showed an error for each missing file.
|
💖 Thanks for opening this pull request! 💖 Things that will help get your PR across the finish line:
We get a lot of pull requests on this repo, so please be patient and we will get back to you as soon as we can. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1617 +/- ##
=======================================
Coverage 84.00% 84.00%
=======================================
Files 44 44
Lines 11713 11713
Branches 2625 2625
=======================================
Hits 9840 9840
Misses 1873 1873 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This branch has not been deployed
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
http-streaming already uses Node 22 and a v3 lockfile, but
npm auditshows many vulnerabilities in the dev toolchain. This change does the same steps as videojs/video.js#9231 and videojs/video.js#9232:Before, using
v22.23.310.9.9npm auditshowed:Now, using
v24.21.011.19.0npm auditshows18 vulnerabilities (7 moderate, 11 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.Specific Changes proposed
Each commit passes lint, the build and the karma unit tests in Chrome headless. The last commit also passes the playback, playback-min and coverage tests.
localhost:9999.CHANGELOG.mdtofilesinpackage.json..nvmrcandengines. CI reads the Node version from.nvmrc.enginesvalue is the same as in video.js and mpd-parser.coactions/setup-xvfbhas only a node16 runtime. The ci job now callsxvfb-rundirectly, because the karma config starts browsers that need a display. The runner image includes xvfb.npm audit fix. Result:29 vulnerabilities (11 moderate, 18 high)rollupto^2.80.0and added an override forserialize-javascript.rollupversions before 2.80.0 have known vulnerabilities.rollup-plugin-terserrequiresserialize-javascript4.x, which has a known vulnerability. The override forces a fixed version. The plugin only callsserialize(options), and 7.x keeps that function.docs/api/from the npm package.docs:apiwrites the generated pages todocs/api, andfilesincludesdocs/. Without the exclusion, a publish afternpm run docsincludes those pages.docs:apiscript. jsdoc has no-goption, so the script failed and made no files..jsdoc.json.jsdocto 4. jsdoc 3 depends on vulnerabletaffydbandmarkdown-itversions, andtaffydbhas no fixed version.axiosinwater-plant-uml.water-plant-uml2.0.2 is the latest release, and it requiresaxios0.21.x, which has known vulnerabilities.water-plant-uml.axios0.34, the exported diagrams are byte identical.uuid.conventional-changelog-cli2 usestempfile3, which depends on a vulnerableuuidversion.tempfileonly callsuuid.v4(), anduuid11 keeps that function.old-indexfiles from the netlify deploy script. chore: remove old-index since IE is no longer supported #1308 removed these files, soshelljsshowed an error for each missing file.Built files:
npm audit fixchanges the built files. Only the commit that runs it changes them.videojs-http-streaming.cjs.jshas only format differences. Its AST is identical._extendshelper from@babel/runtime7.29, which fixes the runtime advisory. The helper behavior does not change.Package checks:
npm pack --dry-rungives the same file list as main, plusCHANGELOG.md.npm run prepublishOnlypasses.@videojs/generator-helpers3.1 uses husky 4, which reads thehusky.hooksblock inpackage.json.Follow-up items
karma,@babel/cli,lint-stagedandwater-plant-uml.videojs-standard.videojs-standardrelease with a newer eslint.npm releasestep of the release workflow failed for 3.17.3, 3.17.4 and 3.17.5. The logs are no longer available. Before the next release, a maintainer must examine the npm publish setup.test/videojs-http-streaming.test.jsfail sometimes. They also fail on main. In 2 of 27 karma unit runs, 3 of these tests failed, and the next run passed. In the failed runs, the hooks also got themain.m3u8response, so a global hook set was already in place before the test started.@videojs/generator-helpers3.2 moves to husky 7. That update needs.husky/pre-commit, apreparescript andvideojs-generator-verify4, as in mpd-parser. No audit finding needs it, so this change keeps 3.1.Requirements Checklist