Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 23 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,31 @@ jobs:
mamba-version: "*"
channels: conda-forge
python-version: "3.7"

- name: Install dependencies
run: |
mamba install python=${{ matrix.python-version }} pip nodejs
mamba install python=${{ matrix.python-version }} pip nodejs=16 yarn
pip install .[test]
cd tests; npm install
- name: Run tests

- name: Build JavaScript assets
working-directory: javascript
run: |
yarn
yarn build
cd ../tests; npm install

- name: Linter check
if: ${{ !contains(matrix.os, 'windows') }}
working-directory: javascript
run: |
yarn lint:check

- name: Run Python tests
run: |
pytest -v

- name: Run JS tests
working-directory: javascript
run: |
yarn build:test
yarn test:cov
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -130,3 +130,7 @@ dmypy.json

node_modules/
package-lock.json
tests/package-lock.json
javascript/tsconfig.tsbuildinfo
javascript/.eslintcache
javascript/coverage/
34 changes: 17 additions & 17 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -260,59 +260,59 @@

## 0.1.4

([Full Changelog](https://github.com/davidbrochart/jupyter_ydoc/compare/v0.1.3...d6e754a8c957582029d923cadc4e6547a324718c))
([Full Changelog](https://github.com/jupyter-server/jupyter_ydoc/compare/v0.1.3...d6e754a8c957582029d923cadc4e6547a324718c))

### Merged PRs

- Update ypy>=0.5.0 [#9](https://github.com/davidbrochart/jupyter_ydoc/pull/9) ([@davidbrochart](https://github.com/davidbrochart))
- Update ypy>=0.5.0 [#9](https://github.com/jupyter-server/jupyter_ydoc/pull/9) ([@davidbrochart](https://github.com/davidbrochart))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/davidbrochart/jupyter_ydoc/graphs/contributors?from=2022-05-05&to=2022-05-09&type=c))
([GitHub contributors page for this release](https://github.com/jupyter-server/jupyter_ydoc/graphs/contributors?from=2022-05-05&to=2022-05-09&type=c))

[@davidbrochart](https://github.com/search?q=repo%3Adavidbrochart%2Fjupyter_ydoc+involves%3Adavidbrochart+updated%3A2022-05-05..2022-05-09&type=Issues)
[@davidbrochart](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_ydoc+involves%3Adavidbrochart+updated%3A2022-05-05..2022-05-09&type=Issues)

## 0.1.3

([Full Changelog](https://github.com/davidbrochart/jupyter_ydoc/compare/v0.1.2...c68ebe54e500edde4eb34aa598dfb7bbb4d22b63))
([Full Changelog](https://github.com/jupyter-server/jupyter_ydoc/compare/v0.1.2...c68ebe54e500edde4eb34aa598dfb7bbb4d22b63))

### Merged PRs

- Add setuptools to install_requires [#7](https://github.com/davidbrochart/jupyter_ydoc/pull/7) ([@davidbrochart](https://github.com/davidbrochart))
- Add setuptools to install_requires [#7](https://github.com/jupyter-server/jupyter_ydoc/pull/7) ([@davidbrochart](https://github.com/davidbrochart))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/davidbrochart/jupyter_ydoc/graphs/contributors?from=2022-05-05&to=2022-05-05&type=c))
([GitHub contributors page for this release](https://github.com/jupyter-server/jupyter_ydoc/graphs/contributors?from=2022-05-05&to=2022-05-05&type=c))

[@davidbrochart](https://github.com/search?q=repo%3Adavidbrochart%2Fjupyter_ydoc+involves%3Adavidbrochart+updated%3A2022-05-05..2022-05-05&type=Issues)
[@davidbrochart](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_ydoc+involves%3Adavidbrochart+updated%3A2022-05-05..2022-05-05&type=Issues)

## 0.1.2

([Full Changelog](https://github.com/davidbrochart/jupyter_ydoc/compare/v0.1.1...6a1fc44531344e1f930a7fd52b62cbd289873be0))
([Full Changelog](https://github.com/jupyter-server/jupyter_ydoc/compare/v0.1.1...6a1fc44531344e1f930a7fd52b62cbd289873be0))

### Merged PRs

- Improve jupyter_ydoc.ydocs [#5](https://github.com/davidbrochart/jupyter_ydoc/pull/5) ([@davidbrochart](https://github.com/davidbrochart))
- Improve jupyter_ydoc.ydocs [#5](https://github.com/jupyter-server/jupyter_ydoc/pull/5) ([@davidbrochart](https://github.com/davidbrochart))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/davidbrochart/jupyter_ydoc/graphs/contributors?from=2022-05-04&to=2022-05-05&type=c))
([GitHub contributors page for this release](https://github.com/jupyter-server/jupyter_ydoc/graphs/contributors?from=2022-05-04&to=2022-05-05&type=c))

[@davidbrochart](https://github.com/search?q=repo%3Adavidbrochart%2Fjupyter_ydoc+involves%3Adavidbrochart+updated%3A2022-05-04..2022-05-05&type=Issues)
[@davidbrochart](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_ydoc+involves%3Adavidbrochart+updated%3A2022-05-04..2022-05-05&type=Issues)

## 0.1.1

([Full Changelog](https://github.com/davidbrochart/jupyter_ydoc/compare/0.1.0...9db91b826c38116ab1e00b26140dd49950e1a793))
([Full Changelog](https://github.com/jupyter-server/jupyter_ydoc/compare/0.1.0...9db91b826c38116ab1e00b26140dd49950e1a793))

### Merged PRs

- Add test [#3](https://github.com/davidbrochart/jupyter_ydoc/pull/3) ([@davidbrochart](https://github.com/davidbrochart))
- Update README [#1](https://github.com/davidbrochart/jupyter_ydoc/pull/1) ([@davidbrochart](https://github.com/davidbrochart))
- Add test [#3](https://github.com/jupyter-server/jupyter_ydoc/pull/3) ([@davidbrochart](https://github.com/davidbrochart))
- Update README [#1](https://github.com/jupyter-server/jupyter_ydoc/pull/1) ([@davidbrochart](https://github.com/davidbrochart))

### Contributors to this release

([GitHub contributors page for this release](https://github.com/davidbrochart/jupyter_ydoc/graphs/contributors?from=2022-05-02&to=2022-05-04&type=c))
([GitHub contributors page for this release](https://github.com/jupyter-server/jupyter_ydoc/graphs/contributors?from=2022-05-02&to=2022-05-04&type=c))

[@davidbrochart](https://github.com/search?q=repo%3Adavidbrochart%2Fjupyter_ydoc+involves%3Adavidbrochart+updated%3A2022-05-02..2022-05-04&type=Issues)
[@davidbrochart](https://github.com/search?q=repo%3Ajupyter-server%2Fjupyter_ydoc+involves%3Adavidbrochart+updated%3A2022-05-02..2022-05-04&type=Issues)

## 0.1.0
2 changes: 2 additions & 0 deletions javascript/.eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
node_modules
lib
101 changes: 101 additions & 0 deletions javascript/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
module.exports = {
env: {
browser: true,
es6: true,
commonjs: true,
node: true,
'jest/globals': true
},
globals: {
BigInt: 'readonly',
HTMLCollectionOf: 'readonly',
NodeJS: 'readonly',
RequestInit: 'readonly',
RequestInfo: 'readonly',
ScrollLogicalPosition: 'readonly'
},
root: true,
extends: [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'prettier'
],
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
overrides: [
{
files: ['test/**/*.spec.ts'],
plugins: ['jest'],
extends: ['plugin:jest/recommended'],
rules: {
'jest/no-conditional-expect': 'warn',
'jest/valid-title': 'warn',
'jest/no-standalone-expect': [
'error',
{
additionalTestBlockFunctions: ['it']
}
]
}
}
],
rules: {
'@typescript-eslint/naming-convention': [
'error',
{
selector: 'interface',
format: ['PascalCase'],
custom: {
regex: '^I[A-Z]',
match: true
}
}
],
'@typescript-eslint/no-unused-vars': ['warn', { args: 'none' }],
'@typescript-eslint/no-use-before-define': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-non-null-assertion': 'off',
'@typescript-eslint/no-namespace': 'off',
'@typescript-eslint/interface-name-prefix': 'off',
'@typescript-eslint/explicit-function-return-type': 'off',
'@typescript-eslint/ban-ts-comment': ['warn', { 'ts-ignore': true }],
'@typescript-eslint/ban-types': 'warn',
'@typescript-eslint/no-non-null-asserted-optional-chain': 'warn',
'@typescript-eslint/no-var-requires': 'off',
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/triple-slash-reference': 'warn',
'@typescript-eslint/no-inferrable-types': 'off',
camelcase: [
'error',
{
allow: [
'cell_type',
'display_name',
'execution_count',
'orig_nbformat',
'outputs_hidden',
'nbformat_minor'
]
}
],
'id-match': ['error', '^[a-zA-Z_]+[a-zA-Z0-9_]*$'], // https://certitude.consulting/blog/en/invisible-backdoor/
'no-inner-declarations': 'off',
'no-prototype-builtins': 'off',
'no-control-regex': 'warn',
'no-undef': 'warn',
'no-case-declarations': 'warn',
'no-useless-escape': 'off',
'prefer-const': 'off',
'sort-imports': [
'error',
{
ignoreCase: true,
ignoreDeclarationSort: true,
ignoreMemberSort: false,
memberSyntaxSortOrder: ['none', 'all', 'multiple', 'single'],
allowSeparatedGroups: false
}
]
}
};
3 changes: 3 additions & 0 deletions javascript/.prettierignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules
lib
package.json
5 changes: 5 additions & 0 deletions javascript/.prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"singleQuote": true,
"trailingComma": "none",
"arrowParens": "avoid"
}
15 changes: 15 additions & 0 deletions javascript/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "0.2.0",
"configurations": [
{
"type": "node",
"request": "attach",
"name": "Attach to jest",
// Usage:
// Open the parent directory in VSCode
// Run `jlpm test:debug:watch` in a terminal
// Run this debugging task
"port": 9229
}
]
}
12 changes: 12 additions & 0 deletions javascript/jest.config.cjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
/*
* Copyright (c) Jupyter Development Team.
* Distributed under the terms of the Modified BSD License.
*/

const esModules = ['lib0', 'y-protocols', 'y-websocket', 'yjs'].join('|');

module.exports = {
testEnvironment: 'node',
testRegex: 'lib/test/.*.spec.js[x]?$',

};
65 changes: 65 additions & 0 deletions javascript/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
{
"name": "@jupyter-notebook/ydoc",
"version": "0.2.0",
"type": "module",
"description": "Jupyter document structures for collaborative editing using YJS",
"homepage": "https://github.com/jupyter-server/jupyter_ydoc",
"bugs": {
"url": "https://github.com/jupyter-server/jupyter_ydoc/issues"
},
"repository": {
"type": "git",
"url": "https://github.com/jupyter-server/jupyter_ydoc.git"
},
"license": "BSD-3-Clause",
"author": "Project Jupyter",
"main": "lib/index.js",
"types": "lib/index.d.ts",
"directories": {
"lib": "lib/"
},
"files": [
"lib/**/*.{d.ts,js,js.map,json}"
],
"scripts": {
"build": "tsc -b",
"build:test": "tsc --build tsconfig.test.json",
"clean": "rimraf lib && rimraf tsconfig.tsbuildinfo",
"docs": "typedoc src",
"eslint": "eslint --ext .js,.jsx,.ts,.tsx --cache --fix .",
"eslint:check": "eslint --ext .js,.jsx,.ts,.tsx --cache .",
"lint": "yarn prettier && yarn eslint",
"lint:check": "yarn prettier:check && yarn eslint:check",
"prettier": "prettier --write \"**/*{.ts,.tsx,.js,.jsx,.css,.json}\"",
"prettier:check": "prettier --check \"**/*{.ts,.tsx,.js,.jsx,.css,.json}\"",
"test": "jest",
"test:cov": "jest --collect-coverage",
"test:debug": "node --inspect-brk node_modules/.bin/jest --runInBand",
"test:debug:watch": "node --inspect-brk node_modules/.bin/jest --runInBand --watch",
"watch": "tsc -b --watch"
},
"dependencies": {
"@jupyterlab/nbformat": "^3.0.0 || ^4.0.0-alpha.15",
"@lumino/coreutils": "^1.11.0 || ^2.0.0-alpha.6",
"@lumino/disposable": "^1.10.0 || ^2.0.0-alpha.6",
"@lumino/signaling": "^1.10.0 || ^2.0.0-alpha.6",
"y-protocols": "^1.0.5",
"yjs": "^13.5.40"
},
"devDependencies": {
"@types/jest": "^29.0.0",
"@typescript-eslint/eslint-plugin": "^5.36.0",
"@typescript-eslint/parser": "^5.36.0",
"eslint": "^8.17.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-jest": "^27.0.0",
"eslint-plugin-prettier": "^4.0.0",
"jest": "^29.0.0",
"prettier": "^2.6.0",
"rimraf": "^3.0.0",
"typescript": "^4.8.0"
},
"publishConfig": {
"access": "public"
}
}
Loading