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

Improve upgrade extension script #14882

Merged

Conversation

fcollonval
Copy link
Member

References

Fixes jupyterlab/extension-template#36

Code changes

  • Remove prepare script when upgrading an extension
  • Add more workflows recommended to override
  • Better cleaning of the python package name when using the npm package name

User-facing changes

None

Backwards-incompatible changes

None

@jupyterlab-probot
Copy link

Thanks for making a pull request to jupyterlab!
To try out this branch on binder, follow this link: Binder

@fcollonval fcollonval added this to the 4.0.x milestone Jul 30, 2023
@fcollonval
Copy link
Member Author

@krassowski if you have seen other things that could be improved let me know.

@krassowski
Copy link
Member

The only thing that got me was stylelint configuration being in package.json. The recommend to override list still includes .stylelintrc, .prettierrc and .eslintrc.js even though these are now in package.json. I needed to copy the keys over manually - I am not sure if this is because of an answer I given or if this is not handled by the script. Somewhat related but on the template side, I needed to add selector-class-pattern to allow JupyterLab style class names.

Copy link
Member

@krassowski krassowski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As for the changes that are already in, LGTM. Not sure what you think about the lint config situation (an alternative to improving the upgrade script would be to revert the template to have them in individual files).

@fcollonval
Copy link
Member Author

The script does not import the styling config from the template (only the scripts and (dev)dependencies are processed. But I agree with you, I found myself always switching the config for the linter. So I'll push a commit to improve the upgrade script to handle that.

Fix copying package.json for ui-tests
@fcollonval fcollonval merged commit 659c611 into jupyterlab:main Jul 31, 2023
75 of 77 checks passed
@fcollonval fcollonval deleted the fix/upgrade-extension-remove-prepare branch July 31, 2023 14:59
@fcollonval
Copy link
Member Author

@meeseeksdev please backport to 4.0.x

meeseeksmachine pushed a commit to meeseeksmachine/jupyterlab that referenced this pull request Jul 31, 2023
fcollonval added a commit that referenced this pull request Aug 2, 2023
Co-authored-by: Frédéric Collonval <fcollonval@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Check-release action in fails on check-npm
2 participants