|
| 1 | +<a name="2.0.0"></a> |
| 2 | +# [2.0.0](https://github.com/karma-runner/karma-coverage/compare/v1.1.1...v2.0.0) (2019-08-20) |
| 3 | + |
| 4 | + |
| 5 | +### Bug Fixes |
| 6 | + |
| 7 | +* **build:** Update to lodash 4 ([d6d21d2](https://github.com/karma-runner/karma-coverage/commit/d6d21d2)), closes [#242](https://github.com/karma-runner/karma-coverage/issues/242) |
| 8 | +* **reporter:** replace colons in the output path ([3b2bffa](https://github.com/karma-runner/karma-coverage/commit/3b2bffa)) |
| 9 | +* bump lodash for CVE-2018-16487 ([15f8b12](https://github.com/karma-runner/karma-coverage/commit/15f8b12)) |
| 10 | + |
| 11 | + |
| 12 | +### Chores |
| 13 | + |
| 14 | +* Update travis config ([00090ea](https://github.com/karma-runner/karma-coverage/commit/00090ea)) |
| 15 | +* **deps:** Use latest istanbul lib packages ([#377](https://github.com/karma-runner/karma-coverage/issues/377)) ([f40d6af](https://github.com/karma-runner/karma-coverage/commit/f40d6af)) |
| 16 | + |
| 17 | + |
| 18 | +### BREAKING CHANGES |
| 19 | + |
| 20 | +* **deps:** This set of changes may impact some use cases. |
| 21 | + |
| 22 | +* chore: Add Updated Istanbul Dependencies |
| 23 | + |
| 24 | +The istanbul package is deprecated in favor several split packages that |
| 25 | +control different aspects of how istanbul works. This commit adds the |
| 26 | +recommended packages that will be used in future commits as |
| 27 | +karma-coverage's usage of istanbul is updated to the latest api. |
| 28 | + |
| 29 | +* refactor(reporter): Follow new report API |
| 30 | + |
| 31 | +This commit refactors the in memory report implementation to use the new |
| 32 | +istanbul report API. |
| 33 | + |
| 34 | +Report creation is removed from newer versions of the istanbul API, so |
| 35 | +this commit adds a set of utility functions to wrap around the new API |
| 36 | +and provide similar functionality as the old API. The top level export |
| 37 | +uses the new utility function to register the in-memory report. |
| 38 | + |
| 39 | +* refactor(preprocessor): Switch to istanbul-lib-instrument |
| 40 | + |
| 41 | +This commit updates the preprocessor to use istanbul-lib-instrument |
| 42 | +instead of the deprecated istanbul package. The biggest change in this |
| 43 | +refactor is using a callable function instead of a constructor when |
| 44 | +creating instrumenters |
| 45 | + |
| 46 | +The old istanbul package exposed the Instrumenter directly, allowing the |
| 47 | +preprocessor to create an instance of it. istanbul-lib-instrument, |
| 48 | +however, exposes a callable function that creates an Instrumenter. |
| 49 | +This commit updates the preprocessor to follow this new pattern of using |
| 50 | +a callable function. In order to ensure backwards compatibility, a |
| 51 | +utility function is added to wrap constructors with a callable function |
| 52 | +for creation automatically. |
| 53 | + |
| 54 | +This change allows the following configuration for creating instrumenters: |
| 55 | +1. An object that contains an Instrumenter constructor |
| 56 | +2. An Instrumenter constructor itself |
| 57 | +3. A callable function that returns an Instrumenter instance. |
| 58 | + |
| 59 | +This commit also uses the istanbul-lib-source-maps package to handle |
| 60 | +storing source maps. A global source map store registers source maps so |
| 61 | +they can be used later on in the reporter. |
| 62 | + |
| 63 | +* refactor(reporter): Switch to istanbul-lib-coverage |
| 64 | + |
| 65 | +This commit updates the reporter by using the istanbul-lib-coverage |
| 66 | +package api for handling coverage checking/management and the |
| 67 | +istanbul-lib-report package api for handling reporting. |
| 68 | + |
| 69 | +The new apis remove the need for collectors and remove the need to |
| 70 | +handle disposing collectors. |
| 71 | + |
| 72 | +* refactor: Remove unused source cache utilities |
| 73 | + |
| 74 | +This commit removes the source-cache-store and source-cache files as |
| 75 | +they are no longer being used. The source-map-store and |
| 76 | +istanbul-lib-source-maps are used instead, so these files are no longer |
| 77 | +needed. |
| 78 | + |
| 79 | +* feat(util): Add Reset Functionality |
| 80 | + |
| 81 | +This commit updates the report creator utility to allow resetting the |
| 82 | +custom reporter map. |
| 83 | + |
| 84 | +* fix(preprocessor): Track Coverage Maps Properly |
| 85 | + |
| 86 | +This commit updates the preprocessor to properly access file coverage |
| 87 | +when storing it in the global coverage map (when includeAllSources is |
| 88 | +true). The previous method did not work because the returned |
| 89 | +instrumented code from the default istanbul instrumenter returns the |
| 90 | +coverage map in a POJO object instead of JSON notation. This breaks the |
| 91 | +coverage regex used to match and parse the coverage map. |
| 92 | + |
| 93 | +The istanbul instrumenter offers the ability to receive the coverage map |
| 94 | +for the last instrumented file through a separate function, so that is |
| 95 | +tested for and used if it is supported. The original method is used as a |
| 96 | +fallback for backwards compatibility. |
| 97 | + |
| 98 | +This commit also addresses changes from the v0 instanbul instrumenter |
| 99 | +options. The changes are additive only to maintain backwards compatibility |
| 100 | +for other instrumenters. |
| 101 | + |
| 102 | +* fix(reporter): Access Data Properly to Check Coverage |
| 103 | + |
| 104 | +This commit fixes errors with accessing data properly during the |
| 105 | +checkCoverage method. A previous commit updated the implementation to |
| 106 | +use istanbul-lib-coverage, but this involved an api change to access the |
| 107 | +raw coverage data (which checkCoverage uses). |
| 108 | + |
| 109 | +This commit also fixes the checking coverage for each file by using a |
| 110 | +map to store file coverage summaries instead of merging summaries like |
| 111 | +the global results. Per file coverage now works as expected. |
| 112 | + |
| 113 | +* test: Update Unit Tests to use new Istanbul API |
| 114 | + |
| 115 | +This commit updates the mocking done in unit tests to properly mock the |
| 116 | +new istanbul API. Additionally, new unit test suites are added for the |
| 117 | +utility methods report-creator and source-map-store. |
| 118 | +* drop support for node < 8 |
| 119 | +* **reporter:** the output folder names change, they no longer contain `:` |
| 120 | + |
| 121 | + |
| 122 | + |
1 | 123 | <a name="1.1.2"></a>
|
2 | 124 | ## [1.1.2](https://github.com/karma-runner/karma-coverage/compare/v1.1.1...v1.1.2) (2018-05-03)
|
3 | 125 |
|
|
0 commit comments