wayfair / one-version

Implementation of Google’s One Version Rule for JS monorepos
https://www.npmjs.com/package/@wayfair/one-version
MIT License
24 stars 4 forks source link

Refactor Workspace Utils #30

Closed wvanrensselaer closed 1 year ago

wvanrensselaer commented 1 year ago

Description

Note: this is incomplete, want to get thoughts before I clean up and add tests.

Currently we split the check APIs which abstract workspace extraction. This makes it mildly difficult to add checks (see https://github.com/wayfair/one-version/issues/24) without extracting workspaces twice or duplicating across check APIs.

I think we can just bifurcate the workspace extraction across package managers, have that return a uniform object. Then operate checks directly on that.

Type of Change

finn-orsini commented 1 year ago

👍 Yeah this is very similar to what I had planned when adding the set command! Looks good to me pending spec updates.

finn-orsini commented 1 year ago

Closing, merged in https://github.com/wayfair/one-version/pull/32