ipywidgets
ipywidgets copied to clipboard
latest version of npm packages might be incorrect
I'm sorry for not using the template as this does not apply to any code, but applies to the version of npm packages published
Looking at https://www.npmjs.com/package/@jupyter-widgets/base?activeTab=versions the latest version is 4.1.5
However I think the latest version should be 6.0.6
Also we seem to have 6.0.0-rc.2 as the next
This is probably just a display issue on NPM (I guess it does not like that we continue publishing 4.x alongside 6.x). 6.0.6 is correctly published on NPM: https://www.npmjs.com/package/@jupyter-widgets/base/v/6.0.6
I don't think it's a display issue. when I run npm install the version 4.x is installed and not the latest 6.x
Can you check that the version is correct in your package.json
file?
Yes
- npm init -y
- npm install @jupyter-widgets/base
- package.json is as follows
{
"name": "demo",
"version": "1.0.0",
"description": "",
"main": "sample.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"dependencies": {
"@jupyter-widgets/base": "^4.1.5"
}
}
Or
> npm view @jupyter-widgets/base version
4.1.5
It seems I was able to fix it running:
npm dist-tags add @jupyter-widgets/[email protected] latest
I'm unsure why this needs to be done (why the hell is this not automatic??), and if it will be required everytime we make a release.
Now the page shows 6.0.6 as being the latest: https://www.npmjs.com/package/@jupyter-widgets/base?activeTab=versions
Thanks for reporting!!
Btw, this wasn't the only package, there were a few others as well that didn't get published correctly. This wasn't the only package
Here are a few others
- https://www.npmjs.com/package/@jupyter-widgets/controls?activeTab=versions
- https://www.npmjs.com/package/@jupyter-widgets/jupyterlab-manager?activeTab=versions
- https://www.npmjs.com/package/@jupyter-widgets/output?activeTab=versions
- https://www.npmjs.com/package/@jupyter-widgets/base?activeTab=versions
- https://www.npmjs.com/package/@jupyter-widgets/html-manager?activeTab=versions
A simple alternative to resetting latest tag after a release is to point older versions to a new tag on publish, this could be done with npm publish --tag previous
where "previous" is one idea for the tag name. If it is not already supported by jupyter-releaser, it probably should.
For reference JupyterLab has a script to update the npm
tags: https://github.com/jupyterlab/jupyterlab/blob/main/buildutils/src/update-dist-tag.ts
Which is invoked via a releaser hook:
- https://github.com/jupyterlab/jupyterlab/blob/773a1a7d2e80210adb8886eb9527dd2256bd2bf6/pyproject.toml#L240
- https://github.com/jupyterlab/jupyterlab/blob/main/buildutils/src/publish.ts
👍🏼 on maintaining a consistent latest
tag for the package versions 🙏, for example I think that recently the latest
tag on @jupyter-widgets/jupyterlab-manager
has been inadvertently set to 3.1.7
- I am assuming because the last published released happened to be on the 3.1.x code line?
In this case adopting a v3
tag alongside latest
would be good, via some publishing script -- note that also gives consumers the ability to add "@jupyter-widgets/juptyerlab-manager": "v3"
to their package.json to keep tracking the latest of that release line.