New major version.
There will be some minor breaking changes, but the footprint will be tiny. Here are the key topics:
Convert prettydiff from an object to a function
Calling the application will be prettydiff() instead of prettydiff.mode(options).
Fix an internal data caching problem
Currently some options are internally modified as a way to store values when moving between libraries recursively. This breaks in the case where prettydiff runs multiple times from an object in memory.
This effort will eliminate options end and start. It will also find a different way to map indentation level when moving between libraries.
See:
Build new files instead of modifying js files compiled from TypeScript
TypeScript 3.4 will be releasing soon and it will feature incremental compilation. As I have tested this against the parser and Pretty Diff the incremental compiling reduces compile time from about 4.7-5.2s to about 2.1-2.3s.
TypeScript incremental compilation is great in that it reduces compile time by more than half, but its not all sunshine. In order for incremental builds to work there needs to be a frame of reference so that the compiler can know what has changed and only compile against the changes. Unfortunately the frame of reference is the JavaScript output opposed to the TypeScript source files.
Currently Pretty Diff modifies JavaScript files produced by TypeScript during its build process. This continues to result in no problems when running the full regular TypeScript compile process. It confuses the compiler though when running in incremental mode resulting in appending to JavaScript files instead of overwriting them.
Bottom line: never modify JavaScript files produced by TypeScript.
New major version.
There will be some minor breaking changes, but the footprint will be tiny. Here are the key topics:
Convert
prettydifffrom an object to a functionCalling the application will be
prettydiff()instead ofprettydiff.mode(options).Fix an internal data caching problem
Currently some options are internally modified as a way to store values when moving between libraries recursively. This breaks in the case where prettydiff runs multiple times from an object in memory.
This effort will eliminate options end and start. It will also find a different way to map indentation level when moving between libraries.
See:
Build new files instead of modifying js files compiled from TypeScript
TypeScript 3.4 will be releasing soon and it will feature incremental compilation. As I have tested this against the parser and Pretty Diff the incremental compiling reduces compile time from about 4.7-5.2s to about 2.1-2.3s.
TypeScript incremental compilation is great in that it reduces compile time by more than half, but its not all sunshine. In order for incremental builds to work there needs to be a frame of reference so that the compiler can know what has changed and only compile against the changes. Unfortunately the frame of reference is the JavaScript output opposed to the TypeScript source files.
Currently Pretty Diff modifies JavaScript files produced by TypeScript during its build process. This continues to result in no problems when running the full regular TypeScript compile process. It confuses the compiler though when running in incremental mode resulting in appending to JavaScript files instead of overwriting them.
Bottom line: never modify JavaScript files produced by TypeScript.