diff --git a/.circleci/config.yml b/.circleci/config.yml new file mode 100644 index 00000000..dbfd56f7 --- /dev/null +++ b/.circleci/config.yml @@ -0,0 +1,7 @@ +version: 2.1 +orbs: + node: circleci/node@3.0.0 +workflows: + node-tests: + jobs: + - node/test diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 00000000..a391700d --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,29 @@ +# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions + +name: Node.js CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [10.x, 12.x, 14.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v1 + with: + node-version: ${{ matrix.node-version }} + - run: npm ci + - run: npm run build --if-present + - run: npm test diff --git a/README.md b/README.md index d36b15b8..d19a48b0 100644 --- a/README.md +++ b/README.md @@ -31,18 +31,19 @@ I'm currently looking for sponsors that allow me to be less dependent on contracting work. These awesome backers already fund further development of Yjs: -[![Vincent Waller](https://github.com/vwall.png?size=60)](https://github.com/vwall) -[](https://input.com/) -[![Duane Johnson](https://github.com/canadaduane.png?size=60)](https://github.com/canadaduane) -[![Joe Reeve](https://github.com/ISNIT0.png?size=60)](https://github.com/ISNIT0) -[](https://room.sh/) +[![davidhq](https://github.com/davidhq.png?size=60)](https://github.com/davidhq) +[![Ifiok Jr.](https://github.com/ifiokjr.png?size=60)](https://github.com/ifiokjr) +[![Burke Libbey](https://github.com/burke.png?size=60)](https://github.com/burke) +[![Beni Cherniavsky-Paskin](https://github.com/cben.png?size=60)](https://github.com/cben) +[![Tom Moor](https://github.com/tommoor.png?size=60)](https://github.com/tommoor) +[![Michael Meyers](https://github.com/michaelemeyers.png?size=60)](https://github.com/michaelemeyers) +[![Cristiano Benjamin](https://github.com/csbenjamin.png?size=60)](https://github.com/csbenjamin) +[![Braden](https://github.com/AdventureBeard.png?size=60)](https://github.com/AdventureBeard) +[![nimbuswebinc](https://nimbusweb.me/new-style-img/note-icon.svg)](https://github.com/nimbuswebinc) [![JourneyApps](https://github.com/journeyapps.png?size=60)](https://github.com/journeyapps) [![Adam Brunnmeier](https://github.com/adabru.png?size=60)](https://github.com/adabru) [![Nathanael Anderson](https://github.com/NathanaelA.png?size=60)](https://github.com/NathanaelA) -[![Gremloon](https://github.com/gremloon.png?size=60)](https://github.com/gremloon) -[![ifiokjr](https://github.com/ifiokjr.png?size=60)](https://github.com/ifiokjr) -[![mrfambo](https://github.com/mrfambo.png?size=60)](https://github.com/mrfambo) +[](https://room.sh/) Sponsorship also comes with special perks! [![Become a Sponsor](https://img.shields.io/static/v1?label=Become%20a%20Sponsor&message=%E2%9D%A4&logo=GitHub&style=flat&color=d42f2d)](https://github.com/sponsors/dmonad) diff --git a/package-lock.json b/package-lock.json index 09f6357b..b4c81fca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.4.4", + "version": "13.4.6", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index 3ad5de32..d0eea0c8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "yjs", - "version": "13.4.4", + "version": "13.4.6", "description": "Shared Editing Library", "main": "./dist/yjs.cjs", "module": "./dist/yjs.mjs", diff --git a/src/index.js b/src/index.js index 91d34893..3daecee2 100644 --- a/src/index.js +++ b/src/index.js @@ -45,6 +45,7 @@ export { snapshot, emptySnapshot, findRootTypeKey, + getItem, typeListToArraySnapshot, typeMapGetSnapshot, createDocFromSnapshot, diff --git a/src/utils/Doc.js b/src/utils/Doc.js index 41c241b3..bec8966b 100644 --- a/src/utils/Doc.js +++ b/src/utils/Doc.js @@ -257,6 +257,7 @@ export class Doc extends Observable { }, null, true) } this.emit('destroyed', [true]) + this.emit('destroy', [this]) super.destroy() }