-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #86 from fcollonval/import-yjs-models
Import shared model
- Loading branch information
Showing
23 changed files
with
8,770 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
node_modules | ||
lib |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
lib | ||
package.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
{ | ||
"singleQuote": true, | ||
"trailingComma": "none", | ||
"arrowParens": "avoid" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
/* | ||
* Copyright (c) Jupyter Development Team. | ||
* Distributed under the terms of the Modified BSD License. | ||
*/ | ||
|
||
module.exports = { | ||
presets: [ | ||
[ | ||
'@babel/preset-env', | ||
{ | ||
targets: { | ||
node: 'current' | ||
} | ||
} | ||
] | ||
] | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
/* | ||
* Copyright (c) Jupyter Development Team. | ||
* Distributed under the terms of the Modified BSD License. | ||
*/ | ||
|
||
const path = require('path'); | ||
const esModules = ['lib0', 'y-protocols', 'y-websocket', 'yjs'].join('|'); | ||
|
||
module.exports = { | ||
preset: 'ts-jest/presets/js-with-babel', | ||
testTimeout: 10000, | ||
testPathIgnorePatterns: ['/lib/', '/node_modules/'], | ||
moduleFileExtensions: [ | ||
'ts', | ||
'tsx', | ||
'js', | ||
'jsx', | ||
'json', | ||
'node', | ||
'mjs', | ||
'cjs' | ||
], | ||
transformIgnorePatterns: [`/node_modules/(?!${esModules}).+`], | ||
reporters: ['default'], | ||
coverageReporters: ['json', 'lcov', 'text', 'html'], | ||
coverageDirectory: path.join(__dirname, 'coverage'), | ||
testRegex: '/test/.*.spec.ts[x]?$', | ||
globals: { | ||
'ts-jest': { | ||
tsconfig: `./tsconfig.test.json` | ||
} | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
{ | ||
"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": { | ||
"@babel/core": "^7.10.2", | ||
"@babel/preset-env": "^7.10.2", | ||
"@types/jest": "^26.0.10", | ||
"@typescript-eslint/eslint-plugin": "~5.28.0", | ||
"@typescript-eslint/parser": "~5.28.0", | ||
"eslint": "~8.17.0", | ||
"eslint-config-prettier": "~8.5.0", | ||
"eslint-plugin-jest": "~26.5.3", | ||
"eslint-plugin-prettier": "~4.0.0", | ||
"eslint-plugin-react": "~7.29.4", | ||
"jest": "^26.4.2", | ||
"prettier": "~2.6.0", | ||
"rimraf": "~3.0.0", | ||
"ts-jest": "^26.3.0", | ||
"typescript": "~4.7.3" | ||
}, | ||
"publishConfig": { | ||
"access": "public" | ||
} | ||
} |
Oops, something went wrong.