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

Fix breaking change in pnpn v9 with workspace package linking. #621

Merged

Conversation

Cooldude2606
Copy link
Collaborator

@Cooldude2606 Cooldude2606 commented May 8, 2024

As per the pnpn v9 change log:

link-workspace-packages: disabled by default. This means that by default, dependencies will be linked from workspace packages only when they are specified using the workspace protocol.

Previously the default was true which allowed packages to be linked within the workspace as long as the version was compatible. With the new value of false this no longer happens and you must be explicit in the package linking. This resulted in fresh dev installs failling at build and prepare stages. Thankfully, this is an easy change to make and pnpn will update the version on publish to match the workspace versions.

The changes made:

  • Add web ui as a dev dep at the root of the project.
  • Change all workspace versions to workspace:* to allow linking.

Possible change:

  • We could update the CI to use pnpn v9 in / after this PR.

Copy link
Member

@Hornwitser Hornwitser left a comment

Choose a reason for hiding this comment

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

Looks good. I did not find any missed entries, and it builds fine in my dev environment with pnpm 8.

@Cooldude2606
Copy link
Collaborator Author

There was some discussion around if workspace:* or workspace:^ should be used. The difference between the two is their behaviour during pnpm publish; the first will insert the exact package version used, while the second will prepend a ^ to allow any compatible version. e.g. workspace:* -> 2.0.0-alpha.18 vs workspace:^ -> ^2.0.0-alpha.18

It was decided to stay with workspace:* because each alpha version of v2.0.0 is expected to contain breaking changes so although 2.0.0-alpha.19 would be accepted by ^2.0.0-alpha.18 we do not maintain the guarantee that it will be compatible. Once we are at full release it would be more appropriate to use workspace:^

@Cooldude2606 Cooldude2606 merged commit b9e9a75 into clusterio:master May 8, 2024
3 checks passed
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.

None yet

2 participants