Skip to content
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

Upgrade library versions for compatibility with JupyterLab 2.0 #449

Merged
merged 4 commits into from
Mar 9, 2020

Conversation

jhelie
Copy link
Contributor

@jhelie jhelie commented Mar 3, 2020

I'm not sure this is the correct way of bumping jupytext but with these changes the extension works again with JupyterLab 2.0.

@jhelie
Copy link
Contributor Author

jhelie commented Mar 4, 2020

Thanks, I've tried addressing these (and updating setup.py so that Travis tests work) but I can't seem to be able to build locally as jlpm install fails with:

> [email protected] build /home/jean/repos/projects/jupytext/packages/labextension
> tsc

node_modules/@jupyterlab/ui-components/lib/icon/labicon.d.ts:3:8 - error TS1259: Module '"/home/jean/repos/projects/jupytext/packages/labextension/node_modules/@types/react/index"' can only be default-imported using the 'esModuleInterop' flag

3 import React from 'react';
         ~~~~~

  node_modules/@types/react/index.d.ts:62:1
    62 export = React;
       ~~~~~~~~~~~~~~~
    This module is declared with using 'export =', and can only be used with a default import when using the 'esModuleInterop' flag.

src/index.ts:7:10 - error TS2305: Module '"../node_modules/@jupyterlab/coreutils/lib"' has no exported member 'nbformat'.

7 import { nbformat } from "@jupyterlab/coreutils";
           ~~~~~~~~

I'm not sure what change on my end triggers this new error.

@jhelie jhelie force-pushed the migrate-to-jupyterlab2 branch from 2d5c7c8 to 4f9f94e Compare March 4, 2020 14:56
@jhelie
Copy link
Contributor Author

jhelie commented Mar 4, 2020

I think I found the two issues:

  • nbformat now has its own package (was actually mentioned in the migration guide)
  • esModuleInterop had to be set to true in tsconfig.json

@jhelie jhelie force-pushed the migrate-to-jupyterlab2 branch 2 times, most recently from ed27c14 to 6c603bb Compare March 4, 2020 15:04
@codecov
Copy link

codecov bot commented Mar 4, 2020

Codecov Report

Merging #449 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #449   +/-   ##
=======================================
  Coverage   98.91%   98.91%           
=======================================
  Files          77       77           
  Lines        7573     7573           
=======================================
  Hits         7491     7491           
  Misses         82       82
Impacted Files Coverage Δ
jupytext/version.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b0e2edc...b8e20ab. Read the comment docs.

@mwouts
Copy link
Owner

mwouts commented Mar 7, 2020

Jean, I have documented the change in the CHANGELOG, and added a word about how to use the previous version of the extension with JupyterLab 1.x. in the README for the extension. Is that OK with you?

Many thanks again for your contribution!

@mwouts mwouts force-pushed the migrate-to-jupyterlab2 branch from d3d9029 to b0d9327 Compare March 8, 2020 08:17
@jhelie
Copy link
Contributor Author

jhelie commented Mar 9, 2020

Just fixed a typo in the PR reference but otherwise LGTM, thanks! Happy for this to be merged whenever.

@mwouts mwouts merged commit c538d84 into mwouts:master Mar 9, 2020
@mwouts
Copy link
Owner

mwouts commented Mar 9, 2020

Excellent ! Thank you @jhelie !

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants