Skip to content

Commit

Permalink
Update CHANGELOG.md for v0.4.4 (#563)
Browse files Browse the repository at this point in the history
* Update CHANGELOG.md for v0.4.4

* Add missing comments to exposed interfaces
  • Loading branch information
hackerwins committed Jul 5, 2023
1 parent 3a59d69 commit 5d5f951
Show file tree
Hide file tree
Showing 6 changed files with 55 additions and 5 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ and Yorkie JS SDK adheres to [Semantic Versioning](https://semver.org/spec/v2.0.

## [Unreleased]

## [0.4.4] - 2023-07-05

### Changed
* Cleanup of test-related terminology by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/562
* Use TreeRangeStruct to represent tree selection by @chacha912 in https://github.com/yorkie-team/yorkie-js-sdk/pull/561

## [0.4.3] - 2023-06-29

### Added
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yorkie-js-sdk",
"version": "0.4.3",
"version": "0.4.4",
"description": "Yorkie JS SDK",
"main": "./dist/yorkie-js-sdk.js",
"typings": "./dist/yorkie-js-sdk.d.ts",
Expand Down
2 changes: 1 addition & 1 deletion package.publish.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "yorkie-js-sdk",
"version": "0.4.3",
"version": "0.4.4",
"description": "Yorkie JS SDK",
"main": "./dist/yorkie-js-sdk.js",
"typings": "./dist/yorkie-js-sdk.d.ts",
Expand Down
5 changes: 3 additions & 2 deletions src/document/json/tree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ export class Tree {
}

/**
* `getInitialRoot` returns the root node of this tree.
* `buildRoot` builds the root of this tree with the given initial root
* which set by the user.
*/
public buildRoot(context: ChangeContext): CRDTTreeNode {
if (!this.initialRoot) {
Expand Down Expand Up @@ -438,7 +439,7 @@ export class Tree {
}

/**
* `createRange` returns pair of CRDTTreePos of the given integer offsets.
* `createRangeByPath` returns pair of CRDTTreePos of the given path.
*/
createRangeByPath(fromPath: Array<number>, toPath: Array<number>): TreeRange {
if (!this.context || !this.tree) {
Expand Down
40 changes: 40 additions & 0 deletions src/document/operation/operation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -36,33 +36,57 @@ export type CounterOperationInfo = IncreaseOpInfo;
export type ArrayOperationInfo = AddOpInfo | RemoveOpInfo | MoveOpInfo;
export type ObjectOperationInfo = SetOpInfo | RemoveOpInfo;
export type TreeOperationInfo = TreeEditOpInfo | TreeStyleOpInfo;

/**
* `AddOpInfo` represents the information of the add operation.
*/
export type AddOpInfo = {
type: 'add';
path: string;
index: number;
};

/**
* `MoveOpInfo` represents the information of the move operation.
*/
export type MoveOpInfo = {
type: 'move';
path: string;
previousIndex: number;
index: number;
};

/**
* `SetOpInfo` represents the information of the set operation.
*/
export type SetOpInfo = {
type: 'set';
path: string;
key: string;
};

/**
* `RemoveOpInfo` represents the information of the remove operation.
*/
export type RemoveOpInfo = {
type: 'remove';
path: string;
key?: string;
index?: number;
};

/**
* `IncreaseOpInfo` represents the information of the increase operation.
*/
export type IncreaseOpInfo = {
type: 'increase';
path: string;
value: number;
};

/**
* `EditOpInfo` represents the information of the edit operation.
*/
export type EditOpInfo = {
type: 'edit';
from: number;
Expand All @@ -73,6 +97,10 @@ export type EditOpInfo = {
content: string;
};
};

/**
* `StyleOpInfo` represents the information of the style operation.
*/
export type StyleOpInfo = {
type: 'style';
from: number;
Expand All @@ -82,12 +110,20 @@ export type StyleOpInfo = {
attributes: Indexable;
};
};

/**
* `SelectOpInfo` represents the information of the select operation.
*/
export type SelectOpInfo = {
type: 'select';
from: number;
to: number;
path: string;
};

/**
* `TreeEditOpInfo` represents the information of the tree edit operation.
*/
export type TreeEditOpInfo = {
type: 'tree-edit';
from: number;
Expand All @@ -97,6 +133,10 @@ export type TreeEditOpInfo = {
value: TreeNode;
path: string;
};

/**
* `TreeStyleOpInfo` represents the information of the tree style operation.
*/
export type TreeStyleOpInfo = {
type: 'tree-style';
from: number;
Expand Down
5 changes: 4 additions & 1 deletion src/yorkie.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,10 @@ export {
CompleteFn,
Unsubscribe,
} from '@yorkie-js-sdk/src/util/observable';
export { TimeTicket, TimeTicketStruct } from '@yorkie-js-sdk/src/document/time/ticket';
export {
TimeTicket,
TimeTicketStruct,
} from '@yorkie-js-sdk/src/document/time/ticket';
export { ActorID } from '@yorkie-js-sdk/src/document/time/actor_id';
export type {
OperationInfo,
Expand Down

0 comments on commit 5d5f951

Please sign in to comment.