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

chore: update workspace version constraints #8864

Merged
merged 2 commits into from
Oct 23, 2023

Conversation

mmachatschek
Copy link
Contributor

@mmachatschek mmachatschek commented Oct 21, 2023

Updates the version constraints of all workspaces (except examples folder). The version constraints with workspaces are supported

When publishing packages that contain the workspace: key in the version constraint, pnpm will automatically inject the correct version of the workspace package.
https://pnpm.io/workspaces#publishing-workspace-packages

I didn't update the examples with the workspace: prefix as they should be easily copiable.

@mmachatschek mmachatschek force-pushed the pnpm_workspaces-improvements branch from a78ad6a to c5b8391 Compare October 21, 2023 18:08
@codesandbox-ci
Copy link

codesandbox-ci bot commented Oct 21, 2023

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

Latest deployment of this branch, based on commit 96d6f44:

Sandbox Source
@keystone-6/sandbox Configuration

@mmachatschek mmachatschek marked this pull request as ready for review October 21, 2023 18:11
@mmachatschek mmachatschek marked this pull request as draft October 21, 2023 18:48
@dcousens dcousens marked this pull request as ready for review October 21, 2023 23:59
@dcousens
Copy link
Member

dcousens commented Oct 22, 2023

We use the following to publish

run: pnpm changeset publish --tag latest

Are we guaranteed that changesets will use pnpm? 🤔

Love this initiative by the way, and maybe changesets is less necessary...

@mmachatschek
Copy link
Contributor Author

mmachatschek commented Oct 22, 2023

@dcousens changesets is still necessary to detect which packages need a patch/minor/major bump. So that functionality stays.

Are we guaranteed that changesets will use pnpm? 🤔

https://github.com/changesets/changesets/blob/main/docs/command-line-options.md#publish

the changeset cli will automatically detect that its running pnpm (same as it does now in the publishing process) and calls the pnpm publish command under the hood. That pnpm publish command will automatically replace the workspace: version constraint from the package.json while publishing.

The workspace: version constraint just makes local development and versioning easier.

For publishing e.g. using workspace:* will not lead to updates like this: https://github.com/keystonejs/keystone/pull/8524/files#diff-3124b4b520bd0b5947ccd314a4b1f28ff07b2813f76af8ba2efdbf54631ccd94

@mmachatschek
Copy link
Contributor Author

mmachatschek commented Oct 22, 2023

marking this as draft as tests are failing that I need to debug

@mmachatschek mmachatschek force-pushed the pnpm_workspaces-improvements branch from c5b8391 to 07b9900 Compare October 22, 2023 06:47
@mmachatschek mmachatschek marked this pull request as draft October 22, 2023 06:49
update packages/* deps

fix build of local installation of keystone-6 core
@mmachatschek mmachatschek force-pushed the pnpm_workspaces-improvements branch from 07b9900 to 4a64956 Compare October 22, 2023 08:26
@mmachatschek mmachatschek marked this pull request as ready for review October 22, 2023 08:28
@@ -10,7 +10,7 @@
"postinstall": "keystone postinstall"
},
"dependencies": {
"@keystone-6/cloudinary": "workspace:^",
Copy link
Member

Choose a reason for hiding this comment

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

For posterity

I didn't update the examples with the workspace: prefix as they should be easily copiable.

Agreed 💙

@dcousens dcousens merged commit a1af5cd into keystonejs:main Oct 23, 2023
57 checks passed
@dcousens dcousens self-assigned this Oct 23, 2023
@mmachatschek mmachatschek deleted the pnpm_workspaces-improvements branch October 24, 2023 05:06
@dcousens dcousens mentioned this pull request Dec 4, 2023
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