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

feat: remove Terser types definitions #32819

Merged
merged 3 commits into from Feb 14, 2019

Conversation

Projects
None yet
6 participants
@Kocal
Copy link
Contributor

Kocal commented Feb 6, 2019

Since version 3.12, Terser provide it's own types definitions (search for TypeScript in terser-js/terser@v3.11.0...v3.12.0).

I just ran npm run not-needed -- terser 3.12 https://github.com/terser-js/terser, I hope this will be fine.

I also patched @types/terser-webpack-plugin to prevent some breaks.

EDIT: Created a PR on types-publisher for whitelist terser: Microsoft/types-publisher#567
EDIT 2: The PR has been merged, but I can't restart the Travis build.


Please fill in this template.

  • 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.)
  • Follow the advice from the readme.
  • Avoid common mistakes.
  • Run npm run lint package-name (or tsc if no tslint.json is present).

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: terser-js/terser#121
  • Increase the version number in the header if appropriate.
  • If you are making substantial changes, consider adding a tslint.json containing { "extends": "dtslint/dt.json" }.

If removing a declaration:

  • If a package was never on DefinitelyTyped, you don't need to do anything. (If you wrote a package and provided types, you don't need to register it with us.)
  • Delete the package's directory.
  • Add it to notNeededPackages.json.

@typescript-bot typescript-bot added this to Needs Author Attention in Pull Request Status Board Feb 6, 2019

@typescript-bot

This comment has been minimized.

Copy link

typescript-bot commented Feb 6, 2019

@Kocal Thank you for submitting this PR!

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

If no reviewer appears after a week, a DefinitelyTyped maintainer will review the PR instead.

@typescript-bot

This comment has been minimized.

Copy link

typescript-bot commented Feb 6, 2019

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

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

@Kocal Kocal referenced this pull request Feb 6, 2019

Merged

feat: whitelist Terser #567

@JordiAnderl
Copy link
Contributor

JordiAnderl left a comment

I'd have to take a look at the typings over at Terser since the last time I checked (and informed them of the existance of these typings) they seemed somewhat incomplete to me.

I'd have no issue with completing their typings and aproving the PR.

@Kocal

This comment has been minimized.

Copy link
Contributor Author

Kocal commented Feb 6, 2019

Actually, there is a lot of missing types in our @types/terser for the final user (the one which only use Terser to compress its JS), because it has not been updated for a long time (versions 3.8 vs 3.12).

A tons on properties in ParseOptions, CompressOptions, OutputOptions (...) are missing in our types.

For internal types (like Tree*, AST_*, ...) I can't confirm if they are complete and if there is any differences with our @types/terser.
But since terser-js/terser#121 got a lot of reviews, I think this is ok.

@Danscho

Danscho approved these changes Feb 6, 2019

Copy link
Contributor

Danscho left a comment

I have no problem with removing the typings here as the typings over a terser-js are more complete than these are. I just added the definitions I am using myself.

@JordiAnderl
Copy link
Contributor

JordiAnderl left a comment

It's better for terser-js to handle their types and update them as they see fit.

@Kocal

This comment has been minimized.

Copy link
Contributor Author

Kocal commented Feb 6, 2019

Yep 👍

Also, we just have to wait for Microsoft/types-publisher#567 to be merged and that will be good I guess.

@Kocal

This comment has been minimized.

Copy link
Contributor Author

Kocal commented Feb 9, 2019

The Travis build should pass but I can't restart it.

@typescript-bot

This comment has been minimized.

Copy link

typescript-bot commented Feb 12, 2019

@Kocal I haven't seen anything from you in a while and this PR currently has problems that prevent it from being merged. The PR will be closed tomorrow if there aren't new commits to fix the issues.

@Kocal

This comment has been minimized.

Copy link
Contributor Author

Kocal commented Feb 12, 2019

Well, I have nothing to push and I can't restart the build... 🤷‍♂️

@Kocal Kocal force-pushed the Kocal:feat/remove-terser-definitions branch from 977b601 to f3b348e Feb 12, 2019

@Kocal

This comment has been minimized.

Copy link
Contributor Author

Kocal commented Feb 12, 2019

Hum, even when rebasing the PR on master, I still have the error about dependency terser is not allowed to be install, even after my PR to whitelist it...
Is there something I'm missing??

@typescript-bot

This comment has been minimized.

Copy link

typescript-bot commented Feb 12, 2019

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

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

@Kocal

This comment has been minimized.

Copy link
Contributor Author

Kocal commented Feb 12, 2019

Ping @PranavSenthilnathan, thanks 🙂

@typescript-bot

This comment has been minimized.

Copy link

typescript-bot commented Feb 14, 2019

@Kocal Unfortunately, this pull request currently has a merge conflict 😥. Please update your PR branch to be up-to-date with respect to master. Have a nice day!

@sandersn

This comment has been minimized.

Copy link
Contributor

sandersn commented Feb 14, 2019

Weird, now it's failing with "unexpected semver" in notNeededPackages.json. All the other entries use "n.n.n" format instead of just "n.n" so I suspect that's the problem.

@Kocal

This comment has been minimized.

Copy link
Contributor Author

Kocal commented Feb 14, 2019

Ah weird, I will rebase, try with 3.12.0, and see what happens.

EDIT: Oh it works! Thanks for pointing out the format version, I will be more careful next time :)

@Kocal Kocal force-pushed the Kocal:feat/remove-terser-definitions branch from f3b348e to aa860de Feb 14, 2019

@typescript-bot typescript-bot moved this from Needs Author Attention to Check and Merge in Pull Request Status Board Feb 14, 2019

@typescript-bot

This comment has been minimized.

Copy link

typescript-bot commented Feb 14, 2019

A definition owner has approved this PR ⭐️. A maintainer will merge this PR shortly. If it shouldn't be merged yet, please leave a comment saying so and we'll wait. Thank you for your contribution to DefinitelyTyped!

@minestarks minestarks merged commit 010617d into DefinitelyTyped:master Feb 14, 2019

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details
@typescript-bot

This comment has been minimized.

Copy link

typescript-bot commented Feb 14, 2019

@typescript-bot typescript-bot removed this from Check and Merge in Pull Request Status Board Feb 14, 2019

@Kocal Kocal deleted the Kocal:feat/remove-terser-definitions branch Feb 15, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment