Skip to content

Commit

Permalink
(chore) Dependency: Bump version to 0.1.1
Browse files Browse the repository at this point in the history
Fixes: #43
Signed-off-by: Progyan Bhattacharya <[email protected]>
  • Loading branch information
0xTheProDev committed Sep 5, 2021
1 parent 30fc181 commit a121778
Show file tree
Hide file tree
Showing 4 changed files with 33 additions and 29 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ Good to have: commit or PR links.
-->

## v0.3.1 [#44](https://github.com/interviewstreet/firepad-x/pull/44)

### Changed

- Bump version of `@operational-transformation` packages to `v0.1.1`.
- This fixes [issue](https://github.com/interviewstreet/firepad-x/issues/43) with Universal Application building using this library.

## v0.3.0 [#42](https://github.com/interviewstreet/firepad-x/pull/42)

### Changed
Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@hackerrank/firepad",
"description": "Collaborative text editing powered by Firebase",
"version": "0.3.0",
"version": "0.3.1",
"author": {
"email": "[email protected]",
"name": "Progyan Bhattacharya",
Expand Down Expand Up @@ -59,9 +59,9 @@
"monaco-editor": "0.18.1"
},
"dependencies": {
"@operational-transformation/plaintext": "0.1.0",
"@operational-transformation/plaintext-editor": "0.1.0",
"@operational-transformation/state-machine": "0.1.0",
"@operational-transformation/plaintext": "0.1.1",
"@operational-transformation/plaintext-editor": "0.1.1",
"@operational-transformation/state-machine": "0.1.1",
"mitt": "3.0.0",
"uuid": "8.3.2"
},
Expand Down
21 changes: 9 additions & 12 deletions src/monaco-adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -609,7 +609,7 @@ export class MonacoAdapter implements IEditorAdapter {

/** If no change information received */
if (!ev.changes || ev.changes.length === 0) {
const op = new TextOperation().retain(contentLength, null);
const op = new TextOperation().retain(contentLength);
this._trigger(EditorAdapterEvent.Change, {
operation: op,
inverse: op,
Expand Down Expand Up @@ -705,8 +705,8 @@ export class MonacoAdapter implements IEditorAdapter {
const retain = rangeOffset - skippedChars;

try {
mainOp = mainOp.retain(retain, null);
reverseOp = reverseOp.retain(retain, null);
mainOp = mainOp.retain(retain);
reverseOp = reverseOp.retain(retain);
} catch (err) {
this._trigger(EditorAdapterEvent.Error, {
err,
Expand All @@ -718,26 +718,23 @@ export class MonacoAdapter implements IEditorAdapter {

if (!text && !range.isEmpty()) {
mainOp = mainOp.delete(rangeLength);
reverseOp = reverseOp.insert(
this._getPreviousContentInRange(range),
null
);
reverseOp = reverseOp.insert(this._getPreviousContentInRange(range));
} else if (text && !range.isEmpty()) {
mainOp = mainOp.delete(rangeLength).insert(text, null);
mainOp = mainOp.delete(rangeLength).insert(text);
reverseOp = reverseOp
.insert(this._getPreviousContentInRange(range), null)
.insert(this._getPreviousContentInRange(range))
.delete(text);
} else {
mainOp = mainOp.insert(text, null);
mainOp = mainOp.insert(text);
reverseOp = reverseOp.delete(text);
}

skippedChars = skippedChars + retain + rangeLength;
}

try {
mainOp = mainOp.retain(contentLength - skippedChars, null);
reverseOp = reverseOp.retain(contentLength - skippedChars, null);
mainOp = mainOp.retain(contentLength - skippedChars);
reverseOp = reverseOp.retain(contentLength - skippedChars);
} catch (err) {
this._trigger(EditorAdapterEvent.Error, {
err,
Expand Down
26 changes: 13 additions & 13 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1445,23 +1445,23 @@
"@types/yargs" "^16.0.0"
chalk "^4.0.0"

"@operational-transformation/[email protected].0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@operational-transformation/plaintext-editor/-/plaintext-editor-0.1.0.tgz#0c7fc3253b9917bb95ba65134f4e07006cba8fd6"
integrity sha512-1o7XR/DbOyY0CkSnPRyLsXHanVBq4XwLIKyPkTvlwHVFn2NuxkpAL/3tlwhIKA1fRd06pxxe+Dhzprf1yaTW4g==
"@operational-transformation/[email protected].1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@operational-transformation/plaintext-editor/-/plaintext-editor-0.1.1.tgz#6523a7b52fe619c96b72f026fa157a3b1486fe25"
integrity sha512-2vQEItOulQeQp7lOu4rLCSd9H1Liq/arv26I88JfnhnPD1IFGEvrFJjHfgOoJSghMvNV/HxrpojOnRneRvdMXw==
dependencies:
"@operational-transformation/state-machine" "0.1.0"
"@operational-transformation/state-machine" "0.1.1"
mitt "3.0.0"

"@operational-transformation/[email protected].0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@operational-transformation/plaintext/-/plaintext-0.1.0.tgz#2d7469b7bf886e7345fcbbb300afe45827ba990b"
integrity sha512-Kg0sU5+7+Fi0p9b2F558tioeInlPzlWhgSQRt4I6xwMNQAu6jpWTbnvEhGc8jAh5kaVjNYPQhzvpdZHnmDeX0g==
"@operational-transformation/[email protected].1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@operational-transformation/plaintext/-/plaintext-0.1.1.tgz#22bbb4f4eacdb63a90f3557adeb9d438c91b4617"
integrity sha512-90vZeG74f0Ruz2avG8jDj7y4w1LxxTuSGNwAht9vWzNl8U01JEP1rcIDZ/jhQGL9yZFWTZY4mwPSUJuMZks7Bg==

"@operational-transformation/[email protected].0":
version "0.1.0"
resolved "https://registry.yarnpkg.com/@operational-transformation/state-machine/-/state-machine-0.1.0.tgz#92096618e9747d94b9f6f12afe76a6a4b58177c1"
integrity sha512-fcttrjExFey5noy4eFQUXecK/YPqyINkS5GifMHirTw2cJGX8+oDosroFW+RnflS7lnSxuNq+M2S40at75B+mg==
"@operational-transformation/[email protected].1":
version "0.1.1"
resolved "https://registry.yarnpkg.com/@operational-transformation/state-machine/-/state-machine-0.1.1.tgz#ef13979993c41a32eacd1a0bae4e40b3998ada37"
integrity sha512-2Get0p4quTXts5JzroPs7Ry1zu2bjD1R/oMjBRI4YgRRshRfDSOrxvfHsN2R+wNM1akfGfLgVKgxh8sLKR5ZSw==

"@protobufjs/aspromise@^1.1.1", "@protobufjs/aspromise@^1.1.2":
version "1.1.2"
Expand Down

0 comments on commit a121778

Please sign in to comment.