jupyterlab / extension-cookiecutter-ts

A cookiecutter recipe for JupyterLab extensions in Typescript
BSD 3-Clause "New" or "Revised" License
179 stars 88 forks source link

Update to jupyterlab 4.0.0b0 #293

Closed brichet closed 1 year ago

brichet commented 1 year ago

This PR updates the extension-cookiecutter to jupyterlab>=4.0.0a37 (with yarn3).

It includes the changes of https://github.com/jupyterlab/extension-cookiecutter-ts/pull/291 by @trungleduc.

It also adds some missing devDependencies which should allow yarn install using nodeLinker: pnpm.

welcome[bot] commented 1 year ago

Thanks for submitting your first pull request! You are awesome! :hugs:
If you haven't done so already, check out Jupyter's Code of Conduct. Also, please make sure you followed the pull request template, as this will help us review your contribution more quickly. welcome You can meet the other Jovyans by joining our Discourse forum. There is also a intro thread there where you can stop by and say Hi! :wave:
Welcome to the Jupyter community! :tada:

jtpio commented 1 year ago

some missing devDependencies

Do you know if that was because the cookiecutter setup was making explicit use of them, and expecting these dev dependencies to be installed via another dependency? For example via @jupyterlab/builder.

brichet commented 1 year ago

Do you know if that was because the cookiecutter setup was making explicit use of them, and expecting these dev dependencies to be installed via another dependency? For example via @jupyterlab/builder.

No, it is not explicit use.

welcome[bot] commented 1 year ago

Congrats on your first merged pull request in this project! :tada: congrats Thank you for contributing, we are very proud of you! :heart:

jtpio commented 1 year ago

Still wondering why we need to explicitly list these devDependencies.

the others are necessary to build the extension (probably for webpack): https://github.com/jupyterlab/jupyterlab/blob/a3a0e3e7abf75e53810ed7ff8037c439cbb07697/buildutils/src/ensure-repo.ts#L71-L81. But it seems that not all of them were necessary.

Normally the extension code should not have to care about these webpack dependencies, since they are already dependencies of @jupyterlab/builder.

jtpio commented 1 year ago

Asking because the same list of devDependencies can also be found in the extension template: https://github.com/jupyterlab/extension-template

fcollonval commented 1 year ago

This is due to stricter check of pnpm packager about dependency specifications.

jtpio commented 1 year ago

Maybe these devDependencies could be put behind a "use pnpm?" copier flag, to remove noise for extensions staying on the default jlpm?

brichet commented 1 year ago

Maybe these devDependencies could be put behind a "use pnpm?" copier flag, to remove noise for extensions staying on the default jlpm?

Strict control also applies to the use of node-modules. By the way, extension-cookiecutter-ts generate an extension using node-modules: https://github.com/jupyterlab/extension-cookiecutter-ts/blob/0ba10b8e268135a9c4c0283c8498a5d8f4a62c8f/%7B%7Bcookiecutter.python_name%7D%7D/.yarnrc.yml#L3