Skip to content

feat(csp-html-webpack-plugin): upgrade to v5.1#75212

Open
hkleungai wants to merge 1 commit into
DefinitelyTyped:masterfrom
hkleungai:csp-html-webpack-plugin-update
Open

feat(csp-html-webpack-plugin): upgrade to v5.1#75212
hkleungai wants to merge 1 commit into
DefinitelyTyped:masterfrom
hkleungai:csp-html-webpack-plugin-update

Conversation

@hkleungai

@hkleungai hkleungai commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

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.

  • HtmlPluginDataHookV3 is removed, since v5 no longer works with v3 of html-webpack-plugin.
  • .processFn() is added, by me digging into the release note.
  • .xhtml is added; It is an undocumented options, but since the other undocumented option cspPlugin is 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-plugin depends on tapable but not @types/tapable. Consequently dependencies has to be further updated.


Please fill in this template.

Select one of these and delete the others:

If changing an existing definition:

  • Provide a URL to documentation or source code which provides context for the suggested changes: <>
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the package.json.

@typescript-automation

typescript-automation Bot commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

@hkleungai Thank you for submitting this PR!

This is a live comment that I will keep updated.

1 package in this PR

Code Reviews

Because 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

  • ✅ No merge conflicts
  • ✅ Continuous integration tests have passed
  • 🕐 Most recent commit is approved by type definition owners, DT maintainers or others

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"
}

@typescript-automation

Copy link
Copy Markdown
Contributor

🔔 @Seally — please review this PR in the next few days. Be sure to explicitly select Approve or Request Changes in the GitHub UI so I know what's going on.

@typescript-automation typescript-automation Bot moved this to Waiting for Code Reviews in Pull Request Status Board Jul 5, 2026
@typescript-automation

Copy link
Copy Markdown
Contributor

@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.

@typescript-automation typescript-automation Bot added the The CI failed When GH Actions fails label Jul 5, 2026
@typescript-automation typescript-automation Bot moved this from Waiting for Code Reviews to Needs Author Action in Pull Request Status Board Jul 5, 2026
@hkleungai hkleungai force-pushed the csp-html-webpack-plugin-update branch from 33c9181 to fa76651 Compare July 5, 2026 08:36
@typescript-automation typescript-automation Bot removed the The CI failed When GH Actions fails label Jul 5, 2026
@typescript-automation typescript-automation Bot moved this from Needs Author Action to Waiting for Code Reviews in Pull Request Status Board Jul 5, 2026
@typescript-automation typescript-automation Bot added the The CI failed When GH Actions fails label Jul 5, 2026
@typescript-automation typescript-automation Bot moved this from Waiting for Code Reviews to Needs Author Action in Pull Request Status Board Jul 5, 2026
@typescript-automation

Copy link
Copy Markdown
Contributor

@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.

@hkleungai hkleungai force-pushed the csp-html-webpack-plugin-update branch from fa76651 to e4d3e43 Compare July 5, 2026 09:00
@typescript-automation typescript-automation Bot removed the The CI failed When GH Actions fails label Jul 5, 2026
@typescript-automation typescript-automation Bot moved this from Needs Author Action to Waiting for Code Reviews in Pull Request Status Board Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Waiting for Code Reviews

Development

Successfully merging this pull request may close these issues.

1 participant