Required: installed server extensions
-Paste the output from running `jupyter serverextension list` from the command line here.
+Paste the output from running `jupyter server extension list` (JupyterLab >= 3)
+or `jupyter serverextension list` (JupyterLab < 3) from the command line here.
You may want to sanitize the paths in the output.
diff --git a/.github/ISSUE_TEMPLATE/language_server_builtin.md b/.github/ISSUE_TEMPLATE/language_server_builtin.md
index 6d2089e54..12f84d62a 100644
--- a/.github/ISSUE_TEMPLATE/language_server_builtin.md
+++ b/.github/ISSUE_TEMPLATE/language_server_builtin.md
@@ -6,7 +6,7 @@ about: Help us improve the existing auto-detected language servers
@@ -39,7 +39,7 @@ https://jupyterlab.readthedocs.io/en/latest/getting_started/issue.html
- Browser and version:
- JupyterLab version:
- `jupyter-lsp` version:
-- `@krassowski/jupyterlab-lsp` version:
+- `jupyterlab-lsp` version:
- Language Server:
- Language Server version:
- Language Server installed with:
diff --git a/.github/ISSUE_TEMPLATE/language_server_byo.md b/.github/ISSUE_TEMPLATE/language_server_byo.md
index 73b26d258..833596814 100644
--- a/.github/ISSUE_TEMPLATE/language_server_byo.md
+++ b/.github/ISSUE_TEMPLATE/language_server_byo.md
@@ -6,7 +6,7 @@ about: Help us improve language servers we don't know about
@@ -39,14 +39,14 @@ https://jupyterlab.readthedocs.io/en/latest/getting_started/issue.html
- Browser and version:
- JupyterLab version:
- `jupyter-lsp` version:
-- `@krassowski/jupyterlab-lsp` version:
+- `jupyterlab-lsp` version:
- Language Server:
- Language Server version:
- Language Server installed with:
- Language Server Spec
```python
-# jupyter_notebook_config.json
+# jupyter_server_config.json
{
"LanguageServerManager": {
"language_servers": {
diff --git a/.github/workflows/job.lint.yml b/.github/workflows/job.lint.yml
deleted file mode 100644
index a3b028274..000000000
--- a/.github/workflows/job.lint.yml
+++ /dev/null
@@ -1,60 +0,0 @@
-name: lint
-on:
- push:
- branches:
- - master
- pull_request:
- branches:
- - master
-
-defaults:
- run:
- shell: bash -l {0}
-
-jobs:
- lint:
- runs-on: ${{ matrix.os }}
- strategy:
- matrix:
- os: [ubuntu-16.04]
- python: [3.8]
- nodejs: ['>=12,<13.0.0a0']
- lab: ['>=2,<3.0.0a0']
- steps:
- - uses: actions/checkout@v2
-
- - uses: cschleiden/replace-tokens@v1
- with:
- tokenPrefix: '{'
- tokenSuffix: '}'
- files: '["requirements/github-actions.yml"]'
- env:
- lab: '${{ matrix.lab }}'
- nodejs: '${{ matrix.nodejs }}'
-
- - name: Set up Python and conda
- uses: conda-incubator/setup-miniconda@v2
- with:
- python-version: ${{ matrix.python }}
- channel-priority: true
- activate-environment: jupyterlab-lsp
- environment-file: requirements/github-actions.yml
- auto-update-conda: true
-
- - name: linting dependencies
- run: conda env update -n jupyterlab-lsp --file requirements/lint.yml --quiet
-
- - name: check integrity of package versions
- run: python scripts/integrity.py
-
- - name: install npm dependencies
- run: jlpm
-
- - name: lint backend
- run: python scripts/lint.py
-
- - name: build schema so linting can complete
- run: jlpm build:schema
-
- - name: lint frontend
- run: jlpm lint:check
diff --git a/.github/workflows/job.test.yml b/.github/workflows/job.test.yml
index 8bafadf49..6c4b61781 100644
--- a/.github/workflows/job.test.yml
+++ b/.github/workflows/job.test.yml
@@ -1,4 +1,5 @@
-name: tests
+name: CI
+
on:
push:
branches:
@@ -12,32 +13,197 @@ defaults:
shell: bash -l {0}
env:
- # TODO extract these from files instead
- PY_JLSP_VERSION: 0.9.3
- JS_JLLSP_VERSION: 2.1.2
- JS_JLG2D_VERSION: 1.0.0
+ # Increase this value to reset all caches
+ CACHE_EPOCH: 0
+
+ JLPM_CMD: jlpm --ignore-optional --prefer-offline --frozen-lockfile
PYTHONUNBUFFERED: 1
ATEST_RETRIES: 3
+ PIP_DISABLE_PIP_VERSION_CHECK: 1
- LINKED_EXTENSIONS: >-
- packages/lsp-ws-connection
- packages/code-jumpers
- packages/completion-theme
- packages/theme-vscode
- packages/theme-material
+ # TODO: replace once mambaforge "just works" with setup-miniconda
+ MAMBAFORGE_URL: https://github.com/conda-forge/miniforge/releases/latest/download/Mambaforge
jobs:
+ lint:
+ name: jstest/lint
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+ nodejs: ['>=14,<15.0.0a0']
+ lab: ['>=3.0.0,<4.0.0a0']
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: cschleiden/replace-tokens@v1
+ with:
+ tokenPrefix: '{'
+ tokenSuffix: '}'
+ files: '["requirements/github-actions.yml"]'
+ env:
+ lab: '${{ matrix.lab }}'
+ nodejs: '${{ matrix.nodejs }}'
+
+ - name: Cache conda
+ uses: actions/cache@v1
+ with:
+ path: ~/conda_pkgs_dir
+ key: |
+ ${{ env.CACHE_EPOCH }}-${{ matrix.os }}-lint-${{ hashFiles('requirements/github-actions.yml', 'requirements/lint.yml') }}
+ restore-keys: |
+ ${{ env.CACHE_EPOCH }}-${{ matrix.os }}-lint-
+
+ - name: Set up Python and mamba
+ uses: conda-incubator/setup-miniconda@v2
+ with:
+ installer-url: ${{ env.MAMBAFORGE_URL }}-Linux-x86_64.sh
+ condarc-file: .github/.condarc
+
+ - name: install base conda dependencies
+ run: mamba env update -n test --file requirements/github-actions.yml
+
+ - name: install linting dependencies
+ run: mamba env update -n test --file requirements/lint.yml
+
+ - name: check integrity of package versions
+ run: python scripts/integrity.py
+
+ - name: Cache node_modules
+ id: cache-node-modules
+ uses: actions/cache@v2
+ with:
+ path: '**/node_modules'
+ key: ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-lint-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
+
+ - name: Cache yarn packages
+ id: cache-yarn-packages
+ if: steps.cache-node-modules.outputs.cache-hit != 'true'
+ uses: actions/cache@v1
+ with:
+ path: .yarn-packages
+ key: ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
+ restore-keys: |
+ ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
+ ${{ env.CACHE_EPOCH }}-yarn-
+
+ - name: Install npm dependencies
+ if: steps.cache-node-modules.outputs.cache-hit != 'true'
+ run: ${{ env.JLPM_CMD }}
+
+ - name: Build frontend
+ run: jlpm build
+
+ - name: Run frontend unit tests
+ run: jlpm test
+
+ - name: Lint backend
+ run: python scripts/lint.py
+
+ - name: Lint frontend
+ run: jlpm lint:check
+
+ build:
+ name: build
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+ nodejs: ['>=14,<15.0.0a0']
+ lab: ['>=3.0.0,<4.0.0a0']
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: cschleiden/replace-tokens@v1
+ with:
+ tokenPrefix: '{'
+ tokenSuffix: '}'
+ files: '["requirements/github-actions.yml"]'
+ env:
+ lab: '${{ matrix.lab }}'
+ nodejs: '${{ matrix.nodejs }}'
+
+ - name: Cache conda
+ uses: actions/cache@v1
+ with:
+ path: ~/conda_pkgs_dir
+ key: |
+ ${{ env.CACHE_EPOCH }}-${{ matrix.os }}-build-${{ hashFiles('requirements/github-actions.yml') }}
+ restore-keys: |
+ ${{ env.CACHE_EPOCH }}-${{ matrix.os }}-build-
+
+ - name: Set up Python and mamba
+ uses: conda-incubator/setup-miniconda@v2
+ with:
+ installer-url: ${{ env.MAMBAFORGE_URL }}-Linux-x86_64.sh
+ condarc-file: .github/.condarc
+
+ - name: Install minimal build deps
+ shell: bash -l {0}
+ run: mamba install -n test -c conda-forge setuptools wheel 'jupyterlab${{ matrix.lab }}' 'nodejs${{ matrix.nodejs }}'
+
+ - name: Cache node_modules
+ id: cache-node-modules
+ uses: actions/cache@v2
+ with:
+ path: '**/node_modules'
+ key: ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-build-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
+
+ - name: Cache yarn packages
+ id: cache-yarn-packages
+ if: steps.cache-node-modules.outputs.cache-hit != 'true'
+ uses: actions/cache@v1
+ with:
+ path: .yarn-packages
+ key: ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
+ restore-keys: |
+ ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
+ ${{ env.CACHE_EPOCH }}-yarn-
+
+ - name: install npm dependencies
+ if: steps.cache-node-modules.outputs.cache-hit != 'true'
+ run: ${{ env.JLPM_CMD }}
+
+ - name: Build frontend
+ run: |
+ jlpm build
+ jlpm bundle
+
+ - name: Build python distributions
+ run: |
+ set -eux
+ cp README.md python_packages/jupyterlab_lsp
+ cd python_packages/jupyter_lsp
+ python setup.py sdist bdist_wheel
+ cd ../jupyterlab_lsp
+ python setup.py sdist bdist_wheel
+
+ - name: Collect distributions
+ run: |
+ set -eux
+ mkdir dist
+ cp python_packages/*/dist/* packages/*/*.tgz dist/
+ cd dist
+ sha256sum * | tee SHA256SUMS
+
+ - name: Publish builds
+ uses: actions/upload-artifact@v2
+ with:
+ name: jupyterlab-lsp dist ${{ github.run_number }}
+ path: ./dist
+
acceptance:
runs-on: ${{ matrix.os }}-latest
- name: ${{ matrix.os }} py${{ matrix.python }} node${{ matrix.nodejs }}
+ name: atest ${{ matrix.os }} py${{ matrix.python }}
+ needs: [build]
strategy:
# TODO: maybe turn back on
fail-fast: false
matrix:
os: [ubuntu, macos, windows]
python: [3.6, 3.7, 3.8]
- lab: ['>=2.2.0,<3.0.0a0']
+ lab: ['>=3.0.0,<4.0.0a0']
include:
# if using 3.6, use an old node
- python: 3.6
@@ -50,6 +216,13 @@ jobs:
- python: 3.8
# Node 14 end-of-life: April 2023
nodejs: '>=14,<15.0.0.a0'
+ # TODO: remove when mambaforge just works on setup-miniconda
+ - os: ubuntu
+ mambaforge: Linux-x86_64.sh
+ - os: macos
+ mambaforge: MacOSX-x86_64.sh
+ - os: windows
+ mambaforge: Windows-x86_64.exe
steps:
- uses: actions/checkout@v2
@@ -66,142 +239,138 @@ jobs:
- name: Cache conda
uses: actions/cache@v1
- env:
- # Increase this value to reset cache if requirements/github-actions.yml has not changed
- CACHE_NUMBER: 0
with:
path: ~/conda_pkgs_dir
- key: ${{ matrix.os }}-${{ matrix.python }}-conda-${{ env.CACHE_NUMBER }}-${{ hashFiles('requirements/github-actions.yml') }}
+ key: |
+ ${{ env.CACHE_EPOCH }}-${{ matrix.os }}-${{ matrix.python }}-atest-${{ hashFiles('requirements/github-actions.yml') }}
+ restore-keys: |
+ ${{ env.CACHE_EPOCH }}-${{ matrix.os }}-${{ matrix.python }}-atest-
- - name: Set up Python and conda
+ - name: Set up Python and mamba
uses: conda-incubator/setup-miniconda@v2
with:
+ installer-url: ${{ env.MAMBAFORGE_URL }}-${{ matrix.mambaforge }}
python-version: ${{ matrix.python }}
- channel-priority: true
- auto-activate-base: true
- activate-environment: jupyterlab-lsp
- environment-file: requirements/github-actions.yml
- auto-update-conda: true
- use-only-tar-bz2: true # needs to be set for caching to work properly
+ condarc-file: .github/.condarc
- name: Describe conda
- shell: bash -l {0}
run: |
conda info
- conda list
conda config --show-sources
conda config --show
- printenv | sort
-
- - name: Cache yarn
- uses: actions/cache@v1
- with:
- path: .yarn-packages
- key: yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
- restore-keys: |
- yarn-${{ runner.os }}-
- yarn-
- - name: Install npm dependencies
- run: jlpm --ignore-optional
-
- - name: Build the extension
- run: jlpm build
+ - name: Install conda dependencies (unix)
+ if: ${{ matrix.os != 'windows' }}
+ run: mamba env update -n test --file requirements/github-actions.yml
- - name: Build python distributions
- run: python setup.py sdist bdist_wheel
+ - name: Install conda dependencies (windows)
+ if: ${{ matrix.os == 'windows' }}
+ shell: cmd /C call {0}
+ run: mamba env update -n test --file requirements/github-actions.yml
- - name: Build npm bundles
- run: jlpm lerna run bundle
+ - name: List all packages
+ run: conda list
- - name: Install python wheel
- run: cd dist && python -m pip install jupyter_lsp-${{ env.PY_JLSP_VERSION }}-py3-none-any.whl --no-deps
-
- - name: Find out jedi cache location
- id: jedi-cache
- run: python -c 'import jedi; print("::set-output name=dir::" + jedi.settings.cache_directory)'
+ - name: Cache node_modules
+ id: cache-node-modules
+ uses: actions/cache@v2
+ with:
+ path: '**/node_modules'
+ key: ${{ env.CACHE_EPOCH }}-${{ runner.os }}-node-test-${{ hashFiles('yarn.lock', 'requirements/github-actions.yml') }}
- - name: Cache jedi cache
+ - name: Cache yarn packages
+ id: cache-yarn-packages
+ if: steps.cache-node-modules.outputs.cache-hit != 'true'
uses: actions/cache@v1
with:
- path: ${{ steps.jedi-cache.outputs.dir }}
- key: jedi-${{ matrix.os }}-${{ hashFiles('scripts/jedi_cache.py') }}-${{ hashFiles('requirements/github-actions.yml') }}
+ path: .yarn-packages
+ key: ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-${{ hashFiles('yarn.lock') }}
+ restore-keys: |
+ ${{ env.CACHE_EPOCH }}-yarn-${{ runner.os }}-
+ ${{ env.CACHE_EPOCH }}-yarn-
- - name: Warm up jedi cache
- run: python scripts/jedi_cache.py
+ - name: install npm dependencies
+ if: steps.cache-node-modules.outputs.cache-hit != 'true'
+ run: ${{ env.JLPM_CMD }}
- - name: Cache tectonic cache
- uses: actions/cache@v2
+ - uses: actions/download-artifact@v2
with:
- # locations for: Linux, MacOS, Windows
- path: |
- ~/.cache/Tectonic
- ~/Library/Caches/Tectonic
- %LOCALAPPDATA%/TectonicProject/Tectonic
- key: ${{ runner.os }}-${{ hashFiles('scripts/tectonic_cache.py') }}
+ name: jupyterlab-lsp dist ${{ github.run_number }}
+ path: ./dist
- - name: Warm up tectonic cache
- run: python scripts/tectonic_cache.py
-
- - name: Run frontend unit tests
- if: ${{ !contains(matrix.os, 'windows') }}
- run: jlpm test
+ - name: Install python packages
+ run: python -m pip install --find-links=dist --no-index --ignore-installed --no-deps jupyter_lsp jupyterlab_lsp
- # js_cov_packages:
- # - code-jumpers
- # - jupyterlab-lsp
-
- #- task: PublishTestResults@2
- # name: publish frontend test results
- # inputs:
- # testResultsFiles: packages/**/junit.xml
- # testRunTitle: 'Jest ${{ env.name }}${{ python.name }}'
- # mergeTestResults: true
- # condition: always()
-
- #- ${{ each js_package in parameters.js_cov_packages }}:
- # - task: PublishCodeCoverageResults@1
- # name: 'publish ${{ js_package }} coverage'
- # inputs:
- # codeCoverageTool: Cobertura
- # summaryFileLocation: 'packages/${{ js_package }}/coverage/cobertura-coverage.xml'
- # condition: always()
+ - name: Pip check
+ run: python -m pip check
- name: List server extensions
- run: jupyter serverextension list
-
- - name: Run python tests
- run: python scripts/utest.py
+ run: jupyter server extension list
- - name: Install support packages
- run: jupyter labextension link --debug --no-build ${{ env.LINKED_EXTENSIONS }}
-
- - name: Install labextensions
- run: jupyter labextension install --debug --no-build packages/jupyterlab-lsp/krassowski-jupyterlab-lsp-${{ env.JS_JLLSP_VERSION }}.tgz
-
- - name: List labextensions before build
+ - name: List frontend extensions
run: jupyter labextension list
- - name: Build lab
- run: jupyter lab build --debug --dev-build=False --minimize=True
-
- - name: List labextensions after build
- run: jupyter labextension list
+ - name: Run python tests
+ run: python scripts/utest.py
- name: Run browser tests
run: python scripts/atest.py --exclude expect:fail
- #- task: PublishTestResults@2
- # name: publish browser test results
- # inputs:
- # testResultsFiles: atest/output/*.xunit.xml
- # testRunTitle: 'Robot ${{ env.name }}${{ python.name }}'
- # mergeTestResults: true
- # condition: always()
-
- name: Publish browser test output
uses: actions/upload-artifact@v2
with:
name: ${{ job.status }} Robot ${{ matrix.os }} Python ${{ matrix.python }} ${{ github.run_number }}
path: ./atest/output
if: always()
+
+ smoke:
+ name: smoke ${{ matrix.os }} py${{ matrix.python }}
+ runs-on: ${{ matrix.os }}-latest
+ needs: [build, lint]
+ strategy:
+ fail-fast: false
+ matrix:
+ os: [ubuntu, macos, windows]
+ python: ['3.6', '3.9', 'pypy3']
+ exclude:
+ - os: windows
+ python: pypy3
+ include:
+ - python: '3.6'
+ dist: 'jupyter*lsp*.tar.gz'
+ - python: 'pypy3'
+ dist: 'jupyter*lsp*.tar.gz'
+ - python: '3.9'
+ dist: 'jupyter*lsp*.whl'
+ - os: windows
+ py_cmd: python
+ - os: macos
+ py_cmd: python3
+ - os: ubuntu
+ py_cmd: python
+ steps:
+ - name: Install Python
+ uses: actions/setup-python@v2
+ with:
+ python-version: ${{ matrix.python }}
+ architecture: 'x64'
+ - uses: actions/download-artifact@v2
+ with:
+ name: jupyterlab-lsp dist ${{ github.run_number }}
+ path: ./dist
+ - name: Install the prerequisites
+ run: ${{ matrix.py_cmd }} -m pip install pip wheel
+ - name: Install the package
+ run: cd dist && ${{ matrix.py_cmd }} -m pip install -vv ${{ matrix.dist }}
+ - name: Validate environment
+ run: |
+ set -eux
+ ${{ matrix.py_cmd }} -m pip freeze
+ ${{ matrix.py_cmd }} -m pip check
+ - name: Validate the install
+ run: |
+ set -eux
+ jupyter labextension list
+ jupyter server extension list
+ jupyter labextension list 2>&1 | grep -ie "jupyterlab-lsp.*enabled.*ok" -
+ jupyter server extension list 2>&1 | grep -ie "jupyter_lsp.*enabled" -
diff --git a/.gitignore b/.gitignore
index 3011f3b3c..d568448c7 100644
--- a/.gitignore
+++ b/.gitignore
@@ -116,3 +116,6 @@ coverage/
_*.d.ts
_build
.virtual_documents/
+
+# Built labextensions
+python_packages/jupyterlab_lsp/jupyterlab_lsp/labextensions/
diff --git a/.prettierignore b/.prettierignore
index 621588973..ac7187c34 100644
--- a/.prettierignore
+++ b/.prettierignore
@@ -2,33 +2,22 @@
.mypy_cache
.pytest_cache
.yarn-packages
+**/_*.d.ts
**/.ipynb_checkpoints
**/*.egg-info
**/build
**/dist
+**/labextensions
**/lib
**/node_modules
**/package.json
**/static
atest
coverage
-dev_mode/index.js
-dev_mode/schemas
-dev_mode/static
-dev_mode/themes
-dev_mode/workspaces
docs/_build
docs/_templates
docs/api
envs
-examples/app/build
-examples/app/schemas
-examples/app/themes
htmlcov
-jupyterlab/geckodriver
-jupyterlab/schemas
-jupyterlab/staging/index.js
-jupyterlab/staging/yarn.js
-jupyterlab/themes
node_modules
tests/**/coverage
diff --git a/CHANGELOG.md b/CHANGELOG.md
index af116bdd4..02cb05edd 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,5 +1,20 @@
## CHANGELOG
+### `@krassowski/jupyterlab-lsp 3.0.0` (2021-01-XX)
+
+- features
+
+ - support for JupyterLab 3.0 ([#452], [#402])
+
+### `jupyter-lsp 1.0.0` (2021-XX-XX)
+
+- features
+
+ - support for JupyterLab 3.0 ([#452], [#402])
+
+[#402]: https://github.com/krassowski/jupyterlab-lsp/issues/402
+[#452]: https://github.com/krassowski/jupyterlab-lsp/issues/452
+
### `@krassowski/jupyterlab-lsp 2.1.2` (2021-01-02)
- features
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 38cc552be..2c765df68 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -29,11 +29,11 @@ You can contribute to the project through:
Development requires, at a minimum:
-- `nodejs >=10.12,<15`
+- `nodejs >=12,<15`
- `python >=3.6,<3.9.0a0`
- - Python 3.6 and 3.8 are also tested on CI
+ - Python 3.7 and 3.8 are also tested on CI
- Python 3.6 has issues on Windows
-- `jupyterlab >=2.2.0,<3.0.0a0`
+- `jupyterlab >=3.0.0,<4.0.0a0`
It is recommended to use a virtual environment (e.g. `virtualenv` or `conda env`)
for development.
@@ -60,29 +60,29 @@ Once your environment is created and activated, on Linux/OSX you can run:
bash binder/postBuild
```
-This performs all of the basic setup steps, and is used for the binder demo.
+This performs all the basic setup steps, and is used for the binder demo.
#### The Hard Way
Install `jupyter-lsp` from source in your virtual environment:
```bash
-python -m pip install -e .
+python -m pip install -e python_packages/jupter_lsp --ignore-installed --no-deps -vv
```
Enable the server extension:
```bash
-jupyter serverextension enable --sys-prefix --py jupyter_lsp
+jupyter server extension enable --sys-prefix --py jupyter_lsp
```
Install `npm` dependencies, build TypeScript packages, and link
to JupyterLab for development:
```bash
-jlpm
-jlpm build
-jlpm lab:link
+jlpm bootstrap
+# if you installed `jupyterlab_lsp` before uninstall it before running the next line
+jupyter labextension develop python_packages/jupyterlab_lsp/ --overwrite
```
### Frontend Development
@@ -101,6 +101,9 @@ jlpm watch # leave this running...
jupyter lab --watch # ...in another terminal
```
+Now after each change to TypesScript files wait until both watchers finish compilation,
+and then refresh the JupyterLab in your browser.
+
> Note: the backend schema is not included in `watch`, and is only refreshed by `build`
To check and fix code style:
@@ -227,7 +230,7 @@ python scripts/atest.py --test "Works With Kernel Running"
##### Run test with a tag
-Tags are preferrable to file names and test name matching in many settings, as
+Tags are preferable to file names and test name matching in many settings, as
they are aggregated nicely between runs.
```bash
@@ -328,8 +331,8 @@ server it will always win vs an auto-configured one.
> See the built-in [specs][] for implementations and some [helpers][].
-[specs]: https://github.com/krassowski/jupyterlab-lsp/tree/master/py_src/jupyter_lsp/specs
-[helpers]: https://github.com/krassowski/jupyterlab-lsp/blob/master/py_src/jupyter_lsp/specs/utils.py
+[specs]: https://github.com/krassowski/jupyterlab-lsp/tree/master/python_packages/jupyter_lsp/jupyter_lsp/specs
+[helpers]: https://github.com/krassowski/jupyterlab-lsp/blob/master/python_packages/jupyter_lsp/jupyter_lsp/specs/utils.py
A spec is a python function that accepts a single argument, the
`LanguageServerManager`, and returns a dictionary of the form:
@@ -349,7 +352,7 @@ the server) and `languages` (which languages to respond to), but many number of
other options to enrich the user experience are available in the
[schema][] and are exercised by the current `entry_points`-based [specs][].
-[schema]: https://github.com/krassowski/jupyterlab-lsp/blob/master/py_src/jupyter_lsp/schema/schema.json
+[schema]: https://github.com/krassowski/jupyterlab-lsp/blob/master/python_packages/jupyter_lsp/jupyter_lsp/schema/schema.json
The spec should only be advertised if the command _could actually_ be run:
@@ -368,7 +371,7 @@ The spec should only be advertised if the command _could actually_ be run:
- use a helper script to encapsulate some complexity.
- See the [r spec][] for an example
-[r spec]: https://github.com/krassowski/jupyterlab-lsp/blob/master/py_src/jupyter_lsp/specs/r_languageserver.py
+[r spec]: https://github.com/krassowski/jupyterlab-lsp/blob/master/python_packages/jupyter_lsp/jupyter_lsp/specs/r_languageserver.py
##### Example: making a pip-installable `cool-language-server` spec
diff --git a/MANIFEST.in b/MANIFEST.in
deleted file mode 100644
index 7f5542fb2..000000000
--- a/MANIFEST.in
+++ /dev/null
@@ -1,2 +0,0 @@
-include LICENSE README.md
-recursive-include py_src *.json *.R
diff --git a/README.md b/README.md
index 09ca1e9db..2d0b755f2 100644
--- a/README.md
+++ b/README.md
@@ -77,9 +77,12 @@ Use context menu on rows in the panel to filter out diagnostics or copy their me
You will need to have all of the following installed:
-- JupyterLab >=2.2.0,<3.0.0a0
+- JupyterLab >=3.0.0,<4.0.0a0
- Python 3.6+
-- nodejs 10.12+
+
+In addition, if you wish to use javascript, html, markdown or any other NodeJS-based language server you will need to have appropriate NodeJS version installed.
+
+> Note: Installation for JupyterLab 2.x requires a different procedure, please consult the documentation for the extension [version 2.x][version 2.x docs].
## Installation
@@ -94,36 +97,19 @@ Use of a python `virtualenv` or a conda env is also recommended.
conda install -c conda-forge python=3
```
-1. install JupyterLab and the server extension
+1. install JupyterLab and the extensions
```bash
- conda install -c conda-forge 'jupyterlab>=2.2,<3.0.0a0' jupyter-lsp
+ conda install -c conda-forge 'jupyterlab>=3.0.0,<4.0.0a0' jupyterlab-lsp
# or
- pip install 'jupyterlab>=2.2,<3.0.0a0' jupyter-lsp
+ pip install 'jupyterlab>=3.0.0,<4.0.0a0' jupyterlab-lsp
```
+ > Note: `jupyterlab-lsp` provides both the server extension and the lab extension.
+
> Note: With conda, you could take advantage of the bundles: `jupyter-lsp-python`
> or `jupyter-lsp-r` to install both the server extension and the language server.
-1. install `nodejs`
-
- ```bash
- conda install -c conda-forge nodejs
- # or one of the following, as an administrator
- choco install nodejs # Windows with Chocolatey
- sudo apt-get install nodejs # Debian/Ubuntu
- sudo brew install nodejs # MacOS with Homebrew
- sudo dnf install nodejs # Fedora
- sudo yum install nodejs # RHEL/CentOS
- ```
-
-1. install the frontend extension:
-
- ```bash
- jupyter labextension install @krassowski/jupyterlab-lsp # for JupyterLab 2.x
- # jupyter labextension install @krassowski/jupyterlab-lsp@0.8.0 # for JupyterLab 1.x
- ```
-
1. install LSP servers for languages of your choice; for example, for Python
([pyls](https://github.com/palantir/python-language-server)) and
R ([languageserver](https://github.com/REditorSupport/languageserver)) servers:
@@ -165,27 +151,6 @@ Use of a python `virtualenv` or a conda env is also recommended.
(written for a related jupyterlab-go-to-definition extension) is available
[here](https://github.com/krassowski/jupyterlab-go-to-definition/blob/master/README.md#which-directories-to-symlink).
-### Updating
-
-To update previously installed extensions:
-
-```bash
-conda update jupyter-lsp
-jupyter labextension update @krassowski/jupyterlab-lsp
-# or
-pip install -U jupyter-lsp
-jupyter labextension update @krassowski/jupyterlab-lsp
-```
-
-### Getting the latest alpha/beta/RC version
-
-Use `install` command (update does not seem to work) appending `@<0.x.y.rc-z>` to the
-extension name, like this:
-
-```bash
-jupyter labextension install @krassowski/jupyterlab-lsp@0.7.0-rc.0
-```
-
### Configuring the servers
Server configurations can be edited using the Advanced Settings editor in JupyterLab (_Settings > Advanced Settings Editor_). For settings specific to each server, please see the [table of language servers][language-servers]. Example settings might include:
@@ -265,3 +230,4 @@ This would not be possible without the fantastic initial work at
[language-servers]: https://jupyterlab-lsp.readthedocs.io/en/latest/Language%20Servers.html
[installation-documentation]: https://jupyterlab-lsp.readthedocs.io/en/latest/Installation.html
+[version 2.x docs]: https://jupyterlab-lsp.readthedocs.io/en/2.x/Installation.html
diff --git a/atest/05_Features/Completion.robot b/atest/05_Features/Completion.robot
index ce2566ee9..c3679b008 100644
--- a/atest/05_Features/Completion.robot
+++ b/atest/05_Features/Completion.robot
@@ -154,7 +154,7 @@ VSCode Theme Works
VSCode Dark Theme Works
${file} = Set Variable Completion.ipynb
- Lab Command Use JupyterLab Dark Theme
+ Lab Command Use Theme: JupyterLab Dark
Wait For Splash
Capture Page Screenshot 00-theme-changed.png
Configure JupyterLab Plugin {"theme": "vscode"} plugin id=${COMPLETION PLUGIN ID}
@@ -166,7 +166,7 @@ VSCode Dark Theme Works
Capture Page Screenshot 02-completions-shown.png
Completer Should Suggest TabError
Completer Should Include Icon lsp:vscode-class-dark
- Lab Command Use JupyterLab Light Theme
+ Lab Command Use Theme: JupyterLab Light
Wait For Splash
Works Without A Theme
diff --git a/atest/05_Features/Hover.robot b/atest/05_Features/Hover.robot
index 9004a12e7..eb353ddf0 100644
--- a/atest/05_Features/Hover.robot
+++ b/atest/05_Features/Hover.robot
@@ -53,6 +53,7 @@ Last Occurrence
Trigger Via Hover With Modifier
[Arguments] ${sel}
# bring the cursor to the element
+ Wokraround Visibility Problem ${sel}
Mouse Over ${sel}
# move it back and forth (wiggle) while hodling the ctrl modifier
Mouse Over With Control ${sel} x_wiggle=5
@@ -62,6 +63,7 @@ Trigger Via Hover With Modifier
Trigger Via Modifier Key Press
[Arguments] ${sel}
# bring the cursor to the element
+ Wokraround Visibility Problem ${sel}
Mouse Over ${sel}
Wait Until Page Contains Element ${HOVER_SIGNAL} timeout=10s
Mouse Over And Wiggle ${sel} 5
@@ -76,3 +78,8 @@ Trigger Tooltip
Setup Hover Test
Setup Notebook Python Hover.ipynb
+
+Wokraround Visibility Problem
+ [Arguments] ${sel}
+ ${width} ${height} = Get Element Size ${sel}
+ Run Keyword If ${width} == 0 Cover Element ${sel} # don't know why but otherwise it raises Message: TypeError: rect is undefined
diff --git a/atest/06_Style.robot b/atest/06_Style.robot
index 09ec1d932..a429b590e 100644
--- a/atest/06_Style.robot
+++ b/atest/06_Style.robot
@@ -23,7 +23,7 @@ Screenshot Editor Themes with Lab Theme
Set Screenshot Directory ${SCREENSHOTS DIR}${/}style${/}${norm lab theme}
Copy File examples${/}${file} ${NOTEBOOK DIR}${/}${file}
Run Keyword If "${THEME NAMES}" == "" Wait Until Keyword Succeeds 3x 1s Get Theme Names
- Lab Command Use ${lab theme} Theme
+ Lab Command Use Theme: ${lab theme}
Try to Close All Tabs
Setup Notebook python ${notebook} isolated=${False}
Open ${file} in ${MENU EDITOR}
diff --git a/atest/Keywords.robot b/atest/Keywords.robot
index 56a596586..e47928d74 100644
--- a/atest/Keywords.robot
+++ b/atest/Keywords.robot
@@ -65,6 +65,9 @@ Initialize User Settings
Create File
... ${SETTINGS DIR}${/}@jupyterlab${/}codemirror-extension${/}commands.jupyterlab-settings
... {"styleActiveLine": true}
+ Create File
+ ... ${SETTINGS DIR}${/}@jupyterlab${/}apputils-extension${/}palette.jupyterlab-settings
+ ... {"modal": false}
Reset Plugin Settings
[Arguments] ${package}=jupyterlab-lsp ${plugin}=plugin
@@ -200,7 +203,7 @@ Open Context Menu for File
[Arguments] ${file}
Ensure File Browser is Open
Click Element ${JLAB CSS REFRESH FILES}
- ${selector} = Set Variable xpath://span[@class='jp-DirListing-itemText']\[text() = '${file}']
+ ${selector} = Set Variable xpath://span[@class='jp-DirListing-itemText']/span\[text() = '${file}']
Wait Until Page Contains Element ${selector} timeout=10s
Open Context Menu ${selector}
diff --git a/atest/Variables.robot b/atest/Variables.robot
index d41dd4bb2..71dfab695 100644
--- a/atest/Variables.robot
+++ b/atest/Variables.robot
@@ -1,6 +1,6 @@
*** Variables ***
${FIXTURES} ${CURDIR}${/}fixtures
-${NBSERVER CONF} jupyter_notebook_config.json
+${NBSERVER CONF} jupyter_server_config.json
${SPLASH} id:jupyterlab-splash
# to help catch hard-coded paths and encoding issues
${BASE URL} /@est/
diff --git a/atest/config.py b/atest/config.py
index 39e3b788a..b056c89de 100644
--- a/atest/config.py
+++ b/atest/config.py
@@ -7,7 +7,7 @@
def update_jupyter_config(path, has_traits, **key_values):
- """update an existing jupyter_notebook_config.json"""
+ """update an existing jupyter_server_config.json"""
p = Path(path)
conf = json.loads(p.read_text(**ENC))
diff --git a/atest/fixtures/jupyter_notebook_config.json b/atest/fixtures/jupyter_server_config.json
similarity index 100%
rename from atest/fixtures/jupyter_notebook_config.json
rename to atest/fixtures/jupyter_server_config.json
diff --git a/binder/environment.yml b/binder/environment.yml
index 7cfe731ef..536e0deaa 100644
--- a/binder/environment.yml
+++ b/binder/environment.yml
@@ -7,10 +7,10 @@ channels:
dependencies:
# runtime dependencies
- python >=3.6,<3.9.0a0
- - jupyterlab >=2.2.0,<3.0.0a0
- - notebook >=4.3.1
+ - jupyterlab >=3.0.0,<4.0.0a0
+ - jupyter_server >=1.1.2
# build dependencies
- - nodejs >=10.12,<15
+ - nodejs >=12,<15
# for python language server (and development)
- flake8 >=3.5
- pip
diff --git a/binder/postBuild b/binder/postBuild
index 902ba76c7..80b00ef05 100755
--- a/binder/postBuild
+++ b/binder/postBuild
@@ -1,24 +1,23 @@
#!/usr/bin/env bash
set -eux
-# do a dev install of the server side
-python -m pip install -e . --ignore-installed --no-deps -vv
-jupyter serverextension enable --sys-prefix --py jupyter_lsp
-
-# should have no extensions
-jupyter labextension list
-
-# do a dev build of the client side
+# Build labextensions
jlpm bootstrap
-# link all pieces to lab (no build)
-jlpm lab:link && jupyter labextension list
-
-# list extensions before build
-jupyter labextension list
+# Do a dev install of the server side
+pushd python_packages/jupyter_lsp
+python setup.py sdist bdist_wheel
+python -m pip install -e . --ignore-installed --no-deps -vv
+jupyter serverextension enable --sys-prefix --py jupyter_lsp
+popd
-# actually build
-jupyter lab build --debug --dev-build=False --minimize=True
+# Install the labextension
+pushd python_packages/jupyterlab_lsp
+python setup.py sdist bdist_wheel
+python -m pip install -e . --ignore-installed --no-deps -vv
+jupyter labextension develop . --overwrite
+popd
-# list extensions again
+# List extensions
+jupyter serverextension list
jupyter labextension list
diff --git a/docs/Configuring.ipynb b/docs/Configuring.ipynb
index 88b7dcf2c..601ff3c76 100644
--- a/docs/Configuring.ipynb
+++ b/docs/Configuring.ipynb
@@ -65,10 +65,10 @@
"- the schema `version` of the spec (currently `2`)\n",
"\n",
"```python\n",
- "# ./jupyter_notebook_config.json ---------- unique! -----------\n",
+ "# ./jupyter_server_config.json ---------- unique! -----------\n",
"# | |\n",
"# or e.g. V V\n",
- "# $PREFIX/etc/jupyter/jupyter_notebook_config.d/a-language-server-implementation.json\n",
+ "# $PREFIX/etc/jupyter/jupyter_server_config.d/a-language-server-implementation.json\n",
"{\n",
" \"LanguageServerManager\": {\n",
" \"language_servers\": {\n",
@@ -91,13 +91,13 @@
"available in the [schema][].\n",
"\n",
"[schema]:\n",
- " https://github.com/krassowski/jupyterlab-lsp/blob/master/py_src/jupyter_lsp/schema/schema.json\n",
+ " https://github.com/krassowski/jupyterlab-lsp/blob/master/python_packages/jupyter_lsp/jupyter_lsp/schema/schema.json\n",
"\n",
"More complex configurations that can't be hard-coded may benefit from the python\n",
"approach:\n",
"\n",
"```python\n",
- "# jupyter_notebook_config.py\n",
+ "# jupyter_server_config.py\n",
"import shutil\n",
"\n",
"# c is a magic, lazy variable\n",
diff --git a/docs/Extending.ipynb b/docs/Extending.ipynb
index cbdd1c256..2a6dd503f 100644
--- a/docs/Extending.ipynb
+++ b/docs/Extending.ipynb
@@ -232,7 +232,7 @@
"Listeners can be added via `traitlets` configuration, e.g.\n",
"\n",
"```yaml\n",
- "## jupyter_notebook_config.jsons\n",
+ "## jupyter_server_config.jsons\n",
"{\n",
" 'LanguageServerManager':\n",
" {\n",
diff --git a/docs/Installation.ipynb b/docs/Installation.ipynb
index 9434a509b..91b15b949 100644
--- a/docs/Installation.ipynb
+++ b/docs/Installation.ipynb
@@ -28,7 +28,9 @@
" JUPYTERLAB_LSP_VERSION,\n",
" JUPYTERLAB_NEXT_MAJOR_VERSION,\n",
" JUPYTERLAB_VERSION,\n",
+ " REQUIRED_JUPYTER_SERVER,\n",
" REQUIRED_JUPYTERLAB,\n",
+ " REQUIRED_PYTHON,\n",
")"
]
},
@@ -54,17 +56,16 @@
"\n",
"#### `jupyter-lsp`\n",
"\n",
- "- runs in your `notebook` web application on your server to handle requests from\n",
+ "- runs in your `jupyter_server` web application on your server to handle requests from\n",
" the browser to _language servers_\n",
"- to run, you need:\n",
- " - `python >=3.6,<3.9.0a0`\n",
- " - `notebook >=4.3`\n",
+ " - `python {REQUIRED_PYTHON}`\n",
+ " - `jupyter_server {REQUIRED_JUPYTER_SERVER}`\n",
"\n",
"#### `jupyterlab-lsp`\n",
"\n",
"- runs in your browser, as an extension to JupyterLab\n",
"- to install it, you need:\n",
- " - `nodejs >=10.12,<15`\n",
" - `jupyterlab {REQUIRED_JUPYTERLAB}`\n",
"\n",
"#### Language Servers\n",
@@ -97,7 +98,7 @@
"#### conda (minimal python)\n",
"\n",
"```bash\n",
- "conda create -c conda-forge -n lsp 'python >=3.7,<3.8' 'jupyterlab={JUPYTERLAB_VERSION}' 'nodejs >=10.12,<15' 'jupyter-lsp-python={JUPYTER_LSP_VERSION}'\n",
+ "conda create -c conda-forge -n lsp 'python {REQUIRED_PYTHON}' 'jupyterlab={JUPYTERLAB_VERSION}' 'jupyter-lsp-python={JUPYTER_LSP_VERSION}'\n",
"# jupyter-lsp-python includes both the server extension (jupyter-lsp) and pyls third-party server (python-language-server)\n",
"# if you swap it with another pre-made bundle, jupyter-lsp-r, you will get the server extension and r-languageserver;\n",
"# alternatively, use jupyter-lsp and manually install a language server of your choice (see the table below).\n",
@@ -227,29 +228,6 @@
" https://jupyterlab.readthedocs.io/en/stable/getting_started/installation.html#pip"
]
},
- {
- "cell_type": "markdown",
- "metadata": {},
- "source": [
- "#### Get a Working NodeJS\n",
- "\n",
- "The [JupyterLab Development Environment Documentation][nodejs-conda] shows some\n",
- "approaches for getting NodeJS.\n",
- "\n",
- "| conda | `*` |\n",
- "| ---------------------- | --- |\n",
- "| [nodejs][nodejs-conda] | `*` |\n",
- "\n",
- "[nodejs-conda]:\n",
- " https://jupyterlab.readthedocs.io/en/stable/developer/extension_tutorial.html#set-up-a-development-environment\n",
- "\n",
- "Verify your node works and is findable from python.\n",
- "\n",
- "```bash\n",
- "jlpm versions\n",
- "```"
- ]
- },
{
"cell_type": "code",
"execution_count": null,
diff --git a/docs/Language Servers.ipynb b/docs/Language Servers.ipynb
index bb18f5576..011209341 100644
--- a/docs/Language Servers.ipynb
+++ b/docs/Language Servers.ipynb
@@ -164,6 +164,24 @@
")"
]
},
+ {
+ "cell_type": "markdown",
+ "metadata": {},
+ "source": [
+ "NodeJS is a prerequisite for installation of any of the above language servers;\n",
+ "you can get it with:\n",
+ "\n",
+ "```bash\n",
+ "conda install -c conda-forge nodejs\n",
+ "# or one of the following, as an administrator\n",
+ "choco install nodejs # Windows with Chocolatey\n",
+ "sudo apt-get install nodejs # Debian/Ubuntu\n",
+ "sudo brew install nodejs # MacOS with Homebrew\n",
+ "sudo dnf install nodejs # Fedora\n",
+ "sudo yum install nodejs # RHEL/CentOS\n",
+ "```"
+ ]
+ },
{
"cell_type": "markdown",
"metadata": {},
diff --git a/docs/Releasing.ipynb b/docs/Releasing.ipynb
index 9c60c964a..433077ad4 100644
--- a/docs/Releasing.ipynb
+++ b/docs/Releasing.ipynb
@@ -33,7 +33,7 @@
"\n",
"The PyPI version (jupyter-lsp) must be updated in the following places:\n",
"\n",
- "- `py_src/jupyter_lsp/_version.py` (canonical)\n",
+ "- `python_packages/jupyter_lsp/jupyter_lsp/_version.py` (canonical)\n",
"- `.github/workflows/job.test.yml`\n",
"- `CHANGELOG.md`\n",
"\n",
diff --git a/docs/conf.py b/docs/conf.py
index de89937e0..46884a604 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -18,7 +18,12 @@
sys.path.insert(
- 0, str((pathlib.Path.cwd().parent / "py_src" / "jupyter_lsp").resolve())
+ 0,
+ str(
+ (
+ pathlib.Path.cwd().parent / "python_packages" / "jupyter_lsp" / "src"
+ ).resolve()
+ ),
)
project = "Jupyter[Lab] Language Server"
diff --git a/docs/rtd.yml b/docs/rtd.yml
index 7178b068c..f16fe6820 100644
--- a/docs/rtd.yml
+++ b/docs/rtd.yml
@@ -5,11 +5,11 @@ channels:
- conda-forge
dependencies:
- - nodejs >=11,<14
+ - nodejs >=12,<13
- pip
- python >=3.8,<3.9.0a0
- pip:
- - -e ..
+ - -e ../python_packages/jupyter_lsp/
- graphviz
- importlib_metadata
- jupyterlab >=1,<1.3.0a0
diff --git a/package.json b/package.json
index 8847ef85c..ca5797c1b 100644
--- a/package.json
+++ b/package.json
@@ -1,25 +1,26 @@
{
"dependencies": {},
"devDependencies": {
- "@typescript-eslint/eslint-plugin": "^3.10.1",
- "@typescript-eslint/parser": "^3.10.1",
+ "@typescript-eslint/eslint-plugin": "^4.8.1",
+ "@typescript-eslint/parser": "^4.8.1",
"bash-language-server": "^1.17.0",
"dictionary-en": "^3.0.0",
"dockerfile-language-server-nodejs": "^0.0.22",
- "eslint": "^7.5.0",
- "eslint-config-prettier": "^6.7.0",
- "eslint-plugin-import": "^2.22.0",
- "eslint-plugin-jest": "^23.8.2",
- "eslint-plugin-prettier": "^3.1.1",
- "eslint-plugin-react": "^7.19.0",
+ "eslint": "^7.14.0",
+ "eslint-config-prettier": "^6.15.0",
+ "eslint-plugin-import": "^2.22.1",
+ "eslint-plugin-jest": "^24.1.3",
+ "eslint-plugin-prettier": "^3.1.4",
+ "eslint-plugin-react": "^7.21.5",
"husky": "^3.0.9",
"javascript-typescript-langserver": "^2.11.3",
"jest-github-actions-reporter": "^1.0.2",
"lerna": "^3.13.2",
+ "npm-run-all": "^4.1.5",
"precise-commits": "^1.0.2",
"prettier": "^2.1.2",
"sql-language-server": "^0.11.4",
- "typescript": "~4.0.2",
+ "typescript": "~4.1.3",
"unified-language-server": "^0.3.0",
"vscode-css-languageserver-bin": "^1.4.0",
"vscode-html-languageserver-bin": "^1.4.0",
@@ -38,18 +39,19 @@
"private": true,
"scripts": {
"bootstrap": "jlpm --no-optional --prefer-offline && lerna bootstrap && jlpm lint && jlpm clean && jlpm build",
- "build": "jlpm build:schema && jlpm build:completion-theme && jlpm build:theme-material && jlpm build:theme-vscode && jlpm build:jump && jlpm build:meta && jlpm build:ws",
+ "build": "jlpm build:schema && jlpm build:meta && jlpm build:ws && jlpm build:labextension",
"build:schema": "lerna run build:schema --stream",
"build:meta": "lerna run build --stream --scope @krassowski/jupyterlab-lsp-metapackage",
+ "build:labextension": "lerna run build:labextension --stream",
"build:completion-theme": "lerna run build --stream --scope @krassowski/completion-theme",
"build:theme-vscode": "lerna run build --stream --scope @krassowski/theme-vscode",
"build:theme-material": "lerna run build --stream --scope @krassowski/theme-material",
+ "build:jupyterlab-lsp": "lerna run build --stream --scope @krassowski/jupyterlab-lsp",
"build:ws": "lerna run build --stream --scope lsp-ws-connection",
"build:jump": "lerna run build --stream --scope @krassowski/code-jumpers",
"watch": "lerna run --parallel watch",
"bundle": "lerna run --parallel bundle",
"clean": "lerna run --parallel clean",
- "lab:link": "lerna run lab:link",
"lint:check": "jlpm prettier:check && jlpm eslint:check",
"lint": "jlpm prettier && jlpm eslint",
"prettier:check": "prettier --check \"**/*{.ts,.tsx,.js,.jsx,.css,.json,.md,.yml}\"",
diff --git a/packages/.eslintrc.js b/packages/.eslintrc.js
index 7b61d1977..b6230551c 100644
--- a/packages/.eslintrc.js
+++ b/packages/.eslintrc.js
@@ -17,6 +17,7 @@ module.exports = {
],
ignorePatterns: [
'**/node_modules/**/*',
+ 'python_packages/jupyterlab_lsp/jupyterlab_lsp/labextensions/**/*',
'**/lib/**/*',
'**/_*.ts',
'**/_*.d.ts',
@@ -64,7 +65,9 @@ module.exports = {
'jest/valid-expect': 'off',
'no-async-promise-executor': 'off',
'prefer-spread': 'off',
- 'react/display-name': 'off'
+ 'react/display-name': 'off',
+ // TODO: re-enable once the lsp-ws-connection tests are re-written to jest
+ 'jest/no-done-callback': 'off'
},
settings: {
react: {
diff --git a/packages/code-jumpers/package.json b/packages/code-jumpers/package.json
index c7c72b6be..bb5d2f091 100644
--- a/packages/code-jumpers/package.json
+++ b/packages/code-jumpers/package.json
@@ -26,34 +26,34 @@
"scripts": {
"build": "tsc -b",
"bundle": "npm pack .",
- "clean": "rimraf lib",
- "lab:link": "jupyter labextension link . --no-build"
+ "clean": "rimraf lib"
},
"peerDependencies": {
- "@jupyterlab/apputils": "~2.2.0",
- "@jupyterlab/codeeditor": "~2.2.0",
- "@jupyterlab/coreutils": "~4.2.0",
- "@jupyterlab/docmanager": "~2.2.0",
- "@jupyterlab/docregistry": "~2.2.0",
- "@jupyterlab/fileeditor": "~2.2.0",
- "@jupyterlab/notebook": "~2.2.0",
- "@jupyterlab/observables": "~3.2.0"
+ "@jupyterlab/apputils": "^3.0.0",
+ "@jupyterlab/codeeditor": "^3.0.0",
+ "@jupyterlab/coreutils": "^5.0.0",
+ "@jupyterlab/docmanager": "^3.0.0",
+ "@jupyterlab/docregistry": "^3.0.0",
+ "@jupyterlab/fileeditor": "^3.0.0",
+ "@jupyterlab/notebook": "^3.0.0",
+ "@jupyterlab/observables": "^4.0.0"
},
"devDependencies": {
- "@jupyterlab/apputils": "~2.2.0",
- "@jupyterlab/codeeditor": "~2.2.0",
- "@jupyterlab/coreutils": "~4.2.0",
- "@jupyterlab/docmanager": "~2.2.0",
- "@jupyterlab/docregistry": "~2.2.0",
- "@jupyterlab/fileeditor": "~2.2.0",
- "@jupyterlab/notebook": "~2.2.0",
- "@jupyterlab/observables": "~3.2.0",
- "@jupyterlab/testutils": "~2.2.0",
- "rimraf": "^2.6.1",
- "typescript": "~4.0.2",
+ "@jupyterlab/apputils": "^3.0.0",
+ "@jupyterlab/codeeditor": "^3.0.0",
+ "@jupyterlab/coreutils": "^5.0.0",
+ "@jupyterlab/docmanager": "^3.0.0",
+ "@jupyterlab/docregistry": "^3.0.0",
+ "@jupyterlab/fileeditor": "^3.0.0",
+ "@jupyterlab/notebook": "^3.0.0",
+ "@jupyterlab/observables": "^4.0.0",
+ "@jupyterlab/testutils": "^3.0.0",
+ "rimraf": "^3.0.2",
+ "typescript": "~4.1.3",
"@babel/preset-env": "^7.4.3"
},
"jupyterlab": {
- "extension": false
+ "extension": false,
+ "outputDir": "../../python_packages/jupyterlab_lsp/jupyterlab_lsp/labextensions/@krassowski/code-jumpers"
}
}
diff --git a/packages/completion-theme/package.json b/packages/completion-theme/package.json
index 79ec97af6..a609cb8a3 100644
--- a/packages/completion-theme/package.json
+++ b/packages/completion-theme/package.json
@@ -16,7 +16,7 @@
"url": "https://github.com/krassowski/jupyterlab-lsp/issues"
},
"license": "BSD-3-Clause",
- "author": "JupyterLab-LSP Developement Team",
+ "author": "JupyterLab-LSP Development Team",
"files": [
"{lib,style,schema,src}/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf,css,json,ts,tsx,txt,md}"
],
@@ -29,16 +29,19 @@
"scripts": {
"build": "tsc -b",
"bundle": "npm pack .",
- "clean": "rimraf lib",
- "lab:link": "jupyter labextension link . --no-build"
+ "clean": "rimraf lib"
},
"devDependencies": {
- "react": "*",
- "@jupyterlab/ui-components": "~2.2.0"
+ "@jupyterlab/builder": "^3.0.0",
+ "@jupyterlab/ui-components": "^3.0.0",
+ "react": "^17.0.1",
+ "rimraf": "^3.0.2",
+ "typescript": "~4.1.3"
},
"peerDependencies": {},
"jupyterlab": {
"extension": true,
- "schemaDir": "schema"
+ "schemaDir": "schema",
+ "outputDir": "../../python_packages/jupyterlab_lsp/jupyterlab_lsp/labextensions/@krassowski/completion-theme"
}
}
diff --git a/packages/completion-theme/transform.js b/packages/completion-theme/transform.js
new file mode 100644
index 000000000..8bf3272ad
--- /dev/null
+++ b/packages/completion-theme/transform.js
@@ -0,0 +1,2 @@
+const config = require('./babel.config.js');
+module.exports = require('babel-jest').createTransformer(config);
diff --git a/packages/jupyterlab-lsp/package-lock.json b/packages/jupyterlab-lsp/package-lock.json
new file mode 100644
index 000000000..547b6ba6a
--- /dev/null
+++ b/packages/jupyterlab-lsp/package-lock.json
@@ -0,0 +1,169 @@
+{
+ "name": "@krassowski/jupyterlab-lsp",
+ "version": "1.0.0",
+ "lockfileVersion": 1,
+ "requires": true,
+ "dependencies": {
+ "@types/jest": {
+ "version": "23.3.14",
+ "dev": true
+ },
+ "@types/lodash": {
+ "version": "4.14.150",
+ "resolved": "https://registry.npmjs.org/@types/lodash/-/lodash-4.14.150.tgz",
+ "integrity": "sha512-kMNLM5JBcasgYscD9x/Gvr6lTAv2NVgsKtet/hm93qMyf/D1pt+7jeEZklKJKxMVmXjxbRVQQGfqDSfipYCO6w==",
+ "dev": true
+ },
+ "@types/lodash.mergewith": {
+ "version": "4.6.6",
+ "resolved": "https://registry.npmjs.org/@types/lodash.mergewith/-/lodash.mergewith-4.6.6.tgz",
+ "integrity": "sha512-RY/8IaVENjG19rxTZu9Nukqh0W2UrYgmBj5sdns4hWRZaV8PqR7wIKHFKzvOTjo4zVRV7sVI+yFhAJql12Kfqg==",
+ "dev": true,
+ "requires": {
+ "@types/lodash": "*"
+ }
+ },
+ "balanced-match": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz",
+ "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=",
+ "dev": true
+ },
+ "brace-expansion": {
+ "version": "1.1.11",
+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",
+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",
+ "dev": true,
+ "requires": {
+ "balanced-match": "^1.0.0",
+ "concat-map": "0.0.1"
+ }
+ },
+ "concat-map": {
+ "version": "0.0.1",
+ "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz",
+ "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=",
+ "dev": true
+ },
+ "fs.realpath": {
+ "version": "1.0.0",
+ "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
+ "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=",
+ "dev": true
+ },
+ "glob": {
+ "version": "7.1.6",
+ "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz",
+ "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==",
+ "dev": true,
+ "requires": {
+ "fs.realpath": "^1.0.0",
+ "inflight": "^1.0.4",
+ "inherits": "2",
+ "minimatch": "^3.0.4",
+ "once": "^1.3.0",
+ "path-is-absolute": "^1.0.0"
+ }
+ },
+ "inflight": {
+ "version": "1.0.6",
+ "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz",
+ "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
+ "dev": true,
+ "requires": {
+ "once": "^1.3.0",
+ "wrappy": "1"
+ }
+ },
+ "inherits": {
+ "version": "2.0.4",
+ "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz",
+ "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",
+ "dev": true
+ },
+ "js-tokens": {
+ "version": "4.0.0",
+ "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz",
+ "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==",
+ "dev": true
+ },
+ "loose-envify": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/loose-envify/-/loose-envify-1.4.0.tgz",
+ "integrity": "sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==",
+ "dev": true,
+ "requires": {
+ "js-tokens": "^3.0.0 || ^4.0.0"
+ }
+ },
+ "minimatch": {
+ "version": "3.0.4",
+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz",
+ "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==",
+ "dev": true,
+ "requires": {
+ "brace-expansion": "^1.1.7"
+ }
+ },
+ "object-assign": {
+ "version": "4.1.1",
+ "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz",
+ "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=",
+ "dev": true
+ },
+ "once": {
+ "version": "1.4.0",
+ "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz",
+ "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
+ "dev": true,
+ "requires": {
+ "wrappy": "1"
+ }
+ },
+ "path-is-absolute": {
+ "version": "1.0.1",
+ "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz",
+ "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=",
+ "dev": true
+ },
+ "prop-types": {
+ "version": "15.7.2",
+ "resolved": "https://registry.npmjs.org/prop-types/-/prop-types-15.7.2.tgz",
+ "integrity": "sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==",
+ "dev": true,
+ "requires": {
+ "loose-envify": "^1.4.0",
+ "object-assign": "^4.1.1",
+ "react-is": "^16.8.1"
+ }
+ },
+ "react": {
+ "version": "16.13.0",
+ "dev": true,
+ "requires": {
+ "loose-envify": "^1.1.0",
+ "object-assign": "^4.1.1",
+ "prop-types": "^15.6.2"
+ }
+ },
+ "react-is": {
+ "version": "16.13.1",
+ "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz",
+ "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==",
+ "dev": true
+ },
+ "rimraf": {
+ "version": "2.6.3",
+ "dev": true,
+ "requires": {
+ "glob": "^7.1.3"
+ }
+ },
+ "wrappy": {
+ "version": "1.0.2",
+ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz",
+ "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=",
+ "dev": true
+ }
+ }
+}
diff --git a/packages/jupyterlab-lsp/package.json b/packages/jupyterlab-lsp/package.json
index f15f8b8ac..cc5da71d1 100644
--- a/packages/jupyterlab-lsp/package.json
+++ b/packages/jupyterlab-lsp/package.json
@@ -1,6 +1,6 @@
{
"name": "@krassowski/jupyterlab-lsp",
- "version": "2.1.2",
+ "version": "3.0.0",
"description": "Language Server Protocol integration for JupyterLab",
"keywords": [
"jupyter",
@@ -17,7 +17,7 @@
"url": "https://github.com/krassowski/jupyterlab-lsp/issues"
},
"license": "BSD-3-Clause",
- "author": "MichaĆ Krassowski",
+ "author": "JupyterLab-LSP Development Team",
"files": [
"{lib,style,schema,src}/**/*.{d.ts,eot,gif,html,jpg,js,js.map,json,png,svg,woff2,ttf,css,json,ts,tsx,txt,md}"
],
@@ -28,48 +28,62 @@
"url": "https://github.com/krassowski/jupyterlab-lsp.git"
},
"scripts": {
- "build": "jlpm build:schema && tsc -b",
+ "build": "jlpm build:schema && jlpm run build:lib && jlpm run build:labextension",
+ "build:labextension": "jupyter labextension build .",
+ "build:labextension:dev": "jupyter labextension build --development True .",
+ "build:lib": "tsc",
+ "build:prod": "jlpm run build:lib && jlpm run build:labextension",
"build:schema": "jlpm build:schema-backend && jlpm build:schema-completion && jlpm build:schema-hover && jlpm build:schema-diagnostics && jlpm build:schema-syntax_highlighting && jlpm build:schema-jump_to && jlpm build:schema-highlights",
- "build:schema-backend": "json2ts ../../py_src/jupyter_lsp/schema/schema.json --unreachableDefinitions | prettier --stdin-filepath _schema.d.ts > src/_schema.d.ts",
+ "build:schema-backend": "json2ts ../../python_packages/jupyter_lsp/jupyter_lsp/schema/schema.json --unreachableDefinitions | prettier --stdin-filepath _schema.d.ts > src/_schema.d.ts",
"build:schema-completion": "json2ts schema/completion.json | prettier --stdin-filepath _completion.d.ts > src/_completion.d.ts",
+ "build:schema-diagnostics": "json2ts schema/diagnostics.json | prettier --stdin-filepath _diagnostics.d.ts > src/_diagnostics.d.ts",
"build:schema-hover": "json2ts schema/hover.json | prettier --stdin-filepath _hover.d.ts > src/_hover.d.ts",
"build:schema-jump_to": "json2ts schema/jump_to.json | prettier --stdin-filepath _jump_to.d.ts > src/_jump_to.d.ts",
- "build:schema-diagnostics": "json2ts schema/diagnostics.json | prettier --stdin-filepath _diagnostics.d.ts > src/_diagnostics.d.ts",
"build:schema-syntax_highlighting": "json2ts schema/syntax_highlighting.json | prettier --stdin-filepath _syntax_highlighting.d.ts > src/_syntax_highlighting.d.ts",
"build:schema-highlights": "json2ts schema/highlights.json | prettier --stdin-filepath _highlights.d.ts > src/_highlights.d.ts",
"bundle": "npm pack .",
- "clean": "rimraf lib",
- "lab:link": "jupyter labextension link . --no-build",
- "test": "jlpm jest --coverage --coverageReporters=cobertura --coverageReporters=html --coverageReporters=text-summary"
+ "clean": "jlpm run clean:lib",
+ "clean:all": "jlpm run clean:lib && jlpm run clean:labextension",
+ "clean:labextension": "rimraf labextension",
+ "clean:lib": "rimraf lib tsconfig.tsbuildinfo",
+ "eslint": "eslint . --ext .ts,.tsx --fix",
+ "eslint:check": "eslint . --ext .ts,.tsx",
+ "install:extension": "jupyter labextension develop --overwrite .",
+ "prepare": "jlpm run clean && jlpm run build:prod",
+ "test": "jlpm jest --coverage --coverageReporters=cobertura --coverageReporters=html --coverageReporters=text-summary",
+ "watch": "run-p watch:src watch:labextension",
+ "watch:labextension": "jupyter labextension watch .",
+ "watch:src": "tsc -w"
},
"dependencies": {
"@krassowski/code-jumpers": "~1.0.0",
- "lodash.mergewith": "^4.6.1",
- "lsp-ws-connection": "~0.5.1",
"@krassowski/completion-theme": "~2.0.0",
+ "@krassowski/theme-material": "~2.0.0",
"@krassowski/theme-vscode": "~2.0.0",
- "@krassowski/theme-material": "~2.0.0"
+ "lodash.mergewith": "^4.6.1",
+ "lsp-ws-connection": "~0.5.1"
},
"devDependencies": {
"@babel/preset-env": "^7.4.3",
- "@jupyterlab/application": "~2.2.0",
- "@jupyterlab/apputils": "~2.2.0",
- "@jupyterlab/cells": "~2.2.0",
- "@jupyterlab/codeeditor": "~2.2.0",
- "@jupyterlab/codemirror": "~2.2.0",
- "@jupyterlab/completer": "~2.2.0",
- "@jupyterlab/coreutils": "~4.2.0",
- "@jupyterlab/docmanager": "~2.2.0",
- "@jupyterlab/docregistry": "~2.2.0",
- "@jupyterlab/fileeditor": "~2.2.0",
- "@jupyterlab/notebook": "~2.2.0",
- "@jupyterlab/rendermime": "~2.2.0",
- "@jupyterlab/services": "~5.2.0",
- "@jupyterlab/statusbar": "~2.2.0",
- "@jupyterlab/testutils": "~2.2.0",
- "@jupyterlab/tooltip": "~2.2.0",
+ "@jupyterlab/application": "^3.0.0",
+ "@jupyterlab/apputils": "^3.0.0",
+ "@jupyterlab/builder": "^3.0.0",
+ "@jupyterlab/cells": "^3.0.0",
+ "@jupyterlab/codeeditor": "^3.0.0",
+ "@jupyterlab/codemirror": "^3.0.0",
+ "@jupyterlab/completer": "^3.0.0",
+ "@jupyterlab/coreutils": "^5.0.0",
+ "@jupyterlab/docmanager": "^3.0.0",
+ "@jupyterlab/docregistry": "^3.0.0",
+ "@jupyterlab/fileeditor": "^3.0.0",
+ "@jupyterlab/notebook": "^3.0.0",
+ "@jupyterlab/rendermime": "^3.0.0",
+ "@jupyterlab/services": "^6.0.0",
+ "@jupyterlab/statusbar": "^3.0.0",
+ "@jupyterlab/testutils": "^3.0.0",
+ "@jupyterlab/tooltip": "^3.0.0",
"@lumino/algorithm": "*",
- "@lumino/widgets": "*",
+ "@lumino/widgets": "^1.16.1",
"@types/chai": "^4.1.7",
"@types/codemirror": "^0.0.74",
"@types/events": "^3.0.0",
@@ -81,30 +95,32 @@
"jest": "^26.0.0",
"jest-junit": "^8.0.0",
"json-schema-to-typescript": "^8.0.0",
- "react": "*",
- "rimraf": "~2.6.2",
+ "mkdirp": "^1.0.3",
+ "prettier": "^2.1.2",
+ "react": "^17.0.1",
+ "rimraf": "^3.0.2",
"ts-jest": "^26.4.3",
- "typescript": "~4.0.2"
+ "typescript": "~4.1.3"
},
"peerDependencies": {
- "@jupyterlab/application": "~2.2.0",
- "@jupyterlab/apputils": "~2.2.0",
- "@jupyterlab/cells": "~2.2.0",
- "@jupyterlab/codeeditor": "~2.2.0",
- "@jupyterlab/codemirror": "~2.2.0",
- "@jupyterlab/completer": "~2.2.0",
- "@jupyterlab/coreutils": "~4.2.0",
- "@jupyterlab/docmanager": "~2.2.0",
- "@jupyterlab/docregistry": "~2.2.0",
- "@jupyterlab/fileeditor": "~2.2.0",
- "@jupyterlab/notebook": "~2.2.0",
- "@jupyterlab/rendermime": "~2.2.0",
- "@jupyterlab/services": "~5.2.0",
- "@jupyterlab/statusbar": "~2.2.0",
- "@jupyterlab/tooltip": "~2.2.0",
- "@jupyterlab/ui-components": "~2.2.0",
+ "@jupyterlab/application": "^3.0.0",
+ "@jupyterlab/apputils": "^3.0.0",
+ "@jupyterlab/cells": "^3.0.0",
+ "@jupyterlab/codeeditor": "^3.0.0",
+ "@jupyterlab/codemirror": "^3.0.0",
+ "@jupyterlab/completer": "^3.0.0",
+ "@jupyterlab/coreutils": "^5.0.0",
+ "@jupyterlab/docmanager": "^3.0.0",
+ "@jupyterlab/docregistry": "^3.0.0",
+ "@jupyterlab/fileeditor": "^3.0.0",
+ "@jupyterlab/notebook": "^3.0.0",
+ "@jupyterlab/rendermime": "^3.0.0",
+ "@jupyterlab/services": "^6.0.0",
+ "@jupyterlab/statusbar": "^3.0.0",
+ "@jupyterlab/tooltip": "^3.0.0",
+ "@jupyterlab/ui-components": "^3.0.0",
"@lumino/algorithm": "*",
- "@lumino/widgets": "*",
+ "@lumino/widgets": "^1.16.1",
"codemirror": "*",
"react": "*"
},
@@ -113,13 +129,15 @@
"discovery": {
"server": {
"base": {
- "name": "jupyter-lsp"
+ "name": "jupyterlab_lsp"
},
"managers": [
- "pip"
+ "pip",
+ "conda"
]
}
},
- "schemaDir": "schema"
+ "schemaDir": "schema",
+ "outputDir": "../../python_packages/jupyterlab_lsp/jupyterlab_lsp/labextensions/@krassowski/jupyterlab-lsp"
}
}
diff --git a/packages/jupyterlab-lsp/src/editor_integration/testutils.ts b/packages/jupyterlab-lsp/src/editor_integration/testutils.ts
index e1a026f33..0a0b8614f 100644
--- a/packages/jupyterlab-lsp/src/editor_integration/testutils.ts
+++ b/packages/jupyterlab-lsp/src/editor_integration/testutils.ts
@@ -387,7 +387,7 @@ export function showAllCells(notebook: Notebook) {
}
}
-export function getCellsJSON(notebook: Notebook) {
+export function getCellsJSON(notebook: Notebook): Array