@fluidframework/sequence 1.4.0-121020 → 2.0.0-dev-rc.1.0.0.225277

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (350) hide show
  1. package/.eslintrc.js +9 -11
  2. package/.mocharc.js +12 -0
  3. package/CHANGELOG.md +449 -0
  4. package/README.md +364 -183
  5. package/api-extractor-esm.json +4 -0
  6. package/api-extractor-lint.json +4 -0
  7. package/api-extractor.json +2 -2
  8. package/api-report/sequence.api.md +734 -0
  9. package/dist/{defaultMap.js → defaultMap.cjs} +38 -26
  10. package/dist/defaultMap.cjs.map +1 -0
  11. package/dist/defaultMap.d.ts +7 -6
  12. package/dist/defaultMap.d.ts.map +1 -1
  13. package/dist/defaultMapInterfaces.cjs +7 -0
  14. package/dist/defaultMapInterfaces.cjs.map +1 -0
  15. package/dist/defaultMapInterfaces.d.ts +45 -12
  16. package/dist/defaultMapInterfaces.d.ts.map +1 -1
  17. package/dist/index.cjs +60 -0
  18. package/dist/index.cjs.map +1 -0
  19. package/dist/index.d.ts +14 -12
  20. package/dist/index.d.ts.map +1 -1
  21. package/dist/intervalCollection.cjs +1193 -0
  22. package/dist/intervalCollection.cjs.map +1 -0
  23. package/dist/intervalCollection.d.ts +448 -162
  24. package/dist/intervalCollection.d.ts.map +1 -1
  25. package/dist/intervalIndex/endpointInRangeIndex.cjs +66 -0
  26. package/dist/intervalIndex/endpointInRangeIndex.cjs.map +1 -0
  27. package/dist/intervalIndex/endpointInRangeIndex.d.ts +34 -0
  28. package/dist/intervalIndex/endpointInRangeIndex.d.ts.map +1 -0
  29. package/dist/intervalIndex/endpointIndex.cjs +47 -0
  30. package/dist/intervalIndex/endpointIndex.cjs.map +1 -0
  31. package/dist/intervalIndex/endpointIndex.d.ts +38 -0
  32. package/dist/intervalIndex/endpointIndex.d.ts.map +1 -0
  33. package/dist/intervalIndex/idIntervalIndex.cjs +44 -0
  34. package/dist/intervalIndex/idIntervalIndex.cjs.map +1 -0
  35. package/dist/intervalIndex/idIntervalIndex.d.ts +18 -0
  36. package/dist/intervalIndex/idIntervalIndex.d.ts.map +1 -0
  37. package/dist/intervalIndex/index.cjs +24 -0
  38. package/dist/intervalIndex/index.cjs.map +1 -0
  39. package/dist/intervalIndex/index.d.ts +13 -0
  40. package/dist/intervalIndex/index.d.ts.map +1 -0
  41. package/dist/{defaultMapInterfaces.js → intervalIndex/intervalIndex.cjs} +1 -1
  42. package/dist/intervalIndex/intervalIndex.cjs.map +1 -0
  43. package/dist/intervalIndex/intervalIndex.d.ts +30 -0
  44. package/dist/intervalIndex/intervalIndex.d.ts.map +1 -0
  45. package/dist/intervalIndex/intervalIndexUtils.cjs +22 -0
  46. package/dist/intervalIndex/intervalIndexUtils.cjs.map +1 -0
  47. package/dist/intervalIndex/intervalIndexUtils.d.ts +17 -0
  48. package/dist/intervalIndex/intervalIndexUtils.d.ts.map +1 -0
  49. package/dist/intervalIndex/overlappingIntervalsIndex.cjs +116 -0
  50. package/dist/intervalIndex/overlappingIntervalsIndex.cjs.map +1 -0
  51. package/dist/intervalIndex/overlappingIntervalsIndex.d.ts +44 -0
  52. package/dist/intervalIndex/overlappingIntervalsIndex.d.ts.map +1 -0
  53. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.cjs +41 -0
  54. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.cjs.map +1 -0
  55. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.d.ts +11 -0
  56. package/dist/intervalIndex/overlappingSequenceIntervalsIndex.d.ts.map +1 -0
  57. package/dist/intervalIndex/sequenceIntervalIndexes.cjs +7 -0
  58. package/dist/intervalIndex/sequenceIntervalIndexes.cjs.map +1 -0
  59. package/dist/intervalIndex/sequenceIntervalIndexes.d.ts +35 -0
  60. package/dist/intervalIndex/sequenceIntervalIndexes.d.ts.map +1 -0
  61. package/dist/intervalIndex/startpointInRangeIndex.cjs +66 -0
  62. package/dist/intervalIndex/startpointInRangeIndex.cjs.map +1 -0
  63. package/dist/intervalIndex/startpointInRangeIndex.d.ts +34 -0
  64. package/dist/intervalIndex/startpointInRangeIndex.d.ts.map +1 -0
  65. package/dist/intervalTree.cjs +80 -0
  66. package/dist/intervalTree.cjs.map +1 -0
  67. package/dist/intervalTree.d.ts +24 -0
  68. package/dist/intervalTree.d.ts.map +1 -0
  69. package/dist/intervals/index.cjs +24 -0
  70. package/dist/intervals/index.cjs.map +1 -0
  71. package/dist/intervals/index.d.ts +8 -0
  72. package/dist/intervals/index.d.ts.map +1 -0
  73. package/dist/intervals/interval.cjs +181 -0
  74. package/dist/intervals/interval.cjs.map +1 -0
  75. package/dist/intervals/interval.d.ts +84 -0
  76. package/dist/intervals/interval.d.ts.map +1 -0
  77. package/dist/intervals/intervalUtils.cjs +90 -0
  78. package/dist/intervals/intervalUtils.cjs.map +1 -0
  79. package/dist/intervals/intervalUtils.d.ts +240 -0
  80. package/dist/intervals/intervalUtils.d.ts.map +1 -0
  81. package/dist/intervals/sequenceInterval.cjs +378 -0
  82. package/dist/intervals/sequenceInterval.cjs.map +1 -0
  83. package/dist/intervals/sequenceInterval.d.ts +137 -0
  84. package/dist/intervals/sequenceInterval.d.ts.map +1 -0
  85. package/dist/{localValues.js → localValues.cjs} +1 -1
  86. package/dist/localValues.cjs.map +1 -0
  87. package/dist/localValues.d.ts +2 -1
  88. package/dist/localValues.d.ts.map +1 -1
  89. package/dist/{packageVersion.js → packageVersion.cjs} +2 -2
  90. package/dist/packageVersion.cjs.map +1 -0
  91. package/dist/packageVersion.d.ts +1 -1
  92. package/dist/packageVersion.d.ts.map +1 -1
  93. package/dist/revertibles.cjs +425 -0
  94. package/dist/revertibles.cjs.map +1 -0
  95. package/dist/revertibles.d.ts +86 -0
  96. package/dist/revertibles.d.ts.map +1 -0
  97. package/dist/sequence-alpha.d.ts +1290 -0
  98. package/dist/sequence-beta.d.ts +244 -0
  99. package/dist/sequence-public.d.ts +244 -0
  100. package/dist/sequence-untrimmed.d.ts +1778 -0
  101. package/dist/{sequence.js → sequence.cjs} +230 -156
  102. package/dist/sequence.cjs.map +1 -0
  103. package/dist/sequence.d.ts +125 -48
  104. package/dist/sequence.d.ts.map +1 -1
  105. package/dist/{sequenceDeltaEvent.js → sequenceDeltaEvent.cjs} +18 -8
  106. package/dist/sequenceDeltaEvent.cjs.map +1 -0
  107. package/dist/sequenceDeltaEvent.d.ts +24 -7
  108. package/dist/sequenceDeltaEvent.d.ts.map +1 -1
  109. package/dist/sequenceFactory.cjs +55 -0
  110. package/dist/sequenceFactory.cjs.map +1 -0
  111. package/dist/sequenceFactory.d.ts +3 -89
  112. package/dist/sequenceFactory.d.ts.map +1 -1
  113. package/dist/{sharedIntervalCollection.js → sharedIntervalCollection.cjs} +17 -22
  114. package/dist/sharedIntervalCollection.cjs.map +1 -0
  115. package/dist/sharedIntervalCollection.d.ts +12 -12
  116. package/dist/sharedIntervalCollection.d.ts.map +1 -1
  117. package/dist/{sharedSequence.js → sharedSequence.cjs} +29 -22
  118. package/dist/sharedSequence.cjs.map +1 -0
  119. package/dist/sharedSequence.d.ts +14 -2
  120. package/dist/sharedSequence.d.ts.map +1 -1
  121. package/dist/sharedString.cjs +274 -0
  122. package/dist/sharedString.cjs.map +1 -0
  123. package/dist/sharedString.d.ts +49 -26
  124. package/dist/sharedString.d.ts.map +1 -1
  125. package/dist/tsdoc-metadata.json +11 -0
  126. package/lib/{defaultMap.d.ts → defaultMap.d.mts} +8 -7
  127. package/lib/defaultMap.d.mts.map +1 -0
  128. package/lib/{defaultMap.js → defaultMap.mjs} +38 -26
  129. package/lib/defaultMap.mjs.map +1 -0
  130. package/lib/{defaultMapInterfaces.d.ts → defaultMapInterfaces.d.mts} +46 -13
  131. package/lib/defaultMapInterfaces.d.mts.map +1 -0
  132. package/lib/defaultMapInterfaces.mjs +6 -0
  133. package/lib/defaultMapInterfaces.mjs.map +1 -0
  134. package/lib/index.d.mts +17 -0
  135. package/lib/index.d.mts.map +1 -0
  136. package/lib/index.mjs +16 -0
  137. package/lib/index.mjs.map +1 -0
  138. package/lib/intervalCollection.d.mts +556 -0
  139. package/lib/intervalCollection.d.mts.map +1 -0
  140. package/lib/intervalCollection.mjs +1178 -0
  141. package/lib/intervalCollection.mjs.map +1 -0
  142. package/lib/intervalIndex/endpointInRangeIndex.d.mts +34 -0
  143. package/lib/intervalIndex/endpointInRangeIndex.d.mts.map +1 -0
  144. package/lib/intervalIndex/endpointInRangeIndex.mjs +61 -0
  145. package/lib/intervalIndex/endpointInRangeIndex.mjs.map +1 -0
  146. package/lib/intervalIndex/endpointIndex.d.mts +38 -0
  147. package/lib/intervalIndex/endpointIndex.d.mts.map +1 -0
  148. package/lib/intervalIndex/endpointIndex.mjs +42 -0
  149. package/lib/intervalIndex/endpointIndex.mjs.map +1 -0
  150. package/lib/intervalIndex/idIntervalIndex.d.mts +18 -0
  151. package/lib/intervalIndex/idIntervalIndex.d.mts.map +1 -0
  152. package/lib/intervalIndex/idIntervalIndex.mjs +40 -0
  153. package/lib/intervalIndex/idIntervalIndex.mjs.map +1 -0
  154. package/lib/intervalIndex/index.d.mts +13 -0
  155. package/lib/intervalIndex/index.d.mts.map +1 -0
  156. package/lib/intervalIndex/index.mjs +11 -0
  157. package/lib/intervalIndex/index.mjs.map +1 -0
  158. package/lib/intervalIndex/intervalIndex.d.mts +30 -0
  159. package/lib/intervalIndex/intervalIndex.d.mts.map +1 -0
  160. package/lib/{defaultMapInterfaces.js → intervalIndex/intervalIndex.mjs} +1 -1
  161. package/lib/intervalIndex/intervalIndex.mjs.map +1 -0
  162. package/lib/intervalIndex/intervalIndexUtils.d.mts +17 -0
  163. package/lib/intervalIndex/intervalIndexUtils.d.mts.map +1 -0
  164. package/lib/intervalIndex/intervalIndexUtils.mjs +18 -0
  165. package/lib/intervalIndex/intervalIndexUtils.mjs.map +1 -0
  166. package/lib/intervalIndex/overlappingIntervalsIndex.d.mts +44 -0
  167. package/lib/intervalIndex/overlappingIntervalsIndex.d.mts.map +1 -0
  168. package/lib/intervalIndex/overlappingIntervalsIndex.mjs +111 -0
  169. package/lib/intervalIndex/overlappingIntervalsIndex.mjs.map +1 -0
  170. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.d.mts +11 -0
  171. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.d.mts.map +1 -0
  172. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.mjs +37 -0
  173. package/lib/intervalIndex/overlappingSequenceIntervalsIndex.mjs.map +1 -0
  174. package/lib/intervalIndex/sequenceIntervalIndexes.d.mts +35 -0
  175. package/lib/intervalIndex/sequenceIntervalIndexes.d.mts.map +1 -0
  176. package/lib/intervalIndex/sequenceIntervalIndexes.mjs +6 -0
  177. package/lib/intervalIndex/sequenceIntervalIndexes.mjs.map +1 -0
  178. package/lib/intervalIndex/startpointInRangeIndex.d.mts +34 -0
  179. package/lib/intervalIndex/startpointInRangeIndex.d.mts.map +1 -0
  180. package/lib/intervalIndex/startpointInRangeIndex.mjs +61 -0
  181. package/lib/intervalIndex/startpointInRangeIndex.mjs.map +1 -0
  182. package/lib/intervalTree.d.mts +24 -0
  183. package/lib/intervalTree.d.mts.map +1 -0
  184. package/lib/intervalTree.mjs +76 -0
  185. package/lib/intervalTree.mjs.map +1 -0
  186. package/lib/intervals/index.d.mts +8 -0
  187. package/lib/intervals/index.d.mts.map +1 -0
  188. package/lib/intervals/index.mjs +8 -0
  189. package/lib/intervals/index.mjs.map +1 -0
  190. package/lib/intervals/interval.d.mts +84 -0
  191. package/lib/intervals/interval.d.mts.map +1 -0
  192. package/lib/intervals/interval.mjs +176 -0
  193. package/lib/intervals/interval.mjs.map +1 -0
  194. package/lib/intervals/intervalUtils.d.mts +240 -0
  195. package/lib/intervals/intervalUtils.d.mts.map +1 -0
  196. package/lib/intervals/intervalUtils.mjs +84 -0
  197. package/lib/intervals/intervalUtils.mjs.map +1 -0
  198. package/lib/intervals/sequenceInterval.d.mts +137 -0
  199. package/lib/intervals/sequenceInterval.d.mts.map +1 -0
  200. package/lib/intervals/sequenceInterval.mjs +370 -0
  201. package/lib/intervals/sequenceInterval.mjs.map +1 -0
  202. package/lib/{localValues.d.ts → localValues.d.mts} +4 -3
  203. package/lib/localValues.d.mts.map +1 -0
  204. package/lib/{localValues.js → localValues.mjs} +2 -2
  205. package/lib/localValues.mjs.map +1 -0
  206. package/lib/{packageVersion.d.ts → packageVersion.d.mts} +2 -2
  207. package/lib/packageVersion.d.mts.map +1 -0
  208. package/lib/{packageVersion.js → packageVersion.mjs} +2 -2
  209. package/lib/packageVersion.mjs.map +1 -0
  210. package/lib/revertibles.d.mts +86 -0
  211. package/lib/revertibles.d.mts.map +1 -0
  212. package/lib/revertibles.mjs +416 -0
  213. package/lib/revertibles.mjs.map +1 -0
  214. package/lib/sequence-alpha.d.mts +1277 -0
  215. package/lib/sequence-beta.d.mts +231 -0
  216. package/lib/sequence-public.d.mts +231 -0
  217. package/lib/sequence-untrimmed.d.mts +1765 -0
  218. package/lib/{sequence.d.ts → sequence.d.mts} +128 -51
  219. package/lib/sequence.d.mts.map +1 -0
  220. package/lib/{sequence.js → sequence.mjs} +229 -152
  221. package/lib/sequence.mjs.map +1 -0
  222. package/lib/{sequenceDeltaEvent.d.ts → sequenceDeltaEvent.d.mts} +25 -8
  223. package/lib/sequenceDeltaEvent.d.mts.map +1 -0
  224. package/lib/{sequenceDeltaEvent.js → sequenceDeltaEvent.mjs} +20 -8
  225. package/lib/sequenceDeltaEvent.mjs.map +1 -0
  226. package/lib/sequenceFactory.d.mts +22 -0
  227. package/lib/sequenceFactory.d.mts.map +1 -0
  228. package/lib/sequenceFactory.mjs +51 -0
  229. package/lib/sequenceFactory.mjs.map +1 -0
  230. package/lib/{sharedIntervalCollection.d.ts → sharedIntervalCollection.d.mts} +13 -13
  231. package/lib/sharedIntervalCollection.d.mts.map +1 -0
  232. package/lib/{sharedIntervalCollection.js → sharedIntervalCollection.mjs} +16 -21
  233. package/lib/sharedIntervalCollection.mjs.map +1 -0
  234. package/lib/{sharedSequence.d.ts → sharedSequence.d.mts} +16 -4
  235. package/lib/sharedSequence.d.mts.map +1 -0
  236. package/lib/{sharedSequence.js → sharedSequence.mjs} +30 -23
  237. package/lib/sharedSequence.mjs.map +1 -0
  238. package/lib/{sharedString.d.ts → sharedString.d.mts} +52 -29
  239. package/lib/sharedString.d.mts.map +1 -0
  240. package/lib/sharedString.mjs +269 -0
  241. package/lib/sharedString.mjs.map +1 -0
  242. package/package.json +168 -75
  243. package/prettier.config.cjs +8 -0
  244. package/src/defaultMap.ts +419 -403
  245. package/src/defaultMapInterfaces.ts +164 -117
  246. package/src/index.ts +86 -26
  247. package/src/intervalCollection.ts +2042 -1563
  248. package/src/intervalIndex/endpointInRangeIndex.ts +116 -0
  249. package/src/intervalIndex/endpointIndex.ts +91 -0
  250. package/src/intervalIndex/idIntervalIndex.ts +64 -0
  251. package/src/intervalIndex/index.ts +25 -0
  252. package/src/intervalIndex/intervalIndex.ts +32 -0
  253. package/src/intervalIndex/intervalIndexUtils.ts +27 -0
  254. package/src/intervalIndex/overlappingIntervalsIndex.ts +187 -0
  255. package/src/intervalIndex/overlappingSequenceIntervalsIndex.ts +80 -0
  256. package/src/intervalIndex/sequenceIntervalIndexes.ts +34 -0
  257. package/src/intervalIndex/startpointInRangeIndex.ts +114 -0
  258. package/src/intervalTree.ts +98 -0
  259. package/src/intervals/index.ts +26 -0
  260. package/src/intervals/interval.ts +238 -0
  261. package/src/intervals/intervalUtils.ts +298 -0
  262. package/src/intervals/sequenceInterval.ts +616 -0
  263. package/src/localValues.ts +68 -73
  264. package/src/packageVersion.ts +1 -1
  265. package/src/revertibles.ts +693 -0
  266. package/src/sequence.ts +850 -690
  267. package/src/sequenceDeltaEvent.ts +164 -131
  268. package/src/sequenceFactory.ts +58 -214
  269. package/src/sharedIntervalCollection.ts +161 -152
  270. package/src/sharedSequence.ts +181 -167
  271. package/src/sharedString.ts +367 -234
  272. package/tsc-multi.test.json +10 -0
  273. package/tsconfig.json +11 -13
  274. package/.editorconfig +0 -7
  275. package/.vscode/launch.json +0 -15
  276. package/dist/defaultMap.js.map +0 -1
  277. package/dist/defaultMapInterfaces.js.map +0 -1
  278. package/dist/index.js +0 -44
  279. package/dist/index.js.map +0 -1
  280. package/dist/intervalCollection.js +0 -1250
  281. package/dist/intervalCollection.js.map +0 -1
  282. package/dist/localValues.js.map +0 -1
  283. package/dist/packageVersion.js.map +0 -1
  284. package/dist/sequence.js.map +0 -1
  285. package/dist/sequenceDeltaEvent.js.map +0 -1
  286. package/dist/sequenceFactory.js +0 -192
  287. package/dist/sequenceFactory.js.map +0 -1
  288. package/dist/sharedIntervalCollection.js.map +0 -1
  289. package/dist/sharedNumberSequence.d.ts +0 -50
  290. package/dist/sharedNumberSequence.d.ts.map +0 -1
  291. package/dist/sharedNumberSequence.js +0 -61
  292. package/dist/sharedNumberSequence.js.map +0 -1
  293. package/dist/sharedObjectSequence.d.ts +0 -50
  294. package/dist/sharedObjectSequence.d.ts.map +0 -1
  295. package/dist/sharedObjectSequence.js +0 -61
  296. package/dist/sharedObjectSequence.js.map +0 -1
  297. package/dist/sharedSequence.js.map +0 -1
  298. package/dist/sharedString.js +0 -187
  299. package/dist/sharedString.js.map +0 -1
  300. package/dist/sparsematrix.d.ts +0 -139
  301. package/dist/sparsematrix.d.ts.map +0 -1
  302. package/dist/sparsematrix.js +0 -332
  303. package/dist/sparsematrix.js.map +0 -1
  304. package/lib/defaultMap.d.ts.map +0 -1
  305. package/lib/defaultMap.js.map +0 -1
  306. package/lib/defaultMapInterfaces.d.ts.map +0 -1
  307. package/lib/defaultMapInterfaces.js.map +0 -1
  308. package/lib/index.d.ts +0 -27
  309. package/lib/index.d.ts.map +0 -1
  310. package/lib/index.js +0 -26
  311. package/lib/index.js.map +0 -1
  312. package/lib/intervalCollection.d.ts +0 -270
  313. package/lib/intervalCollection.d.ts.map +0 -1
  314. package/lib/intervalCollection.js +0 -1238
  315. package/lib/intervalCollection.js.map +0 -1
  316. package/lib/localValues.d.ts.map +0 -1
  317. package/lib/localValues.js.map +0 -1
  318. package/lib/packageVersion.d.ts.map +0 -1
  319. package/lib/packageVersion.js.map +0 -1
  320. package/lib/sequence.d.ts.map +0 -1
  321. package/lib/sequence.js.map +0 -1
  322. package/lib/sequenceDeltaEvent.d.ts.map +0 -1
  323. package/lib/sequenceDeltaEvent.js.map +0 -1
  324. package/lib/sequenceFactory.d.ts +0 -108
  325. package/lib/sequenceFactory.d.ts.map +0 -1
  326. package/lib/sequenceFactory.js +0 -186
  327. package/lib/sequenceFactory.js.map +0 -1
  328. package/lib/sharedIntervalCollection.d.ts.map +0 -1
  329. package/lib/sharedIntervalCollection.js.map +0 -1
  330. package/lib/sharedNumberSequence.d.ts +0 -50
  331. package/lib/sharedNumberSequence.d.ts.map +0 -1
  332. package/lib/sharedNumberSequence.js +0 -57
  333. package/lib/sharedNumberSequence.js.map +0 -1
  334. package/lib/sharedObjectSequence.d.ts +0 -50
  335. package/lib/sharedObjectSequence.d.ts.map +0 -1
  336. package/lib/sharedObjectSequence.js +0 -57
  337. package/lib/sharedObjectSequence.js.map +0 -1
  338. package/lib/sharedSequence.d.ts.map +0 -1
  339. package/lib/sharedSequence.js.map +0 -1
  340. package/lib/sharedString.d.ts.map +0 -1
  341. package/lib/sharedString.js +0 -183
  342. package/lib/sharedString.js.map +0 -1
  343. package/lib/sparsematrix.d.ts +0 -139
  344. package/lib/sparsematrix.d.ts.map +0 -1
  345. package/lib/sparsematrix.js +0 -323
  346. package/lib/sparsematrix.js.map +0 -1
  347. package/src/sharedNumberSequence.ts +0 -62
  348. package/src/sharedObjectSequence.ts +0 -62
  349. package/src/sparsematrix.ts +0 -421
  350. package/tsconfig.esnext.json +0 -7
