c873b4c8f24dedbcf6963dec107b0138c99defcebfef667f32476e8c3733f4733eda554307e13c4775f4638ffdc678ad1820e2bc2586842a609ae4473ac474 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211
  1. # Change Log
  2. All notable changes to this project will be documented in this file.
  3. The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
  4. ## [4.3.0] - 2023.01.20
  5. ### Added
  6. - Add public member `container` to `Iterator` which means the container that the iterator pointed to.
  7. ### Changed
  8. - Reimplement `Queue`, separate `Queue` from `Deque`.
  9. ## [4.2.0] - 2022.11.20
  10. ### Changed
  11. - Optimized the structure of class `TreeNodeEnableIndex`.
  12. - Change the `iterator access denied` error message to reduce the packing size.
  13. - Change the internal storage of the hash container to the form of a linked list, traversing in insertion order.
  14. - Standardize hash container. Make it extends from `Container` and add general functions.
  15. - Refactor `LinkList` to do optimization.
  16. ### Added
  17. - Add public `length` property to all the container.
  18. - Add returned value to `pop` function including `popBack` and `popFront` to all the container which has such function.
  19. - Add returned value to `eraseElementByKey` which means whether erase successfully.
  20. - Add returned value to `push` or `insert` function which means the size of the container.
  21. ### Fixed
  22. - Fixed wrong error type when `updateKeyByIterator`.
  23. - Fixed wrong iterator was returned when erase tree reverse iterator.
  24. ## [4.2.0-beta.1] - 2022.11.06
  25. ### Changed
  26. - Remove all the arrow function to optimize.
  27. - Modify `HashContainer` implementation to optimize.
  28. ## [4.2.0-beta.0] - 2022.10.30
  29. ### Added
  30. - Add `ts` sourcemap for debug mode.
  31. - Add `this` param for `forEach` function.
  32. - Support single package umd build.
  33. ### Changed
  34. - Changed the packaging method of isolation packages release and the method of the member export.
  35. ## [4.1.5] - 2022.09.30
  36. ### Added
  37. - Add `find`, `remove`, `updateItem` and `toArray` functions to `PriorityQueue`.
  38. - Support single package release (use scope @js-sdsl).
  39. ## [4.1.5-beta.1] - 2022.09.23
  40. ### Fixed
  41. - Get wrong tree index when size is 0.
  42. ## [4.1.5-beta.0] - 2022.09.23
  43. ### Added
  44. - Add `index` property to tree iterator which represents the sequential index of the iterator in the tree.
  45. ### Changed
  46. - Minimal optimization with private properties mangling, macro inlining and const enum.
  47. - Private properties are now mangled.
  48. - Remove `checkWithinAccessParams` function.
  49. - Constants of `HashContainer` are moved to `HashContainerConst` const enum.
  50. - The iteratorType parameter in the constructor now changed from `boolean` type to `IteratorType` const enum type.
  51. - The type of `TreeNode.color` is now changed from `boolean` to `TreeNodeColor` const enum.
  52. - Turn some member exports into export-only types.
  53. ### Fixed
  54. - Fixed wrong iterator error message.
  55. ## [4.1.4] - 2022.09.07
  56. ### Added
  57. - Add some notes.
  58. ### Changed
  59. - Optimize hash container.
  60. - Abstracting out the hash container.
  61. ### Fixed
  62. - Fixed tree get height function return one larger than the real height.
  63. - Tree-shaking not work in ES module.
  64. - `Queue` and `Deque` should return `undefined` when container is empty.
  65. ## [4.1.4-beta.0] - 2022.08.31
  66. ### Added
  67. - Add function update key by iterator.
  68. - Add iterator copy function to get a copy of itself.
  69. - Add insert by iterator hint function in tree container.
  70. ### Changed
  71. - Changed OrderedMap's iterator pointer get from `Object.defineProperty'` to `Proxy`.
  72. - Improve iterator performance by remove some judgment.
  73. - Change iterator type description from `normal` and `reverse` to boolean.
  74. ## [4.1.2-beta.0] - 2022.08.27
  75. ### Added
  76. - Make `SequentialContainer` and `TreeBaseContainer` export in the index.
  77. ### Changed
  78. - Change rbTree binary search from recursive to loop implementation (don't effect using).
  79. - Reduce memory waste during deque initialization.
  80. ### Fixed
  81. - Fixed priority queue not dereference on pop.
  82. ## [4.1.1] - 2022.08.23
  83. ### Fixed
  84. - Forgot to reset root node on rotation in red-black tree delete operation.
  85. - Fix iterator invalidation after tree container removes iterator.
  86. ## [4.1.0] - 2022.08.21
  87. ### Changed
  88. - Change some functions from recursive to loop implementation (don't effect using).
  89. - Change some iterator function parameter type.
  90. - Change commonjs target to `es6`.
  91. - Change `Deque` from sequential queue to circular queue.
  92. - Optimize so many places (don't affect using).
  93. ### Fixed
  94. - Fix `Vector` length bugs.
  95. ## [4.0.3] - 2022-08-13
  96. ### Changed
  97. - Change `if (this.empty())` to `if (!this.length)`.
  98. - Change some unit test.
  99. - Change class type and optimized type design.
  100. ### Fixed
  101. - Fix can push undefined to deque.
  102. ## [4.0.0] - 2022-07-30
  103. ### Changed
  104. - Remove InternalError error as much as possible (don't affect using).
  105. - Change `HashSet` api `eraseElementByValue`'s name to `eraseElementByKey`.
  106. - Change some unit tests to improve coverage (don't affect using).
  107. ## [4.0.0-beta.0] - 2022-07-24
  108. ### Added
  109. - Complete test examples (don't effect using).
  110. - The error thrown is standardized, you can catch it according to the error type.
  111. ### Changed
  112. - Refactor all container from function to class (don't affect using).
  113. - Abstracting tree containers and hash containers, change `Set`'s and `Map`'s name to `OrderedSet` and `OrderedMap` to distinguish it from the official container.
  114. - Change `OrderedSet` api `eraseElementByValue`'s name to `eraseElementByKey`.
  115. ### Fixed
  116. - Fixed so many bugs.
  117. ## [3.0.0-beta.0] - 2022-04-29
  118. ### Added
  119. - Bidirectional iterator is provided for all containers except Stack, Queue, HashSet and HashMap.
  120. - Added begin, end, rBegin and rEnd functions to some containers for using iterator.
  121. - Added `eraseElementByIterator` function.
  122. ### Changed
  123. - Changed Pair type `T, K` to `K, V` (don't affect using).
  124. - Changed `find`, `lowerBound`, `upperBound`, `reverseLowerBound` and `reverseUpperBound` function's returned value to `Iterator`.
  125. ### Fixed
  126. - Fixed an error when the insert value was 0.
  127. - Fixed the problem that the lower version browser does not recognize symbol Compilation error caused by iterator.