How can/will django-commons handle related npm packages? #182
Replies: 3 comments 8 replies
-
👋 my two cents as someone who has more packages on npm than PyPI: go with npm rather than GitHub
npm’s organizations have a concept of teams. Packages are always associated with a specific team rather than the whole organization, so it would be possible to have a "django-cookie-consent" team in the "Django Commons" organization, with access to that package.
Publishing under a scope isn’t a requirement when using organizations. For example the wagtail organization on npm has two |
Beta Was this translation helpful? Give feedback.
-
Thank you for raising this @sergei-maertens! I think this is something Django Commons should be involved in. I'm not sure when though. I'm a little worried about going through the leg work to figure out how to properly maintain organizations and teams, defining our processes and playbooks to only have one package use it. Not saying it would only apply to one package ever, but it's hard to predict the future. |
Beta Was this translation helpful? Give feedback.
-
I checked with another organization on how the package "transfer" works and it's a bit clunky 😬 As owner of the package The CLI is probably the easiest way to do this npm owner add <django-commons-admin-username> <package-name>
npm owner rm <own-username> <package-name> or do this in the UI via the Settings > add maintainer. It's probably best to remove yourself as owner only after all the rest has gone right. As django-commons admin You need to be an owner/maintainer of the package to do this
Team members should now be able to publish (new versions of) this package. |
Beta Was this translation helpful? Give feedback.
-
Hi everyone - this question is me doing my due diligence before I (try to) transfer django-cookie-consent into django-commons.
There is some Javascript bundled with django-cookie-consent through django staticfiles, but DX-wise that creates some friction when trying to integrate this in common frontend stacks with bundlers (Vite,Webpack) and/or Typescript. For this reason, the JS and type declaration are also published on NPM and the version number of that package matches the PyPI package version number. However, I currently have to publish this package under my personal NPM account because there's no jazzband account that I can publish it with and using Github package registry is not an option either because I can't make the package public.
I see django-commons as a solution to this problem, in two possible ways (that are not necessarily mutually exclusive):
@django-commons/django-cookie-consent
I'm curious what the rest of the community thinks about this and whether there's a preferred approach. The discussion could also set a precedent for future other package ecosystems (e.g. possible Rust/cargo crates that are exposed via Python bindings, to name one).
Beta Was this translation helpful? Give feedback.
All reactions