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

yjs

Package Overview
Dependencies
Maintainers
1
Versions
286
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

yjs - npm Package Compare versions

Comparing version 13.5.23 to 13.5.24

3

dist/src/types/AbstractType.d.ts

@@ -134,2 +134,5 @@ export class ArraySearchMarker {

} | Array<any> | number | null | string | Uint8Array>): void;
export function typeListPushGenerics(transaction: Transaction, parent: AbstractType<any>, content: Array<{
[x: string]: any;
} | Array<any> | number | null | string | Uint8Array>): void;
export function typeListDelete(transaction: Transaction, parent: AbstractType<any>, index: number, length: number): void;

@@ -136,0 +139,0 @@ export function typeMapDelete(transaction: Transaction, parent: AbstractType<any>, key: string): void;

@@ -54,2 +54,4 @@ /**

* @param {Array<T>} content Array of content to append.
*
* @todo Use the following implementation in all types.
*/

@@ -56,0 +58,0 @@ push(content: Array<T>): void;

2

package.json
{
"name": "yjs",
"version": "13.5.23",
"version": "13.5.24",
"description": "Shared Editing Library",

@@ -5,0 +5,0 @@ "main": "./dist/yjs.cjs",

@@ -739,4 +739,27 @@

/**
* Pushing content is special as we generally want to push after the last item. So we don't have to update
* the serach marker.
*
* @param {Transaction} transaction
* @param {AbstractType<any>} parent
* @param {Array<Object<string,any>|Array<any>|number|null|string|Uint8Array>} content
*
* @private
* @function
*/
export const typeListPushGenerics = (transaction, parent, content) => {
// Use the marker with the highest index and iterate to the right.
const marker = (parent._searchMarker || []).reduce((maxMarker, currMarker) => currMarker.index > maxMarker.index ? currMarker : maxMarker, { index: 0, p: parent._start })
let n = marker.p
if (n) {
while (n.right) {
n = n.right
}
}
return typeListInsertGenericsAfter(transaction, parent, n, content)
}
/**
* @param {Transaction} transaction
* @param {AbstractType<any>} parent
* @param {number} index

@@ -743,0 +766,0 @@ * @param {number} length

@@ -13,2 +13,3 @@ /**

typeListInsertGenerics,
typeListPushGenerics,
typeListDelete,

@@ -146,5 +147,13 @@ typeListMap,

* @param {Array<T>} content Array of content to append.
*
* @todo Use the following implementation in all types.
*/
push (content) {
this.insert(this.length, content)
if (this.doc !== null) {
transact(this.doc, transaction => {
typeListPushGenerics(transaction, this, content)
})
} else {
/** @type {Array<any>} */ (this._prelimContent).push(...content)
}
}

@@ -151,0 +160,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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