You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I've been using get-yarn-workspaces to get a list of my workspaces (for various custom scripts), but going forward I thought I should make my own package that I can easily update if required.
There are 3 ways I can proceed with this:
Copy/paste get-yarn-workspaces and update
Run yarn -s workspaces info via the child_process module (see this post)
Use an official API
I decided to start with 3 and fall back to 2 if it doesn't work.
Looking at @yarnpkg/core I found WorkspaceFetcher but glancing at the code I get the impression this gets information (or something else) of a known workspace passed by arguments, am I right?
If so, can you tell me how I can use the official API to simply return a list of workspaces like the get-yarn-workspaces package does.
The text was updated successfully, but these errors were encountered:
I've been using get-yarn-workspaces to get a list of my workspaces (for various custom scripts), but going forward I thought I should make my own package that I can easily update if required.
There are 3 ways I can proceed with this:
yarn -s workspaces info
via the child_process module (see this post)I decided to start with 3 and fall back to 2 if it doesn't work.
Looking at
@yarnpkg/core
I foundWorkspaceFetcher
but glancing at the code I get the impression this gets information (or something else) of a known workspace passed by arguments, am I right?If so, can you tell me how I can use the official API to simply return a list of workspaces like the get-yarn-workspaces package does.
The text was updated successfully, but these errors were encountered: