Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update webpack-manifest-plugin definitions to v3 #50071

Merged

Conversation

alex996
Copy link
Contributor

@alex996 alex996 commented Dec 10, 2020

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: https://github.com/shellscape/webpack-manifest-plugin#options
  • If this PR brings the type definitions up to date with a new version of the JS library, update the version number in the header.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }. If for reason the any rule need to be disabled, disable it for that line using // tslint:disable-next-line [ruleName] and not for whole package so that the need for disabling can be reviewed.

Rationale:

  • Bring the type definition up to speed with the latest v3.0 release of webpack-manifest-plugin which adds compatibility with Webpack 5.
  • Namely, make WebpackManifestPlugin a named rather than default export, and add an export of getCompilerHooks.

@typescript-bot typescript-bot added the Popular package This PR affects a popular package (as counted by NPM download counts). label Dec 10, 2020
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Dec 10, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented Dec 10, 2020

@alex996 Thank you for submitting this PR!

This is a live comment which 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.

Status

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

All of the items on the list are green. To merge, you need to post a comment including the string "Ready to merge" to bring in your changes.


Diagnostic Information: What the bot saw about this PR
{
  "type": "info",
  "now": "-",
  "pr_number": 50071,
  "author": "alex996",
  "headCommitAbbrOid": "cbc245e",
  "headCommitOid": "cbc245e82824a34287bd38fd7ff1abc619f194bb",
  "lastPushDate": "2020-12-10T22:20:52.000Z",
  "lastActivityDate": "2020-12-10T23:00:04.000Z",
  "maintainerBlessed": false,
  "mergeOfferDate": "2020-12-10T22:47:01.000Z",
  "mergeRequestDate": "2020-12-10T23:00:04.000Z",
  "mergeRequestUser": "alex996",
  "hasMergeConflict": false,
  "isFirstContribution": false,
  "popularityLevel": "Popular",
  "pkgInfo": [
    {
      "name": "webpack-manifest-plugin",
      "kind": "edit",
      "files": [
        {
          "path": "types/webpack-manifest-plugin/index.d.ts",
          "kind": "definition"
        },
        {
          "path": "types/webpack-manifest-plugin/webpack-manifest-plugin-tests.ts",
          "kind": "test"
        }
      ],
      "owners": [
        "r3nya",
        "monsonjeremy"
      ],
      "addedOwners": [],
      "deletedOwners": [],
      "popularityLevel": "Popular"
    }
  ],
  "reviews": [
    {
      "type": "approved",
      "reviewer": "monsonjeremy",
      "date": "2020-12-10T22:46:24.000Z",
      "isMaintainer": false
    }
  ],
  "ciResult": "pass"
}

@typescript-bot
Copy link
Contributor

🔔 @r3nya @monsonjeremy — 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-bot typescript-bot added the The CI failed When GH Actions fails label Dec 10, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Needs Author Action in New Pull Request Status Board Dec 10, 2020
@typescript-bot
Copy link
Contributor

@alex996 The CI build failed! Please review the logs for more information.

Once you've pushed the fixes, the build will automatically re-run. Thanks!

@typescript-bot
Copy link
Contributor

👋 Hi there! I’ve run some quick measurements against master and your PR. These metrics should help the humans reviewing this PR gauge whether it might negatively affect compile times or editor responsiveness for users who install these typings.

Let’s review the numbers, shall we?

These typings are for a version of webpack-manifest-plugin that doesn’t yet exist on master, so I’ve compared them with v2.1.

Comparison details 📊
2.1@master 3.0 in #50071 diff
Batch compilation
Memory usage (MiB) 76.4 75.4 -1.3%
Type count 11089 11091 0%
Assignability cache size 1960 1960 0%
Language service
Samples taken 67 67 0%
Identifiers in tests 67 67 0%
getCompletionsAtPosition
    Mean duration (ms) 375.6 377.2 +0.4%
    Mean CV 11.4% 12.6%
    Worst duration (ms) 470.1 453.3 -3.6%
    Worst identifier name path
getQuickInfoAtPosition
    Mean duration (ms) 378.5 380.9 +0.6%
    Mean CV 11.3% 10.9%
    Worst duration (ms) 448.9 480.9 +7.1%
    Worst identifier name files

It looks like nothing changed too much. I won’t post performance data again unless it gets worse.

@typescript-bot typescript-bot added the Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. label Dec 10, 2020
@typescript-bot typescript-bot removed the The CI failed When GH Actions fails label Dec 10, 2020
@typescript-bot typescript-bot moved this from Needs Author Action to Waiting for Code Reviews in New Pull Request Status Board Dec 10, 2020
Copy link
Contributor

@monsonjeremy monsonjeremy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! Nice work @alex996

@typescript-bot typescript-bot added Owner Approved A listed owner of this package signed off on the pull request. Self Merge This PR can now be self-merged by the PR author or an owner labels Dec 10, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in New Pull Request Status Board Dec 10, 2020
@typescript-bot
Copy link
Contributor

@alex996 Everything looks good here. Great job! I am ready to merge this PR (at cbc245e) on your behalf.

If you'd like that to happen, please post a comment saying:

Ready to merge

and I'll merge this PR almost instantly. Thanks for helping out! ❤️

(@r3nya, @monsonjeremy: you can do this too.)

@alex996
Copy link
Contributor Author

alex996 commented Dec 10, 2020

Ready to merge

@typescript-bot typescript-bot moved this from Waiting for Author to Merge to Recently Merged in New Pull Request Status Board Dec 10, 2020
@typescript-bot typescript-bot merged commit ab56dbf into DefinitelyTyped:master Dec 10, 2020
@alex996 alex996 deleted the feat/webpack-manifest-plugin branch December 10, 2020 23:01
@typescript-bot
Copy link
Contributor

I just published @types/webpack-manifest-plugin@3.0.0 to npm.

/**
* Create the manifest. It can return anything as long as it's serializable by JSON.stringify.
*/
generate?: (seed: object, files: FileDescriptor[], entries: string[]) => object;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@alex996 looks like the type of entries here is wrong - it hasn't changed since v2, and is still: { [key: string]: string[] }.

Logging it out at compile time shows this to be the case too:

new WebpackManifestPlugin({
      fileName: "asset-manifest.json",
      generate: (seed, files, entrypoints) => {
        console.log(chalk.cyanBright("entrypoints", JSON.stringify(entrypoints, null, 2)));
		...
	  }
})

image

Copy link
Contributor Author

@alex996 alex996 Dec 22, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like you are right. There might be a typo in the readme, as I was following the types mentioned there.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Owner Approved A listed owner of this package signed off on the pull request. Perf: Same typescript-bot determined that this PR will not significantly impact compilation performance. Popular package This PR affects a popular package (as counted by NPM download counts). Self Merge This PR can now be self-merged by the PR author or an owner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants