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

Use "*" instead of exact version number for internal dependencies #2792

Closed
trivikr opened this issue Sep 16, 2021 · 6 comments · Fixed by #3222
Closed

Use "*" instead of exact version number for internal dependencies #2792

trivikr opened this issue Sep 16, 2021 · 6 comments · Fixed by #3222
Labels
feature-request New feature or enhancement. May require GitHub community feedback.

Comments

@trivikr
Copy link
Member

trivikr commented Sep 16, 2021

Is your feature request related to a problem? Please describe.

Rebasing takes time as we need to manually resolve package version number before merge.
If there is a mistake while rebasing, the CI fails on main branch. Example: #2697

Describe the solution you'd like

Use "*" instead of specifying exact version number for internal dependencies.

@trivikr trivikr added the feature-request New feature or enhancement. May require GitHub community feedback. label Sep 16, 2021
@trivikr
Copy link
Member Author

trivikr commented Sep 16, 2021

The "*" mentioned in the dependencies is changed to the exact version number when lerna version is run. Verified in commit: trivikr/test-lerna-monorepo-publish@2b60543

Command run:

$ ./node_modules/.bin/lerna version --exact --conventional-commits --no-push --no-git-tag-version --no-commit-hooks --yes

We can use "*", given that we create another commit to replace version numbers for internal dependencies back to "*" after the release commit.

@trivikr
Copy link
Member Author

trivikr commented Oct 12, 2021

AWS CDK uses 0.0.0 as version marker, added in aws/aws-cdk#6463

@trivikr
Copy link
Member Author

trivikr commented Jan 18, 2022

The "*" mentioned in the dependencies is changed to the exact version number when lerna version is run.

Open question in lerna lerna/lerna#3063

@trivikr
Copy link
Member Author

trivikr commented Jan 18, 2022

AWS CDK uses custom script for managing versions
https://github.com/aws/aws-cdk/blob/master/scripts/align-version.js

@trivikr
Copy link
Member Author

trivikr commented Jan 18, 2022

Decision: we'll continue to use lerna version command for creating release commit, and update internal release scripts as follows:

  • Push changes made by running version command in tag branch.
  • Undo version numbers in deps/devDeps/peerDeps back to * and push it to main branch.
  • Npm publish from tag branch.

@github-actions
Copy link

github-actions bot commented Feb 5, 2022

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs and link to relevant comments in this thread.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request New feature or enhancement. May require GitHub community feedback.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant