Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

prosemirror-history

Package Overview
Dependencies
Maintainers
1
Versions
33
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

prosemirror-history - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

6

CHANGELOG.md

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

## 1.0.2 (2018-03-13)
### Bug fixes
Fix a bug that could corrupt the history when rebasing changes because of collaborative editing.
## 1.0.1 (2018-03-05)

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

4

dist/history.js

@@ -152,2 +152,3 @@ 'use strict';

var eventCount = this.eventCount;
this.items.forEach(function (item) { if (item.selection) { eventCount--; } }, this.items.length - rebasedCount);

@@ -163,5 +164,5 @@ var iRebased = rebasedCount;

var selection = item.selection && item.selection.map(mapping.slice(iRebased, pos));
if (selection) { eventCount++; }
rebasedItems.push(new Item(map, step, selection));
} else {
if (item.selection) { eventCount--; }
rebasedItems.push(new Item(map));

@@ -176,2 +177,3 @@ }

var branch = new Branch(items, eventCount);
if (branch.emptyItemCount() > max_empty_items)

@@ -178,0 +180,0 @@ { branch = branch.compress(this.items.length - rebasedItems.length); }

{
"name": "prosemirror-history",
"version": "1.0.1",
"version": "1.0.2",
"description": "Undo history for ProseMirror",

@@ -5,0 +5,0 @@ "main": "dist/history.js",

@@ -145,2 +145,3 @@ import RopeSequence from "rope-sequence"

let eventCount = this.eventCount
this.items.forEach(item => { if (item.selection) eventCount-- }, this.items.length - rebasedCount)

@@ -156,5 +157,5 @@ let iRebased = rebasedCount

let selection = item.selection && item.selection.map(mapping.slice(iRebased, pos))
if (selection) eventCount++
rebasedItems.push(new Item(map, step, selection))
} else {
if (item.selection) eventCount--
rebasedItems.push(new Item(map))

@@ -169,2 +170,3 @@ }

let branch = new Branch(items, eventCount)
if (branch.emptyItemCount() > max_empty_items)

@@ -171,0 +173,0 @@ branch = branch.compress(this.items.length - rebasedItems.length)

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