Shopify / javascript

The home for all things JavaScript at Shopify.
MIT License
253 stars 38 forks source link

`date_handler_test.coffee` shouldn't break private calls decaffing #183

Closed GoodForOneFare closed 8 years ago

GoodForOneFare commented 8 years ago

Note sure what's going on yet. I'll fill in details later.

test/javascripts/unit/modules/date_handler_test.coffee

TypeError: Cannot read property 'name' of undefined
    at getClassName (shopify-decaf/dist/index.js:591:51)
    at NodePath.<anonymous> (shopify-decaf/dist/index.js:620:78)
    at NodePath.<anonymous> (shopify-decaf/node_modules/jscodeshift/dist/collections/Node.js:134:58)
    at shopify-decaf/node_modules/jscodeshift/dist/Collection.js:92:25
    at Array.forEach (native)
    at Collection.forEach (shopify-decaf/node_modules/jscodeshift/dist/Collection.js:91:20)
    at Collection.replaceWith (shopify-decaf/node_modules/jscodeshift/dist/collections/Node.js:133:17)
    at Collection.typedMethod (shopify-decaf/node_modules/jscodeshift/dist/Collection.js:382:43)
    at mapClassPrivateCalls (shopify-decaf/dist/index.js:619:6)
    at shopify-decaf/dist/index.js:634:64
    at Array.map (native)
    at mapBlockStatements (shopify-decaf/dist/index.js:627:50)
    at mapBlockStatement (shopify-decaf/dist/index.js:699:23)
    at transpile (shopify-decaf/dist/index.js:1513:17)
    at shopify-decaf/dist/index.js:1550:12
    at shopify-decaf/node_modules/lodash/internal/createFlow.js:67:31
    at Object.compile (shopify-decaf/dist/index.js:1553:10)
    at transform (esify/lib/decaf.js:38:16)
GoodForOneFare commented 8 years ago

Similar errors in test/javascripts/unit/modules/shopify_mixin_test.coffee, test/theme-editor-javascripts/unit/picker_test.coffee, test/theme-editor-next-javascripts/unit/lib/properties_next_test.coffee.

GoodForOneFare commented 8 years ago

Fixed by https://github.com/Shopify/decaf/pull/13,