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

@liveblocks/yjs

Package Overview
Dependencies
Maintainers
6
Versions
222
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@liveblocks/yjs - npm Package Compare versions

Comparing version 1.0.12-yjs1 to 1.0.12-yjs2

dist/index.mjs

50

dist/index.js

@@ -1,3 +0,8 @@

"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { newObj[key] = obj[key]; } } } newObj.default = obj; return newObj; } }var __defProp = Object.defineProperty;
"use strict";
var __create = Object.create;
var __defProp = Object.defineProperty;
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
var __getOwnPropNames = Object.getOwnPropertyNames;
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
var __getProtoOf = Object.getPrototypeOf;
var __hasOwnProp = Object.prototype.hasOwnProperty;

@@ -17,2 +22,23 @@ var __propIsEnum = Object.prototype.propertyIsEnumerable;

};
var __export = (target, all) => {
for (var name in all)
__defProp(target, name, { get: all[name], enumerable: true });
};
var __copyProps = (to, from2, except, desc) => {
if (from2 && typeof from2 === "object" || typeof from2 === "function") {
for (let key of __getOwnPropNames(from2))
if (!__hasOwnProp.call(to, key) && key !== except)
__defProp(to, key, { get: () => from2[key], enumerable: !(desc = __getOwnPropDesc(from2, key)) || desc.enumerable });
}
return to;
};
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
// If the importer is in node compatibility mode or this is not an ESM
// file that has been converted to a CommonJS file using a Babel-
// compatible transform (i.e. "__esModule" has not been set), then set
// "default" to the CommonJS "module.exports" for node compatibility.
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
mod
));
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
var __async = (__this, __arguments, generator) => {

@@ -40,3 +66,9 @@ return new Promise((resolve, reject) => {

// src/index.ts
var _jsbase64 = require('js-base64');
var src_exports = {};
__export(src_exports, {
Awareness: () => Awareness,
default: () => LiveblocksProvider
});
module.exports = __toCommonJS(src_exports);
var import_js_base64 = require("js-base64");

@@ -114,3 +146,3 @@ // ../../node_modules/lib0/map.js

// src/index.ts
var _yjs = require('yjs'); var Y = _interopRequireWildcard(_yjs);
var Y = __toESM(require("yjs"));
var Awareness = class extends Observable {

@@ -192,3 +224,3 @@ constructor(doc, room) {

if (origin !== "backend") {
const encodedUpdate = _jsbase64.Base64.fromUint8Array(update);
const encodedUpdate = import_js_base64.Base64.fromUint8Array(update);
this.room.updateDoc(encodedUpdate);

@@ -218,3 +250,3 @@ if (this.httpEndpoint) {

this.awareness.clientID = this.doc.clientID;
const encodedVector = _jsbase64.Base64.fromUint8Array(
const encodedVector = import_js_base64.Base64.fromUint8Array(
Y.encodeStateVector(this.doc)

@@ -228,3 +260,3 @@ );

this.room.events.docUpdated.subscribe((updates) => {
const decodedUpdates = updates.map(_jsbase64.Base64.toUint8Array);
const decodedUpdates = updates.map(import_js_base64.Base64.toUint8Array);
const update = Y.mergeUpdates(decodedUpdates);

@@ -260,3 +292,3 @@ Y.applyUpdate(this.doc, update, "backend");

this.lastUpdateDate = new Date(lastUpdate);
const update = Y.mergeUpdates(updates.map(_jsbase64.Base64.toUint8Array));
const update = Y.mergeUpdates(updates.map(import_js_base64.Base64.toUint8Array));
Y.applyUpdate(this.doc, update, "backend");

@@ -271,5 +303,1 @@ });

};
exports.Awareness = Awareness; exports.default = LiveblocksProvider;
{
"name": "@liveblocks/yjs",
"version": "1.0.12-yjs1",
"version": "1.0.12-yjs2",
"description": "An integration with . Liveblocks is the all-in-one toolkit to build collaborative products like Figma, Notion, and more.",

@@ -22,4 +22,4 @@ "license": "Apache-2.0",

"dependencies": {
"@liveblocks/client": "1.0.12-yjs1",
"@liveblocks/core": "1.0.12-yjs1",
"@liveblocks/client": "1.0.12-yjs2",
"@liveblocks/core": "1.0.12-yjs2",
"js-base64": "^3.7.5"

@@ -26,0 +26,0 @@ },

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