-
-
Notifications
You must be signed in to change notification settings - Fork 451
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
Feature: Passthru metadata #398
Conversation
8a23971
to
1ce6f1b
Compare
Codecov Report
@@ Coverage Diff @@
## master #398 +/- ##
==========================================
+ Coverage 83.03% 83.52% +0.49%
==========================================
Files 6 6
Lines 165 176 +11
Branches 38 39 +1
==========================================
+ Hits 137 147 +10
Misses 12 12
- Partials 16 17 +1
Continue to review full report at Codecov.
|
532fb02
to
9f94dee
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay after more thinking about it I think there is no other way to achieve this.
I made some comments about some minor changes. Can you address them?
src/index.js
Outdated
@@ -134,10 +146,16 @@ module.exports = function(source, inputSourceMap) { | |||
transform: transpile, | |||
}, function(err, result) { | |||
if (err) { return callback(err); } | |||
metadataSubscribers.map(function (s) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for .map()
. Can use .forEach()
src/index.js
Outdated
return callback(null, result.code, result.map); | ||
}); | ||
} | ||
|
||
const result = transpile(source, options); | ||
metadataSubscribers.map(function (s) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here
.gitignore
Outdated
@@ -4,3 +4,4 @@ lib | |||
node_modules | |||
npm-debug.log | |||
test/output | |||
.idea |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we please revert this. You should ignore this folder globally on your machine.
https://help.github.com/articles/ignoring-files/#create-a-global-gitignore
package.json
Outdated
@@ -32,6 +32,10 @@ | |||
"eslint-plugin-flowtype": "^2.25.0", | |||
"nyc": "^10.0.0", | |||
"rimraf": "^2.4.3", | |||
"react": "^15.1.0", | |||
"react-intl":"^2.1.2", | |||
"babel-plugin-react-intl": "2.1.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we do ^2.1.3
here so we test agains the latest version 2.3.0
Waho 🎉 ! Thanks so much @Ognian! Are there docs/examples anywhere for how to access the metadata now? |
* master: 6.4.0 Update CHANGELOG.md for 6.4.0 Optimize code after merge of #398 Update yarn.lock Sort package.json # Conflicts: # package.json # src/index.js # yarn.lock
Please Read the CONTRIBUTING Guidelines
In particular the portion on Commit Message Formatting
Please check if the PR fulfills these requirements
What kind of change does this PR introduce? (Bug fix, feature, docs update, ...)
What is the current behavior? (You can also link to an open issue here)
What is the new behavior?
Does this PR introduce a breaking change?
If this PR contains a breaking change, please describe the following...
Other information: