jscodeshift icon indicating copy to clipboard operation
jscodeshift copied to clipboard

change index.js point to './src/core' break test cases follow README

Open dead-horse opened this issue 8 years ago • 2 comments

this commit https://github.com/facebook/jscodeshift/commit/964f0a9c9182fe2172efc5c6c3ef6097ffe00e27 change index.js to module.exports = require('./src/core').

but https://github.com/facebook/jscodeshift#unit-testing use const defineTest = require('jscodeshift/dist/testUtils').defineTest;, that makes jscodeshift.registerMethods useless in our test case.

dead-horse avatar Jun 21 '17 04:06 dead-horse

You can use require('jscodeshift/src/testUtils') instead. But I agree that this dist/ / src/ situation is not ideal and confusing. Will have to think about how to solve that.

fkling avatar Jun 21 '17 15:06 fkling

yes, I can use require('jscodeshift/src/testUtils'), but it is a breaking change for user because it is recommend in README.

dead-horse avatar Jun 21 '17 15:06 dead-horse