Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
I had to remove the dynamic version ranges from the package.json and pin all the versions, as pnpm updated some of the versions ranges. This broke some tests. Some versions probably did a minor update which was breaking. Fun!
I'd be fine with leaving them pinned, but we can add dynamic version ranges back. I'd use
~
instead of^
, though.TODO:
We need to determine if using pnpm's
node-linker=isolated
(which is their default, recommended one) breaks serverless deployments, as written here. Possible workarounds (if it in fact is an issue) could be found here and here.Another possible workaround, if determined to be an issue, would be to use
node-linker=hoisted
. The benefit of this would be that we then wouldn't need a workaround for this typescript bug anymore. However, in this exact typescript issue comment, he writes the following (point 5.):"But that might not be the case; imagine you publish express-app to the npm registry and someone installs it in a project using isolated mode - then express-serve-static-core is not present and it could introduce TypeScript errors on their side!"
So, basically, it could cause issue for people installing payload with pnpm's isolated mode. This is probably not an issue if we keep the workaround I've already included in this PR, though. However,, isolated mode should be helpful for tackling phantom dependencies when we switch to Workspaces.
If we decide to thus switch to node-linker=hoisted, we should keep the workaround and create a github action which builds the application using isolated mode as well, to verify it still works there,
Type of change
Checklist: