Skip to content

feat(publish): replace +{SHA} with .{SHA} in lerna publish --canary#4124

Draft
MatusKnizka wants to merge 2 commits intolerna:mainfrom
MatusKnizka:feature/dot-instead-of-plus
Draft

feat(publish): replace +{SHA} with .{SHA} in lerna publish --canary#4124
MatusKnizka wants to merge 2 commits intolerna:mainfrom
MatusKnizka:feature/dot-instead-of-plus

Conversation

@MatusKnizka
Copy link
Copy Markdown

@MatusKnizka MatusKnizka commented Nov 15, 2024

Replace +{SHA} with .{SHA} in lerna publish --canary

Description

Instead of using plus (+) sign in package name provided by --canary flag, use dot.

Motivation and Context

It's not possible to publish --canary version into jfrog artifactory, as jfrog is cutting part of filename, due to + (plus) character. So, instead of using +, I would suggest to use dot.

#2060

How Has This Been Tested?

Unit tests
Integration tests
Run publish command

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Chore (change that has absolutely no effect on users)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@nx-cloud
Copy link
Copy Markdown

nx-cloud Bot commented Feb 19, 2025

View your CI Pipeline Execution ↗ for commit 64ae261.

Command Status Duration Result
nx run-many --t e2e --parallel=1 ✅ Succeeded 3m 59s View ↗
nx run integration:integration --ci --maxWorkers=2 ✅ Succeeded 3m 22s View ↗
nx run-many -t test --parallel=3 --ci --maxWork... ✅ Succeeded 44s View ↗
nx run-many -t lint --parallel=3 ✅ Succeeded 18s View ↗
nx run-many -t build --parallel=3 ✅ Succeeded 12s View ↗
nx-cloud record -- npx nx format:check ✅ Succeeded 3s View ↗
nx run-many -t build ✅ Succeeded 5s View ↗
nx run-many -t test --parallel=3 --ci --maxWork... ✅ Succeeded 1m 37s View ↗

☁️ Nx Cloud last updated this comment at 2025-02-19 15:28:18 UTC

@JamesHenry
Copy link
Copy Markdown
Member

I'm really sorry for the delay on a formal resolution here @MatusKnizka. This is not a PR we can proceed with directly because it's mixing a couple of different concerns IMO and is a breaking change which would required wider clean up.

The + is significant in the semver spec, it's called "build metadata": https://semver.org/#spec-item-10

Importantly, it is just metadata and not used to differentiate versions during installs and dependency resolution:

1.0.0-alpha.0+abc123 and 1.0.0-alpha.0+def456 will not be treated any differently by your package manager - they are effectively the same version - 1.0.0-alpha.0.

Therefore, it does make sense that jfrog is "cutting it" as you describe.

Please can you share more about your use-case? Are you trying to publish over the same version with different build metadata? Are you saying that lerna is not incrementing the .0 after the alpha upon subsequent canary releases?

Copy link
Copy Markdown
Member

@JamesHenry JamesHenry left a comment

Choose a reason for hiding this comment

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

See comment

@JamesHenry JamesHenry marked this pull request as draft September 15, 2025 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants