jwkvam / jupyterlab-vim

:neckbeard: Vim notebook cell bindings for JupyterLab
MIT License
966 stars 73 forks source link

attempt at getting the extension to work in jlab2.0 #114

Closed afonit closed 4 years ago

afonit commented 4 years ago

Note: this is not building, I tried to do the changes I could observe from https://jupyterlab.readthedocs.io/en/stable/developer/extension_migration.html

to see if I could help move this forward (not I am not an extension developer, just a user who wants to get this working for jlab2.0)

I followed PULL_REQUEST_TEMPLATE.md

When I execute:

jlpm install

I get the below errors:

src/index.ts:23:1 - error TS6133: 'ReadonlyPartialJSONObject' is declared but its value is never read.

23 import {
   ~~~~~~~~
24     ReadonlyPartialJSONObject
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
25 } from '@lumino/coreutils';
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~

src/index.ts:125:25 - error TS2531: Object is possibly 'null'.

125                     if (currentCell.model.type === 'markdown') {
                            ~~~~~~~~~~~

src/index.ts:218:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.
  Index signatures are incompatible.
    Type 'string | number | boolean | ReadonlyPartialJSONObject | ReadonlyPartialJSONArray | null | undefined' is not assignable to type 'ReadonlyJSONValue'.
      Type 'undefined' is not assignable to type 'ReadonlyJSONValue'.

218                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:222:68 - error TS2339: Property 'session' does not exist on type 'IContext<INotebookModel>'.

222                     NotebookActions.runAndAdvance(content, context.session);
                                                                       ~~~~~~~

src/index.ts:231:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

231                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:235:58 - error TS2339: Property 'session' does not exist on type 'IContext<INotebookModel>'.

235                     NotebookActions.run(content, context.session);
                                                             ~~~~~~~

src/index.ts:244:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

244                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:257:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

257                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:270:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

270                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:283:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

283                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:296:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

296                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:312:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

312                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:327:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

327                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:343:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

343                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:359:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

359                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:378:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

378                 const current = getCurrent(args);
                                               ~~~~

src/index.ts:397:44 - error TS2345: Argument of type 'ReadonlyPartialJSONObject' is not assignable to parameter of type 'ReadonlyJSONObject'.

397                 const current = getCurrent(args);
                                               ~~~~

Found 34 errors.

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! jupyterlab_vim@0.12.0 build: `tsc`
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the jupyterlab_vim@0.12.0 build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     C:\Users\jthomp261\AppData\Roaming\npm-cache\_logs\2020-03-05T11_30_31_955Z-debug.log
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/install for documentation about this command.
lgtm-com[bot] commented 4 years ago

This pull request introduces 1 alert when merging 2833990c522b3b16c60f72e88844fe987c111816 into d3ef1ed7aaebfda8cb7582cbd54ef730c4815640 - view on LGTM.com

new alerts: