Skip to content
This repository was archived by the owner on Feb 8, 2020. It is now read-only.

Conversation

@ericmorand
Copy link
Contributor

(a = (doSomething(), doSomethingElse(), true)) => {} is a prefectly valid syntax that is used
extensively by code instrumenters. When a list of expressions is used as a default value, only the
last expression is the actual default value. This commit add support for this syntax.
TAG: latest

fixes #110

I didn't add a plugin. I think it makes more sense to improve the existing plugin that deals with params since the scope of this change is the params and nothing else.

Tests were added and code coverage preserved.

(a = (doSomething(), doSomethingElse(), true)) => {} is a prefectly valid syntax that is used
extensively by code instrumenters. When a list of expressions is used as a default value, only the
last expression is the actual default value. This commit add support for this syntax.
TAG: latest

fixes tunnckoCore#110
@codecov
Copy link

codecov bot commented Feb 9, 2018

Codecov Report

Merging #111 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #111   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           6      6           
  Lines          90     96    +6     
=====================================
+ Hits           90     96    +6
Impacted Files Coverage Δ
src/lib/plugins/params.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f96b70d...c2303e6. Read the comment docs.

@tunnckoCore
Copy link
Owner

Great! ❤️ Thanks, I'll merge soon. But just should recheck what's up with the new-release GitHub App. Probably moved to frozen state...

@tunnckoCore tunnckoCore self-assigned this Feb 9, 2018
@tunnckoCore tunnckoCore merged commit d9e6102 into tunnckoCore:master Feb 10, 2018
@tunnckoCore
Copy link
Owner

tunnckoCore commented Feb 10, 2018

Hoping refreshed new-release app to work and this to get released 🙏

@tunnckoCore
Copy link
Owner

tunnckoCore commented Feb 10, 2018

Yeaaah!! 🎉 And there it go :) 💯 https://github.com/tunnckoCore/parse-function/releases/tag/v5.1.0

GitHub
parse-function - 🔱 Parse a function into an object using espree, acorn or babylon parsers. Extensible through Smart Plugins.

@ericmorand
Copy link
Contributor Author

I think you broke something :D

There is no dist/index.js in the final package. Only dist/test.js.

@tunnckoCore
Copy link
Owner

damn.. :D probably..

tunnckoCore pushed a commit that referenced this pull request Feb 10, 2018
@tunnckoCore
Copy link
Owner

Yup. Should work now. 🥇

@ericmorand
Copy link
Contributor Author

Awesome! 👍

I just built Twing using parse-function 5.1.1, removing my custom code that worked around instrumentation problem, and it's perfect. Thanks a lot!

@tunnckoCore
Copy link
Owner

Sweeet :) It's big pleasure to develop with such workflow 💃

@tunnckoCore
Copy link
Owner

tunnckoCore commented Mar 7, 2018

Just to notify that it includes dist from https://github.com/tunnckoCore/parse-function/releases/tag/v5.2.1 and won't have such problems in future. :)

GitHub
parse-function - 🔱 Parse a function into an object using espree, acorn or babylon parsers. Extensible through Smart Plugins.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Bug with arguments default value consisting of a list of expressions

2 participants