diff --git a/README.md b/README.md index dcfa0b5b..5fb44e08 100644 --- a/README.md +++ b/README.md @@ -49,7 +49,8 @@ Sponsorship also comes with special perks! [![Become a Sponsor](https://img.shie ## Who is using Yjs -* [Serenity Notes](https://www.serenity.re/en/notes) End-to-end encrypted collaborative notes app. +* [Serenity Notes](https://www.serenity.re/en/notes) End-to-end encrypted + collaborative notes app. * [Relm](https://www.relm.us/) A collaborative gameworld for teamwork and community. :star2: * [Input](https://input.com/) A collaborative note taking app. :star2: diff --git a/package-lock.json b/package-lock.json index 88ab6c79..871af1d0 100644 --- a/package-lock.json +++ b/package-lock.json @@ -78,9 +78,9 @@ } }, "@rollup/plugin-node-resolve": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.0.tgz", - "integrity": "sha512-qHjNIKYt5pCcn+5RUBQxK8krhRvf1HnyVgUCcFFcweDS7fhkOLZeYh0mhHK6Ery8/bb9tvN/ubPzmfF0qjDCTA==", + "version": "11.2.1", + "resolved": "https://registry.npmjs.org/@rollup/plugin-node-resolve/-/plugin-node-resolve-11.2.1.tgz", + "integrity": "sha512-yc2n43jcqVyGE2sqV5/YCmocy9ArjVAP/BeXyTtADTBBX6V0e5UMqwO8CdQ0kzjb6zu5P1qMzsScCMRvE9OlVg==", "dev": true, "requires": { "@rollup/pluginutils": "^3.1.0", @@ -135,9 +135,9 @@ "dev": true }, "@types/node": { - "version": "14.14.31", - "resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.31.tgz", - "integrity": "sha512-vFHy/ezP5qI0rFgJ7aQnjDXwAMrG0KqqIH7tQG5PPv3BWBayOPIQNBjVc/P6hhdZfMx51REc6tfDNXHUio893g==", + "version": "15.0.3", + "resolved": "https://registry.npmjs.org/@types/node/-/node-15.0.3.tgz", + "integrity": "sha512-/WbxFeBU+0F79z9RdEOXH4CsDga+ibi5M8uEYr91u3CkT/pdWcV8MCook+4wDPnZBexRdwWS+PiVZ2xJviAzcQ==", "dev": true }, "@types/resolve": { @@ -1479,9 +1479,9 @@ "dev": true }, "isomorphic.js": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/isomorphic.js/-/isomorphic.js-0.2.0.tgz", - "integrity": "sha512-U7JlVUbmVYvV1ddGLhc7pvoMNp+1uGwE3sCIGHEh9I4ldSJJ9LtLog5/H8GzZkwLjmbeEvIbQb50nsre57nDuw==" + "version": "0.2.4", + "resolved": "https://registry.npmjs.org/isomorphic.js/-/isomorphic.js-0.2.4.tgz", + "integrity": "sha512-Y4NjZceAwaPXctwsHgNsmfuPxR8lJ3f8X7QTAkhltrX4oGIv+eTlgHLXn4tWysC9zGTi929gapnPp+8F8cg7nA==" }, "js-tokens": { "version": "4.0.0", @@ -1598,11 +1598,11 @@ } }, "lib0": { - "version": "0.2.38", - "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.38.tgz", - "integrity": "sha512-ZxnX62R5weebi8bH/Ipc6JBiQIsiQ1D7p3r96zulSSu1byW6DDWSBeI8WC/W5UGtkZ80GktX3JNY2pqhNiXWGA==", + "version": "0.2.41", + "resolved": "https://registry.npmjs.org/lib0/-/lib0-0.2.41.tgz", + "integrity": "sha512-lZ0I6N81tIDgoPIlUTRhb6mNjPsG5BXIbaK/UbtjakcYnfR+O64bKtIrLXDDnfd7nAo4vpGeZ0mPzbTsNTREcg==", "requires": { - "isomorphic.js": "^0.2.0" + "isomorphic.js": "^0.2.4" } }, "linkify-it": { @@ -2430,9 +2430,9 @@ } }, "rollup": { - "version": "2.39.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.39.0.tgz", - "integrity": "sha512-+WR3bttcq7zE+BntH09UxaW3bQo3vItuYeLsyk4dL2tuwbeSKJuvwiawyhEnvRdRgrII0Uzk00FpctHO/zB1kw==", + "version": "2.47.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-2.47.0.tgz", + "integrity": "sha512-rqBjgq9hQfW0vRmz+0S062ORRNJXvwRpzxhFXORvar/maZqY6za3rgQ/p1Glg+j1hnc1GtYyQCPiAei95uTElg==", "dev": true, "requires": { "fsevents": "~2.3.1" @@ -2828,9 +2828,9 @@ "dev": true }, "typescript": { - "version": "4.1.5", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.1.5.tgz", - "integrity": "sha512-6OSu9PTIzmn9TCDiovULTnET6BgXtDYL4Gg4szY+cGsc3JP1dQL8qvE8kShTRx1NIw4Q9IBHlwODjkjWEtMUyA==", + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.2.4.tgz", + "integrity": "sha512-V+evlYHZnQkaz8TRBuxTA92yZBPotr5H+WhQ7bD3hZUndx5tGOa1fuCgeSjxAzM1RiN5IzvadIXTVefuuwZCRg==", "dev": true }, "uc.micro": { diff --git a/package.json b/package.json index 4191826b..2e229390 100644 --- a/package.json +++ b/package.json @@ -58,7 +58,8 @@ "Yjs", "CRDT", "offline", - "shared editing", + "offline-first", + "shared-editing", "concurrency", "collaboration" ], @@ -70,19 +71,19 @@ }, "homepage": "https://docs.yjs.dev", "dependencies": { - "lib0": "^0.2.38" + "lib0": "^0.2.41" }, "devDependencies": { "@rollup/plugin-commonjs": "^17.0.0", - "@rollup/plugin-node-resolve": "^11.2.0", + "@rollup/plugin-node-resolve": "^11.2.1", "concurrently": "^3.6.1", "http-server": "^0.12.3", "jsdoc": "^3.6.6", "markdownlint-cli": "^0.23.2", - "rollup": "^2.39.0", + "rollup": "^2.47.0", "standard": "^14.3.4", "tui-jsdoc-template": "^1.2.2", - "typescript": "^4.1.5", + "typescript": "^4.2.4", "y-protocols": "^1.0.4" } } diff --git a/rollup.config.js b/rollup.config.js index 809cf263..8c63bcba 100644 --- a/rollup.config.js +++ b/rollup.config.js @@ -45,7 +45,7 @@ export default [{ sourcemap: true, paths: path => { if (/^lib0\//.test(path)) { - return `lib0/dist/${path.slice(5, -3)}.cjs` + return `lib0/dist/${path.slice(5)}.cjs` } return path } diff --git a/src/structs/AbstractStruct.js b/src/structs/AbstractStruct.js index 889be3ab..38457aef 100644 --- a/src/structs/AbstractStruct.js +++ b/src/structs/AbstractStruct.js @@ -3,7 +3,7 @@ import { UpdateEncoderV1, UpdateEncoderV2, ID, Transaction // eslint-disable-line } from '../internals.js' -import * as error from 'lib0/error.js' +import * as error from 'lib0/error' export class AbstractStruct { /** diff --git a/src/structs/ContentBinary.js b/src/structs/ContentBinary.js index 30e55fe5..2708f53b 100644 --- a/src/structs/ContentBinary.js +++ b/src/structs/ContentBinary.js @@ -2,7 +2,7 @@ import { UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, StructStore, Item, Transaction // eslint-disable-line } from '../internals.js' -import * as error from 'lib0/error.js' +import * as error from 'lib0/error' export class ContentBinary { /** diff --git a/src/structs/ContentDoc.js b/src/structs/ContentDoc.js index 939734c1..89233a5b 100644 --- a/src/structs/ContentDoc.js +++ b/src/structs/ContentDoc.js @@ -3,7 +3,7 @@ import { Doc, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, StructStore, Transaction, Item // eslint-disable-line } from '../internals.js' -import * as error from 'lib0/error.js' +import * as error from 'lib0/error' /** * @private diff --git a/src/structs/ContentEmbed.js b/src/structs/ContentEmbed.js index 27dcd3fa..a64c53fa 100644 --- a/src/structs/ContentEmbed.js +++ b/src/structs/ContentEmbed.js @@ -3,7 +3,7 @@ import { UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, StructStore, Item, Transaction // eslint-disable-line } from '../internals.js' -import * as error from 'lib0/error.js' +import * as error from 'lib0/error' /** * @private diff --git a/src/structs/ContentFormat.js b/src/structs/ContentFormat.js index fb2610d2..4b82bba7 100644 --- a/src/structs/ContentFormat.js +++ b/src/structs/ContentFormat.js @@ -3,7 +3,7 @@ import { AbstractType, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, Item, StructStore, Transaction // eslint-disable-line } from '../internals.js' -import * as error from 'lib0/error.js' +import * as error from 'lib0/error' /** * @private diff --git a/src/structs/ContentType.js b/src/structs/ContentType.js index 3be38298..30851077 100644 --- a/src/structs/ContentType.js +++ b/src/structs/ContentType.js @@ -10,7 +10,7 @@ import { UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, StructStore, Transaction, Item, YEvent, AbstractType // eslint-disable-line } from '../internals.js' -import * as error from 'lib0/error.js' +import * as error from 'lib0/error' /** * @type {Array>} diff --git a/src/structs/Item.js b/src/structs/Item.js index 95ef3f6a..b88407af 100644 --- a/src/structs/Item.js +++ b/src/structs/Item.js @@ -25,8 +25,8 @@ import { UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, ContentType, ContentDeleted, StructStore, ID, AbstractType, Transaction // eslint-disable-line } from '../internals.js' -import * as error from 'lib0/error.js' -import * as binary from 'lib0/binary.js' +import * as error from 'lib0/error' +import * as binary from 'lib0/binary' /** * @todo This should return several items diff --git a/src/structs/Skip.js b/src/structs/Skip.js index c763f853..3db2399d 100644 --- a/src/structs/Skip.js +++ b/src/structs/Skip.js @@ -3,8 +3,8 @@ import { AbstractStruct, UpdateEncoderV1, UpdateEncoderV2, StructStore, Transaction, ID // eslint-disable-line } from '../internals.js' -import * as error from 'lib0/error.js' -import * as encoding from 'lib0/encoding.js' +import * as error from 'lib0/error' +import * as encoding from 'lib0/encoding' export const structSkipRefNumber = 10 diff --git a/src/types/AbstractType.js b/src/types/AbstractType.js index 76a88a33..a4e32afc 100644 --- a/src/types/AbstractType.js +++ b/src/types/AbstractType.js @@ -14,10 +14,10 @@ import { ContentDoc, YText, YArray, UpdateEncoderV1, UpdateEncoderV2, Doc, Snapshot, Transaction, EventHandler, YEvent, Item, // eslint-disable-line } from '../internals.js' -import * as map from 'lib0/map.js' -import * as iterator from 'lib0/iterator.js' -import * as error from 'lib0/error.js' -import * as math from 'lib0/math.js' +import * as map from 'lib0/map' +import * as iterator from 'lib0/iterator' +import * as error from 'lib0/error' +import * as math from 'lib0/math' const maxSearchMarker = 80 diff --git a/src/types/YMap.js b/src/types/YMap.js index 2cb0342a..6cb1b309 100644 --- a/src/types/YMap.js +++ b/src/types/YMap.js @@ -17,7 +17,7 @@ import { UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, Doc, Transaction, Item // eslint-disable-line } from '../internals.js' -import * as iterator from 'lib0/iterator.js' +import * as iterator from 'lib0/iterator' /** * @template T diff --git a/src/types/YText.js b/src/types/YText.js index d4114644..0bf4d567 100644 --- a/src/types/YText.js +++ b/src/types/YText.js @@ -29,9 +29,9 @@ import { ArraySearchMarker, UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, ID, Doc, Item, Snapshot, Transaction // eslint-disable-line } from '../internals.js' -import * as object from 'lib0/object.js' -import * as map from 'lib0/map.js' -import * as error from 'lib0/error.js' +import * as object from 'lib0/object' +import * as map from 'lib0/map' +import * as error from 'lib0/error' /** * @param {any} a diff --git a/src/types/YXmlFragment.js b/src/types/YXmlFragment.js index 6aa78bcd..828a9d07 100644 --- a/src/types/YXmlFragment.js +++ b/src/types/YXmlFragment.js @@ -20,7 +20,7 @@ import { UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, Doc, ContentType, Transaction, Item, YXmlText, YXmlHook, Snapshot // eslint-disable-line } from '../internals.js' -import * as error from 'lib0/error.js' +import * as error from 'lib0/error' /** * Define the elements to which a set of CSS queries apply. diff --git a/src/utils/AbstractConnector.js b/src/utils/AbstractConnector.js index aa81508d..ecf76a3b 100644 --- a/src/utils/AbstractConnector.js +++ b/src/utils/AbstractConnector.js @@ -1,5 +1,5 @@ -import { Observable } from 'lib0/observable.js' +import { Observable } from 'lib0/observable' import { Doc // eslint-disable-line diff --git a/src/utils/DeleteSet.js b/src/utils/DeleteSet.js index 9e0efece..d396c97b 100644 --- a/src/utils/DeleteSet.js +++ b/src/utils/DeleteSet.js @@ -8,11 +8,11 @@ import { DSDecoderV1, DSEncoderV1, DSDecoderV2, DSEncoderV2, Item, GC, StructStore, Transaction, ID // eslint-disable-line } from '../internals.js' -import * as array from 'lib0/array.js' -import * as math from 'lib0/math.js' -import * as map from 'lib0/map.js' -import * as encoding from 'lib0/encoding.js' -import * as decoding from 'lib0/decoding.js' +import * as array from 'lib0/array' +import * as math from 'lib0/math' +import * as map from 'lib0/map' +import * as encoding from 'lib0/encoding' +import * as decoding from 'lib0/decoding' export class DeleteItem { /** diff --git a/src/utils/Doc.js b/src/utils/Doc.js index b18ea09e..779e5714 100644 --- a/src/utils/Doc.js +++ b/src/utils/Doc.js @@ -13,10 +13,10 @@ import { ContentDoc, Item, Transaction, YEvent // eslint-disable-line } from '../internals.js' -import { Observable } from 'lib0/observable.js' -import * as random from 'lib0/random.js' -import * as map from 'lib0/map.js' -import * as array from 'lib0/array.js' +import { Observable } from 'lib0/observable' +import * as random from 'lib0/random' +import * as map from 'lib0/map' +import * as array from 'lib0/array' export const generateNewClientId = random.uint32 diff --git a/src/utils/EventHandler.js b/src/utils/EventHandler.js index c54a5048..33fa6f20 100644 --- a/src/utils/EventHandler.js +++ b/src/utils/EventHandler.js @@ -1,4 +1,4 @@ -import * as f from 'lib0/function.js' +import * as f from 'lib0/function' /** * General event handler implementation. diff --git a/src/utils/ID.js b/src/utils/ID.js index c10d191f..225ee5b4 100644 --- a/src/utils/ID.js +++ b/src/utils/ID.js @@ -1,9 +1,9 @@ import { AbstractType } from '../internals.js' // eslint-disable-line -import * as decoding from 'lib0/decoding.js' -import * as encoding from 'lib0/encoding.js' -import * as error from 'lib0/error.js' +import * as decoding from 'lib0/decoding' +import * as encoding from 'lib0/encoding' +import * as error from 'lib0/error' export class ID { /** diff --git a/src/utils/PermanentUserData.js b/src/utils/PermanentUserData.js index 29fd1f52..6ebd33b1 100644 --- a/src/utils/PermanentUserData.js +++ b/src/utils/PermanentUserData.js @@ -8,7 +8,7 @@ import { DSEncoderV1, DSDecoderV1, ID, DeleteSet, YArrayEvent, Transaction, Doc // eslint-disable-line } from '../internals.js' -import * as decoding from 'lib0/decoding.js' +import * as decoding from 'lib0/decoding' import { mergeDeleteSets, isDeleted } from './DeleteSet.js' diff --git a/src/utils/RelativePosition.js b/src/utils/RelativePosition.js index 764eedb5..614c0bc5 100644 --- a/src/utils/RelativePosition.js +++ b/src/utils/RelativePosition.js @@ -12,9 +12,9 @@ import { ID, Doc, AbstractType // eslint-disable-line } from '../internals.js' -import * as encoding from 'lib0/encoding.js' -import * as decoding from 'lib0/decoding.js' -import * as error from 'lib0/error.js' +import * as encoding from 'lib0/encoding' +import * as decoding from 'lib0/decoding' +import * as error from 'lib0/error' /** * A relative position is based on the Yjs model and is not affected by document changes. diff --git a/src/utils/Snapshot.js b/src/utils/Snapshot.js index 50c64772..abf10e4a 100644 --- a/src/utils/Snapshot.js +++ b/src/utils/Snapshot.js @@ -18,10 +18,10 @@ import { DSEncoderV1, DSEncoderV2, DSDecoderV1, DSDecoderV2, Transaction, Doc, DeleteSet, Item // eslint-disable-line } from '../internals.js' -import * as map from 'lib0/map.js' -import * as set from 'lib0/set.js' -import * as decoding from 'lib0/decoding.js' -import * as encoding from 'lib0/encoding.js' +import * as map from 'lib0/map' +import * as set from 'lib0/set' +import * as decoding from 'lib0/decoding' +import * as encoding from 'lib0/encoding' export class Snapshot { /** diff --git a/src/utils/StructStore.js b/src/utils/StructStore.js index 4a773127..7a2e256c 100644 --- a/src/utils/StructStore.js +++ b/src/utils/StructStore.js @@ -5,8 +5,8 @@ import { Transaction, ID, Item, DSDecoderV2 // eslint-disable-line } from '../internals.js' -import * as math from 'lib0/math.js' -import * as error from 'lib0/error.js' +import * as math from 'lib0/math' +import * as error from 'lib0/error' export class StructStore { constructor () { diff --git a/src/utils/Transaction.js b/src/utils/Transaction.js index 1733b675..ff17aaf1 100644 --- a/src/utils/Transaction.js +++ b/src/utils/Transaction.js @@ -11,14 +11,14 @@ import { Item, generateNewClientId, createID, - UpdateDecoderV1, UpdateDecoderV2, UpdateEncoderV1, UpdateEncoderV2, GC, StructStore, AbstractType, AbstractStruct, YEvent, Doc // eslint-disable-line + UpdateEncoderV1, UpdateEncoderV2, GC, StructStore, AbstractType, AbstractStruct, YEvent, Doc // eslint-disable-line } from '../internals.js' -import * as map from 'lib0/map.js' -import * as math from 'lib0/math.js' -import * as set from 'lib0/set.js' -import * as logging from 'lib0/logging.js' -import { callAll } from 'lib0/function.js' +import * as map from 'lib0/map' +import * as math from 'lib0/math' +import * as set from 'lib0/set' +import * as logging from 'lib0/logging' +import { callAll } from 'lib0/function' /** * A transaction is created for every change on the Yjs model. It is possible diff --git a/src/utils/UndoManager.js b/src/utils/UndoManager.js index cf42dbd1..b7bc80bf 100644 --- a/src/utils/UndoManager.js +++ b/src/utils/UndoManager.js @@ -13,8 +13,8 @@ import { Transaction, Doc, Item, GC, DeleteSet, AbstractType, YEvent // eslint-disable-line } from '../internals.js' -import * as time from 'lib0/time.js' -import { Observable } from 'lib0/observable.js' +import * as time from 'lib0/time' +import { Observable } from 'lib0/observable' class StackItem { /** diff --git a/src/utils/UpdateDecoder.js b/src/utils/UpdateDecoder.js index 74568650..67a38ceb 100644 --- a/src/utils/UpdateDecoder.js +++ b/src/utils/UpdateDecoder.js @@ -1,5 +1,5 @@ -import * as buffer from 'lib0/buffer.js' -import * as decoding from 'lib0/decoding.js' +import * as buffer from 'lib0/buffer' +import * as decoding from 'lib0/decoding' import { ID, createID } from '../internals.js' diff --git a/src/utils/UpdateEncoder.js b/src/utils/UpdateEncoder.js index 764cf7f0..a7c301d3 100644 --- a/src/utils/UpdateEncoder.js +++ b/src/utils/UpdateEncoder.js @@ -1,6 +1,6 @@ -import * as error from 'lib0/error.js' -import * as encoding from 'lib0/encoding.js' +import * as error from 'lib0/error' +import * as encoding from 'lib0/encoding' import { ID // eslint-disable-line diff --git a/src/utils/YEvent.js b/src/utils/YEvent.js index cfbb9123..89d89742 100644 --- a/src/utils/YEvent.js +++ b/src/utils/YEvent.js @@ -4,8 +4,8 @@ import { Item, AbstractType, Transaction, AbstractStruct // eslint-disable-line } from '../internals.js' -import * as set from 'lib0/set.js' -import * as array from 'lib0/array.js' +import * as set from 'lib0/set' +import * as array from 'lib0/array' /** * YEvent describes the changes on a YType. diff --git a/src/utils/encoding.js b/src/utils/encoding.js index c81bdab8..2ba23408 100644 --- a/src/utils/encoding.js +++ b/src/utils/encoding.js @@ -38,11 +38,11 @@ import { DSDecoderV2, Doc, Transaction, GC, Item, StructStore // eslint-disable-line } from '../internals.js' -import * as encoding from 'lib0/encoding.js' -import * as decoding from 'lib0/decoding.js' -import * as binary from 'lib0/binary.js' -import * as map from 'lib0/map.js' -import * as math from 'lib0/math.js' +import * as encoding from 'lib0/encoding' +import * as decoding from 'lib0/decoding' +import * as binary from 'lib0/binary' +import * as map from 'lib0/map' +import * as math from 'lib0/math' /** * @param {UpdateEncoderV1 | UpdateEncoderV2} encoder diff --git a/src/utils/updates.js b/src/utils/updates.js index 4bac25bc..b3aec8d6 100644 --- a/src/utils/updates.js +++ b/src/utils/updates.js @@ -1,9 +1,9 @@ -import * as binary from 'lib0/binary.js' -import * as decoding from 'lib0/decoding.js' -import * as encoding from 'lib0/encoding.js' -import * as logging from 'lib0/logging.js' -import * as math from 'lib0/math.js' +import * as binary from 'lib0/binary' +import * as decoding from 'lib0/decoding' +import * as encoding from 'lib0/encoding' +import * as logging from 'lib0/logging' +import * as math from 'lib0/math' import { createID, readItemContent, diff --git a/tests/compatibility.tests.js b/tests/compatibility.tests.js index 50ab4076..3a7ad4fe 100644 --- a/tests/compatibility.tests.js +++ b/tests/compatibility.tests.js @@ -7,8 +7,8 @@ */ import * as Y from '../src/index.js' -import * as t from 'lib0/testing.js' -import * as buffer from 'lib0/buffer.js' +import * as t from 'lib0/testing' +import * as buffer from 'lib0/buffer' /** * @param {t.TestCase} tc diff --git a/tests/doc.tests.js b/tests/doc.tests.js index dc8c37da..200f5ba3 100644 --- a/tests/doc.tests.js +++ b/tests/doc.tests.js @@ -1,6 +1,6 @@ import * as Y from '../src/index.js' -import * as t from 'lib0/testing.js' +import * as t from 'lib0/testing' /** * Client id should be changed when an instance receives updates from another client using the same client id. diff --git a/tests/encoding.tests.js b/tests/encoding.tests.js index c5afd833..207f13d5 100644 --- a/tests/encoding.tests.js +++ b/tests/encoding.tests.js @@ -1,5 +1,5 @@ -import * as t from 'lib0/testing.js' -import * as promise from 'lib0/promise.js' +import * as t from 'lib0/testing' +import * as promise from 'lib0/promise' import { contentRefs, diff --git a/tests/index.js b/tests/index.js index 53a85b90..2f8d8874 100644 --- a/tests/index.js +++ b/tests/index.js @@ -11,9 +11,9 @@ import * as snapshot from './snapshot.tests.js' import * as updates from './updates.tests.js' import * as relativePositions from './relativePositions.tests.js' -import { runTests } from 'lib0/testing.js' -import { isBrowser, isNode } from 'lib0/environment.js' -import * as log from 'lib0/logging.js' +import { runTests } from 'lib0/testing' +import { isBrowser, isNode } from 'lib0/environment' +import * as log from 'lib0/logging' if (isBrowser) { log.createVConsole(document.body) diff --git a/tests/relativePositions.tests.js b/tests/relativePositions.tests.js index 15b63c47..48b000f3 100644 --- a/tests/relativePositions.tests.js +++ b/tests/relativePositions.tests.js @@ -1,6 +1,6 @@ import * as Y from '../src/internals' -import * as t from 'lib0/testing.js' +import * as t from 'lib0/testing' /** * @param {Y.YText} ytext diff --git a/tests/snapshot.tests.js b/tests/snapshot.tests.js index b52cb67c..dc66a763 100644 --- a/tests/snapshot.tests.js +++ b/tests/snapshot.tests.js @@ -1,5 +1,5 @@ import { createDocFromSnapshot, Doc, snapshot, YMap } from '../src/internals' -import * as t from 'lib0/testing.js' +import * as t from 'lib0/testing' import { init } from './testHelper' /** diff --git a/tests/testHelper.js b/tests/testHelper.js index 5ebb7836..6cb2ba35 100644 --- a/tests/testHelper.js +++ b/tests/testHelper.js @@ -1,10 +1,10 @@ -import * as t from 'lib0/testing.js' -import * as prng from 'lib0/prng.js' -import * as encoding from 'lib0/encoding.js' -import * as decoding from 'lib0/decoding.js' +import * as t from 'lib0/testing' +import * as prng from 'lib0/prng' +import * as encoding from 'lib0/encoding' +import * as decoding from 'lib0/decoding' import * as syncProtocol from 'y-protocols/sync.js' -import * as object from 'lib0/object.js' +import * as object from 'lib0/object' import * as Y from '../src/internals.js' export * from '../src/internals.js' diff --git a/tests/undo-redo.tests.js b/tests/undo-redo.tests.js index c1f5129a..f36e2ad6 100644 --- a/tests/undo-redo.tests.js +++ b/tests/undo-redo.tests.js @@ -5,7 +5,7 @@ import { } from '../src/internals.js' import * as Y from '../src/index.js' -import * as t from 'lib0/testing.js' +import * as t from 'lib0/testing' /** * @param {t.TestCase} tc diff --git a/tests/updates.tests.js b/tests/updates.tests.js index 9c006642..d9f8743d 100644 --- a/tests/updates.tests.js +++ b/tests/updates.tests.js @@ -1,9 +1,9 @@ -import * as t from 'lib0/testing.js' +import * as t from 'lib0/testing' import { init, compare } from './testHelper.js' // eslint-disable-line import * as Y from '../src/index.js' import { readClientsStructRefs, readDeleteSet, UpdateDecoderV2, UpdateEncoderV2, writeDeleteSet } from '../src/internals.js' -import * as encoding from 'lib0/encoding.js' -import * as decoding from 'lib0/decoding.js' +import * as encoding from 'lib0/encoding' +import * as decoding from 'lib0/decoding' /** * @typedef {Object} Enc diff --git a/tests/y-array.tests.js b/tests/y-array.tests.js index f2c0e86f..f86d3947 100644 --- a/tests/y-array.tests.js +++ b/tests/y-array.tests.js @@ -1,9 +1,9 @@ import { init, compare, applyRandomTests, Doc } from './testHelper.js' // eslint-disable-line import * as Y from '../src/index.js' -import * as t from 'lib0/testing.js' -import * as prng from 'lib0/prng.js' -import * as math from 'lib0/math.js' +import * as t from 'lib0/testing' +import * as prng from 'lib0/prng' +import * as math from 'lib0/math' /** * @param {t.TestCase} tc diff --git a/tests/y-map.tests.js b/tests/y-map.tests.js index c1540a76..9ac259ab 100644 --- a/tests/y-map.tests.js +++ b/tests/y-map.tests.js @@ -5,8 +5,8 @@ import { } from '../src/internals.js' import * as Y from '../src/index.js' -import * as t from 'lib0/testing.js' -import * as prng from 'lib0/prng.js' +import * as t from 'lib0/testing' +import * as prng from 'lib0/prng' /** * @param {t.TestCase} tc diff --git a/tests/y-text.tests.js b/tests/y-text.tests.js index ec01b126..fa325750 100644 --- a/tests/y-text.tests.js +++ b/tests/y-text.tests.js @@ -1,7 +1,7 @@ import * as Y from './testHelper.js' -import * as t from 'lib0/testing.js' -import * as prng from 'lib0/prng.js' -import * as math from 'lib0/math.js' +import * as t from 'lib0/testing' +import * as prng from 'lib0/prng' +import * as math from 'lib0/math' const { init, compare } = Y diff --git a/tests/y-xml.tests.js b/tests/y-xml.tests.js index 31513091..f0b6fd38 100644 --- a/tests/y-xml.tests.js +++ b/tests/y-xml.tests.js @@ -1,7 +1,7 @@ import { init, compare } from './testHelper.js' import * as Y from '../src/index.js' -import * as t from 'lib0/testing.js' +import * as t from 'lib0/testing' /** * @param {t.TestCase} tc