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

feat: bumpVersionsWithWorkspaceProtocolOnly #507

Merged
merged 10 commits into from
Jan 21, 2021

Conversation

zkochan
Copy link
Contributor

@zkochan zkochan commented Dec 8, 2020

close #506

@changeset-bot
Copy link

changeset-bot bot commented Dec 8, 2020

🦋 Changeset detected

Latest commit: 828dcad

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 6 packages
Name Type
@changesets/apply-release-plan Minor
@changesets/assemble-release-plan Minor
@changesets/cli Minor
@changesets/config Minor
@changesets/get-dependents-graph Minor
@changesets/types Minor

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link
Member

@Andarist Andarist left a comment

Choose a reason for hiding this comment

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

I've left just mostly nit-picky comments - as such I don't expect those places to be adjusted for this to get merged in if you don't feel like changing them. I've also left some minor questions - it would be lovely if you could answer those.

I'm not super fond of the workspaceVersionsOnly name for this but I also don't have anything in particular better than that. Maybe manageWorkspaceVersionsOnly?

__fixtures__/workspace-and-other-range-dep/package.json Outdated Show resolved Hide resolved
packages/apply-release-plan/src/index.test.ts Outdated Show resolved Hide resolved
packages/cli/src/types.ts Outdated Show resolved Hide resolved
packages/assemble-release-plan/src/index.test.ts Outdated Show resolved Hide resolved
packages/apply-release-plan/src/index.test.ts Outdated Show resolved Hide resolved
packages/apply-release-plan/src/index.test.ts Show resolved Hide resolved
packages/cli/src/run.ts Outdated Show resolved Hide resolved
zkochan and others added 4 commits January 17, 2021 02:06
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
@zkochan
Copy link
Contributor Author

zkochan commented Jan 17, 2021

maybe bumpWorkspaceVersionsOnly?

zkochan and others added 2 commits January 17, 2021 02:35
Co-authored-by: Mateusz Burzyński <mateuszburzynski@gmail.com>
@Andarist
Copy link
Member

maybe bumpWorkspaceVersionsOnly?

That would be better 👍 @mitchellhamilton any naming preferences for this one? I'll leave this open for a few days - if we don't get any further comments on this one I'll be proceeding with bumpWorkspaceVersionsOnly.

@aspirisen
Copy link

@zkochan looks like your issue is pretty close to my one #512
I have a question about how does it work.

Let's say we have a repo with three projects: foo@2.0.0, bar@2.0.0, qar@2.0.0
foo has qar@2.0.0 in the dependencies. Which is the same as in the monorepo.
bar has an older version of qar in dependencies: 1.0.0.

In your example, does bar has exact match version of qar? if not, how does it understand that it shouldn't bump qar version in bar?

@zkochan
Copy link
Contributor Author

zkochan commented Jan 17, 2021

pnpm and Yarn support the workspace: protocol to link packages inside a monorepo:

https://pnpm.js.org/en/workspaces#workspace-protocol-workspace

So with this change, if the dependency has "qar: "workspace:1.0.0" in package.json, changeset will bump the version of qar. But if qar is specified without the workspace protocol: "qar": "1.0.0". In this case, changeset will not bump the version of qar in dependencies.

@aspirisen
Copy link

@zkochan so as I understood you need to change it manually. For example you have foo and bar and each of them are using qar via workspace protocol "qar: "workspace:1.0.0" and therefore changesets will bump its version inside foo and bar. Then once you understand that bar package becomes stale and in order to avoid random breaking changes you set the version of qar without workspace and changesets stops incrementing qar version automatically?

@zkochan
Copy link
Contributor Author

zkochan commented Jan 17, 2021

Sounds correct. In a huge monorepo used by many teams, this scenario can happen. It did happen at my company, so until this is merged, we are using a fork of this project.

@aspirisen
Copy link

Got it, thanks

@emmatown
Copy link
Member

Maybe bumpVersionsWithWorkspaceProtocolOnly?

@zkochan zkochan changed the title feat: workspaceVersionsOnly feat: bumpVersionsWithWorkspaceProtocolOnly Jan 20, 2021
@zkochan
Copy link
Contributor Author

zkochan commented Jan 20, 2021

I have renamed the setting.

@zkochan
Copy link
Contributor Author

zkochan commented Jan 21, 2021

Is there something else that needs to be done?

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.

Dependencies are upgraded to new major versions during release
4 participants