Socket
Socket
Sign inDemoInstall

@codemirror/rangeset

Package Overview
Dependencies
Maintainers
2
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@codemirror/rangeset - npm Package Compare versions

Comparing version 0.19.0 to 0.19.1

6

CHANGELOG.md

@@ -0,1 +1,7 @@

## 0.19.1 (2021-08-20)
### Bug fixes
Fix a bug in range set iteration that would sometimes cause ranges to report their position as NaN, breaking downstream code.
## 0.19.0 (2021-08-11)

@@ -2,0 +8,0 @@

31

dist/index.js

@@ -526,6 +526,7 @@ import { MapMode } from '@codemirror/state';

}
let rangeIndex = this.chunkIndex == this.layer.chunk.length ? 0
: this.layer.chunk[this.chunkIndex].findIndex(pos - this.layer.chunkPos[this.chunkIndex], side, true);
if (!forward || this.rangeIndex < rangeIndex)
this.rangeIndex = rangeIndex;
if (this.chunkIndex < this.layer.chunk.length) {
let rangeIndex = this.layer.chunk[this.chunkIndex].findIndex(pos - this.layer.chunkPos[this.chunkIndex], side, true);
if (!forward || this.rangeIndex < rangeIndex)
this.setRangeIndex(rangeIndex);
}
this.next();

@@ -550,10 +551,3 @@ }

this.value = chunk.value[this.rangeIndex];
if (++this.rangeIndex == chunk.value.length) {
this.chunkIndex++;
if (this.skip) {
while (this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]))
this.chunkIndex++;
}
this.rangeIndex = 0;
}
this.setRangeIndex(this.rangeIndex + 1);
if (this.minPoint < 0 || this.value.point && this.to - this.from >= this.minPoint)

@@ -564,2 +558,15 @@ break;

}
setRangeIndex(index) {
if (index == this.layer.chunk[this.chunkIndex].value.length) {
this.chunkIndex++;
if (this.skip) {
while (this.chunkIndex < this.layer.chunk.length && this.skip.has(this.layer.chunk[this.chunkIndex]))
this.chunkIndex++;
}
this.rangeIndex = 0;
}
else {
this.rangeIndex = index;
}
}
nextChunk() {

@@ -566,0 +573,0 @@ this.chunkIndex++;

{
"name": "@codemirror/rangeset",
"version": "0.19.0",
"version": "0.19.1",
"description": "Range set data structure for the CodeMirror code editor",

@@ -5,0 +5,0 @@ "scripts": {

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc