Skip to content

Conversation

@ecraig12345
Copy link
Member

@ecraig12345 ecraig12345 commented May 12, 2023

(New version of the paths part of #179)

Move the very basic path helpers to a new package @ws-tools/paths. This helps prepare for splitting other packages, including git utilities.

The main reason for splitting this package (rather than just using exports with various entry points) is to avoid the extra dependencies such as URL and workspace parsing where they're not actually needed.

For now, findProjectRoot is staying in workspace-tools since it uses getWorkspaceRoot, which then uses getWorkspaceManagerAndRoot. The workspace manager/root logic was recently moved to separate files and could almost be pulled out, but...

  • It doesn't seem like "workspace" logic quite belongs in a "paths" package?
  • The code uses the WorkspaceManager type (which certainly doesn't seem like it belongs in "paths"), so this might also require creating a "types" package
  • The code also uses the isCachingEnabled helper I recently added (to support a beachball change which isn't checked in yet). This logic certainly doesn't belong in "paths" and is not clear where it should go (or if it should be replaced with an environment variable)...

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.

1 participant