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
When publishing from workspaces, it is still desirable to have gitHead still set, for all the reasons it was desirable without them. (Specifically, that published packages can be correlated with a specific commit in the source repo.) This is described in terms of subdirectories and not workspaces because supporting this without requiring a workspace definition would allow monorepos that npm does not manage to still be published with gitHead. This is most commonly the case when pnpm is used as it calls npm publish from its own workspace folders under the hood.
Motivation ("The Why")
When publishing from workspaces, it is still desirable to have gitHead still set, for all the reasons it was desirable without them. (Specifically, that published packages can be correlated with a specific commit in the source repo.) This is described in terms of subdirectories and not workspaces because supporting this without requiring a workspace definition would allow monorepos that npm does not manage to still be published with gitHead. This is most commonly the case when pnpm is used as it calls
npm publish
from its own workspace folders under the hood.Example
How
Current Behaviour
Currently gitHead is read only if there is a .git folder in the same directory as the package.json
Desired Behaviour
npm should scan up the directory tree looking for a .git folder the same way git itself does.
References
The text was updated successfully, but these errors were encountered: