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
path: root/lib
AgeCommit message (Collapse)Author
2019-06-11Merge branches 'update-travis-node-versions', 'change-carriage-returns' and ↵Rens Baardman
'fix-167-global-var-leakage'
2019-06-11Fix #167: non-enumerable globals are now also prefixed with `var`fix-167-global-var-leakageRens Baardman
2019-06-11Change line endings from carriage returns to line feedschange-carriage-returnsRens Baardman
2018-04-24Fix const regexJohannes Ewald
Fixes an issue where const wasn't properly detected when using destructering.
2018-04-10Merge branch 'master' into pr/origin/127Johannes 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-04-09Refactor babel plugin initialization in moduleEnv.jsJohannes Ewald
2018-04-09Remove unused path importJohannes Ewald
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.
2018-01-16use 'coffeescript' packageOded Niv
2017-11-15Make sure rewire is not using a .babelrc filejeroenvalcke
2017-11-13Require resolve babel plugin so it searches the plugin from the cwd()jeroenvalcke
2017-11-11Remove legacy code for node < 4Johannes Ewald
2017-11-11Update .travis.ymlJohannes Ewald
Remove unsupported node versions
2017-11-11Refactor codeJohannes Ewald
2017-11-08Remove opts and only use old load functionality for coffee scriptsjeroenvalcke
2017-10-19Add optional babel const to let parser.Jeroen Valcke
2016-07-01Add empty line after varJohannes Ewald
2016-05-18Only add .coffee to extensions if it was present beforeTim Schaub
2015-11-30Should not blow up on modules that export primitivesEli White
2015-11-16Move testLib into dedicated folder inside root folderJohannes Ewald
2015-11-14Move shared test cases into lib folderJohannes Ewald
Since new versions of npm respect the .npmignore even when it comes from git urls, we need to move the shared test cases into the lib folder in order to provide these cases to other modules which port rewire's functionality to other environments. As discussed at https://github.com/jhnns/rewire-webpack/pull/18
2015-10-13Make properties writableEli White
2015-04-28Fix issue where the strict mode was not detected when a comment was before ↵Johannes Ewald
"strict mode"; Fixes #54
2015-04-28Fix wrong commentsJohannes Ewald
2015-04-28Use IIFE like in ↵Johannes Ewald
https://github.com/jhnns/rewire-webpack/blob/e6ae0c2be0cd7d273ef272b91c2934ecf3447edf/lib/rewire.loader.js Closes #56
2015-04-28Try to require coffee-script on start-upJohannes Ewald
2015-02-23Fix problems when global objects like JSON, etc. have been rewiredJohannes Ewald
Fixes #40
2015-02-17Add possibility to mock undefined, implicit globalsJohannes Ewald
Fixes #35
2015-02-06Add support for dot notationJohannes Ewald
#39
2015-02-05Fix issues with reverting nested propertiesJohannes Ewald
Fixes #39
2015-01-16ignore invalid variable names during injection of global paramsZolmeister
2014-11-04Put src generator into dedicated module `getDefinePropertySrc()`Johannes Ewald
2014-11-04Fix shadowing of internal `module`, `exports` and `require` when a global ↵Johannes Ewald
counterpart exists @see https://github.com/jhnns/rewire-webpack/pull/6
2014-10-28mv var to top of function to be consistent with style in rest of fileRich Trott
2014-10-28fix leak, add test, for #33Rich Trott
2014-10-28Small refactoringsJohannes Ewald
2014-10-25rewire methods as non-enumerableNick Bottomley
2014-07-08Add promise feature to __with__Johannes Ewald
2014-07-08Move __with__-function into own moduleJohannes Ewald
2014-07-08Refactor code to match module styleJohannes Ewald
2014-07-07added __with__ function according to proposed syntax in issue #29Bob Pace
2014-07-01__set__ returns an 'undo' function that when invoked will restore the module ↵Bob Pace
to the values it had before it was called
2014-05-20Added fix for node 0.11.x testsJohannes Ewald
2014-05-20Added istanbul for test coverageJohannes Ewald
2013-10-01- removed client-side bundlers (for webpack support take a look at ↵jhnns
https://github.com/jhnns/rewire-webpack)
2013-03-13- Added deprecation warning for client-side bundlersJohannes Ewald
- Updated package.json for node v0.10 - Removed tests for client-side bundlers - Updated .travis.yml for node v0.10 - Updated README
2013-03-01support module that without last empty linesuisho
2013-02-23- added Coffee-Script support closes #8 (jashkenas/coffee-script#2707)Johannes Ewald
- renamed internalRewire.js to simply rewire.js - moved all the stuff related to manipulating the module environment to moduleEnv.js