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 to Terser v5 #237

Merged
merged 5 commits into from
Sep 4, 2020
Merged

Update to Terser v5 #237

merged 5 commits into from
Sep 4, 2020

Conversation

theenadayalank
Copy link
Contributor

@theenadayalank theenadayalank commented Aug 25, 2020

Implemented #235

Also fixes ember-cli/ember-cli#9290.

This PR upgrades the terser version from 4.8.0 to 5.2.1.

This new terser version introduces the following breakages (changelog).

  • minify() is now async and rejects a promise instead of returning an error. [introduced bug in test]
  • Internal AST is no longer exposed so that it can be improved without releasing breaking changes.
  • Lowest supported node version is 10
  • There are no more warnings being emitted

@theenadayalank theenadayalank changed the title bump terser from v4.8.0 to v5.2.1 Update to terser v5 Aug 25, 2020
@theenadayalank
Copy link
Contributor Author

theenadayalank commented Aug 26, 2020

since the terser.minify function is now asynchronous by default, what will be the case of uglify.async property? Will minify() be async by default? (terser doesn't provide any option to make it sync)

@rwjblue

Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

This looks good, thanks for picking it up! I would like to separate the dropping Node versions (a breaking change) from the updating of Terser (other than Node version support changes, this doesn't introduce breaking changes to our users)...

.travis.yml Outdated Show resolved Hide resolved
lib/process-file.js Outdated Show resolved Hide resolved
index.js Outdated Show resolved Hide resolved
test/test.js Show resolved Hide resolved
Copy link
Member

@rwjblue rwjblue left a comment

Choose a reason for hiding this comment

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

Thank you!

@rwjblue rwjblue merged commit 9b60926 into ember-cli:master Sep 4, 2020
@rwjblue rwjblue changed the title Update to terser v5 Update to Terser v5 Sep 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Nullish coalescing / optional chaining support without IE11 in targets
2 participants