Comparing version 0.5.3 to 0.7.1
{ | ||
"name": "yjs", | ||
"version": "0.5.3", | ||
"description": "A Framework that enables Real-Time Collaboration on arbitrary data structures.", | ||
"main": "./build/node/y.js", | ||
"version": "0.7.1", | ||
"description": "A framework for real-time p2p shared editing on arbitrary complex data types", | ||
"main": "y.js", | ||
"scripts": { | ||
"prepublish": "./node_modules/gulp/bin/gulp.js build_node", | ||
"test": "./node_modules/gulp/bin/gulp.js mocha" | ||
"test": "node --harmony ./node_modules/.bin/gulp test", | ||
"lint": "./node_modules/.bin/standard" | ||
}, | ||
"pre-commit": [ | ||
"lint", | ||
"test" | ||
], | ||
"standard": { | ||
"parser": "babel-eslint", | ||
"ignore": [ | ||
"build/**", | ||
"dist/**", | ||
"declarations/**", | ||
"./y.js", | ||
"./y.js.map" | ||
] | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "https://github.com/rwth-acis/yjs" | ||
"url": "https://github.com/y-js/yjs.git" | ||
}, | ||
"keywords": [ | ||
"OT", | ||
"Operational Transformation", | ||
"collaboration", | ||
"synchronization", | ||
"ShareJS", | ||
"Coweb", | ||
"ShareJs", | ||
"OpenCoweb", | ||
"concurrency" | ||
@@ -26,41 +41,37 @@ ], | ||
"bugs": { | ||
"url": "https://github.com/rwth-acis/yjs/issues" | ||
"url": "https://github.com/y-js/yjs/issues" | ||
}, | ||
"homepage": "https://dadamonad.github.io/yjs/", | ||
"dependencies": { | ||
}, | ||
"homepage": "http://y-js.org", | ||
"devDependencies": { | ||
"chai": "^2.2.0", | ||
"codo": "^2.0.9", | ||
"coffee-errors": "~0.8.6", | ||
"coffee-script": "^1.7.1", | ||
"coffeeify": "^0.6.0", | ||
"gulp": "^3.8.7", | ||
"gulp-browserify": "^0.5.0", | ||
"gulp-cached": "^1.0.1", | ||
"gulp-coffee": "^2.1.1", | ||
"gulp-coffeeify": "^0.1.2", | ||
"gulp-coffeelint": "^0.3.3", | ||
"gulp-concat": "^2.3.4", | ||
"gulp-copy": "0.0.2", | ||
"gulp-debug": "^1.0.0", | ||
"gulp-exit": "0.0.2", | ||
"gulp-git": "^0.5.0", | ||
"gulp-if": "^1.2.4", | ||
"gulp-ignore": "^1.2.0", | ||
"gulp-ljs": "^0.1.1", | ||
"gulp-mocha": "^0.5.2", | ||
"gulp-plumber": "^0.6.6", | ||
"gulp-rename": "^1.2.0", | ||
"gulp-rimraf": "^0.1.0", | ||
"gulp-run": "^1.6.3", | ||
"gulp-sourcemaps": "^1.1.1", | ||
"gulp-uglify": "^0.3.1", | ||
"gulp-watch": "^3.0.0", | ||
"jquery": "^2.1.1", | ||
"underscore": "^1.6.0", | ||
"mocha": "^2.1.0", | ||
"sinon": "^1.12.2", | ||
"sinon-chai": "^2.7.0" | ||
"babel-plugin-transform-runtime": "^6.1.18", | ||
"babel-preset-es2015": "^6.1.18", | ||
"babelify": "^7.2.0", | ||
"browserify": "^12.0.1", | ||
"eslint": "^1.10.2", | ||
"gulp": "^3.9.0", | ||
"gulp-bump": "^1.0.0", | ||
"gulp-concat": "^2.6.0", | ||
"gulp-filter": "^3.0.1", | ||
"gulp-git": "^1.6.0", | ||
"gulp-if": "^2.0.0", | ||
"gulp-jasmine": "^2.0.1", | ||
"gulp-jasmine-browser": "^0.2.3", | ||
"gulp-load-plugins": "^1.0.0", | ||
"gulp-prompt": "^0.1.2", | ||
"gulp-rename": "^1.2.2", | ||
"gulp-serve": "^1.2.0", | ||
"gulp-shell": "^0.5.1", | ||
"gulp-sourcemaps": "^1.5.2", | ||
"gulp-tag-version": "^1.3.0", | ||
"gulp-uglify": "^1.5.1", | ||
"gulp-util": "^3.0.6", | ||
"gulp-watch": "^4.3.5", | ||
"minimist": "^1.2.0", | ||
"pre-commit": "^1.1.1", | ||
"regenerator": "^0.8.42", | ||
"run-sequence": "^1.1.4", | ||
"standard": "^5.2.2", | ||
"vinyl-buffer": "^1.0.0", | ||
"vinyl-source-stream": "^1.1.0" | ||
} | ||
} |
# ![Yjs](http://y-js.org/files/layout/yjs.svg) | ||
# ![Yjs](http://y-js.org/images/yjs.png) | ||
[![Build Status](https://travis-ci.org/y-js/yjs.svg)](https://travis-ci.org/y-js/yjs) | ||
Yjs is a framework for optimistic concurrency control and automatic conflict resolution on shared data types. The framework implements a new OT-like concurrency algorithm and provides similar functionality as [ShareJs] and [OpenCoweb]. Yjs was designed to handle concurrent actions on arbitrary complex data types like Text, Json, and XML. We provide a tutorial and some applications for this framework on our [homepage](http://y-js.org/). | ||
Yjs is a framework for optimistic concurrency control and automatic conflict resolution on arbitrary data types. The framework implements a new OT-like concurrency algorithm and provides similar functionality as [ShareJs] and [OpenCoweb]. Yjs was designed to handle concurrent actions on arbitrary complex data types like Text, Json, and XML. We provide a tutorial and some applications for this framework on our [homepage](http://y-js.org/). | ||
**NOTE** This project is currently migrating. So there may exist some information that is not true anymore.. | ||
You can create you own data types easily. Therefore, you can take matters into your own hand by defining the meaning of the shared types and ensure that it is valid, while Yjs ensures data consistency (everyone will eventually end up with the same data). We already provide data types for | ||
You can create you own shared types easily. Therefore, you can take matters into your own hand by defining the meaning of the shared types and ensure that it is valid, while Yjs ensures data consistency (everyone will eventually end up with the same data). We already provide data types for | ||
| Name | Description | ||
| ---------------------------------------------------- | --------------------------------------------- | ||
y-object | Add, update, and remove properties of an object. Circular references are supported. Included in Yjs | ||
[y-list](https://github.com/y-js/y-list) | A shared linked list implementation. Circular references are supported | ||
[y-selections](https://github.com/y-js/y-selections) | Manages selections on types that use linear structures (e.g. the y-list type). You can select a range of elements and assign meaning to them. | ||
[y-xml](https://github.com/y-js/y-xml) | An implementation of the DOM. You can create a two way binding to Browser DOM objects | ||
[y-text](https://github.com/y-js/y-text) | Collaborate on text. You can create a two way binding to textareas, input elements, or HTML elements (e.g. *h1*, or *p*) | ||
[y-richtext](https://github.com/y-js/y-richtext) | Collaborate on rich text. You can create a two way binding to several editors | ||
| Name | Description | | ||
|----------|-------------------| | ||
|[map](https://github.com/y-js/y-map) | Add, update, and remove properties of an object. Included in Yjs| | ||
|[array](https://github.com/y-js/y-array) | A shared linked list implementation | | ||
|[selections](https://github.com/y-js/y-selections) | Manages selections on types that use linear structures (e.g. the y-array type). Select a range of elements, and assign meaning to them.| | ||
|[xml](https://github.com/y-js/y-xml) | An implementation of the DOM. You can create a two way binding to Browser DOM objects| | ||
|[text](https://github.com/y-js/y-text) | Collaborate on text. Supports two way binding to textareas, input elements, or HTML elements (e.g. *h1*, or *p*)| | ||
|[richtext](https://github.com/y-js/y-richtext) | Collaborate on rich text. Supports two way binding to several editors| | ||
@@ -23,7 +23,7 @@ Unlike other frameworks, Yjs supports P2P message propagation and is not bound to a specific communication protocol. Therefore, Yjs is extremely scalable and can be used in a wide range of application scenarios. | ||
Name | Description | ||
---------------------------------------- | ------------------------------------------------------- | ||
[y-xmpp](https://github.com/y-js/y-xmpp) | Propagate updates in a XMPP multi-user-chat room ([XEP-0045](http://xmpp.org/extensions/xep-0045.html)) | ||
[y-webrtc](https://github.com/y-js/y-webrtc) | Propagate updates Browser2Browser via WebRTC | ||
[y-test](https://github.com/y-js/y-test) | A Connector for testing purposes. It is designed to simulate delays that happen in worst case scenarios | ||
|Name | Description | | ||
|----------------|-----------------------------------| | ||
|[xmpp](https://github.com/y-js/y-xmpp) | Propagate updates in a XMPP multi-user-chat room ([XEP-0045](http://xmpp.org/extensions/xep-0045.html))| | ||
|[webrtc](https://github.com/y-js/y-webrtc) | Propagate updates Browser2Browser via WebRTC| | ||
|[test](https://github.com/y-js/y-test) | A Connector for testing purposes. It is designed to simulate delays that happen in worst case scenarios| | ||
@@ -36,7 +36,6 @@ | ||
* .. arbitrary complex data types | ||
* .. offline editing: Only relevant changes are propagated on rejoin (unimplemented) | ||
* .. AnyUndo: Undo *any* action that was executed in constant time (unimplemented) | ||
* .. offline editing: Changes are stored persistently and only relevant changes are propagated on rejoin | ||
* .. AnyUndo: Undo *any* action that was executed in constant time (coming..) | ||
* .. Intention Preservation: When working on Text, the intention of your changes are preserved. This is particularily important when working offline. Every type has a notion on how we define Intention Preservation on it. | ||
## Use it! | ||
@@ -73,4 +72,4 @@ You can find a tutorial, and examples on the [website](http://y-js.org). Furthermore, the [github wiki](https://github.com/y-js/yjs/wiki) offers more information about how you can use Yjs in your application. | ||
# Y.Object | ||
Yjs includes only one type by default - the Y.Object type. It mimics the behaviour of a JSON Object. You can create, update, and remove properies on the Y.Object type. Furthermore, you can observe changes on this type as you can observe changes on Javascript Objects with [Object.observe](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe) - an ECMAScript 7 proposal which is likely to become accepted by the committee. Until then, we have our own implementation. | ||
# Y.Map | ||
Yjs includes only one type by default - the Y.Map type. It mimics the behaviour of a javascript Object. You can create, update, and remove properies on the Y.Map type. Furthermore, you can observe changes on this type as you can observe changes on Javascript Objects with [Object.observe](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/observe) - an ECMAScript 7 proposal which is likely to become accepted by the committee. Until then, we have our own implementation. | ||
@@ -81,18 +80,14 @@ | ||
``` | ||
var y = new Y.Object(); | ||
var map = y.set("new_map", Y.Map).then(function(map){ | ||
map // is my map type | ||
}); | ||
``` | ||
* Create with existing Object | ||
* Every instance of Y is an Y.Map | ||
``` | ||
var y = new Y.Object({number: 73}); | ||
var y = new Y(options); | ||
``` | ||
* Every instance of Y is an Y.Object | ||
``` | ||
var y = new Y(connector); | ||
``` | ||
* .val() | ||
* Retrieve all properties of this type as a JSON Object | ||
* .val(name) | ||
* Retrieve the value of a property | ||
* .val(name, value) | ||
* Set/update a property. Returns `this` Y.Object | ||
* .get(name) | ||
* Retrieve the value of a property. If the value is a type, `.get(name)` returns a promise | ||
* .set(name, value) | ||
* Set/update a property. `value` may be a primitive type, or a custom type definition (e.g. `Y.Map`) | ||
* .delete(name) | ||
@@ -102,2 +97,4 @@ * Delete a property | ||
* The `observer` is called whenever something on this object changes. Throws *add*, *update*, and *delete* events | ||
* .observePath(path, observer) | ||
* `path` is an array of property names. `observer` is called when the property under `path` is set, deleted, or updated | ||
* .unobserve(f) | ||
@@ -110,7 +107,5 @@ * Delete an observer | ||
# A note on time complexities | ||
* .val() | ||
* O(|properties|) | ||
* .val(name) | ||
* .get(name) | ||
* O(1) | ||
* .val(name, value) | ||
* .set(name, value) | ||
* O(1) | ||
@@ -130,6 +125,20 @@ * .delete(name) | ||
## Get help | ||
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/y-js/yjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) | ||
There are some friendly people on [![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/y-js/yjs?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) who may help you with your problem, and answer your questions. | ||
Please report _any_ issues to the [Github issue page](https://github.com/y-js/yjs/issues)! I try to fix them very soon, if possible. | ||
## Changelog | ||
### 1.0.0 | ||
This is a complete rewrite of the 0.5 version of Yjs. Since Yjs 1.0 it is possible to work asynchronously on a persistent database, which enables offline support. | ||
* Switched to semver versioning | ||
* Requires a promise implementation in environment (es6 promises suffice, included in all the major browsers). Otherwise you have to include a polyfill | ||
* Y.Object has been renamed to Y.Map | ||
* Y.Map exchanges `.val(name [, value])` in favor of `.set(name, value)` and `.get(name)` | ||
* Y.Map `.get(name)` returns a promise, if the value is a custom type | ||
* The Connector definition slightly changed (I'll update the wiki) | ||
* The Type definitions completely changed, so you have to rewrite them (I'll rewrite the article in the wiki) | ||
* Support for several packaging systems | ||
* Flowtype | ||
## Contribution | ||
@@ -144,2 +153,3 @@ I created this framework during my bachelor thesis at the chair of computer science 5 [(i5)](http://dbis.rwth-aachen.de/cms), RWTH University. Since December 2014 I'm working on Yjs as a part of my student worker job at the i5. | ||
[ShareJs]: https://github.com/share/ShareJS | ||
[OpenCoweb]: https://github.com/opencoweb/coweb | ||
[OpenCoweb]: https://github.com/opencoweb/coweb/wiki | ||
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Minified code
QualityThis package contains minified code. This may be harmless in some cases where minified code is included in packaged libraries, however packages on npm should not minify code.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
30
1
148
6
662951
43
7815
1