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

Add new cmdline option to denote implicit returns #3758

Closed

Conversation

plroebuck
Copy link
Contributor

@plroebuck plroebuck commented Feb 21, 2019

Description of the Change

Coffeescript automatically returns the result of the last expression (implicit return).
The change made to deprecate suites returning a value causes a warning for every describe. This adds a cmdline option which can disable the deprecation warning.

Alternate Designs

Simplest and most expedient solution.

Why should this be in core?

NA - already in core

Benefits

Allows CoffeeScript users to upgrade.

Possible Drawbacks

None

Applicable issues

Fixes #3744
Original PR #3243
semver-patch

CoffeeScript has implicit returns. The change made to deprecate suites returning a value causes a
warning for _every_ `describe`. This adds a cmdline option to disable the deprecation warning.

Fixes #3744
@plroebuck plroebuck added type: bug a defect, confirmed by a maintainer area: usability concerning user experience or interface semver-patch implementation requires increase of "patch" version number; "bug fixes" area: node.js command-line-or-Node.js-specific area: integrations related to working with 3rd party software (e.g., babel, typescript) labels Feb 21, 2019
@plroebuck plroebuck added this to the next milestone Feb 21, 2019
@plroebuck plroebuck self-assigned this Feb 21, 2019
@plroebuck
Copy link
Contributor Author

This is quick patch only. Not married to option name, not sure which group it belongs in either.
But it does fix the problem.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.006%) to 91.728% when pulling 76fa998 on plroebuck/suppress-deprecation-for-coffeescript into 00f2ed9 on master.

Copy link
Member

@boneskull boneskull left a comment

Choose a reason for hiding this comment

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

this shouldn't be a new option.

also: this should not warn on every describe. If it does, then the deprecation function is broken.

I can think of a couple other things to do. will respond in #3744.

@boneskull
Copy link
Member

recommend this be closed

@plroebuck plroebuck closed this Feb 21, 2019
@boneskull boneskull removed this from the next milestone Feb 21, 2019
@juergba juergba deleted the plroebuck/suppress-deprecation-for-coffeescript branch August 24, 2019 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: integrations related to working with 3rd party software (e.g., babel, typescript) area: node.js command-line-or-Node.js-specific area: usability concerning user experience or interface semver-patch implementation requires increase of "patch" version number; "bug fixes" type: bug a defect, confirmed by a maintainer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants