-
Notifications
You must be signed in to change notification settings - Fork 613
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
[rush] Generate a change file for projects that don't publish via npm #884
Comments
Is the idea that certain packages are released by running In other words you want to generalize @iclanton and are really wanting to do a sprint to improve the publishing/versioning features. We could try to incorporate this requirement into the design. We already use |
Yes that sums it up very well. Getting all the updated packages in a parseable list is probably enough. In lerna our pattern was:
When I saw the rush change files, I thought "this is perfect, I can just parse these". But then I realized change files are only generated if shouldPublish is true. Otherwise the Could we do something tricky like have a version policy called |
What does
At the point where Rush calls We already encountered this problem ourselves. Someone added _updateApiFile into Rush one time when they needed custom logic to run before publishing, and it really doesn't belong there. Also the It would be great to provide a general mechanisn for customizing this. |
That's good to know it's a common need! I figure a lot of people would like to use rush this way. --since isn't super well documented. Without an argument, it filters Running a custom command is probably good enough. What we really need is a list of all the packages that have changed, because our deployment system can take a list of containers to deploy in parallel. We could have the script command write If you're thinking about how it SHOULD work ideally, my first thought was adding a I will play with version policies a little more and see if I can do what's needed right of the box. |
Is that because deploying creates a Git tag? Sorry if these are dumb questions -- I really should spend more time reading about Lerna. :-)
Version policies are a much better approach to this. I apologize that their current design is fairly confusing (since the requirements were constantly evolving for the people who implemented that portion of Rush). We really need to do another iteration to make it more understandable. |
I believe git tag is how it works by default. Deploying does create a git
tag for the whole repo, creating an easy way for Lerna to check for changes
since the last release(I think, haven't read all the source).
I'm glad you said that because I am getting pretty confused by version
policy. It seems like it is one flag trying to do a lot. I'm trying to
use it as something I would call 'publishing group'. Maybe it could just
use a dedicated doc page that really explains it.
…On Thu, Oct 18, 2018, 16:08 Pete Gonzalez ***@***.***> wrote:
--since isn't super well documented. Without an argument, it filters list/
ls to just give the packages that have changed since their last tag.
***@***.***/filter-options Pretty much perfect
for figuring out what to deploy.
Is that because deploying creates a Git tag? Sorry if these are dumb
questions -- I really should spend more time reading about Lerna. :-)
I will play with version policies a little more and see if I can do what's
needed right of the box.
Version policies are a much better approach to this. I apologize that
their current design is fairly confusing (since the requirements were
constantly evolving for the people who implemented that portion of Rush).
We really need to do another iteration to make it more understandable.
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#884 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAjhEqnc-X6bGMZdj3ufp-8W53IggUaPks5umN-sgaJpZM4XlHiN>
.
|
I tried using pack prior to the containerization step, but I noticed it doesn't include any kind of yarn.lock(or package-lock.json) file. Since that file lives in common/temp, that file won't end up in the published packages. Don't I need a lockfile in each package to be safe with my dependencies? |
So the node_modules folder is not included in your docker container? Instead you run With PNPM's model, I believe it would be fairly straightforward to distill a project-specific shrinkwrap.yaml file for a given project. @zkochan does your "shared shrinkwrap file" feature help with this at all? |
We just figured out we can use cp -RLf node_modules local_node_modules && rm -rf node_modules && mv local_node_modules node_modules To convert rush's symlinks into real files before containerization. It's great because it avoids another install, respects the global package lock, and will also containerize any local packages that are linked but not in NPM. It would be trivial for rush to someday have a command |
@jbcpollak (who was also interested in Docker container deployment) FYI
Today you could probably implement this as a Rush custom command. Eventually we do want to generalize Rush's publishing scenario to support other release types besides |
A couple of days ago @hulkish was asking about this feature for the same pupose in our gitter chat Indeed, it would be easy to implement a pnpm command for fetching a dedicated shrinkwrap from shared shrinkwrap. We have that logic already in the pnpm-shrinkwrap package |
@light24bulbs Hi, I guess I have the same problem as you, did you solve the problem with a list of changes? I'm still confusing with version policy and don't understand how to use it properly for our needs. |
@ledniy We never got as far as achieving this with version policy before switching to Lerna(for many other reasons). In Lerna just doing
|
Not to necro an old thread, but was there an answer for this? I'd like to publish https://aws.github.io/jsii/ projects. So I only want published changed workspaces, but when I publish I want to take over the publish process to jsii-pacmak to actually create the packages and manually publish. |
I would love to have a publish hook as well, I have a monorepo with very different stuff going on, e.g. publish to npm, publish to docker, do some terraform IaC etc. would be nice to have this feature. //edit the creation of changelogs without the need to publish it (or at least to npm) would be absolutly awsome, I already tried to prevent publishing with no success yet |
I just came across this issue, are there any news / new solutions that resolve the problem described here? |
We are using Rush to build a microservice cluster. Some rush packages will deploy to NPM, but after that some others(which depend on the above packages) will be containerized and go to AWS. I'm guessing this is a pretty normal pattern.
It would be really great to use Rush to check what microservices have changed and just deploy those(if they have dockerfiles).
There might be some clever use of version policy to achieve this. Looking for your recommendation.
In Lerna I can do
lerna ls --since --json
to see what I need to redeploy.The text was updated successfully, but these errors were encountered: