-
Notifications
You must be signed in to change notification settings - Fork 29.9k
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
Update webpack-manifest-plugin definitions to v3 #50071
Conversation
@alex996 Thank you for submitting this PR! This is a live comment which I will keep updated. 1 package in this PR
Code ReviewsBecause you edited one package and updated the tests (👏), I can help you merge this PR once someone else signs off on it. Status
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"
} |
🔔 @r3nya @monsonjeremy — please review this PR in the next few days. Be sure to explicitly select |
@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! |
👋 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 📊
It looks like nothing changed too much. I won’t post performance data again unless it gets worse. |
54f8605
to
cbc245e
Compare
There was a problem hiding this 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
@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:
and I'll merge this PR almost instantly. Thanks for helping out! ❤️ (@r3nya, @monsonjeremy: you can do this too.) |
Ready to merge |
I just published |
/** | ||
* Create the manifest. It can return anything as long as it's serializable by JSON.stringify. | ||
*/ | ||
generate?: (seed: object, files: FileDescriptor[], entries: string[]) => object; |
There was a problem hiding this comment.
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)));
...
}
})
There was a problem hiding this comment.
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.
Please fill in this template.
npm test <package to test>
.Select one of these and delete the others:
If changing an existing definition:
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:
WebpackManifestPlugin
a named rather than default export, and add an export ofgetCompilerHooks
.