package/.eslintrc.js CHANGED
@@ -4,14 +4,12 @@
4
4
  */
5
5
 
6
6
  module.exports = {
7
- "extends": [
8
- require.resolve("@fluidframework/eslint-config-fluid")
9
- ],
10
- "parserOptions": {
11
- "project": ["./tsconfig.json", "./src/test/tsconfig.json"]
12
- },
13
- "rules": {
14
- "@typescript-eslint/no-use-before-define": "off",
15
- "@typescript-eslint/strict-boolean-expressions": "off"
16
- }
17
- }
7
+ extends: [require.resolve("@fluidframework/eslint-config-fluid/minimal"), "prettier"],
8
+ parserOptions: {
9
+ project: ["./tsconfig.json", "./src/test/tsconfig.json"],
10
+ },
11
+ rules: {
12
+ "@typescript-eslint/no-use-before-define": "off",
13
+ "@typescript-eslint/strict-boolean-expressions": "off",
14
+ },
15
+ };
package/.mocharc.js ADDED
@@ -0,0 +1,12 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ "use strict";
7
+
8
+ const getFluidTestMochaConfig = require("@fluidframework/mocha-test-setup/mocharc-common");
9
+
10
+ const packageDir = __dirname;
11
+ const config = getFluidTestMochaConfig(packageDir);
12
+ module.exports = config;
package/CHANGELOG.md ADDED
@@ -0,0 +1,449 @@
1
+ # @fluidframework/sequence
2
+
3
+ ## 2.0.0-internal.8.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - sequence: Some function return types are now void instead of any [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
8
+
9
+ The return types of some functions have changed from `any` to `void` because the projects are now being compiled with
10
+ the `noImplicitAny` TypeScript compilation option. This does not represent a logic change and only serves to make the
11
+ typing of these functions more accurate.
12
+
13
+ - sequence: Add experimental support for the obliterate operation [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
14
+
15
+ This change adds experimental support for _obliterate_, a form of _remove_ that deletes concurrently inserted segments.
16
+ To use, enable the `mergeTreeEnableObliterate` feature flag and call the new `obliterateRange` functions.
17
+
18
+ Note: this change may cause compilation errors for those attaching event listeners. As long as obliterate isn't used in
19
+ current handlers, their current implementation is sound.
20
+
21
+ - datastore-definitions: Jsonable and Serializable now require a generic parameter [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
22
+
23
+ The `Jsonable` and `Serializable` types from @fluidframework/datastore-definitions now require a generic parameter and
24
+ if that type is `any` or `unknown`will return a new result `JsonableTypeWith<>` that more accurately represents the
25
+ limitation of serialization.
26
+
27
+ Additional modifications:
28
+
29
+ - `Jsonable`'s `TReplacement` parameter default has also been changed from `void` to `never`, which now disallows
30
+ `void`.
31
+ - Unrecognized primitive types like `symbol` are now filtered to `never` instead of `{}`.
32
+ - Recursive types with arrays (`[]`) are now supported.
33
+
34
+ `Serializable` is commonly used for DDS values and now requires more precision when using them. For example SharedMatrix
35
+ (unqualified) has an `any` default that meant values were `Serializable<any>` (i.e. `any`), but now `Serializable<any>`
36
+ is `JsonableTypeWith<IFluidHandle>` which may be problematic for reading or writing. Preferred correction is to specify
37
+ the value type but casting through `any` may provide a quick fix.
38
+
39
+ - sequence: Removed Marker.hasSimpleType and made sequence operations return void [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
40
+
41
+ `Marker.hasSimpleType` was unused. Sequence operations now no longer return IMergeTree\*Msg types.
42
+ These types are redundant with the input.
43
+
44
+ - sequence: Removed several public exports from merge-tree and sequence [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
45
+
46
+ The following APIs have been removed or marked internal in merge-tree and sequence. This functionality was never
47
+ intended for public export.
48
+
49
+ - `BaseSegment.ack`
50
+ - `Client`
51
+ - `CollaborationWindow`
52
+ - `compareNumbers`
53
+ - `compareStrings`
54
+ - `createAnnotateMarkerOp`
55
+ - `createAnnotateRangeOp`
56
+ - `createGroupOp`
57
+ - `createInsertOp`
58
+ - `createInsertSegmentOp`
59
+ - `createRemoveRangeOp`
60
+ - `IConsensusInfo`
61
+ - `IConsensusValue`
62
+ - `IMarkerModifiedAction`
63
+ - `IMergeTreeTextHelper`
64
+ - `LocalClientId`
65
+ - `MergeTreeDeltaCallback`
66
+ - `MergeTreeMaintenanceCallback`
67
+ - `NonCollabClient`
68
+ - `SegmentAccumulator`
69
+ - `SegmentGroup`
70
+ - `SegmentGroupCollection.enqueue`
71
+ - `SegmentGroupCollection.dequeue`
72
+ - `SegmentGroupCollection.pop`
73
+ - `SortedSegmentSet`
74
+ - `SortedSegmentSetItem`
75
+ - `SortedSet`
76
+ - `toRemovalInfo`
77
+ - `TreeMaintenanceSequenceNumber`
78
+ - `UniversalSequenceNumber`
79
+ - `SharedSegmentSequence.submitSequenceMessage`
80
+
81
+ - sequence: Remove support for combining ops [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
82
+
83
+ In sequence, removed the following APIs:
84
+
85
+ - the `combiningOp` argument from `SharedSegmentSequence.annotateRange` and `SharedString.annotateMarker`
86
+ - the function `SharedString.annotateMarkerNotifyConsensus`
87
+
88
+ In merge-tree, removed the following APIs:
89
+
90
+ - `ICombiningOp`
91
+ - the `combiningOp` field from `IMergeTreeAnnotateMsg`
92
+ - the `op` argument from `BaseSegment.addProperties`, `PropertiesManager.addProperties`, and `ReferencePosition.addProperties`
93
+ - the enum variant `PropertiesRollback.Rewrite`.
94
+
95
+ This functionality was largely unused and had no test coverage.
96
+
97
+ - sequence: Removed several APIs [9a451d4946](https://github.com/microsoft/FluidFramework/commits/9a451d4946b5c51a52e4d1ab5bf51e7b285b0d74)
98
+
99
+ The following APIs have been removed:
100
+
101
+ - `Client.getStackContext`
102
+ - `SharedSegmentSequence.getStackContext`
103
+ - `IntervalType.Nest`
104
+ - `ReferenceType.NestBegin`
105
+ - `ReferenceType.NestEnd`
106
+ - `internedSpaces`
107
+ - `RangeStackMap`
108
+ - `refGetRangeLabels`
109
+ - `refHasRangeLabel`
110
+ - `refHasRangeLabels`
111
+
112
+ This functionality is deprecated, has low test coverage, and is largely unused.
113
+
114
+ ## 2.0.0-internal.7.4.0
115
+
116
+ ### Minor Changes
117
+
118
+ - sequence: `change` and `changeProperties` are now a single method ([#18676](https://github.com/microsoft/FluidFramework/issues/18676)) [12c83d2696](https://github.com/microsoft/FluidFramework/commits/12c83d26962a1d76db6eb0ccad31fd6a7976a1af)
119
+
120
+ Instead of having two separate methods to change the endpoints of an interval and the properties, they have been combined into a
121
+ single method that will change the endpoints, properties, or both, depending on the arguments passed in. The signature
122
+ of this combined method is now updated as well.
123
+
124
+ The new way to use the change method is to call it with an interval id as the first parameter and an object containing
125
+ the desired portions of the interval to update as the second parameter. For the object parameter, the `endpoints` field
126
+ should be an object containing the new `start` and `end` values for the interval, and the `properties` field should be
127
+ an object containing the new properties for the interval. Either the `endpoints` field or the `properties` field can be
128
+ omitted, and if neither are present, `change` will return `undefined`.
129
+
130
+ The new usage of the change method is as follows:
131
+
132
+ Change interval endpoints: `change(id, { endpoints: { start: 1, end: 4 } });`
133
+
134
+ Change interval properties: `change(id { props: { a: 1 } });`
135
+
136
+ Change interval endpoints and properties: `change(id, { endpoints: { start: 1, end: 4 }, props: { a: 1 } });`
137
+
138
+ - sequence: Deprecated findOverlappingIntervals API ([#18036](https://github.com/microsoft/FluidFramework/issues/18036)) [52b864ea42](https://github.com/microsoft/FluidFramework/commits/52b864ea42759403771f2cbcb282b0ba19ce42f6)
139
+
140
+ The `findOverlappingIntervals` API from `IntervalCollection` has been deprecated. This functionality is moved to the
141
+ `OverlappingIntervalsIndex`. Users should independently attach the index to the collection and utilize the API
142
+ accordingly, for instance:
143
+
144
+ ```typescript
145
+ const overlappingIntervalsIndex = createOverlappingIntervalsIndex(sharedString);
146
+ collection.attachIndex(overlappingIntervalsIndex);
147
+ const result = overlappingIntervalsIndex.findOverlappingIntervals(start, end);
148
+ ```
149
+
150
+ - sequence: Deprecated previousInterval and nextInterval APIs ([#18060](https://github.com/microsoft/FluidFramework/issues/18060)) [05fb45d26f](https://github.com/microsoft/FluidFramework/commits/05fb45d26f3065297e219a4bce5763e25bdcffc9)
151
+
152
+ The `previousInterval` and `nextInterval` APIs from `IntervalCollection` have been deprecated. These functions are moved
153
+ to the `EndpointIndex`. Users should independently attach the index to the collection and utilize the API accordingly,
154
+ for instance:
155
+
156
+ ```typescript
157
+ const endpointIndex = createEndpointIndex(sharedString);
158
+ collection.attachIndex(endpointIndex);
159
+
160
+ const result1 = endpointIndex.previousInterval(pos);
161
+ const result2 = endpointIndex.nextInterval(pos);
162
+ ```
163
+
164
+ - sequence: Deprecated ICombiningOp, PropertiesRollback.Rewrite, and SharedString.annotateMarkerNotifyConsensus ([#18318](https://github.com/microsoft/FluidFramework/issues/18318)) [e67c2cac5f](https://github.com/microsoft/FluidFramework/commits/e67c2cac5f275fc5c875c0bc044bbb72aaf76648)
165
+
166
+ The `ICombiningOp` and its usage in various APIs has been deprecated. APIs affected include
167
+ `SharedSegmentSequence.annotateRange` and `SharedString.annotateMarker`. `SharedString.annotateMarkerNotifyConsensus`
168
+ has also been deprecated, because it is related to combining ops. This functionality had no test coverage and was
169
+ largely unused.
170
+
171
+ ## 2.0.0-internal.7.3.0
172
+
173
+ Dependency updates only.
174
+
175
+ ## 2.0.0-internal.7.2.0
176
+
177
+ ### Minor Changes
178
+
179
+ - sequence: SharedString.findTile is now deprecated ([#17832](https://github.com/microsoft/FluidFramework/issues/17832)) [428234a2fb](https://github.com/microsoft/FluidFramework/commits/428234a2fb8c7a7c0bcdc9370a6632cd007c8a07)
180
+
181
+ findTile was previously deprecated on client and mergeTree, but was not on SharedString. Usage is mostly the same, with the exception that the parameter 'startPos' must be a number and cannot be undefined.
182
+
183
+ ## 2.0.0-internal.7.1.0
184
+
185
+ ### Minor Changes
186
+
187
+ - sequence: IntervalCollection.add's intervalType is now deprecated ([#17165](https://github.com/microsoft/FluidFramework/issues/17165)) [a8ea26c9d6](https://github.com/microsoft/FluidFramework/commits/a8ea26c9d61e4938f10c87a8757734f8772fbce6)
188
+
189
+ The `intervalType` parameter is being removed from `IntervalCollection.add`. The new usage requires calling add with an object containing each of the desired parameters.
190
+ Example: `add({start: 0, end: 1, props: { a: b }})`
191
+
192
+ The signature of `IntervalCollection.change` is also being updated to an object containing the desired parameters,
193
+ instead of the existing list of parameters. In addition, `changeProperties` will be removed, so in order to change the
194
+ properties of an interval, the `change` method (with the updated signature) will be used. The id of the interval is not
195
+ included in the object passed to `change`, but is instead passed as the first parameter to `change`.
196
+
197
+ Examples:
198
+
199
+ - Change interval endpoints: `change(intervalId, { start: 3, end: 4 })`
200
+ - Change interval properties: `change(intervalId, { props: { a: c } })`
201
+
202
+ - merge-tree: Deprecate IntervalType.Nest, internedSpaces, RangeStackMap, refGetRangeLabels, refHasRangeLabel, and refHasRangeLabels ([#17555](https://github.com/microsoft/FluidFramework/issues/17555)) [e4c11874ef](https://github.com/microsoft/FluidFramework/commits/e4c11874ef7c62b7cde7c282bc7997519d35fbbc)
203
+
204
+ The following classes and functions have been deprecated. The functionality has poor test coverage and is largely
205
+ unused. They will be removed in a future release.
206
+
207
+ - IntervalType.Nest
208
+ - internedSpaces
209
+ - RangeStackMap
210
+ - refGetRangeLabels
211
+ - refHasRangeLabel
212
+ - refHasRangeLabels
213
+
214
+ ## 2.0.0-internal.7.0.0
215
+
216
+ ### Major Changes
217
+
218
+ - sequence: New API for specifying spatial positioning of intervals [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
219
+
220
+ Previously intervals were specified with only an index. Now the model is a bit more nuanced in that you can specify positions that lie before or after a given index. This makes it more clear how interval endpoints should interact with changes to the sequence. See the docs for SequencePlace for additional context.
221
+
222
+ - sequence: IIntervalCollection.change must specify both endpoints [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
223
+
224
+ IIntervalCollection.change no longer allows an endpoint to be undefined. undefined can unintentionally result in end < start. To adapt to this change, simply use the current position of the endpoint that is not intended to change.
225
+
226
+ - Dependencies on @fluidframework/protocol-definitions package updated to 3.0.0 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
227
+
228
+ This included the following changes from the protocol-definitions release:
229
+
230
+ - Updating signal interfaces for some planned improvements. The intention is split the interface between signals
231
+ submitted by clients to the server and the resulting signals sent from the server to clients.
232
+ - A new optional type member is available on the ISignalMessage interface and a new ISentSignalMessage interface has
233
+ been added, which will be the typing for signals sent from the client to the server. Both extend a new
234
+ ISignalMessageBase interface that contains common members.
235
+ - The @fluidframework/common-definitions package dependency has been updated to version 1.0.0.
236
+
237
+ - Server upgrade: dependencies on Fluid server packages updated to 2.0.1 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
238
+
239
+ Dependencies on the following Fluid server package have been updated to version 2.0.1:
240
+
241
+ - @fluidframework/gitresources: 2.0.1
242
+ - @fluidframework/server-kafka-orderer: 2.0.1
243
+ - @fluidframework/server-lambdas: 2.0.1
244
+ - @fluidframework/server-lambdas-driver: 2.0.1
245
+ - @fluidframework/server-local-server: 2.0.1
246
+ - @fluidframework/server-memory-orderer: 2.0.1
247
+ - @fluidframework/protocol-base: 2.0.1
248
+ - @fluidframework/server-routerlicious: 2.0.1
249
+ - @fluidframework/server-routerlicious-base: 2.0.1
250
+ - @fluidframework/server-services: 2.0.1
251
+ - @fluidframework/server-services-client: 2.0.1
252
+ - @fluidframework/server-services-core: 2.0.1
253
+ - @fluidframework/server-services-ordering-kafkanode: 2.0.1
254
+ - @fluidframework/server-services-ordering-rdkafka: 2.0.1
255
+ - @fluidframework/server-services-ordering-zookeeper: 2.0.1
256
+ - @fluidframework/server-services-shared: 2.0.1
257
+ - @fluidframework/server-services-telemetry: 2.0.1
258
+ - @fluidframework/server-services-utils: 2.0.1
259
+ - @fluidframework/server-test-utils: 2.0.1
260
+ - tinylicious: 2.0.1
261
+
262
+ - Minimum TypeScript version now 5.1.6 [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
263
+
264
+ The minimum supported TypeScript version for Fluid 2.0 clients is now 5.1.6.
265
+
266
+ - sequence: Remove `compareStarts` and `compareEnds` from `IIntervalHelpers` [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
267
+
268
+ These methods are redudant with the functions `IInterval.compareStart` and `IInterval.compareEnd` respectively.
269
+
270
+ - sequence: Remove the mergeTreeUseNewLengthCalculations flag [871b3493dd](https://github.com/microsoft/FluidFramework/commits/871b3493dd0d7ea3a89be64998ceb6cb9021a04e)
271
+
272
+ The `mergeTreeUseNewLengthCalculations` flag has been removed, because the feature was enabled by default in 2.0.0-internal.6.0.0.
273
+
274
+ ## 2.0.0-internal.6.4.0
275
+
276
+ Dependency updates only.
277
+
278
+ ## 2.0.0-internal.6.3.0
279
+
280
+ ### Minor Changes
281
+
282
+ - deprecate compareStarts and compareEnds on IIntervalHelpers ([#17127](https://github.com/microsoft/FluidFramework/issues/17127)) [a830eca757](https://github.com/microsoft/FluidFramework/commits/a830eca7571cfb230abe5b9443ba5c5fc44671e0)
283
+
284
+ these functions will be removed in a future version. use the methods IInterval.compareStart and IInterval.compareEnd respectively instead
285
+
286
+ ## 2.0.0-internal.6.2.0
287
+
288
+ ### Minor Changes
289
+
290
+ - Deprecate getStackContext and associated NestBegin/End ([#16877](https://github.com/microsoft/FluidFramework/issues/16877)) [8e743fe1dd](https://github.com/microsoft/FluidFramework/commits/8e743fe1dde9adb3a1240971987d3abd51ab2fbe)
291
+
292
+ Deprecate SharedSegmentSequence.getStackContext and Client.getStackContext (and the enums ReferenceType.NestBegin and NestEnd they use).
293
+ This functionality is unused, poorly tested, and incurs performance overhead.
294
+
295
+ - Remove use of @fluidframework/common-definitions ([#16638](https://github.com/microsoft/FluidFramework/issues/16638)) [a8c81509c9](https://github.com/microsoft/FluidFramework/commits/a8c81509c9bf09cfb2092ebcf7265205f9eb6dbf)
296
+
297
+ The **@fluidframework/common-definitions** package is being deprecated, so the following interfaces and types are now
298
+ imported from the **@fluidframework/core-interfaces** package:
299
+
300
+ - interface IDisposable
301
+ - interface IErrorEvent
302
+ - interface IErrorEvent
303
+ - interface IEvent
304
+ - interface IEventProvider
305
+ - interface ILoggingError
306
+ - interface ITaggedTelemetryPropertyType
307
+ - interface ITelemetryBaseEvent
308
+ - interface ITelemetryBaseLogger
309
+ - interface ITelemetryErrorEvent
310
+ - interface ITelemetryGenericEvent
311
+ - interface ITelemetryLogger
312
+ - interface ITelemetryPerformanceEvent
313
+ - interface ITelemetryProperties
314
+ - type ExtendEventProvider
315
+ - type IEventThisPlaceHolder
316
+ - type IEventTransformer
317
+ - type ReplaceIEventThisPlaceHolder
318
+ - type ReplaceIEventThisPlaceHolder
319
+ - type TelemetryEventCategory
320
+ - type TelemetryEventPropertyType
321
+
322
+ - Deprecate SharedSequence, SubSequence, and IJSONRunSegment ([#16829](https://github.com/microsoft/FluidFramework/issues/16829)) [0cf2b6d909](https://github.com/microsoft/FluidFramework/commits/0cf2b6d9098c7ef4234b66c5d7d169192db40d15)
323
+
324
+ The types SharedSequence, SubSequence, and IJSONRunSegment are being deprecated and moved.
325
+
326
+ They are now, and will continue to be exposed from the @fluid-experimental/sequence-deprecated package.
327
+
328
+ New usages of these types should not be added, but they may be necessary for migration.
329
+
330
+ ## 2.0.0-internal.6.1.0
331
+
332
+ Dependency updates only.
333
+
334
+ ## 2.0.0-internal.6.0.0
335
+
336
+ ### Major Changes
337
+
338
+ - IntervalConflictResolver removed [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
339
+
340
+ IntervalConflictResolver has been removed. Any lingering usages in application code can be removed as well. This change also marks APIs deprecated in #14318 as internal.
341
+
342
+ - Remove ISegment.parent [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
343
+
344
+ This change removed the parent property on the ISegment interface. The property will still exist, but should not generally be used by outside consumers.
345
+
346
+ There are some circumstances where a consumer may wish to know if a segment is still in the underlying tree and were using the parent property to determine that.
347
+
348
+ Please change those checks to use the following `"parent" in segment && segment.parent !== undefined`
349
+
350
+ - Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
351
+
352
+ Upgraded typescript transpilation target to ES2020. This is done in order to decrease the bundle sizes of Fluid Framework packages. This has provided size improvements across the board for ex. Loader, Driver, Runtime etc. Reduced bundle sizes helps to load lesser code in apps and hence also helps to improve the perf.If any app wants to target any older versions of browsers with which this target version is not compatible, then they can use packages like babel to transpile to a older target.
353
+
354
+ ## 2.0.0-internal.5.4.0
355
+
356
+ ### Minor Changes
357
+
358
+ - Some interval-related APIs are deprecated ([#16573](https://github.com/microsoft/FluidFramework/issues/16573)) [82de148126](https://github.com/microsoft/FluidFramework/commits/82de14812617e4d305bdb621737a0d94a5392d25)
359
+
360
+ The following APIs are now deprecated from `IntervalCollection`:
361
+
362
+ - `findOverlappingIntervals` and `gatherIterationResults` - these functions are moved to
363
+ the `OverlappingIntervalsIndex`. Users are advised to independently attach the index to the collection and utilize the
364
+ API accordingly, for instance:
365
+
366
+ ```typescript
367
+ const overlappingIntervalsIndex = createOverlappingIntervalsIndex(client, helpers);
368
+ collection.attachIndex(overlappingIntervalsIndex);
369
+ const result1 = overlappingIntervalsIndex.findOverlappingIntervals(start, end);
370
+
371
+ const result2 = [];
372
+ overlappingIntervalsIndex.gatherIterationResults(result2, true);
373
+ ```
374
+
375
+ - `CreateBackwardIteratorWithEndPosition`, `CreateBackwardIteratorWithStartPosition`,
376
+ `CreateForwardIteratorWithEndPosition` and `CreateForwardIteratorWithStartPosition` - only the default iterator will be
377
+ supported in the future, and it will no longer preserve sequence order.
378
+
379
+ Equivalent functionality to these four methods is provided by `IOverlappingIntervalIndex.gatherIterationResults`.
380
+
381
+ - `previousInterval` and `nextInterval` - These functionalities are moved to the `EndpointIndex`. Users are advised to
382
+ independently attach the index to the collection and utilize the API accordingly, for instance:
383
+
384
+ ```typescript
385
+ const endpointIndex = createEndpointIndex(client, helpers);
386
+ collection.attachIndex(endpointIndex);
387
+
388
+ const result1 = endpointIndex.previousInterval(pos);
389
+ const result2 = endpointIndex.nextInterval(pos);
390
+ ```
391
+
392
+ ## 2.0.0-internal.5.3.0
393
+
394
+ Dependency updates only.
395
+
396
+ ## 2.0.0-internal.5.2.0
397
+
398
+ ### Minor Changes
399
+
400
+ - Deprecate ISegment.parent ([#16097](https://github.com/microsoft/FluidFramework/issues/16097)) [9486bec0ea](https://github.com/microsoft/FluidFramework/commits/9486bec0ea2f9f1dd3e40fc3b4c42af6b6a44697)
401
+
402
+ This change deprecates the parent property on the ISegment interface. The property will still exist, but should not generally be used by outside consumers.
403
+
404
+ There are some circumstances where a consumer may wish to know if a segment is still in the underlying tree and were using the parent property to determine that.
405
+
406
+ Please change those checks to use the following `"parent" in segment && segment.parent !== undefined`
407
+
408
+ - slide parameter in changeInterval event ([#16117](https://github.com/microsoft/FluidFramework/issues/16117)) [46f74fe568](https://github.com/microsoft/FluidFramework/commits/46f74fe5684e44df436ed28ea41c98ca146b03cc)
409
+
410
+ The changeInterval event listener has a new parameter "slide" that is true if the event was caused by the interval endpoint sliding from a removed range.
411
+
412
+ ## 2.0.0-internal.5.1.0
413
+
414
+ ### Minor Changes
415
+
416
+ - New APIs for interval querying by range ([#15837](https://github.com/microsoft/FluidFramework/issues/15837)) [2a4242e1b5](https://github.com/microsoft/FluidFramework/commits/2a4242e1b5f15442b13ae413124ec76315a4cc52)
417
+
418
+ SharedString now supports querying intervals whose start/end-points fall in a specified range.
419
+
420
+ ## 2.0.0-internal.5.0.0
421
+
422
+ ### Major Changes
423
+
424
+ - The following types have been removed: `IntervalCollection`, `CompressedSerializedInterval`, [8b242fdc79](https://github.com/microsoft/FluidFramework/commits/8b242fdc796714cf1da9ad3f90d02efb122af0c2)
425
+ `IntervalCollectionIterator`, and `ISerializedIntervalCollectionV2`. These types were deprecated in version
426
+ 2.0.0-internal.4.4.0.
427
+
428
+ ## 2.0.0-internal.4.4.0
429
+
430
+ ### Minor Changes
431
+
432
+ - `IntervalCollection` has been deprecated in favor of an interface (`IIntervalCollection`) containing its public API. ([#15774](https://github.com/microsoft/FluidFramework/pull/15774)) [8c6e76ab75](https://github.com/microsoft/FluidFramework/commits/8c6e76ab753d4ec0cc43bdd6ed04db905391ef2e)
433
+ Several types transitively referenced by `IntervalCollection` implementation details have also been deprecated:
434
+ `CompressedSerializedInterval`, `IntervalCollectionIterator`, and `ISerializedIntervalCollectionV2`.
435
+ - New feature: Revertibles for SharedString and Interval provide undo-redo functionality. This includes all direct interval edits as well as string edits that indirectly affect intervals, wrapping merge-tree revertibles. ([#15778](https://github.com/microsoft/FluidFramework/pull/15778)) [6433cb2937](https://github.com/microsoft/FluidFramework/commits/6433cb2937d9a6bc39ac93b0eca2c073e6d5be52)
436
+ - Experimental feature: An initial implementation of "interval stickiness". This experimental feature can only be used by ([#15423](https://github.com/microsoft/FluidFramework/pull/15423)) [8ba75c508f](https://github.com/microsoft/FluidFramework/commits/8ba75c508ff2370f3de0c9f63390f90a12d9bca2)
437
+ enabling the feature flag "intervalStickinessEnabled".
438
+ - New feature: `IntervalCollection`s now have an `attachIndex` and `detachIndex` API for interval querying. ([#15683](https://github.com/microsoft/FluidFramework/pull/15683)) [f5db26a122](https://github.com/microsoft/FluidFramework/commits/f5db26a122735cf12dc0477b37d9297f7f3ae602)
439
+
440
+ ## 2.0.0-internal.4.1.0
441
+
442
+ ### Minor Changes
443
+
444
+ - IntervalConflictResolver deprecation ([#15089](https://github.com/microsoft/FluidFramework/pull-requests/15089)) [38345841a7](https://github.com/microsoft/FluidFramework/commits/38345841a75d68e94748823c3da5078a2fc57449)
445
+
446
+ In `SharedString`, interval conflict resolvers have been unused since [this
447
+ change](https://github.com/microsoft/FluidFramework/pull/6407), which added support for multiple intervals at the same
448
+ position. As such, any existing usages can be removed. Related APIs have been deprecated and will be removed in an
449
+ upcoming release.