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(terser-webpack-plugin): minimizerOptions option #47518

Conversation

peterblazejewicz
Copy link
Member

  • minimizerOptions added
  • test amended
  • cleanup

webpack-contrib/terser-webpack-plugin#311

Thanks!

  • Use a meaningful title for the pull request. Include the name of the package modified.
  • Test the change in your own code. (Compile and run.)
  • Add or edit tests to reflect the change. (Run with npm test.)
  • Run npm run lint package-name (or tsc if no tslint.json is present).
  • 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 header.
  • Include tests for your changes
  • 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.

@typescript-bot typescript-bot added Popular package This PR affects a popular package (as counted by NPM download counts). Author is Owner The author of this PR is a listed owner of the package. labels Sep 11, 2020
@typescript-bot typescript-bot added this to Waiting for Code Reviews in New Pull Request Status Board Sep 11, 2020
@typescript-bot
Copy link
Contributor

typescript-bot commented Sep 11, 2020

@peterblazejewicz 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": 47518,
  "author": "peterblazejewicz",
  "owners": [
    "Danscho",
    "peterblazejewicz"
  ],
  "dangerLevel": "ScopedAndTested",
  "headCommitAbbrOid": "f84ac1c",
  "headCommitOid": "f84ac1c637fe8578c5ea55c6b4bcdcc1658c5b91",
  "mergeIsRequested": true,
  "stalenessInDays": 0,
  "lastPushDate": "2020-09-11T21:01:50.000Z",
  "lastCommentDate": "2020-09-15T07:06:07.000Z",
  "maintainerBlessed": false,
  "reviewLink": "https://github.com/DefinitelyTyped/DefinitelyTyped/pull/47518/files",
  "hasMergeConflict": false,
  "authorIsOwner": true,
  "isFirstContribution": false,
  "popularityLevel": "Popular",
  "newPackages": [],
  "packages": [
    "terser-webpack-plugin"
  ],
  "files": [
    {
      "path": "types/terser-webpack-plugin/index.d.ts",
      "kind": "definition",
      "package": "terser-webpack-plugin"
    },
    {
      "path": "types/terser-webpack-plugin/terser-webpack-plugin-tests.ts",
      "kind": "test",
      "package": "terser-webpack-plugin"
    }
  ],
  "hasDismissedReview": false,
  "ciResult": "pass",
  "lastReviewDate": "2020-09-15T07:04:44.000Z",
  "reviewersWithStaleReviews": [],
  "approvalFlags": 2,
  "isChangesRequested": false
}

@typescript-bot
Copy link
Contributor

🔔 @Danscho — 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.

@danger-public
Copy link

Inspecting the JavaScript source for this package found some properties that are not in the .d.ts files.
The check for missing properties isn't always right, so take this list as advice, not a requirement.

terser-webpack-plugin (unpkg)

was missing the following properties:

  1. isSourceMap
  2. buildError
  3. isWebpack4
  4. getAvailableNumberOfCores
  5. getAsset
as well as these 2 other properties...

emitAsset, updateAsset

Generated by 🚫 dangerJS against f84ac1c

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

Comparison details 📊
master #47518 diff
Batch compilation
Memory usage (MiB) 75.1 76.8 +2.2%
Type count 12168 12168 0%
Assignability cache size 2194 2195 0%
Language service
Samples taken 120 122 +2%
Identifiers in tests 120 122 +2%
getCompletionsAtPosition
    Mean duration (ms) 389.2 384.7 -1.2%
    Mean CV 9.4% 9.3%
    Worst duration (ms) 462.6 494.7 +6.9%
    Worst identifier keep_fnames TerserPlugin
getQuickInfoAtPosition
    Mean duration (ms) 384.6 381.5 -0.8%
    Mean CV 9.8% 9.5% -2.6%
    Worst duration (ms) 470.4 472.7 +0.5%
    Worst identifier condition output

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 Sep 11, 2020
@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 Sep 15, 2020
@typescript-bot typescript-bot moved this from Waiting for Code Reviews to Waiting for Author to Merge in New Pull Request Status Board Sep 15, 2020
@typescript-bot
Copy link
Contributor

@peterblazejewicz Everything looks good here. Great job! I am ready to merge this PR 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! ❤️

(@Danscho: you can do this too.)

@Danscho
Copy link
Contributor

Danscho commented Sep 15, 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 Sep 15, 2020
@typescript-bot typescript-bot merged commit 71edd17 into DefinitelyTyped:master Sep 15, 2020
@peterblazejewicz peterblazejewicz deleted the update/terser-webpack-plugin branch September 15, 2020 07:39
@typescript-bot typescript-bot removed this from Recently Merged in New Pull Request Status Board Sep 16, 2020
danielrearden pushed a commit to danielrearden/DefinitelyTyped that referenced this pull request Sep 22, 2020
…mizerOptions` option by @peterblazejewicz

- `minimizerOptions` added
- test amended
- cleanup

webpack-contrib/terser-webpack-plugin#311

Thanks!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Author is Owner The author of this PR is a listed owner of the package. 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