feat: support for yarn projects; improvement: rewrote bump script in python - #27
Conversation
| | `project-type` | Version lives in | Bumped with | | ||
| | --- | --- | --- | | ||
| | `uv` (default) | `pyproject.toml` | `uv version --bump` | | ||
| | `yarn` | `package.json` | `npm version` | |
There was a problem hiding this comment.
Can we use npm instead of yarn as a package manager? the ndc webapps are the only project that uses yarn. Gil liked yarn, but I've only had issues. I use npm for single project repos and pnpm for monorepos. pnpm is super fast.
I would assume that action doesn't pull in the package manager version which might cause conflicts
There was a problem hiding this comment.
I have added pnpm and npm as possible backends so the AP can transition easily (or keep using yarn)
| ## Prerequisites | ||
| Two project types are supported, selected with `project-type`: | ||
|
|
||
| | `project-type` | Version lives in | Bumped with | |
There was a problem hiding this comment.
Is this deliberately a project type over a language?
I guess the project type does allow for the distinction between uv and pixi projects which use conda (not sure if that makes a difference here).
These are technically package managers, but a shape-of-the-project label gives us flexibility to support, for example, a "full-stack" that might have slightly different patterns.
|
Nice. Re PEP440 vs semvar - having a single scheme would save effort especially with projects that deal with both (which is our deployment processes now...). PEP440 and semver look closer than they are when you are in stable release territory. I'm not sure of the impact or what does/doesn't work if we used semver. The |
|
We should at least do some exploration about the impact before consolidating, but it would reduce some complexity. I would also put exploring using python dynamic versioning instead of the extra post-release bump on the table too. That might conflict with adopting semver as it uses the @mikapfl might have some insights. I don't have a solid steer either way I just want to be able to accurately describe stable releases vs unreleased code. the Bookshelf pulls the version identifier, so there are co-benefits to getting this right and consistent. The difference burned some time for me yesterday |
|
https://peps.python.org/pep-0440/#semantic-versioning
If our tags follow semver we need to translate to PEP440 for the version in So, at a glance, the dimensions are "package" version vs "tag" version. Does this reduce to bumping via the package manager to handle package version differences, then translating to semver for the tag? Renovate picks up github releases by default so any differences between the tag and the release version shouldn't matter there. |
I needed the support for yarn projects to be able to use the bump action for the AP so I used the chance (and the ever more complex bash script in the action as a motivation) to rewrite the bump action in python (with claudes help).
The version numbers for
uvprojects still follows PEP440, so it's still "v1.2.3.dev1" for those, whileyarnprojects already get semantic versions "1.2.3-dev.1". Maybe we want to standardise both of them to semver? Also re: our discussions on the API versioning @lewisjaredAlso fyi @mikapfl , re: your wish to rewrite this in python ;)