Last active
August 29, 2015 14:13
-
-
Save zaim/c71e3c21c081cd254da7 to your computer and use it in GitHub Desktop.
Trying out 6to5 - got AssertionError
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function allcaps (words) { | |
// trying out fat arrows | |
return words.map(w => w.toUpperCase()); | |
} | |
module.exports = allcaps; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ node -v; node run.js | |
v0.10.35 | |
/Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/node_modules/6to5/node_modules/ast-types/lib/path-visitor.js:135 | |
assert.ok(path instanceof NodePath); | |
^ | |
AssertionError: /Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/allcaps.js: false == true | |
at Visitor.PVp.visitWithoutReset (/Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/node_modules/6to5/node_modules/ast-types/lib/path-visitor.js:135:12) | |
at Visitor.PVp.visit (/Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/node_modules/6to5/node_modules/ast-types/lib/path-visitor.js:117:21) | |
at Function.transform (/Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/node_modules/6to5/node_modules/regenerator/lib/visit.js:31:18) | |
at Object.exports.ast.before (/Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/node_modules/6to5/lib/6to5/transformation/transformers/es6-generators.js:5:17) | |
at Transformer.astRun (/Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/node_modules/6to5/lib/6to5/transformation/transformer.js:52:25) | |
at Transformer.transform (/Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/node_modules/6to5/lib/6to5/transformation/transformer.js:72:8) | |
at /Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/node_modules/6to5/lib/6to5/file.js:260:17 | |
at Function.forEach (/Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/node_modules/6to5/node_modules/lodash/dist/lodash.js:3297:15) | |
at File.transform (/Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/node_modules/6to5/lib/6to5/file.js:259:5) | |
at /Users/zaim/Projects/_scratch/c71e3c21c081cd254da7/node_modules/6to5/lib/6to5/file.js:239:10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "test-6to5", | |
"private": true, | |
"dependencies": { | |
"6to5": "^2.11.3" | |
}, | |
"jshintConfig": { | |
"esnext": true | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require('6to5/register'); | |
var allcaps = require('./allcaps'); | |
if (require.main === module) { | |
// should log ['HELLO', 'ES6', 'WORLD'] | |
console.log(allcaps(['hello', 'es6', 'world'])); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
FIXED
For people stumbling on here, this issue is fixed in 6to5 v2.11.4 😄