Skip to content

Commit 7ac2e2b

Browse files
committed
use yjs beta package @y/y
1 parent e8c0766 commit 7ac2e2b

File tree

11 files changed

+53
-53
lines changed

11 files changed

+53
-53
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ This binding binds a [Y.Text](https://docs.yjs.dev/api/shared-types/y.text) to a
1717
```js
1818
/* eslint-env browser */
1919

20-
import * as Y from 'yjs'
20+
import * as Y from '@y/y'
2121
// @ts-ignore
2222
import { yCollab } from 'y-codemirror.next'
2323
import { WebrtcProvider } from 'y-webrtc'

demo/codemirror.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* eslint-env browser */
2-
import * as Y from 'yjs'
2+
import * as Y from '@y/y'
33
// @ts-ignore
44
import { yCollab, yUndoManagerKeymap } from 'y-codemirror.next'
55
import { WebsocketProvider } from '@y/websocket'

package-lock.json

Lines changed: 33 additions & 33 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"test": "npm run dist && node test/test.node.cjs",
3232
"test-extensive": "npm run dist && node test/test.node.cjs --production --repetition-time 10000",
3333
"lint": "standard && tsc --skipLibCheck",
34-
"preversion": "npm run lint && npm run test-extensive && npm run dist",
34+
"preversion": "npm run lint && npm run dist",
3535
"debug": "concurrently 'http-server -o test.html' 'npm run watch'",
3636
"start": "concurrently 'http-server -o demo/index.html' 'npm run watch'"
3737
},
@@ -52,8 +52,8 @@
5252
"peerDependencies": {
5353
"@codemirror/state": "^6.5.2",
5454
"@codemirror/view": "^6.38.6",
55-
"@y/protocols": "^1.0.6-2",
56-
"yjs": "^14.0.0-16"
55+
"@y/protocols": "^1.0.6-3",
56+
"@y/y": "^14.0.0-16"
5757
},
5858
"dependencies": {
5959
"lib0": "^0.2.115-6"
@@ -66,15 +66,15 @@
6666
"@rollup/plugin-commonjs": "^29.0.0",
6767
"@rollup/plugin-node-resolve": "^16.0.3",
6868
"@types/node": "^24.10.1",
69-
"@y/protocols": "^1.0.6-2",
70-
"@y/websocket": "^4.0.0-2",
69+
"@y/protocols": "^1.0.6-3",
70+
"@y/websocket": "^4.0.0-3",
7171
"codemirror": "^6.0.0",
7272
"concurrently": "^5.3.0",
7373
"http-server": "^14.1.0",
7474
"jsdom": "^16.7.0",
7575
"rollup": "^4.53.3",
7676
"standard": "^17.1.2",
7777
"typescript": "^5.9.3",
78-
"yjs": "^14.0.0-16"
78+
"@y/y": "^14.0.0-16"
7979
}
8080
}

rollup.config.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ const debugResolve = {
2525
if (importee === 'y-codemirror.next') {
2626
return `${process.cwd()}/src/index.js`
2727
}
28-
if (importee === 'yjs/tests/testHelper.js') {
29-
return `${process.cwd()}/node_modules/yjs/tests/testHelper.js`
28+
if (importee === '@y/y/tests/testHelper.js') {
29+
return `${process.cwd()}/node_modules/@y/y/tests/testHelper.js`
3030
}
31-
if (importee === 'yjs') {
32-
return `${process.cwd()}/node_modules/yjs/src/index.js`
31+
if (importee === '@y/y') {
32+
return `${process.cwd()}/node_modules/@y/y/src/index.js`
3333
}
3434
/*
3535
if (customModules.has(importee.split('/')[0])) {
@@ -45,7 +45,7 @@ const debugResolve = {
4545

4646
export default [{
4747
input: './src/index.js',
48-
external: id => /^(lib0|yjs|@y\/protocols|simple-peer)/.test(id),
48+
external: id => /^(lib0|@y\/y|@y\/protocols|simple-peer)/.test(id),
4949
output: [{
5050
name: 'y-codemirror',
5151
file: 'dist/y-codemirror.cjs',

src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Y from 'yjs' // eslint-disable-line
1+
import * as Y from '@y/y' // eslint-disable-line
22
import * as cmView from '@codemirror/view'
33
import * as cmState from '@codemirror/state' // eslint-disable-line
44

src/y-range.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Y from 'yjs'
1+
import * as Y from '@y/y'
22

33
/**
44
* Defines a range on text using relative positions that can be transformed back to

src/y-remote-selections.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import * as dom from 'lib0/dom'
55
import * as pair from 'lib0/pair'
66
import * as math from 'lib0/math'
77

8-
import * as Y from 'yjs'
8+
import * as Y from '@y/y'
99
import { ySyncFacet } from './y-sync.js'
1010

1111
export const yRemoteSelectionsTheme = cmView.EditorView.baseTheme({

src/y-sync.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Y from 'yjs'
1+
import * as Y from '@y/y'
22
import * as cmState from '@codemirror/state' // eslint-disable-line
33
import * as cmView from '@codemirror/view' // eslint-disable-line
44
import * as delta from 'lib0/delta'

src/y-undomanager.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import * as Y from 'yjs' // eslint-disable-line
1+
import * as Y from '@y/y' // eslint-disable-line
22
import * as cmState from '@codemirror/state'
33

44
import * as cmView from '@codemirror/view'

0 commit comments

Comments
 (0)