Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/twbs/rewire.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-06-11Add Firefox compatibility to stack trace teststack-trace-test-firefoxRens Baardman
2018-04-24Fix const regexJohannes Ewald
Fixes an issue where const wasn't properly detected when using destructering.
2018-04-10Drop official node v4 supportJohannes Ewald
2018-04-10Maintain column width when transforming constsJohannes Ewald
2018-04-09Replace babel with a regex-based transformationJohannes Ewald
This regex replacement is not 100% safe because transforming JavaScript requires an actual parser. However, parsing (e.g. via babel) comes with its own problems because now the parser needs to be aware of syntax extensions which might not be supported by the parser, but the underlying JavaScript engine. In fact, rewire used to have babel in place but required an extra transform for the object spread operator (check out commit d9a81c0cdacf6995b24d205b4a2068adbd8b34ff or see https://github.com/jhnns/rewire/pull/128). It was also notable slower (see https://github.com/jhnns/rewire/issues/132). There is another issue: replacing const with let is not safe because of their different behavior. That's why we also have ESLint in place which tries to identify this error case. There is one edge case though: when a new syntax is used *and* a const re-assignment happens, rewire would compile happily in this situation but the actual code wouldn't work. However, since most projects have a seperate linting step which catches these const re-assignment errors anyway, it's probably still a reasonable trade-off. Fixes https://github.com/jhnns/rewire/issues/132
2018-01-24Add support for object spread/rest operator.Marko Žarković
Before this commit, using rewire on a module that had object spread/rest operator in it would throw an exception. Now it doesn't.
2017-11-15Remove Class tests because travis node 4.x tests fails (does not support ↵jeroenvalcke
classes yet)
2017-11-15Make sure rewire is not using a .babelrc filejeroenvalcke
2017-11-15Add line endjeroenvalcke
2017-11-15Add class testsjeroenvalcke
2017-11-11Update .travis.ymlJohannes Ewald
Remove unsupported node versions
2017-11-11Refactor codeJohannes Ewald
2017-10-20Update READMEJeroen Valcke
2017-10-20Add test to check if __filename and __dirname is correctJeroen Valcke
2017-10-20Added __set__ testsJeroen Valcke
2017-10-19Add optional babel const to let parser.Jeroen Valcke
2015-11-30Should not blow up on modules that export primitivesEli White
2015-11-16Move testLib into dedicated folder inside root folderJohannes Ewald