-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import shared model #86
Merged
davidbrochart
merged 13 commits into
jupyter-server:0.2.x
from
fcollonval:import-yjs-models
Nov 7, 2022
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
7b1f25c
Import shared model
fcollonval 75f1a25
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] d81c57a
Remove tsconfig.tsbuildinfo
fcollonval 5721b5d
Ignore tsconfig.tsbuildinfo
fcollonval e46c8b3
Lint code
fcollonval c9bdb7a
Fix CI
fcollonval 4f1d65c
Add lint and fix test
fcollonval 1651868
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 08246d6
Don't version eslintcache
fcollonval d14d3f7
Fix linter
fcollonval c72a550
Don't lint on Windows
fcollonval 538cab6
Add `fromJSON`
fcollonval 2b1df54
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would it make sense to use the
@jupyter-server
scope instead?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This package will most likely end up in Jupyter GitHub organization as it is a formal description of documents (similar to nbformat but applied on CRDT). This is the reason I went for
jupyter-notebook
organization (as we don't ownjupyter
on npm) rather thanjupyter-server
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm actually I just got ownership on
jupyter
from NPM admin.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah that's good news.
ok thanks for the context, in that case it makes sense. The reason I was suggesting
jupyter-server
is for consistency since the repo is under thejupyter-server
org on GitHub.@fcollonval I just sent you an invite to join the
jupyter-server
org onnpm
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the invitation