feat(csp-html-webpack-plugin): upgrade to v5.1#75212
Conversation
|
@hkleungai Thank you for submitting this PR! This is a live comment that I will keep updated. 1 package in this PRCode ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. You can test the changes of this PR in the Playground. Status
Once every item on this list is checked, I'll ask you for permission to merge and publish the changes. Diagnostic Information: What the bot saw about this PR{
"type": "info",
"now": "-",
"pr_number": 75212,
"author": "hkleungai",
"headCommitOid": "e4d3e43fdcc6486e529492e692b534aaa856743b",
"mergeBaseOid": "e2580e07bfb619bbaa80a31c6e9d0e2ec35fea22",
"lastPushDate": "2026-07-05T09:00:21.000Z",
"lastActivityDate": "2026-07-05T09:00:21.000Z",
"hasMergeConflict": false,
"isFirstContribution": false,
"tooManyFiles": false,
"hugeChange": false,
"tooManyCommits": false,
"tooManyReviews": false,
"popularityLevel": "Well-liked by everyone",
"pkgInfo": [
{
"name": "csp-html-webpack-plugin",
"kind": "edit",
"files": [
{
"path": "types/csp-html-webpack-plugin/csp-html-webpack-plugin-tests.ts",
"kind": "test"
},
{
"path": "types/csp-html-webpack-plugin/index.d.ts",
"kind": "definition"
},
{
"path": "types/csp-html-webpack-plugin/package.json",
"kind": "package-meta-ok"
}
],
"owners": [
"Seally"
],
"addedOwners": [],
"deletedOwners": [],
"popularityLevel": "Well-liked by everyone"
}
],
"reviews": [],
"mainBotCommentID": 4885363409,
"ciResult": "pass"
} |
|
🔔 @Seally — please review this PR in the next few days. Be sure to explicitly select |
|
@hkleungai The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! Note: builds that are failing do not end up on the list of PRs for the DT maintainers to review. |
33c9181 to
fa76651
Compare
|
@hkleungai The CI build failed! Please review the logs for more information. Once you've pushed the fixes, the build will automatically re-run. Thanks! Note: builds that are failing do not end up on the list of PRs for the DT maintainers to review. |
fa76651 to
e4d3e43
Compare
From https://www.npmjs.com/package/csp-html-webpack-plugin?activeTab=versions, v3 & v4 got way fewer weekly downloads than v5 does. It should make sense to directly migrate without maintaining any legacy versions.
There are a few breaking / significant changes.
HtmlPluginDataHookV3is removed, since v5 no longer works with v3 ofhtml-webpack-plugin..processFn()is added, by me digging into the release note..xhtmlis added; It is an undocumented options, but since the other undocumented optioncspPluginis already there, it make sense to keep maintaining the interface.For more details, see https://app.unpkg.com/csp-html-webpack-plugin@5.1.0/files/plugin.js & https://github.com/slackhq/csp-html-webpack-plugin/releases.
Note:
html-webpack-plugindepends ontapablebut not@types/tapable. Consequentlydependencieshas to be further updated.Please fill in this template.
pnpm test <package to test>.Select one of these and delete the others:
If changing an existing definition:
package.json.