-
Notifications
You must be signed in to change notification settings - Fork 67
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
WIP: individual publishing of packages #2289
base: main
Are you sure you want to change the base?
Conversation
879eb0f
to
40d6e71
Compare
f48cc5c
to
a2f246b
Compare
], | ||
"version": "0.0.0-dev.0" | ||
"packages": ["configs/*", "packages/*", "scripts/docker"], | ||
"version": "independent" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@addaleax I'm a bit unsure how to go about all this to the point where I can feel much confidence;
What I did here is
- remove lerna force publish
- use lerna independent mode
- add the bump script
I feel like this should hypothetically do the trick. maybe a couple more changes might be all we need.
I tried i.e. running npm run bump-packages
locally and I wonder if it is because of the fact that this PR itself technically changes all of the packages, we end up with a bunch of bumps; some reasonable others not so much.
I assume some of these packages we'd like to ignore right? And also some which we should keep at 0.0.0-dev.0
for our development?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume some of these packages we'd like to ignore right? And also some which we should keep at 0.0.0-dev.0 for our development?
Well, the mongosh
and @mongosh/cli-repl
packages specifically should still be bumped as part of the process we have now, that can be by using the 0.0.0-dev.0
placeholders but I don't think that's a strict requirement here
@@ -20,10 +20,6 @@ export function publishNpmPackages( | |||
); | |||
} | |||
|
|||
if (versions[0] === PLACEHOLDER_VERSION) { | |||
throw new Error('Refusing to publish packages with placeholder version'); | |||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we're dropping this because we're assuming that a placeholder version wouldn't ever be used anyway?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that was my thinking though I am wondering if it'd be useful in some manner; the only thing I can think of is if we want to opt-out a package from being versioned independently; but keeping an opt-out list would make more sense in that case
// updates the version of internal packages to reflect the tagged one | ||
await bumpNpmPackages(config.version); | ||
return; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This release process should still involve a bump of the versions of all packages that the @mongosh/cli-repl
package depends on, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hm right, was going to make this part of a script but re-added it as a function which calls the bump-packages
.
So an idea could be:
- At release, for
mongosh
and@mongosh/cli-repl
, the version is manually set atconfig.version
from release before the rest of the packages get bumped. - We bump all other packages with
bump-packages
at release exceptmongosh
and@mongosh/cli-repl
which will always be excluded frombump-packages
, including when running it from a bump action.
Would this make sense with what we're going for?
], | ||
"version": "0.0.0-dev.0" | ||
"packages": ["configs/*", "packages/*", "scripts/docker"], | ||
"version": "independent" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume some of these packages we'd like to ignore right? And also some which we should keep at 0.0.0-dev.0 for our development?
Well, the mongosh
and @mongosh/cli-repl
packages specifically should still be bumped as part of the process we have now, that can be by using the 0.0.0-dev.0
placeholders but I don't think that's a strict requirement here
8c9c214
to
41bc10a
Compare
@addaleax Didn't get to spend too much time on this before my holiday with some VSCode and coverage test back and forths. Would be happy to jump back into it in a week but if it'd be better to finish this earlier, feel free to pick it up 🙂 I have some WIP files that I may polish up and push at a later time also though not sure how useful they are; will see. |
41bc10a
to
ad630dc
Compare
No description provided.