Repository navigation
fix: update node, regenerate the lockfile and run the audit pass - #48
Open
javierarams wants to merge 9 commits into
Open
javierarams wants to merge 9 commits into
javierarams wants to merge 9 commits into
Conversation
npm 11 kept the resolved versions. 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. Release 4.1.2 was made with npm 10 and does not include it.
GitHub deprecated the node12 and node20 action runtimes. `xvfb-action` uses node12, and `codecov-action` v5 uses node20. Headless browsers do not need xvfb.
All versions stay inside the declared ranges. The lockfile now resolves fixed runtime versions of `@babel/runtime` and `min-document`. `@babel/core` 7.29 changes the generated code in `cjs/`. The exports and the test results stay the same.
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.
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.
`videojs-standard` 8 uses eslint 5, which depends on vulnerable `flatted`, `tmp` and `trim` versions. Version 9 is the version that video.js and mpd-parser use. Its eslint 7 rules reject one trailing comma in a test.
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
vhs-utils 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
88 vulnerabilities (8 low, 18 moderate, 51 high, 11 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
@babel/runtimeandmin-documenthave fixes inside the current ranges.npm audit --omit=devnow shows 0 vulnerabilities.Replaces #47 with the same rollup update.
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.npm audit fix. Result:40 vulnerabilities (6 low, 10 moderate, 21 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.@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.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.videojs-standardto 9.1, the version that video.js and mpd-parser use. Version 8 uses eslint 5, which depends on vulnerableflatted,tmpandtrimversions.Built files:
dist/vhs-utils.min.jsis byte identical to the build from main and to the published 4.1.2 file.dist/vhs-utils.jsand all files ines/have only format differences from newer Babel and rollup versions. Their ASTs are identical.@babel/core7.29 changes the generated code incjs/. Exports now get their value at the declaration, andcjs/index.jsinlines one Babel helper.cjs/and against the newcjs/. The exports of eachcjs/file are identical.bin/parse-format.jsgives the same output for all 756 test fixtures.npm pack --dry-rungives the same file list as the published 4.1.1 package.Follow-up items:
karma,lint-staged,@babel/cliandes-check.videojs-standard.videojs-standardrelease with a newer eslint.Requirements Checklist