-
Notifications
You must be signed in to change notification settings - Fork 944
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
Upgrade to yarn v4 #2551
Upgrade to yarn v4 #2551
Conversation
… build and test work.
… --immutable. Updating module dependencies to use special "workspace:" syntax. Should remove need to update all package.json Turf dependencies for every Turf release.
…sn't run user defined pre* scripts automatically any more, so pretest, posttest, and postlint have been rolled into their respective "main" tasks. Adding yarn prepare explicitly to github workflow as yarn doesn't seem to call that implicitly as part of install.
…re though think I checked in a copy before that was in place.
…ent dependency of the new yarn version.
…setup-node instead.
Drat. Looks like the node-setup github action can't enable corepack, which we need to install the newer yarn version in the CI environment. Going to move this PR in to draft status until that is possible or I can find another way to press on 😩 Dependent on PR actions/setup-node#901 |
For what its worth, I don't think we are tied to yarn for any particular reason (I moved us there because we didn't even have a node package lock at the time). I've mostly moved over to pnpm if that helps make this PR easier. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall lgtm, happy to re-review once it builds.
|
||
isInside = booleanPointInPolygon(multiPoint.coordinates[i], polygon, { | ||
ignoreBoundary: true, | ||
}); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change is a no-op (I guess?) but its confusing as part of the yarn upgrade. It also might be a step away from a better version where we can skip the second booleanPointInPolygon? Not really sure what the original intent was of the oneInside boolean.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Me either. Yeah, it basically evaluated to if (true) ...
Was an issue that didn't seem to justify its own PR, though happy to separate it out.
Well, I might see how this goes with pnpm instead and if that's smoother scrap this PR for one based around that tool. Thanks for clarifying. |
Retiring in favour of PR #2555 |
Turf was using a very old version of yarn (v1), with v4 being the most recently released. Upgrading to a newer version (apart from v1 eventually not being supported) we get access to some monorepo sugar - "workspace:^" instead of "v7.0.0-alpha.2" etc, and first class yarn workspaces commands. There might be some npm deployment related changes, though this has been around long enough they should be well documented. Tagging @mfedderly for a review regardless.
Please fill in this template.
npm test
at the sub modules where changes have occurred.npm run lint
to ensure code style at the turf module level.