@nitra/cursor 1.35.3 → 1.35.5

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.35.5] - 2026-05-30
4
+
5
+ ### Changed
6
+
7
+ - fix: computeLineOffsets — for..of по рядку із pos+=1 замість body.entries()
8
+
9
+ ## [1.35.4] - 2026-05-30
10
+
11
+ ### Changed
12
+
13
+ - fix: відновити for-loop із body.length у computeLineOffsets (String.prototype.entries не існує)
14
+
3
15
  ## [1.35.3] - 2026-05-30
4
16
 
5
17
  ### Fixed
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nitra/cursor",
3
- "version": "1.35.3",
3
+ "version": "1.35.5",
4
4
  "description": "CLI для завантаження cursor-правил (префікс n-) у локальний репозиторій",
5
5
  "keywords": [
6
6
  "cli",
@@ -187,8 +187,10 @@ function findOffendersInBody(body) {
187
187
  */
188
188
  function computeLineOffsets(body) {
189
189
  const offsets = [0]
190
- for (const [i, element] of body.entries()) {
191
- if (element === '\n') offsets.push(i + 1)
190
+ let pos = 0
191
+ for (const ch of body) {
192
+ if (ch === '\n') offsets.push(pos + 1)
193
+ pos += 1
192
194
  }
193
195
  return offsets
194
196
  }