feat(types): add ChangesetsPackages#1872
Conversation
|
| changesets: string[]; | ||
| }; | ||
|
|
||
| export interface ChangesetsPackage { |
There was a problem hiding this comment.
given we are in the scope of Changesets already, I'd prefer to remove the Changesets prefix from those types
| const packagesByName: { [key: string]: Package } = { | ||
| [packages.root.packageJson.name]: packages.root, | ||
| const packagesByName: { [key: string]: ChangesetsPackage } = { | ||
| [packages.root!.packageJson.name]: packages.root!, |
There was a problem hiding this comment.
isn't root required in the new type?
|
|
||
| export default function getDependencyGraph( | ||
| packages: Packages, | ||
| packages: Pick<ChangesetsPackages, "packages" | "root">, |
There was a problem hiding this comment.
q: why do we use Pick here now?
| await git.commit("first commit", tempDir); | ||
|
|
||
| try { | ||
| const { root, packages, tool } = await getPackages(tempDir); |
There was a problem hiding this comment.
q: so now tool is just a string so we wrap it in { type: tool } to conform to thy manypkg's v2 shape, right? once we migrate to it this value will change, we'll be able to just pass in tool directly because it will be an object with a .type property. On our end, in Changesets, we'll only require the .type to exist though
@manypkg/get-packagestov2#1795This PR introduces
ChangesetsPackagestypes to reduce the number of package relying on@manypkg/get-packages